diff --git a/.env.example b/.env.example index 407657b..2b00853 100644 --- a/.env.example +++ b/.env.example @@ -17,6 +17,10 @@ KB_POSTGRES_TEST_URL=postgres://solana:solana@localhost:5432/khadhroony_test # Optional configuration-file override. # KB_CONFIG_PATH=config/example.config.json +# Optional Devnet profile selected by CLI and opt-in scenario tests. +# When absent, the first compatible Devnet profile is selected. +# KB_DEVNET_PROFILE=local_devnet + # Optional Token-2022 Devnet validation fixtures. TOKEN_2022_PROGRAM=TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb TOKEN_2022_MINT= diff --git a/.gitignore b/.gitignore index 43848e2..4a31f79 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,9 @@ var/ config.json +# Runtime wallets and private keypairs +/wallets/ + # bindings TS-rs bindings/ diff --git a/KHADHROONY_BOT3_MIGRATION_CLOSURE_TODO.md b/KHADHROONY_BOT3_MIGRATION_CLOSURE_TODO.md index 2b1a3ea..ae45a7a 100644 --- a/KHADHROONY_BOT3_MIGRATION_CLOSURE_TODO.md +++ b/KHADHROONY_BOT3_MIGRATION_CLOSURE_TODO.md @@ -1,5 +1,5 @@ - + # Clôture de la migration `khadhroony-bot3` @@ -39,8 +39,43 @@ Ce fichier est temporaire. Il doit disparaître lorsque la migration est close, - [x] Les trois erreurs supplémentaires du replay ont été identifiées comme timeouts transitoires du pool PostgreSQL, distincts des échecs fonctionnels de décodage. - [x] Revalider les suites après les correctifs `pre.061-delta-fix-004` et `pre.061-delta-fix-005` : 116 tests desktop, 625 tests `kb-lib`, suites consolidées et replay propre. +# 0. `0.1.0-pre.062` — validation Devnet + +- [x] Séparer les DSN PostgreSQL Mainnet, Devnet et tests par variables d’environnement. +- [x] Résoudre les profils Devnet sans dépendre du nom historique `local_devnet`. +- [x] Autoriser une sélection explicite par l’interface ou `KB_DEVNET_PROFILE` pour les scénarios CLI/tests. +- [x] À l’ouverture des fenêtres Exécution Solana Core et Exécution SPL, connecter la base du profil sélectionné. +- [x] Créer les tables manquantes uniquement lorsque `auto_initialize_schema` l’autorise. +- [x] Refuser l’activation des commandes Devnet lorsque PostgreSQL est désactivé, non PostgreSQL ou incomplet. +- [x] Valider visuellement la préparation de la base Devnet dans les deux fenêtres : seul le profil `local_devnet` est proposé et les 13 tables PostgreSQL sont créées ou détectées. +- [ ] Exécuter les scénarios Devnet selon `docs/DEVNET_EXECUTION_GUIDE.md`. + - [x] Préparer le terminal Bash de contrôle et stocker les preuves sous `/tmp/devnet-validation/pre.062`. + - [x] Vérifier les CLI Solana/Agave et le genesis hash Devnet. + - [x] Financer le wallet persistant `local_devnet` via faucet Web. + - [x] Valider le transfert System de bout en bout : simulation, envoi, confirmation, balances, backfill, Core extraction et Decode replay sans erreur. + - [x] Valider SPL Memo v4 : simulation, confirmation finalisée, backfill, Core extraction, Decode replay, matérialisation et idempotence validés. + - [ ] Valider ATA et SPL Token classique. + - [ ] Valider ATA et scénarios Token-2022. + - [ ] Valider registre ElGamal selon les prérequis disponibles. + + # 1. Nettoyage structurel et nomenclature +## 1.0 Convention globale des identités persistées + +- [x] Arrêter la notation hiérarchique par points pour les identités runtime et les codes persistés. +- [x] Ajouter la documentation normative `docs/OPERATION_NAMING_CONVENTION.md`. +- [x] Ajouter la matrice machine-readable `test-fixtures/contract-matrices/OPERATION_NAMING_MATRIX.json`. +- [x] Migrer les constantes et attentes actives de Solana Core, SPL Memo, SPL Token, Token-2022, ATA, registre ElGamal et Metaplex vers la notation canonique. +- [x] Ajouter une règle courte renvoyant vers la documentation et la matrice. +- [ ] Purger ou recréer la base `solana_devnet`, puis rejouer les preuves System Transfer et Memo v4 avec les nouveaux codes. +- [ ] Ajouter un audit final empêchant la réintroduction des anciennes valeurs contractuelles. +- [x] Corriger la frontière entre codes de registre `lower_snake_case` et identités persistées en notation par points. +- [x] Corriger le test de matrice pour rester propre sous Clippy sans assertion constante fausse. +- [x] Corriger la référence IDL Metaplex vers le nom canonique local. +- [x] Documenter quelles surfaces actives disposent réellement d’une IDL officielle et lesquelles reposent sur des crates d’interface. + + ## 1.1 Règles - [x] Reprendre dans les règles Bot3 toutes les règles Bot2 encore applicables. @@ -72,7 +107,7 @@ Convention arrêtée : - symboles, modules, fichiers, fonctions et variables internes : `token_2022` / `TOKEN_2022` ; - types et variantes Rust en PascalCase : `Token2022` ; - valeurs JSON/TS explicitement concernées : `token_2022` avec attributs Serde et TS-RS ; -- codes persistés : `spl_token_2022` ; +- codes persistés : `spl.token_2022` et opérations sous `spl.token_2022.*` ; - noms officiels externes : conserver leur orthographe publiée ; - exceptions contractuelles Metaplex conservées : `token2022EmbeddedMetadata` et `token2022_embedded_metadata`. @@ -81,7 +116,7 @@ Convention arrêtée : - [x] Renommer les symboles et modules internes vers `token_2022` / `TOKEN_2022`. - [x] Conserver `Token2022` pour les types et variantes Rust. - [x] Aligner Serde et TS-RS sur `token_2022` lorsque cette valeur appartient au contrat applicatif. -- [x] Renommer les identités persistées et runtime vers `spl_token_2022` et `kb-lib.*.token_2022`. +- [x] Renommer les identités persistées et runtime vers `spl.token_2022` et `kb-lib.*.token_2022`. - [x] Purger les données dérivées puis reconstruire Core, Decode et Materialize depuis les 4 574 raws. - [x] Valider 55 instructions Token-2022 décodées, 0 échec fonctionnel. - [x] Vérifier les matrices actives ; corriger la dernière commande historique dans `SPL_TOKEN_2022_MATRIX.json`. @@ -387,3 +422,15 @@ L’ancien bloc `docs/IDL_SOURCES.md` n’est pas un prérequis autonome puisque - [ ] `USAGE.md` disponibles pour les surfaces publiques et binaires. - [ ] Workspace aligné sur `0.4.7`. - [ ] Cette checklist est supprimée. + +### 0.1.0-pre.062 — séparation du socle Devnet commun + +- [x] Garder `kb-app-demo-desktop/src/tauri.rs` comme couche mince de wrappers `#[tauri::command]`. +- [x] Déplacer `DemoExecutionDevnetStoreReadinessPayload`, `bounded_u32` et `prepare_devnet_profile_store` dans `kb-app-demo-desktop/src/demo_devnet_common.rs`. +- [x] Revalider `cargo fmt --all`, `cargo test -p kb-app-demo-desktop -p kb-pipeline-demo-scenarios`, `cargo check --workspace` et `cargo clippy --all-targets` : 117 tests desktop et 37 tests scénarios réussis. +- [x] Renommer l’en-tête du menu desktop `Exécution` en `Exécution Devnet`. +- [x] Déplacer l’idée de profils de logging indépendants vers `docs/IDEA_REMINDERS.md` sans ouvrir de développement dans `pre.062`. +- [x] Corriger l’audit d’ordre des exports pour le cas lexical Token-2022 sans imposer un réordonnancement contraire à rustfmt. +- [x] Aligner les tests `kb-store` sur `materializer.transaction.annotations`. +- [x] Réorganiser `docs/DEVNET_EXECUTION_GUIDE.md` autour de commandes communes référencées et de scénarios Devnet séparés. + diff --git a/RULES_SPECIFIC_KHADHROONY.md b/RULES_SPECIFIC_KHADHROONY.md index 3864fed..f4c8292 100644 --- a/RULES_SPECIFIC_KHADHROONY.md +++ b/RULES_SPECIFIC_KHADHROONY.md @@ -235,3 +235,11 @@ Les `program_id` connus doivent être définis une seule fois dans `kb-program-i - `kb-store` ne dépend pas de `kb-config`. La frontière applicative transforme une configuration résolue en options de store explicitement validées. - Les adaptateurs concrets implémentent les mêmes traits neutres et ne font pas fuiter leurs types de connexion dans les contrats. - Seul `kb-app-demo-desktop` est conservé comme binaire pendant la migration initiale. + +## Nomenclature des identités et opérations persistées + +- Les identités runtime, `processor_name`, `protocol_code`, `surface_code`, `operation_code` et `event_code` sont des contrats persistés et utilisent des segments hiérarchiques séparés par `.`. +- Chaque segment utilise `snake_case`; un underscore ne remplace jamais un niveau hiérarchique. Exemples : `solana.core.system.transfer`, `spl.memo.v4.add_memo`, `spl.token_2022.transfer_checked`. +- Les anciennes formes préfixées par `solana_core`, `solana_native`, `spl_memo`, `spl_token`, `spl_token_2022`, `spl_associated_token_account` ou `metadata_metaplex_token_metadata` sont interdites pour ces valeurs contractuelles. +- Toute nouvelle surface ou opération doit respecter `docs/OPERATION_NAMING_CONVENTION.md` et être ajoutée à `test-fixtures/contract-matrices/OPERATION_NAMING_MATRIX.json` avant son premier remplissage persistant. +- Un renommage de ces valeurs après remplissage d’une base est une migration de données et exige une migration SQL ou une reconstruction explicite des tables dérivées. diff --git a/docs/DEVNET_EXECUTION_GUIDE.md b/docs/DEVNET_EXECUTION_GUIDE.md index af74b00..452d394 100644 --- a/docs/DEVNET_EXECUTION_GUIDE.md +++ b/docs/DEVNET_EXECUTION_GUIDE.md @@ -1,110 +1,791 @@ - + # Guide d’exécution Devnet -## 1. Objet +## 1. Objet et ordre de validation -Ce guide est créé avant la campagne Devnet puis corrigé pendant les essais réels. Il décrit uniquement les scénarios exposés par `kb-app-demo-desktop` et `kb-pipeline-demo-scenarios`. +Ce guide décrit la campagne Devnet de `kb-app-demo-desktop` et `kb-pipeline-demo-scenarios`. Après une modification de nomenclature persistée ou une recréation de la base Devnet, reprendre les scénarios depuis le début dans l’ordre suivant : -## 2. Préparation du profil +1. préparation commune et base PostgreSQL propre ; +2. Solana Core — System Transfer ; +3. SPL Memo v4 ; +4. SPL Associated Token Account — mint Token classique ; +5. SPL Associated Token Account — mint Token-2022 ; +6. SPL Token classique ; +7. Token-2022 ; +8. registre ElGamal. -1. Copier `.env.example` vers `.env` et renseigner au minimum `KB_POSTGRES_DEVNET_URL`. -2. Vérifier que `KB_POSTGRES_DEVNET_URL`, `KB_POSTGRES_MAINNET_URL` et `KB_POSTGRES_TEST_URL` désignent trois bases distinctes. -3. Sélectionner le profil `local_devnet` ou le profil Devnet explicitement autorisé dans `example.config.json`. -4. Vérifier que l’envoi mainnet reste désactivé. -5. Vérifier les plafonds de frais, de dépense et les politiques `simulation-first`. -6. Démarrer l’application avec la configuration de développement attendue. -7. Contrôler dans la fenêtre Configuration que `local_devnet` utilise bien la base Devnet et non la base Mainnet. +Les commandes réutilisables sont centralisées en section 4. Chaque scénario référence leur identifiant `Cxx` au lieu de les recopier. -## 3. Wallet de démonstration +## 2. Préconditions -Créer un wallet dédié avec les outils Solana installés localement, conserver le fichier hors du dépôt et vérifier ses permissions privées. Relever la pubkey sans copier la clé privée dans l’interface ou les logs. +- `.env` contient `KB_POSTGRES_DEVNET_URL` et les secrets de transport requis ; +- `KB_POSTGRES_DEVNET_URL`, `KB_POSTGRES_MAINNET_URL` et `KB_POSTGRES_TEST_URL` désignent des bases distinctes ; +- le profil sélectionné est Devnet et autorise explicitement l’envoi Devnet ; +- l’envoi Mainnet reste désactivé ; +- les plafonds de frais, de dépense et de rent sont contrôlés ; +- la politique reste `simulation-first` ; +- le wallet temporaire persistant n’est jamais copié dans les logs ou les preuves ; +- le financement est réalisé par un faucet Web Devnet, pas par `solana airdrop`. -Champs à consigner pendant les tests : +Lorsque `database.postgres.auto_initialize_schema` vaut `true`, l’ouverture d’une fenêtre Devnet crée les tables manquantes. Lorsqu’il vaut `false`, le schéma doit être préparé avant l’ouverture. -- alias du wallet ; -- pubkey ; -- cluster ; -- solde initial ; -- source de financement Devnet ; -- date du test. +## 3. Organisation des terminaux -## 4. Financement Devnet +La campagne utilise deux terminaux distincts. Les variables d’environnement exportées dans un terminal ne sont pas visibles dans l’autre. -Le financement doit être réalisé avec un faucet Web Devnet. La commande `solana airdrop` n’est pas considérée comme une procédure valide dans l’environnement de validation. Fournir uniquement la pubkey au faucet, ne jamais transmettre le fichier du wallet ni sa clé privée, puis vérifier le solde via la fenêtre HTTP ou une lecture RPC non mutable. +### Terminal A — application Tauri -## 5. Ordre des tests existants +Ce terminal reste occupé par `cargo tauri dev` pendant toute la campagne. Il affiche les logs Rust, Tauri, Vite, PostgreSQL et RPC. -### 5.1 Solana Core +### Terminal B — contrôles CLI et preuves -- génération d’un destinataire ; -- transfert System en simulation ; -- envoi après confirmation opérateur ; -- confirmation réseau ; -- extraction Core ciblée ; -- Decode replay ciblé ; -- vérification des projections. +Ce terminal reste disponible pour les commandes Solana, PostgreSQL, balances, confirmations et captures avec `tee`. -### 5.2 SPL Memo v4 +Les commandes `C01` à `C05` doivent être exécutées dans le terminal B. Le terminal A doit exécuter `T01`, puis rester ouvert. Avant chaque scénario, le terminal B doit définir `KB_DEVNET_SCENARIO` avant d’appeler `C06`. -- saisir un texte borné ; -- vérifier le plan et les signers ; -- simuler ; -- envoyer ; -- confirmer ; -- vérifier l’annotation de transaction et l’idempotence du replay. +## 4. Commandes communes -### 5.3 SPL Token classique +Les commandes suivantes sont exécutées depuis la racine du workspace dans un terminal interactif. Ne pas utiliser `set -e` ou `set -u` dans ce terminal : une commande de contrôle non satisfaite fermerait la session. `set -o pipefail` est suffisant pour fiabiliser les pipelines vers `tee`. -- préparer mint et comptes contrôlés ; -- exécuter les scénarios non destructifs avant le lifecycle complet ; -- documenter chaque signature et chaque solde brut avant/après ; -- vérifier replay et matérialisation. +### T01 — Démarrer l’application dans le terminal A -### 5.4 ATA +Premier lancement du workspace ou après modification des dépendances frontend : -- dériver l’ATA classique et Token-2022 ; -- simuler la création idempotente ; -- envoyer uniquement après contrôle du payer et du plafond de rent ; -- vérifier la projection lifecycle. +```bash +cd ~/Projects/khadhroony-bot3; command -v cargo; command -v npm; command -v cargo-tauri || cargo install tauri-cli --locked; test -d kb-app-demo-desktop/node_modules || npm --prefix kb-app-demo-desktop i; cargo tauri dev -c kb-app-demo-desktop/tauri.conf.json +``` -### 5.5 Token-2022 et registre ElGamal +La commande `npm --prefix kb-app-demo-desktop i -D ...` installe ou réaligne explicitement les dépendances de développement déclarées par l’application. `npm --prefix kb-app-demo-desktop i` reste nécessaire pour les dépendances runtime. -- utiliser uniquement les scénarios explicitement disponibles dans l’interface ; -- conserver les preuves de préflight, comptes, extensions et signers ; -- distinguer registre ElGamal et programme Token-2022 ; -- vérifier les projections admin, token, fee, metadata et risk attendues. +Installation ou réalignement conditionnel des dépendances de développement, uniquement après modification de `package.json`, suppression de `node_modules` ou erreur de dépendance frontend : -## 6. Future fenêtre Metadata +```bash +npm --prefix kb-app-demo-desktop i -D @tauri-apps/cli @types/bootstrap @types/markdown-it @types/node sass-embedded typescript vite +``` -La fenêtre `demo_execution_metadata` sera ajoutée avec le pipeline metadata général. L’ordre prévu est : +`npm run dev` est lancé automatiquement par Tauri via `beforeDevCommand`; il exécute le script `dev` du `package.json`, actuellement Vite. Il ne faut pas le lancer dans un troisième terminal. -1. SPL Token Metadata incorporé à Token-2022 ; -2. programme Metaplex Token Metadata ; -3. éventuel enrichissement off-chain via `kb-offchain-transport`, sans couplage au replay canonique. +La validation frontend de cette campagne est effectuée par `cargo tauri dev -c kb-app-demo-desktop/tauri.conf.json`, qui lance Vite. Ne pas ajouter `npm --prefix kb-app-demo-desktop run build` à la procédure. -## 7. Preuves à conserver par scénario +Lancements suivants, lorsque `cargo-tauri` et `node_modules` sont déjà présents : -- profil et cluster ; +```bash +cd ~/Projects/khadhroony-bot3; cargo tauri dev -c kb-app-demo-desktop/tauri.conf.json +``` + +Attendre avant tout scénario : + +- le démarrage de Vite ; +- le lancement du binaire `kb-app-demo-desktop` ; +- l’ouverture de la fenêtre ; +- le message PostgreSQL indiquant que les 13 tables sont prêtes ; +- la résolution correcte du profil `local_devnet`. + +Ne pas exécuter les commandes `C06` ou `C07` dans ce terminal. + +### T02 — Arrêter et redémarrer Tauri conditionnellement + +Redémarrer Tauri après : + +- recréation du schéma PostgreSQL si l’application était déjà ouverte ; +- modification de `.env`, de la configuration ou du profil actif ; +- recompilation liée à une correction de code ; +- perte de connexion entre Vite et la fenêtre. + +Arrêter avec `Ctrl+C`, puis relancer `T01`. + +### C01 — Initialiser l’environnement de validation + +```bash +cd ~/Projects/khadhroony-bot3 && set -o pipefail && export KB_DEVNET_PROFILE="local_devnet" && export KB_DEVNET_RPC_URL="https://api.devnet.solana.com" && export KB_DEVNET_VALIDATION_DIR="/tmp/devnet-validation/pre.062-clean" && export KB_DEVNET_WALLET="$PWD/wallets/temporary/local_devnet/local-devnet-operator.json" && mkdir -p "$KB_DEVNET_VALIDATION_DIR" && printf 'Profil : %s\n' "$KB_DEVNET_PROFILE" && printf 'RPC Devnet : %s\n' "$KB_DEVNET_RPC_URL" && printf 'Preuves : %s\n' "$KB_DEVNET_VALIDATION_DIR" && printf 'Wallet : %s\n' "$KB_DEVNET_WALLET"; +``` + +### C02 — Capturer les versions CLI + +```bash +command -v solana && command -v solana-keygen && command -v spl-token && { date --iso-8601=seconds; solana --version; solana-keygen --version; spl-token --version; } | tee "$KB_DEVNET_VALIDATION_DIR/00-cli-versions.txt"; +``` + +La première campagne `pre.062` utilisait `solana-cli 4.0.2`, `solana-keygen 4.0.2` et `spl-token-cli 5.5.0`. Une nouvelle campagne doit capturer ses propres versions. + +### C03 — Vérifier l’identité du réseau + +```bash +solana config set --url "$KB_DEVNET_RPC_URL" && { date --iso-8601=seconds; solana config get; solana cluster-version --url "$KB_DEVNET_RPC_URL"; solana genesis-hash --url "$KB_DEVNET_RPC_URL"; solana epoch-info --url "$KB_DEVNET_RPC_URL"; } | tee "$KB_DEVNET_VALIDATION_DIR/01-devnet-network.txt"; +``` + +Le genesis hash Devnet attendu est : + +```text +EtWTRABZaYq6iMfeYKouRu166VU2xqa1wcaWoxPkrZBG +``` + +### C04 — Vérifier le wallet opérateur + +```bash +test -f "$KB_DEVNET_WALLET" && chmod 600 "$KB_DEVNET_WALLET" && export KB_DEVNET_WALLET_PUBKEY="$(solana-keygen pubkey "$KB_DEVNET_WALLET")" && { date --iso-8601=seconds; printf 'wallet_path=%s\n' "$KB_DEVNET_WALLET"; printf 'wallet_pubkey=%s\n' "$KB_DEVNET_WALLET_PUBKEY"; solana balance "$KB_DEVNET_WALLET_PUBKEY" --url "$KB_DEVNET_RPC_URL" --commitment confirmed; } | tee "$KB_DEVNET_VALIDATION_DIR/02-wallet.txt" +``` + +### C05 — Recréer la base Devnet + +Cette commande est destructive. Elle ne doit viser que `KB_POSTGRES_DEVNET_URL`. Elle supprime toutes les données et tous les objets du schéma `public`, puis laisse l’application recréer son schéma lors de l’ouverture d’une fenêtre Devnet. + +```bash +test -n "$KB_POSTGRES_DEVNET_URL" && printf '%s\n' "$KB_POSTGRES_DEVNET_URL" && export KB_CONFIRM_DEVNET_DATABASE_RESET="YES_RESET_SOLANA_DEVNET" && test "$KB_CONFIRM_DEVNET_DATABASE_RESET" = "YES_RESET_SOLANA_DEVNET" && psql "$KB_POSTGRES_DEVNET_URL" -v ON_ERROR_STOP=1 -c 'DROP SCHEMA public CASCADE; CREATE SCHEMA public;' +``` + +Après ouverture d’une fenêtre Devnet, contrôler les tables : + +```bash +psql "$KB_POSTGRES_DEVNET_URL" -v ON_ERROR_STOP=1 -c "SELECT schemaname, tablename FROM pg_tables WHERE schemaname = 'public' ORDER BY tablename;" | tee "$KB_DEVNET_VALIDATION_DIR/03-devnet-schema.txt" +``` + +### C06 — Capturer le solde avant scénario + +Définir `KB_DEVNET_SCENARIO` avant l’appel. + +```bash +test -n "${KB_DEVNET_SCENARIO:-}" && test -n "${KB_DEVNET_WALLET_PUBKEY:-}" && test -n "${KB_DEVNET_RPC_URL:-}" && test -n "${KB_DEVNET_VALIDATION_DIR:-}" && { date --iso-8601=seconds; printf 'scenario=%s\nwallet=%s\n' "$KB_DEVNET_SCENARIO" "$KB_DEVNET_WALLET_PUBKEY"; solana balance "$KB_DEVNET_WALLET_PUBKEY" --url "$KB_DEVNET_RPC_URL" --commitment confirmed; } | tee "$KB_DEVNET_VALIDATION_DIR/${KB_DEVNET_SCENARIO}-wallet-before.txt" +``` + +### C07 — Confirmer une signature et capturer le solde après scénario + +Définir `KB_DEVNET_SCENARIO` et `KB_DEVNET_SIGNATURE` avant l’appel. + +```bash +test -n "${KB_DEVNET_SCENARIO:-}" && test -n "${KB_DEVNET_SIGNATURE:-}" && test -n "${KB_DEVNET_WALLET_PUBKEY:-}" && test -n "${KB_DEVNET_RPC_URL:-}" && test -n "${KB_DEVNET_VALIDATION_DIR:-}" && { date --iso-8601=seconds; printf 'scenario=%s\nsignature=%s\n' "$KB_DEVNET_SCENARIO" "$KB_DEVNET_SIGNATURE"; solana confirm "$KB_DEVNET_SIGNATURE" --url "$KB_DEVNET_RPC_URL" --commitment finalized --verbose; solana balance "$KB_DEVNET_WALLET_PUBKEY" --url "$KB_DEVNET_RPC_URL" --commitment confirmed; } | tee "$KB_DEVNET_VALIDATION_DIR/${KB_DEVNET_SCENARIO}-confirmation.txt" +``` + +### C08 — Préparer un mint SPL Token classique pour ATA + +Cette commande crée uniquement un mint de test persistant. Elle ne crée aucun compte token associé : l’ATA doit être dérivé, simulé et créé par `kb-app-demo-desktop`. + +L’option `--silent` est obligatoire afin que la phrase de récupération ne soit pas affichée dans le terminal, les captures ou l’historique de validation. + +La commande est idempotente au niveau du guide : si le compte du mint existe déjà sur Devnet, elle le réutilise. + +```bash +export KB_SPL_TOKEN_PROGRAM_ID="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" && export KB_DEVNET_CLASSIC_MINT_KEYPAIR="$PWD/wallets/temporary/local_devnet/mints/ata-classic-mint.json" && mkdir -p "$(dirname "$KB_DEVNET_CLASSIC_MINT_KEYPAIR")" && { test -f "$KB_DEVNET_CLASSIC_MINT_KEYPAIR" || solana-keygen new --no-bip39-passphrase --force --silent --outfile "$KB_DEVNET_CLASSIC_MINT_KEYPAIR"; } +``` + +```bash +export KB_DEVNET_CLASSIC_MINT="$(solana-keygen pubkey "$KB_DEVNET_CLASSIC_MINT_KEYPAIR")" && { solana account "$KB_DEVNET_CLASSIC_MINT" --url "$KB_DEVNET_RPC_URL" --output json >/dev/null 2>&1 || spl-token --url "$KB_DEVNET_RPC_URL" --program-id "$KB_SPL_TOKEN_PROGRAM_ID" create-token "$KB_DEVNET_CLASSIC_MINT_KEYPAIR" --decimals 9; } && printf 'classic_mint=%s\n' "$KB_DEVNET_CLASSIC_MINT" | tee "$KB_DEVNET_VALIDATION_DIR/30a-spl-ata-classic-mint.txt" +``` + +### C09 — Préparer un mint Token-2022 pour ATA + +Cette commande crée uniquement un mint Token-2022 de test persistant, sans extension supplémentaire. Elle ne crée aucun ATA. + +```bash +export KB_SPL_TOKEN_2022_PROGRAM_ID="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" && export KB_DEVNET_TOKEN_2022_MINT_KEYPAIR="$PWD/wallets/temporary/local_devnet/mints/ata-token-2022-mint.json" && mkdir -p "$(dirname "$KB_DEVNET_TOKEN_2022_MINT_KEYPAIR")" && { test -f "$KB_DEVNET_TOKEN_2022_MINT_KEYPAIR" || solana-keygen new --no-bip39-passphrase --force --silent --outfile "$KB_DEVNET_TOKEN_2022_MINT_KEYPAIR"; } +``` + +```bash +export KB_DEVNET_TOKEN_2022_MINT="$(solana-keygen pubkey "$KB_DEVNET_TOKEN_2022_MINT_KEYPAIR")" && { solana account "$KB_DEVNET_TOKEN_2022_MINT" --url "$KB_DEVNET_RPC_URL" --output json >/dev/null 2>&1 || spl-token --url "$KB_DEVNET_RPC_URL" --program-id "$KB_SPL_TOKEN_2022_PROGRAM_ID" create-token "$KB_DEVNET_TOKEN_2022_MINT_KEYPAIR" --decimals 9; } && printf 'token_2022_mint=%s\n' "$KB_DEVNET_TOKEN_2022_MINT" | tee "$KB_DEVNET_VALIDATION_DIR/30b-spl-ata-token-2022-mint.txt" +``` + +### C10 — Préparer les comptes du scénario SPL Token classique + +La fenêtre actuelle **Décodeur spl_token — TransferChecked** valide uniquement `TransferChecked`. Elle exige : + +- un mint SPL Token classique ; +- un compte source appartenant au wallet opérateur et possédant un solde token suffisant ; +- un compte destination distinct pour le même mint ; +- l’autorité simple du compte source, qui doit être le wallet opérateur. + +Cette préparation réutilise le mint créé par `C08` et l’ATA classique créée pendant `S03A`. + +1. Dériver l’ATA source avec la syntaxe exigée par `spl-token-cli 5.5.0` : + +```bash +export KB_DEVNET_CLASSIC_SOURCE_ATA="$(spl-token --url "$KB_DEVNET_RPC_URL" --program-id "$KB_SPL_TOKEN_PROGRAM_ID" address --verbose --token "$KB_DEVNET_CLASSIC_MINT" --owner "$KB_DEVNET_WALLET_PUBKEY" | awk -F': ' '/Associated token address/ {print $2}')" && test -n "$KB_DEVNET_CLASSIC_SOURCE_ATA" && printf 'source_ata=%s\n' "$KB_DEVNET_CLASSIC_SOURCE_ATA" +``` + +2. Préparer un owner destinataire persistant : + +```bash +export KB_DEVNET_CLASSIC_RECIPIENT_KEYPAIR="$PWD/wallets/temporary/local_devnet/recipients/spl-token-transfer-recipient.json" && mkdir -p "$(dirname "$KB_DEVNET_CLASSIC_RECIPIENT_KEYPAIR")" && { test -f "$KB_DEVNET_CLASSIC_RECIPIENT_KEYPAIR" || solana-keygen new --no-bip39-passphrase --force --silent --outfile "$KB_DEVNET_CLASSIC_RECIPIENT_KEYPAIR"; } && export KB_DEVNET_CLASSIC_RECIPIENT="$(solana-keygen pubkey "$KB_DEVNET_CLASSIC_RECIPIENT_KEYPAIR")" +``` + +3. Dériver puis créer l’ATA destination si elle n’existe pas : + +```bash +export KB_DEVNET_CLASSIC_DESTINATION_ATA="$(spl-token --url "$KB_DEVNET_RPC_URL" --program-id "$KB_SPL_TOKEN_PROGRAM_ID" address --verbose --token "$KB_DEVNET_CLASSIC_MINT" --owner "$KB_DEVNET_CLASSIC_RECIPIENT" | awk -F': ' '/Associated token address/ {print $2}')" && test -n "$KB_DEVNET_CLASSIC_DESTINATION_ATA" && { solana account "$KB_DEVNET_CLASSIC_DESTINATION_ATA" --url "$KB_DEVNET_RPC_URL" --output json >/dev/null 2>&1 || spl-token --url "$KB_DEVNET_RPC_URL" --program-id "$KB_SPL_TOKEN_PROGRAM_ID" create-account "$KB_DEVNET_CLASSIC_MINT" --owner "$KB_DEVNET_CLASSIC_RECIPIENT" --fee-payer "$KB_DEVNET_WALLET"; } +``` + +4. Créditer le compte source. Cette commande ajoute `10` tokens à chaque exécution ; ne la relancer que si le solde source est insuffisant : + +```bash +spl-token --url "$KB_DEVNET_RPC_URL" --program-id "$KB_SPL_TOKEN_PROGRAM_ID" mint "$KB_DEVNET_CLASSIC_MINT" 10 "$KB_DEVNET_CLASSIC_SOURCE_ATA" --owner "$KB_DEVNET_WALLET" --fee-payer "$KB_DEVNET_WALLET" +``` + +5. Afficher les comptes par leur adresse. Avec cette version du CLI, utiliser `display` plutôt que `account-info `, car l’argument positionnel de `account-info` est interprété comme un mint : + +```bash +spl-token --url "$KB_DEVNET_RPC_URL" --program-id "$KB_SPL_TOKEN_PROGRAM_ID" display "$KB_DEVNET_CLASSIC_SOURCE_ATA" && spl-token --url "$KB_DEVNET_RPC_URL" --program-id "$KB_SPL_TOKEN_PROGRAM_ID" display "$KB_DEVNET_CLASSIC_DESTINATION_ATA" +``` + +6. Capturer la fixture : + +```bash +{ printf 'mint=%s\n' "$KB_DEVNET_CLASSIC_MINT"; printf 'source=%s\n' "$KB_DEVNET_CLASSIC_SOURCE_ATA"; printf 'destination=%s\n' "$KB_DEVNET_CLASSIC_DESTINATION_ATA"; printf 'authority=%s\n' "$KB_DEVNET_WALLET_PUBKEY"; printf 'amount_raw=1000000000\n'; printf 'decimals=9\n'; } | tee "$KB_DEVNET_VALIDATION_DIR/40-spl-token-fixture.txt" +``` + +La création du compte destination par CLI est acceptable ici : `S03A` et `S03B` ont déjà validé l’executor ATA. `S04` doit isoler et valider l’executor SPL Token `TransferChecked`. + +### C11 — Créer ou réutiliser la fixture Token-2022 + +Le workspace fournit une commande idempotente qui prépare les comptes publics requis par les huit scénarios Token-2022 : + +```bash +cargo run -p kb-pipeline-demo-scenarios --bin kb-pipeline-demo-scenarios-cli -- prepare-token-2022-fixture --rpc-url "$KB_DEVNET_RPC_URL" --wallet "$KB_DEVNET_WALLET" --wallet-dir "$PWD/wallets/temporary/local_devnet" --decimals 9 | tee "$KB_DEVNET_VALIDATION_DIR/50-spl-token-2022-fixture-preparation.json" +``` + +Lorsque `--rpc-url` et `--wallet` sont omis, la commande utilise respectivement `KB_DEVNET_RPC_URL` et `KB_DEVNET_WALLET`. Lorsque `--wallet-dir` est omis, elle utilise le répertoire parent du wallet. + +La commande : + +- crée silencieusement les keypairs manquants avec des permissions `0600` ; +- crée ou réutilise un mint Token-2022 avec mint authority et freeze authority égales au wallet opérateur ; +- crée ou réutilise trois comptes Token-2022 distincts : source, destination et compte vide réservé à `CloseAccount` ; +- crée ou réutilise une pubkey delegate indépendante ; +- n'affiche jamais les phrases de récupération ni les octets privés ; +- écrit atomiquement la fixture publique attendue par l'application. + +Les keypairs et la fixture sont conservés sous : + +```text +wallets/temporary/local_devnet/spl_token_2022_validation/ +``` + +La fixture publique est : + +```text +wallets/temporary/local_devnet/spl_token_2022_validation/fixture.env +``` + +Elle définit : + +```text +TOKEN_2022_PROGRAM +TOKEN_2022_MINT +TOKEN_2022_SOURCE +TOKEN_2022_DESTINATION +TOKEN_2022_CLOSE_ACCOUNT +TOKEN_2022_DELEGATE +TOKEN_2022_AUTHORITY +TOKEN_2022_FREEZE_AUTHORITY +TOKEN_2022_DECIMALS +TOKEN_2022_MINT_AMOUNT_RAW +TOKEN_2022_TRANSFER_AMOUNT_RAW +TOKEN_2022_APPROVE_AMOUNT_RAW +TOKEN_2022_BURN_AMOUNT_RAW +KB_DEVNET_WALLET_ADDRESS +``` + +Vérifier puis charger uniquement les valeurs publiques dans le terminal B : + +```bash +export KB_DEVNET_TOKEN_2022_FIXTURE="$PWD/wallets/temporary/local_devnet/spl_token_2022_validation/fixture.env" && test -f "$KB_DEVNET_TOKEN_2022_FIXTURE" && sed -n '/^export [A-Z0-9_]*=/p' "$KB_DEVNET_TOKEN_2022_FIXTURE" | sed 's/=.*$/=/' | tee "$KB_DEVNET_VALIDATION_DIR/50-spl-token-2022-fixture-keys.txt" && source "$KB_DEVNET_TOKEN_2022_FIXTURE" +``` + +Afficher le mint et les trois comptes Token-2022 avec le Program ID explicite : + +```bash +spl-token --url "$KB_DEVNET_RPC_URL" --program-id "$TOKEN_2022_PROGRAM" display "$TOKEN_2022_MINT" && spl-token --url "$KB_DEVNET_RPC_URL" --program-id "$TOKEN_2022_PROGRAM" display "$TOKEN_2022_SOURCE" && spl-token --url "$KB_DEVNET_RPC_URL" --program-id "$TOKEN_2022_PROGRAM" display "$TOKEN_2022_DESTINATION" && spl-token --url "$KB_DEVNET_RPC_URL" --program-id "$TOKEN_2022_PROGRAM" display "$TOKEN_2022_CLOSE_ACCOUNT" +``` + +Le compte `TOKEN_2022_CLOSE_ACCOUNT` doit rester vide jusqu'au scénario `CloseAccount`. Ne pas utiliser `account-info ` dans cette campagne : avec `spl-token-cli 5.5.0`, cette forme peut interpréter l'adresse comme un mint. + +### C12 — Preuves applicatives communes + + + +Pour chaque scénario, conserver depuis l’application : + +- profil et cluster résolus ; - paramètres saisis ; -- plan exact ; -- signers requis ; -- estimation des frais ; -- résultat de simulation ; +- `operation_code`, `program_id` et plan préparé ; +- signers requis et fee payer ; +- plafond de frais et plafond de dépense ; +- résultat et logs de simulation ; - signature d’envoi ; -- confirmation ; -- résumé d’extraction/replay ; +- résultat de confirmation ; +- insertion canonique ; +- extraction Core ; +- Decode replay ciblé ; - projections matérialisées ; -- diagnostics et écarts observés. +- second replay démontrant l’idempotence ; +- diagnostics ou écarts observés. -## 8. Critères de validation +Un scénario n’est validé que si le replay ne produit ni échec fonctionnel ni erreur de traitement et si les projections attendues sont présentes et idempotentes. -Un scénario n’est validé que si : +## 5. Préparation initiale de la campagne -- la simulation réussit ; -- l’envoi est explicitement confirmé ; -- la confirmation réseau correspond à la signature ; -- le replay post-exécution ne produit ni échec fonctionnel ni erreur de traitement ; -- les projections attendues sont présentes et idempotentes ; -- le guide est corrigé lorsque le comportement réel diffère des étapes écrites. +1. Dans le terminal B, exécuter `C01`, `C02`, `C03` et `C04`. +2. Dans le terminal B, exécuter `C05` pour repartir d’une base propre. +3. Dans le terminal A, exécuter `T01`. +4. Attendre la création des 13 tables et la disponibilité de la fenêtre. +5. Dans la fenêtre Configuration, vérifier que `local_devnet` utilise la base Devnet. +6. Dans le terminal B, exécuter le contrôle de tables de `C05`. +7. Financer la pubkey par un faucet Web Devnet si le solde est insuffisant. +8. Réexécuter `C04` dans le terminal B après financement. +9. Avant chaque scénario, définir `KB_DEVNET_SCENARIO` dans le terminal B, puis exécuter `C06`. + +## 6. Scénario S01 — Solana Core System Transfer + +### Objectif + +Valider la chaîne complète : préparation, simulation, envoi, confirmation, stockage canonique, extraction Core et replay. + +### Procédure + +1. Définir puis exécuter `C06` : + +```bash +export KB_DEVNET_SCENARIO="10-system-transfer" +``` + +2. Dans la fenêtre **Exécution Devnet — Solana Core** : + - générer un nouveau destinataire ; + - conserver sa pubkey ; + - saisir un montant borné ; + - vérifier `solana.core.system.transfer` ; + - simuler ; + - contrôler frais, spend et signer ; + - confirmer explicitement l’envoi. +3. Définir la signature et exécuter `C07`. +4. Capturer séparément le solde du destinataire : + +```bash +export KB_DEVNET_RECIPIENT="COLLER_LE_DESTINATAIRE" + +solana balance \ + "$KB_DEVNET_RECIPIENT" \ + --url "$KB_DEVNET_RPC_URL" \ + --commitment confirmed \ + | tee "$KB_DEVNET_VALIDATION_DIR/${KB_DEVNET_SCENARIO}-recipient-after.txt" +``` + +5. Exécuter les contrôles applicatifs `C08` sur la signature. + +### Contrat d’erreur de l’interface + +Pour un nouveau destinataire inexistant, le montant doit être au moins égal au minimum de rent exemption indiqué par l’application. Avec la valeur observée de `890880` lamports, une demande de `10000` lamports doit être refusée avant simulation. + +Ce refus est attendu fonctionnellement, mais l’interface doit afficher l’erreur dans les panneaux de résultat : + +- `Résumé` doit passer de `idle` à `error` ; +- `Plan exact` doit afficher l’échec de préparation ou rester explicitement indisponible avec sa cause ; +- `Simulation exacte` doit indiquer qu’aucune simulation n’a été lancée à cause du préflight ; +- `Confirmation et replay` doit rester non exécuté, avec une raison explicite. + +Un message uniquement présent dans le journal est insuffisant. Tant que les panneaux restent à `idle`, ne pas considérer le scénario comme validé et ne pas utiliser « Signer et envoyer ». + +### Résultat historique de référence + +La première campagne a validé la signature `3k8BaQJKwSn8r2pYdvfp1Q3VYrPEcDEuUunMFn7NDq1ZqsvryjoGsxeBBNJjc1123RgDCoykp7w9VrtZgsDw4ph3`, au slot `479589279`, avec `890880` lamports transférés, `5000` lamports de frais et `150` compute units. Cette preuve réseau reste historique ; les lignes PostgreSQL doivent être recréées dans la nouvelle base. + +## 7. Scénario S02 — SPL Memo v4 + +### Objectif + +Valider l’opération exécutable `spl.memo.add_memo`, l’événement observé `spl.memo.v4.add_memo` et la projection d’annotation. + +### Procédure + +1. Définir puis exécuter `C06` : + +```bash +export KB_DEVNET_SCENARIO="20-spl-memo-v4" +``` + +2. Dans la fenêtre **Exécution Devnet — SPL** : + - sélectionner Memo v4 ; + - saisir un texte UTF-8 borné ; + - vérifier le Program ID `Memo4c2pN8afCj432Lb7RMVKi9PbQnnW7ewFFaV3oAH` ; + - vérifier le wallet signer ; + - simuler puis confirmer l’envoi. +3. Définir `KB_DEVNET_SIGNATURE` et exécuter `C07`. +4. Exécuter `C08` et vérifier précisément : + - `processor_name = materializer.transaction.annotations` ; + - `surface_code = spl.memo.v4` ; + - `event_code = spl.memo.v4.add_memo` ; + - une seule annotation matérialisée ; + - second replay ignoré/idempotent. + +### Résultat historique de référence + +La première campagne a validé la signature `3uYNASrHibwpnsFWwV2JHAxtnci96RhFYf6zbUSfGMbQQV37gfHizstk7atiHYYQCBm4jhmC6cT3G3CCPCV38Lpx`, au slot `479596483`, avec `5000` lamports de frais et `513` compute units. Après recréation de la base, cette signature peut être réingérée pour tester le replay, mais la campagne propre doit également produire une nouvelle preuve complète. + +## 8. Scénario S03 — SPL Associated Token Account + +Le scénario ATA est divisé en deux validations indépendantes. Une ATA dépend du triplet exact : + +```text +owner + token_program + mint +``` + +Un même owner et deux mints appartenant à des Token Programs différents doivent donc produire deux dérivations et deux comptes distincts. + +### S03A — ATA avec SPL Token classique + +#### Objectif + +Valider la dérivation et la création idempotente d’une ATA dont le mint appartient au programme SPL Token classique. + +#### Préparation dans le terminal B + +1. Exécuter `C08`. +2. Définir le scénario et capturer le solde : + +```bash +export KB_DEVNET_SCENARIO="30a-spl-ata-classic" +``` + +3. Exécuter `C06`. +4. Copier la valeur affichée par : + +```bash +printf '%s\n' "$KB_DEVNET_CLASSIC_MINT" +``` + +#### Procédure dans l’application + +1. Ouvrir la fenêtre **SPL Associated Token Account**. +2. Utiliser : + - owner : wallet opérateur `KB_DEVNET_WALLET_PUBKEY` ; + - mint : `KB_DEVNET_CLASSIC_MINT` ; + - token program : SPL Token classique ; + - payer : wallet opérateur. +3. Dériver l’ATA et conserver son adresse. +4. Vérifier que le Program ID sélectionné est `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA`. +5. Simuler `spl.associated_token_account.create_idempotent`. +6. Contrôler le rent ceiling, le payer, l’owner, le mint, le token program et l’adresse ATA dérivée. +7. Confirmer explicitement l’envoi. +8. Définir `KB_DEVNET_SIGNATURE`, puis exécuter `C07`. +9. Exécuter `C12`. +10. Réexécuter la création idempotente et vérifier qu’elle ne produit ni fausse création ni duplication des projections. + +### S03B — ATA avec Token-2022 + +#### Objectif + +Valider la dérivation et la création idempotente d’une ATA dont le mint appartient au programme Token-2022, puis démontrer qu’elle est distincte de l’ATA classique. + +#### Préparation dans le terminal B + +1. Exécuter `C09`. +2. Définir le scénario et capturer le solde : + +```bash +export KB_DEVNET_SCENARIO="30b-spl-ata-token-2022" +``` + +3. Exécuter `C06`. +4. Copier la valeur affichée par : + +```bash +printf '%s\n' "$KB_DEVNET_TOKEN_2022_MINT" +``` + +#### Procédure dans l’application + +1. Utiliser : + - owner : le même wallet opérateur ; + - mint : `KB_DEVNET_TOKEN_2022_MINT` ; + - token program : Token-2022 ; + - payer : wallet opérateur. +2. Dériver l’ATA et conserver son adresse. +3. Vérifier que le Program ID sélectionné est `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb`. +4. Vérifier que l’adresse dérivée diffère de l’ATA classique de S03A. +5. Simuler puis envoyer `spl.associated_token_account.create_idempotent`. +6. Définir `KB_DEVNET_SIGNATURE`, puis exécuter `C07`. +7. Exécuter `C12`. +8. Rejouer la création idempotente. +9. Vérifier séparément les faits parent ATA et les éventuels enfants CPI Token-2022, sans duplication. + +### Critères communs S03A/S03B + +- le mint existe et son owner on-chain correspond au Token Program choisi ; +- l’adresse ATA est dérivée avec les graines dans l’ordre canonique `owner`, `token_program`, `mint` ; +- le compte créé a pour owner le Token Program attendu ; +- le premier envoi peut créer le compte ; +- le second envoi idempotent ne crée pas un second compte ; +- le replay et les projections restent idempotents ; +- aucune ATA classique n’est confondue avec une ATA Token-2022. + +## 9. Scénario S04 — SPL Token classique + +### Portée réellement exposée + +La fenêtre actuelle expose uniquement : + +```text +spl.token.transfer_checked +``` + +Elle ne permet pas encore d’enchaîner depuis l’interface `InitializeMint`, `MintToChecked`, `Approve`, `Revoke`, `BurnChecked` et `CloseAccount`. Ces opérations restent hors de ce scénario Devnet tant qu’elles ne sont pas exposées par la fenêtre. + +### Préparation dans le terminal B + +1. Réutiliser le mint classique de `C08` : + +```bash +export KB_SPL_TOKEN_PROGRAM_ID="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" && export KB_DEVNET_CLASSIC_MINT_KEYPAIR="$PWD/wallets/temporary/local_devnet/mints/ata-classic-mint.json" && export KB_DEVNET_CLASSIC_MINT="$(solana-keygen pubkey "$KB_DEVNET_CLASSIC_MINT_KEYPAIR")" +``` + +2. Définir le scénario : + +```bash +export KB_DEVNET_SCENARIO="40-spl-token" +``` + +3. Exécuter `C06`. +4. Exécuter `C10`. +5. Vérifier les comptes token avant l’opération : + +```bash +spl-token --url "$KB_DEVNET_RPC_URL" --program-id "$KB_SPL_TOKEN_PROGRAM_ID" display "$KB_DEVNET_CLASSIC_SOURCE_ATA" && spl-token --url "$KB_DEVNET_RPC_URL" --program-id "$KB_SPL_TOKEN_PROGRAM_ID" display "$KB_DEVNET_CLASSIC_DESTINATION_ATA" +``` + +### Valeurs à saisir dans l’application + +Dans **Décodeur spl_token — TransferChecked** : + +| Champ | Valeur | +|--------------------|--------------------------------------------| +| Compte source | `$KB_DEVNET_CLASSIC_SOURCE_ATA` | +| Mint | `$KB_DEVNET_CLASSIC_MINT` | +| Compte destination | `$KB_DEVNET_CLASSIC_DESTINATION_ATA` | +| Autorité simple | `$KB_DEVNET_WALLET_PUBKEY` | +| Montant brut exact | `1000000000` pour 1 token avec 9 décimales | +| Decimals | `9` | + +Afficher les valeurs à copier : + +```bash +printf 'source=%s\nmint=%s\ndestination=%s\nauthority=%s\namount_raw=1000000000\ndecimals=9\n' "$KB_DEVNET_CLASSIC_SOURCE_ATA" "$KB_DEVNET_CLASSIC_MINT" "$KB_DEVNET_CLASSIC_DESTINATION_ATA" "$KB_DEVNET_WALLET_PUBKEY" +``` + +### Exécution + +1. Cliquer **Préflight et simuler**. +2. Vérifier : + - owner des deux comptes = SPL Token classique ; + - mint identique sur les deux comptes ; + - decimals = `9` ; + - source suffisamment financée ; + - autorité simple = wallet opérateur ; + - montant brut conservé exactement. +3. Cocher la confirmation opérateur. +4. Cliquer **Signer et envoyer Token**. +5. Copier la signature dans : + +```bash +export KB_DEVNET_SIGNATURE="SIGNATURE_SPL_TOKEN" +``` + +6. Exécuter `C07`, puis `C12`. +7. Vérifier les comptes après transfert : + +```bash +spl-token --url "$KB_DEVNET_RPC_URL" --program-id "$KB_SPL_TOKEN_PROGRAM_ID" display "$KB_DEVNET_CLASSIC_SOURCE_ATA" && spl-token --url "$KB_DEVNET_RPC_URL" --program-id "$KB_SPL_TOKEN_PROGRAM_ID" display "$KB_DEVNET_CLASSIC_DESTINATION_ATA" +``` + +### Critères de validation + +- simulation réussie ; +- transaction confirmée puis finalisée ; +- `operation_code = spl.token.transfer_checked` ; +- montant brut exact ; +- insertion canonique, extraction Core et replay réussis ; +- projection métier présente ; +- second replay idempotent ; +- aucun compte Token-2022 impliqué. + +Le journal métier SPL Token peut rester à `empty` après une simulation seule. Il doit être actualisé après l’envoi confirmé, le replay et la matérialisation. + +## 10. Scénario S05 — Token-2022 + +### Préparation + +1. Définir le scénario et exécuter `C06` : + +```bash +export KB_DEVNET_SCENARIO="50-spl-token-2022" +``` + +2. Exécuter `C11` pour créer ou réutiliser la fixture. +3. Contrôler le mint, la source, la destination et le compte réservé à la fermeture avec les commandes `display` de `C11`. +4. Dans l’application, ouvrir **Exécution spl_token_2022 — scénarios publics**. +5. Cliquer **Charger la fixture Token-2022**. +6. Vérifier que le message indique le chemin de `fixture.env` et le Program ID Token-2022. + +Le bouton lit le `fixture.env` produit par `kb-pipeline-demo-scenarios` et remplit automatiquement : + +- compte source ou cible ; +- mint ; +- compte destination ou destination lamports ; +- delegate ; +- autorité ; +- freeze authority ; +- montant brut ; +- décimales. + +Ne remplacer manuellement une valeur que pour un test négatif délibéré. + +### Ordre des sous-scénarios + +Exécuter les scénarios dans cet ordre, car certains modifient l’état nécessaire aux suivants : + +#### S05.1 — MintToChecked + +Champs utilisés : + +- source/cible : compte token à créditer ; +- mint : mint Token-2022 ; +- autorité : mint authority ; +- montant brut : `TOKEN_2022_MINT_AMOUNT_RAW` chargé depuis la fixture ; +- décimales : valeur de la fixture. + +Avec la fixture par défaut, le mint initial est `10000000000` unités brutes, soit 10 tokens avec 9 décimales. Cette quantité couvre ensuite le transfert, l'approbation et le burn prévus. + +Simuler, envoyer, exécuter `C07`, puis `C12`. + +#### S05.2 — TransferChecked + +Champs utilisés : + +- source : compte financé par S05.1 ; +- mint ; +- destination : second compte Token-2022 ; +- autorité : owner du compte source ; +- montant brut et décimales. + +Simuler, envoyer, confirmer et vérifier les balances source/destination. + +#### S05.3 — ApproveChecked + +Champs utilisés : + +- source ; +- mint ; +- delegate ; +- autorité : owner du compte source ; +- montant brut ; +- décimales. + +Après confirmation, vérifier la projection de délégation. + +#### S05.4 — Revoke + +Champs utilisés : + +- source ; +- autorité : owner du compte source. + +Le mint et le delegate ne sont pas requis par le formulaire pour cette opération. Vérifier que la délégation précédente est supprimée. + +#### S05.5 — BurnChecked + +Champs utilisés : + +- source ; +- mint ; +- autorité : owner du compte source ; +- montant brut ; +- décimales. + +Le compte source doit conserver un solde suffisant après le transfert. + +#### S05.6 — FreezeAccount + +Champs utilisés : + +- source/cible ; +- mint ; +- freeze authority. + +Vérifier que la fixture désigne une freeze authority réellement configurée sur le mint. + +#### S05.7 — ThawAccount + +Réutiliser le même compte cible et la même freeze authority. Ce scénario doit suivre FreezeAccount. + +#### S05.8 — CloseAccount + +À exécuter uniquement avec le compte de fermeture prévu par la fixture : + +- source/cible : `closeAccount` chargé par l’application ; +- destination : autorité/destination lamports chargée ; +- autorité : owner ou close authority. + +Le compte doit être vide et satisfaire toutes les préconditions de fermeture. + +### Pour chaque sous-scénario + +1. sélectionner le scénario ; +2. laisser `applyToken2022Fixture` remplir les champs adaptés ; +3. cliquer **Préflight et simuler** ; +4. contrôler le plan, les owners, les autorités, le montant et les extensions ; +5. cocher la confirmation opérateur ; +6. envoyer ; +7. définir immédiatement `KB_DEVNET_SIGNATURE` avec la signature affichée pour cette sous-opération ; +8. vérifier qu'elle diffère de la signature du scénario précédent, puis exécuter `C07` ; +9. appliquer `C12` ; +10. conserver un fichier de preuve distinct en modifiant temporairement le préfixe, par exemple : + +```bash +export KB_DEVNET_SCENARIO="50a-token-2022-mint-to-checked" +``` + +puis `50b`, `50c`, etc., avant chaque appel à `C07`. + +### Critères de validation + +- chaque opération disponible est simulée sur son message exact ; +- les comptes sont owned par Token-2022 ; +- les autorités correspondent à la fixture ; +- les montants bruts et décimales sont exacts ; +- les projections token account, admin, fee, metadata ou risk attendues sont présentes selon l’opération ; +- aucun événement n’est attribué au programme Token classique ; +- chaque replay est sans échec ; +- le second replay est idempotent. + +## 11. Scénario S06 — Registre ElGamal + +### Objectif + +Valider le programme indépendant de registre ElGamal sans le confondre avec Token-2022. + +### Procédure + +1. Définir puis exécuter `C06` : + +```bash +export KB_DEVNET_SCENARIO="60-spl-elgamal-registry" +``` + +2. Vérifier le Program ID, le PDA de registre, l’owner, la longueur exacte du compte et les preuves requises. +3. Simuler create/update selon le scénario disponible. +4. Confirmer l’envoi, exécuter `C07`, puis appliquer `C08`. +5. Vérifier la projection admin du registre et l’absence de fausse projection Token-2022. + +## 12. Future fenêtre Metadata + +La future fenêtre metadata devra suivre la même structure : commandes communes `C01` à `C12`, puis scénarios séparés pour les metadata incorporées Token-2022, Metaplex Token Metadata et l’enrichissement off-chain indépendant. + +## 13. Critères de clôture de la campagne + +La campagne est clôturable uniquement lorsque : + +- tous les scénarios disponibles ont été rejoués depuis une base Devnet propre ; +- toutes les signatures sont confirmées sur Devnet ; +- les identités persistées respectent la nomenclature canonique ; +- aucun ancien `processor_name`, `surface_code`, `operation_code` ou `event_code` ne subsiste ; +- le replay ciblé est sans échec ni erreur de traitement ; +- les projections sont présentes et idempotentes ; +- le présent guide reflète les commandes réellement exécutées. diff --git a/docs/IDEA_REMINDERS.md b/docs/IDEA_REMINDERS.md index a008c84..74379e0 100644 --- a/docs/IDEA_REMINDERS.md +++ b/docs/IDEA_REMINDERS.md @@ -1,5 +1,5 @@ - + # Rappels d’idées @@ -11,6 +11,8 @@ Ce document regroupe les améliorations utiles mais non bloquantes pour la clôt - Ajouter une autocomplétion Pool lorsque des tables de référence fiables existeront. - Introduire une pagination SQL/IPC côté serveur avant l’exploitation de volumes massifs. - Étudier une résolution configurable du chemin de base utilisé par `kb-store`. +- Séparer à terme la configuration du logging dans un fichier JSON dédié avec son propre schéma et ses propres profils de logging. +- Permettre de sélectionner et changer un profil de logging indépendamment du profil applicatif actif, afin que les fenêtres Devnet puissent écrire dans des routes ou fichiers distincts sans changer le profil général de l’application. ## Pipeline et PostgreSQL diff --git a/docs/IDL_AUDIT.md b/docs/IDL_AUDIT.md new file mode 100644 index 0000000..691c21e --- /dev/null +++ b/docs/IDL_AUDIT.md @@ -0,0 +1,105 @@ + + + +# Audit des IDL v3 + +- Fichiers JSON : **91** +- JSON invalides : **0** +- Contenu JSON modifié : **non** +- Collision de noms v3 : **0** + +## Inventaire + +| Nom v3 | Program ID déclaré | Version déclarée | Instructions | SHA-256 | +|-----------------------------------------------------------------------------------------------------------------------|------------------------------------------------|-----------------:|-------------:|--------------------------------------------------------------------| +| `adapter.DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB.saber_decimal_wrapper.V0_0_0.from_solscan.json` | `non déclaré` | `0.0.0` | 3 | `1b357156864a702c5a1019fd1d19bd5b60661f33101d46a77899b88c8fbc87da` | +| `adapter.TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR.spl_token_wrap.V0_1_0.from_github_solana_program.json` | `TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR` | `0.1.0` | 6 | `8b0a4f56ea3bfa66ba2a1de8523a693629fb3a24417e28f338985eeddbf95cfc` | +| `amm.2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c.lifinity_swap_v2.V0_1_1.from_solscan.json` | `non déclaré` | `0.1.1` | 3 | `bbfefa42ca3ffa024acca68cc0e14c7c4babbc2928923d02d615620b18624910` | +| `amm.AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ.metadao_v0_5.V0_5_0.from_solscan.json` | `non déclaré` | `0.5.0` | 5 | `34c20e1ef623e96cd677f30548cadad2c49fc2b33217911c09b743d278bbae26` | +| `amm.BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.bonk_swap.V0_1_1.from_solscan.json` | `non déclaré` | `0.1.1` | 19 | `27eca49509a866341def453cf303aa8e524a7f8f42a9ab76900c63bbb215c001` | +| `amm.Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB.meteora_damm_v1.V0_5_2.from_solscan.json` | `non déclaré` | `0.5.2` | 26 | `0dd02f981806be81c15353b009a4f077d8f59f7e0192af6bc89d56acaed36f6e` | +| `amm.GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT.goosefx_gamma.V0_2_0.from_solscan.json` | `GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT` | `0.2.0` | 27 | `f515cfbeffebb5019ca15e25c2055fe1ea72882abc0b4a0dfbd6634eb1fa558b` | +| `amm.GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn.goosefx_v2.V0_3_0.from_solscan.json` | `non déclaré` | `0.3.0` | 8 | `ddfe3e78103781cb6189d928a8ad1c00325d668a01a7ef20fe32307424ad203d` | +| `amm.Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1.guac_swap.V0_1_1.from_solscan.json` | `non déclaré` | `0.1.1` | 20 | `11dcb508fc32854aed599f860636e8b3e9de50abb9fdfc3126bc032ec6cae98a` | +| `amm.WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb.woofi.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 41 | `864c5bd4331b8190e2e8cb8f9d01ba7bdbb42ba1e470cc6fbf95d3f9fb4c25b6` | +| `amm.cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG.meteora_damm_v2.V0_2_0.from_solscan.json` | `cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG` | `0.2.0` | 38 | `86077cdb029944c16e6e7515fb3c3a3fba4f7821003a6d23507784e7d66d4ff9` | +| `amm.pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.pump_swap.V0_1_0.from_solscan.json` | `pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA` | `0.1.0` | 27 | `7e56e6acb0bd34530386abe3e91e89ecab66f9c2cbb1e959c4c941e09c0b0316` | +| `amm.vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ.vertigo.V0_1_0.from_solscan.json` | `vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ` | `0.1.0` | 6 | `08f8a5aeba3197dca7f5702d6c0c91f0da9d96d1cd80815d2104b484e49d6103` | +| `bridge.6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn.layer_zero_executor.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 8 | `6b2f1390e8647ea2a2b206c262e7ca226c11c014a49c6a948e208ef0a113f2cc` | +| `bridge.76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6.layer_zero_endpoint.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 32 | `5a1210a5325cc52196f33122485e6c10b4d1d19c919e9da85440aad97ca147dd` | +| `bridge.CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe.circle_cctp_token_messenger_minter_v2.V0_2_0.from_solscan.json` | `CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe` | `0.2.0` | 25 | `7d12fedcd1a923ac1b4ce8dee1ca241ffc37c7c8f7682974bd14ebb75dd36520` | +| `bridge.CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3.circle_cctp_token_messenger_minter.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 19 | `0a5b235212bf5c1791cb62d3775feeddfe8a6c81120455d60fb0d834afcd3f75` | +| `clmm.6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6.stabble.V0_1_0.from_solscan.json` | `6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6` | `0.1.0` | 21 | `d0abb8e6b7f5b0e7ff0e73df2e94185d1d42b8e7e967f0341d2325ee99eccf37` | +| `clmm.CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.raydium.V0_1_0.from_solscan.json` | `CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK` | `0.1.0` | 34 | `6cda2dfa4a880fea3ac91f5055dc1d9b64b799bde997a7941a181f70d6e226fc` | +| `clmm.HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq.pancake_swap.V0_1_0.from_solscan.json` | `HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq` | `0.1.0` | 27 | `271fe54bb767dd63bb2194b6f40164026476cb871b8e624b8ab10d65d7ccf846` | +| `clmm.REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2.byreal.V0_1_0.from_solscan.json` | `REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2` | `0.1.0` | 35 | `2192c87aaf13cf2838dc939bca965e1f9cd8bc2e1c0bc15c54804072390f1d3a` | +| `clmm.fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9.fusion.V1_1_4.from_solscan.json` | `fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9` | `1.1.4` | 33 | `dfc258caa3c4060b761759d1d3120cfd87ac1c2a47c3f061d97ceb4eed97d0a5` | +| `clmm.whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.orca_whirlpool.V0_9_0.from_solscan.json` | `whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc` | `0.9.0` | 66 | `b858ae977743365529c970ced550eba435fa282a198c7d1a620865bd6e424460` | +| `cpmm.CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.raydium.V0_2_0.from_solscan.json` | `CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C` | `0.2.0` | 14 | `e4cbb793a8724e37cba2c92b38d074a9ddec9b810757b5fb404da523cfb4b59f` | +| `dlmm.LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.meteora.V0_12_0.from_solscan.json` | `LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo` | `0.12.0` | 76 | `24b04bbd70964c7a128b7c8df46be6000b43d7814e1ec54140728b7aedb60970` | +| `fees.pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.pump_fees.V0_1_0.from_solscan.json` | `pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ` | `0.1.0` | 29 | `2f8c355c5af9d95891f64fd71986f01f8a630e62dec032d0de42bb23dfa3518e` | +| `governance.FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq.metadao_futarchy.V0_6_1.from_solscan.json` | `non déclaré` | `0.6.1` | 23 | `1a35740c627990de699ea526ed83becf4331b40dbeea96687fa584f4a468ac81` | +| `governance.SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf.squads_multisig.V2_0_0.from_solscan.json` | `non déclaré` | `2.0.0` | 31 | `5304fa2bac2d6ed5a749267ad0cfce217e9ecbf369805ececa0a83c12c51ac56` | +| `governance.WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx.metadao_bid_wall.V0_7_0.from_solscan.json` | `non déclaré` | `0.7.0` | 5 | `6e48c20a4e6ffc1b3226ea2d31e846a4a1d2851d593dad3d8531e5de63b65fa2` | +| `launchpad.5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki.virtuals.V0_1_0.from_solscan.json` | `5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki` | `0.1.0` | 8 | `a61fe5f6fd5add913dfde81e6c30c4a6051a226a741dc2cf7d625298da8260fa` | +| `launchpad.6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.pump_fun.V0_1_0.from_solscan.json` | `6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P` | `0.1.0` | 40 | `5c3c6b548cb3845717eaa483e828aa8e938fc46a847b06f58dbb8e692015bed4` | +| `launchpad.LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.raydium_launchlab.V0_2_0.from_solscan.json` | `LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj` | `0.2.0` | 25 | `f0f1c0c1fa9fb5cb19ba451c2148defc0e13dc33cf2a12b86790ac919ddeb1c1` | +| `launchpad.MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG.moonit.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 6 | `ca1463bb404aa960a02a744a7b80e88a9706b7ad12fa018de14c445d5e8ec2c6` | +| `launchpad.PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd.pump_pumpup_ai.V0_1_0.from_solscan.json` | `PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd` | `0.1.0` | 20 | `841e845ea956220d2f2bf6546efacad218b6d59097709e8a0de205b4cb9e32db` | +| `launchpad.T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint.printr.V1_0_0.from_solscan.json` | `T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint` | `1.0.0` | 28 | `6124c944d3c45529fa3cdff6a69e842ed062892e7f7b53ccb25c13fad4957b5c` | +| `launchpad.boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.boop_fun.V0_3_0.from_solscan.json` | `boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4` | `0.3.0` | 29 | `f68e54671b2e80344804d499e5b8c4bd87e1a3f8705e85b69cdaf3540bcb41c5` | +| `launchpad.dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.meteora_dbc.V0_1_10.from_solscan.json` | `dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN` | `0.1.10` | 28 | `3499aacfe5647ea5a43951094e702826c46163b8e4678d5e75976955846a94d3` | +| `launchpad.moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM.metadao_ico.V0_7_0.from_solscan.json` | `non déclaré` | `0.7.0` | 13 | `852eb123ab405ce54fa67f1237cfe4da9d66033457ad0f129a287989c675cc43` | +| `launchpad.waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF.orca_wavebreak.V1_1_5.from_solscan.json` | `waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF` | `1.1.5` | 64 | `f38f1c00c81bcd94649fa2af5a7fc413149550718402fe1c4e0a6b2a43412d81` | +| `lending.C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr.clone.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 30 | `670402c21d1cdc952aabc1e6b607be2769ab34024e2fc5a46699aefdb8c4814d` | +| `lending.KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD.kamino.V1_23_0.from_solscan.json` | `non déclaré` | `1.23.0` | 63 | `de08e6fc025c3eb62b1445b225aae9e84a08f425cdd164bf7440e6ef7a04d87a` | +| `lending.MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA.marginfi_v2.V0_1_8.from_solscan.json` | `MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA` | `0.1.8` | 91 | `950f5008a596147a52ce6c4403a675aaf357333b6a1920dafd23005770faa01f` | +| `lock.LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.raydium_lp.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 4 | `0422cb7577ce3cbd03c730141bb4172a80c71e89cb0622424cb8662645702d0a` | +| `metadata.ProgM6JCCvbYkfKqJYHePx4xxSUSqJp7rh8Lyv7nk7S.solana_program_metadata.V0_0_0.from_github_solana_program.json` | `ProgM6JCCvbYkfKqJYHePx4xxSUSqJp7rh8Lyv7nk7S` | `0.0.0` | 9 | `e6874f519d2ecaa8d92e2d58d1caabc130352c98b5a829375efd31636dbbc7a1` | +| `metadata.metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s.metaplex_token_metadata.V1_14_0.from_solscan.json` | `metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s` | `1.14.0` | 58 | `8dcfda9d55aca11cc2e521c4670470533426da4613f208fcc2d0ea6bf3014f33` | +| `nft.BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY.metaplex_bubblegum.V0_12_0.from_solscan.json` | `non déclaré` | `0.12.0` | 17 | `db126f7491582f905f79cf0d291233b3b651ed7ea8d96089c25ec8fc6c6c2a98` | +| `nft.TCMPhJdwDryooaGtiocG1u3xcYbRpiJzb283XfCZsDp.tensor_cnft.V2_0_1.from_solscan.json` | `non déclaré` | `2.0.1` | 21 | `4033ac96e4a6af76178e997e58bb670a515c7f397b02dd1e647392c7e3851786` | +| `orderbook.j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X.jupiter_limit_order_v2.V0_1_0.from_solscan.json` | `j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X` | `0.1.0` | 8 | `f6d9c4ef2bc8a8d7757f09743c571526d23137414056d72d8724f0aa6392e1fe` | +| `orderbook.jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu.jupiter_limit_order.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 9 | `06a4d4d60cb5baefd2404fccad2818a4ac201dd0132b3ac530060d2c7ed67ffd` | +| `orderbook.opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb.openbook_v2.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 29 | `e5bc0fcaf3a4b53f22e77704105664f872b338561acabe0f2248b0f84327d391` | +| `perpetuals.EtrnLzgbS7nMMy5fbD42kXiUzGg8XQzJ972Xtk1cjWih.phoenix_eternal.V0_2_0.from_solscan.json` | `EtrnLzgbS7nMMy5fbD42kXiUzGg8XQzJ972Xtk1cjWih` | `0.2.0` | 80 | `fed07943bba51add829c11e69e32c2302a41f242567174f999f6a60cf770e87b` | +| `perpetuals.PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu.jupiter.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 59 | `9b9276a918f27028093742277d9b4335be66ff8a73b566d03a61cf1373c36d98` | +| `perpetuals.ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD.zeta.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 107 | `24194a0de79d5eef4da3d425f0555c81b3f7e983d0ed6d98a99e93bd8cae1927` | +| `perpetuals.dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.drift_v2.V2_150_0.from_solscan.json` | `non déclaré` | `2.150.0` | 241 | `198ab073625c9f5c8c18596d00344d8f194070aebf94f813e41ca51f1a4d1b6b` | +| `router.6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma.okx_labs_v1.V0_1_0.from_solscan.json` | `6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma` | `0.1.0` | 14 | `018edd87dcbc99da4ff852223c649075dfc0bfaef6115ef343d5b543920c8e5a` | +| `router.DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH.dflow_aggregator_v4.V0_1_0.from_solscan.json` | `DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH` | `0.1.0` | 17 | `a61d05f857becf70f6ff348fcdbd025996d9e9120809d6fb91d7e150d38d5947` | +| `router.JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB.jupiter_aggregator_v4.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 34 | `3b69fd55ba15e8620b7c24209650b5ca84eb435f5cbdd596cb59023826bf1bb9` | +| `router.JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4.jupiter_aggregator_v6.V0_1_0.from_solscan.json` | `JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4` | `0.1.0` | 17 | `98f4bf0ea4388f8cc341fc49678756289c5381339a678003f1494960e7ac6f46` | +| `router.proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u.okx_labs_v2.V0_1_0.from_solscan.json` | `proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u` | `0.1.0` | 19 | `39c8f7d80af6534178cc688d0ab580d19d059154ff5142e764a39dd65d61bd34` | +| `rwa.XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm.ondo_global_markets.V0_1_0.from_solscan.json` | `XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm` | `0.1.0` | 62 | `33ce1bcfd180cb9b202d7706e7d797bd96d87ea6a8fe7853f2e197fc880ae2b5` | +| `solana.11111111111111111111111111111111.core.system.V0_0_1.from_github_solana_program.json` | `11111111111111111111111111111111` | `0.0.1` | 14 | `e48967dbcbd252ef175a91f6684630e1f4c5c3e6176bc2c2c4f21d16193f86df` | +| `solana.AddressLookupTab1e1111111111111111111111111.core.address_lookup_table.V0_0_1.from_github_solana_program.json` | `AddressLookupTab1e1111111111111111111111111` | `0.0.1` | 5 | `91ae5d89d647a3dec7dcf36fa4dd96064b902d50bd5f65b2ce41f4aef5a53cfc` | +| `solana.BPFLoaderUpgradeab1e11111111111111111111111.core.loader_v3.V0_0_0.from_github_solana_program.json` | `CoreBPFLoaderUpgradeab1e1111111111111111111` | `0.0.0` | 8 | `a30e6f9f497e6339b63b06a4253c3c7fe1871672009e15994b51c4016376a997` | +| `solana.ComputeBudget111111111111111111111111111111.core.compute_budget.V0_0_1.from_github_solana_program.json` | `ComputeBudget111111111111111111111111111111` | `0.0.1` | 5 | `7b430c17afdae7c804ad9cd8b3d7f934a8dcf8fddaf4802731e8e7b1eed1b6a1` | +| `solana.Config1111111111111111111111111111111111111.core.config.V0_0_1.from_github_solana_program.json` | `Config1111111111111111111111111111111111111` | `0.0.1` | 1 | `c6faf7d86e83e305749b8231211d9a713398775ec7eae97032ece88c50e76aa4` | +| `solana.Feature111111111111111111111111111111111111.core.feature.V0_0_1.from_github_solana_program.json` | `Feature111111111111111111111111111111111111` | `0.0.1` | 1 | `a442ae23b4083aa9111f9dbddb8e25907c9411413d775b671f93c02a183c4784` | +| `solana.LoaderV411111111111111111111111111111111111.core.loader_v4.V0_0_0.from_github_solana_program.json` | `CoreBPFLoaderV41111111111111111111111111111` | `0.0.0` | 6 | `641c77405ce3967c375df5e3d886dbf84e52a2cd8c7626e537a6e5a4ff93c076` | +| `solana.Stake11111111111111111111111111111111111111.core.stake.V4_3_1.from_github_solana_program.json` | `Stake11111111111111111111111111111111111111` | `4.3.1` | 18 | `f9e914666fac43a6c6c3eeab141b950efc9c5702c814fe5b55875a323d904230` | +| `spl.MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr.memo.v3.V3_0_1.from_github_solana_program.json` | `MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr` | `3.0.1` | 1 | `95c763b4fc93d339ab3567c811b064459241f19345e7963a037530d6af94865a` | +| `spl.TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA.token.V3_3_0.from_github_solana_program.json` | `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA` | `3.3.0` | 28 | `de47e7a9469b962dbf7c9f643aa3433316936fbfc0c48aad261ab6388af9611d` | +| `spl.TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb.token_2022.V3_0_1.from_github_solana_program.json` | `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb` | `3.0.1` | 100 | `3c65163c8ed2934a353bc0fc42ddd3193b93137407ca2d3e71a3c3d9692841e4` | +| `stable.HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn.swap_hylo_exchange.V0_1_4.from_solscan.json` | `HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn` | `0.1.4` | 27 | `6230bd19f9ac55e3bcc3e0dbd1967d9272732f8e6f1233dfee859d4a7828b53c` | +| `stable.JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr.swap_jupiter_stable.V0_1_0.from_solscan.json` | `JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr` | `0.1.0` | 13 | `5365cc15dd0476ac697ec435899f9f14c23c499bbda2a56fe1910c086f5386d7` | +| `stable.NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P.swap_numeraire.V0_1_0.from_solscan.json` | `NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P` | `0.1.0` | 22 | `50e3a8ea08c61312fcdb371ef5916e94bd9ccf6101b395fc80019d725e892da1` | +| `stable.swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ.swap_stabble.V1_5_0.from_solscan.json` | `swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ` | `1.5.0` | 19 | `c82c0aa3f83db311e605f716ec7f1fdf2aadea7b611455489fad7b668a2fb77b` | +| `staking.4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7.jito_tip_distribution.V0_1_5.from_solscan.json` | `4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7` | `0.1.5` | 10 | `d8ba465c8b5bfbcb62763107e514c0672b89ee0d3f66d773719925372ec9ef99` | +| `staking.FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr.kamino_farm.V1_6_5.from_solscan.json` | `non déclaré` | `1.6.5` | 26 | `e7b825abd1e44bdc8dd315d491de7f3ddc67e58fce4222f5379a61f31b372572` | +| `staking.MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD.marinade_finance.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 28 | `f549293a7aeaf2f31f584a869a1e6e0e280f496efa0b4e3c70998e6551c1a987` | +| `storage.recr1L3PCGKLbckBqMNcJhuuyU1zgo8nBhfLVsJNwr5.solana_record.V0_4_0.from_github_solana_program.json` | `recr1L3PCGKLbckBqMNcJhuuyU1zgo8nBhfLVsJNwr5` | `0.4.0` | 5 | `9c6a4c8849cf1778cc633bb07ffb8933e0945beba5c072e303894691c761caba` | +| `strategy.DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M.jupiter_dca.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 12 | `0e3cfa37ab4ec041d9e806abb6dcf9e225b3b0a404515cb0ae5b0e1ae76b46c5` | +| `treasury.treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5.helium_treasury_management.V0_2_3.from_solscan.json` | `treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5` | `0.2.3` | 3 | `36e6ce8da7ea0cea0a8a7be0a8e35b679cbcae2e859e98b5b527775ea973d673` | +| `vault.24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi.meteora.V0_7_2.from_solscan.json` | `non déclaré` | `0.7.2` | 14 | `21f750d8ffbb17be4d73bfb4d24cc142897d53a350700f678b927af924305929` | +| `vault.6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc.kamino_yvaults.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 38 | `2a76880dfba5b8fa102823ba9b72ae62095ea78270b9eaa1b0d6c44b176f801f` | +| `vault.CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s.carrot_defi.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 42 | `21932378870ab46deb3408ec5cabfa19d8b47949ba04a57442692ab8abc53cf1` | +| `vault.HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ.hylo_stability_pool.V0_1_4.from_solscan.json` | `HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ` | `0.1.4` | 9 | `70c87ac19ac1d3b8b0ed31d4d4e52d74ab2b155ac1a2b8057ba859c0f42ba106` | +| `vault.KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd.kamino_v2.V2_1_1.from_solscan.json` | `non déclaré` | `2.1.1` | 22 | `17a310e293893bb8fe8cb7daee0b1ef59fd9f31da8ba1fd1f00e7a436ca4348a` | +| `vault.kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr.kamino.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 12 | `5a1c6a1e584be14f8eee1abf4682d057f9aba5d35c4597c48cb2fa997d41cddc` | +| `vesting.LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn.jupiter_lock.V0_4_0.from_solscan.json` | `LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn` | `0.4.0` | 11 | `f424e9c0df4b6bd6e63d40f1ffcf6be065bdb734323808fa1f11c1cb60610bb8` | +| `vesting.strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m.streamflow.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 10 | `d74b7df8692ca019de952534f532d8b38b38ef8a34139bff894df1efd9aed0df` | +| `wallet.JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw.jupiter_apepro_smart_wallet.V0_1_0.from_solscan.json` | `non déclaré` | `0.1.0` | 6 | `7d47428b045fe7ace80dc0f4b5b8a1e8a509a1ed77cd60d90d39f8a1c9e232ec` | +| `weighted.swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW.swap_stabble.V1_5_0.from_solscan.json` | `swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW` | `1.5.0` | 13 | `97ffbefbaa3a9729ac5cd700c2650a74042730ca1c6d0c9acf702504721fcb43` | diff --git a/docs/IDL_TO_KB_LIB_NOMENCLATURE.md b/docs/IDL_TO_KB_LIB_NOMENCLATURE.md new file mode 100644 index 0000000..253e3a0 --- /dev/null +++ b/docs/IDL_TO_KB_LIB_NOMENCLATURE.md @@ -0,0 +1,101 @@ + + + +# Correspondance IDL ↔ `kb-lib` + +Ce tableau constitue la cible de classification pour les futurs décodeurs et exécuteurs. +Il ne signifie pas que tous les modules proposés sont déjà implémentés. + +| IDL v3 | Module actuel | Module cible | Action Rust | +|-----------------------------------------------------------------------------------------------------------------------|------------------------------------------------|------------------------------------------------|---------------------------------------------------------------------| +| `adapter.DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB.saber_decimal_wrapper.V0_0_0.from_solscan.json` | `adapter/saber_decimal_wrapper` | `adapter/saber_decimal_wrapper` | Aucune | +| `adapter.TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR.spl_token_wrap.V0_1_0.from_github_solana_program.json` | `—` | `adapter/spl_token_wrap` | Créer `adapter/spl_token_wrap` | +| `amm.2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c.lifinity_swap_v2.V0_1_1.from_solscan.json` | `amm/lifinity_swap_v2` | `amm/lifinity_swap_v2` | Aucune | +| `amm.AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ.metadao_v0_5.V0_5_0.from_solscan.json` | `amm/metadao_v0_5` | `amm/metadao_v0_5` | Aucune | +| `amm.BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.bonk_swap.V0_1_1.from_solscan.json` | `amm/bonk_swap` | `amm/bonk_swap` | Aucune | +| `amm.Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB.meteora_damm_v1.V0_5_2.from_solscan.json` | `amm/meteora_damm_v1` | `amm/meteora_damm_v1` | Aucune | +| `amm.GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT.goosefx_gamma.V0_2_0.from_solscan.json` | `amm/goosefx_gamma` | `amm/goosefx_gamma` | Aucune | +| `amm.GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn.goosefx_v2.V0_3_0.from_solscan.json` | `amm/goosefx_v2` | `amm/goosefx_v2` | Aucune | +| `amm.Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1.guac_swap.V0_1_1.from_solscan.json` | `amm/guac_swap` | `amm/guac_swap` | Aucune | +| `amm.WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb.woofi.V0_1_0.from_solscan.json` | `amm/woofi` | `amm/woofi` | Aucune | +| `amm.cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG.meteora_damm_v2.V0_2_0.from_solscan.json` | `amm/meteora_damm_v2` | `amm/meteora_damm_v2` | Aucune | +| `amm.pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.pump_swap.V0_1_0.from_solscan.json` | `amm/pump_swap` | `amm/pump_swap` | Aucune | +| `amm.vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ.vertigo.V0_1_0.from_solscan.json` | `amm/vertigo` | `amm/vertigo` | Aucune | +| `bridge.6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn.layer_zero_executor.V0_1_0.from_solscan.json` | `bridge/layer_zero_executor` | `bridge/layer_zero_executor` | Aucune | +| `bridge.76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6.layer_zero_endpoint.V0_1_0.from_solscan.json` | `bridge/layer_zero_endpoint` | `bridge/layer_zero_endpoint` | Aucune | +| `bridge.CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe.circle_cctp_token_messenger_minter_v2.V0_2_0.from_solscan.json` | `bridge/circle_cctp_token_messenger_minter_v2` | `bridge/circle_cctp_token_messenger_minter_v2` | Aucune | +| `bridge.CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3.circle_cctp_token_messenger_minter.V0_1_0.from_solscan.json` | `bridge/circle_cctp_token_messenger_minter` | `bridge/circle_cctp_token_messenger_minter` | Aucune | +| `clmm.6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6.stabble.V0_1_0.from_solscan.json` | `clmm/stabble` | `clmm/stabble` | Aucune | +| `clmm.CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.raydium.V0_1_0.from_solscan.json` | `clmm/raydium` | `clmm/raydium` | Aucune | +| `clmm.HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq.pancake_swap.V0_1_0.from_solscan.json` | `clmm/pancake_swap` | `clmm/pancake_swap` | Aucune | +| `clmm.REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2.byreal.V0_1_0.from_solscan.json` | `clmm/byreal` | `clmm/byreal` | Aucune | +| `clmm.fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9.fusion.V1_1_4.from_solscan.json` | `clmm/fusion` | `clmm/fusion` | Aucune | +| `clmm.whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.orca_whirlpool.V0_9_0.from_solscan.json` | `clmm/orca_whirlpool` | `clmm/orca_whirlpool` | Aucune | +| `cpmm.CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.raydium.V0_2_0.from_solscan.json` | `cpmm/raydium` | `cpmm/raydium` | Aucune | +| `dlmm.LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.meteora.V0_12_0.from_solscan.json` | `dlmm/meteora` | `dlmm/meteora` | Aucune | +| `fees.pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.pump_fees.V0_1_0.from_solscan.json` | `admin/pump_fees` | `fees/pump_fees` | Déplacer `admin/pump_fees` → `fees/pump_fees` | +| `governance.FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq.metadao_futarchy.V0_6_1.from_solscan.json` | `amm/metadao_futarchy_amm` | `governance/metadao_futarchy` | Déplacer `amm/metadao_futarchy_amm` → `governance/metadao_futarchy` | +| `governance.SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf.squads_multisig.V2_0_0.from_solscan.json` | `—` | `governance/squads_multisig` | Créer `governance/squads_multisig` | +| `governance.WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx.metadao_bid_wall.V0_7_0.from_solscan.json` | `governance/metadao_bid_wall` | `governance/metadao_bid_wall` | Aucune | +| `launchpad.5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki.virtuals.V0_1_0.from_solscan.json` | `amm/virtuals` | `launchpad/virtuals` | Déplacer `amm/virtuals` → `launchpad/virtuals` | +| `launchpad.6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.pump_fun.V0_1_0.from_solscan.json` | `launchpad/pump_fun` | `launchpad/pump_fun` | Aucune | +| `launchpad.LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.raydium_launchlab.V0_2_0.from_solscan.json` | `launchpad/raydium_launchlab` | `launchpad/raydium_launchlab` | Aucune | +| `launchpad.MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG.moonit.V0_1_0.from_solscan.json` | `launchpad/moonit` | `launchpad/moonit` | Aucune | +| `launchpad.PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd.pump_pumpup_ai.V0_1_0.from_solscan.json` | `launchpad/pump_pumpup_ai` | `launchpad/pump_pumpup_ai` | Aucune | +| `launchpad.T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint.printr.V1_0_0.from_solscan.json` | `launchpad/printr` | `launchpad/printr` | Aucune | +| `launchpad.boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.boop_fun.V0_3_0.from_solscan.json` | `launchpad/boop_fun` | `launchpad/boop_fun` | Aucune | +| `launchpad.dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.meteora_dbc.V0_1_10.from_solscan.json` | `launchpad/meteora_dbc` | `launchpad/meteora_dbc` | Aucune | +| `launchpad.moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM.metadao_ico.V0_7_0.from_solscan.json` | `launchpad/metadao_ico` | `launchpad/metadao_ico` | Aucune | +| `launchpad.waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF.orca_wavebreak.V1_1_5.from_solscan.json` | `launchpad/orca_wavebreak` | `launchpad/orca_wavebreak` | Aucune | +| `lending.C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr.clone.V0_1_0.from_solscan.json` | `lending/clone` | `lending/clone` | Aucune | +| `lending.KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD.kamino.V1_23_0.from_solscan.json` | `lending/kamino` | `lending/kamino` | Aucune | +| `lending.MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA.marginfi_v2.V0_1_8.from_solscan.json` | `lending/marginfi_v2` | `lending/marginfi_v2` | Aucune | +| `lock.LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.raydium_lp.V0_1_0.from_solscan.json` | `lock/raydium_lp` | `lock/raydium_lp` | Aucune | +| `metadata.ProgM6JCCvbYkfKqJYHePx4xxSUSqJp7rh8Lyv7nk7S.solana_program_metadata.V0_0_0.from_github_solana_program.json` | `—` | `metadata/solana_program_metadata` | Créer `metadata/solana_program_metadata` | +| `metadata.metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s.metaplex_token_metadata.V1_14_0.from_solscan.json` | `metadata/metaplex_token_metadata` | `metadata/metaplex_token_metadata` | Aucune | +| `nft.BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY.metaplex_bubblegum.V0_12_0.from_solscan.json` | `nft/metaplex_bubblegum` | `nft/metaplex_bubblegum` | Aucune | +| `nft.TCMPhJdwDryooaGtiocG1u3xcYbRpiJzb283XfCZsDp.tensor_cnft.V2_0_1.from_solscan.json` | `—` | `nft/tensor_cnft` | Créer `nft/tensor_cnft` | +| `orderbook.j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X.jupiter_limit_order_v2.V0_1_0.from_solscan.json` | `orderbook/jupiter_limit_order_v2` | `orderbook/jupiter_limit_order_v2` | Aucune | +| `orderbook.jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu.jupiter_limit_order.V0_1_0.from_solscan.json` | `orderbook/jupiter_limit_order` | `orderbook/jupiter_limit_order` | Aucune | +| `orderbook.opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb.openbook_v2.V0_1_0.from_solscan.json` | `orderbook/openbook_v2` | `orderbook/openbook_v2` | Aucune | +| `perpetuals.EtrnLzgbS7nMMy5fbD42kXiUzGg8XQzJ972Xtk1cjWih.phoenix_eternal.V0_2_0.from_solscan.json` | `—` | `perpetuals/phoenix_eternal` | Créer `perpetuals/phoenix_eternal` | +| `perpetuals.PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu.jupiter.V0_1_0.from_solscan.json` | `perpetuals/jupiter` | `perpetuals/jupiter` | Aucune | +| `perpetuals.ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD.zeta.V0_1_0.from_solscan.json` | `perpetuals/zeta` | `perpetuals/zeta` | Aucune | +| `perpetuals.dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.drift_v2.V2_150_0.from_solscan.json` | `perpetuals/drift_v2` | `perpetuals/drift_v2` | Aucune | +| `router.6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma.okx_labs_v1.V0_1_0.from_solscan.json` | `router/okx_labs_v1` | `router/okx_labs_v1` | Aucune | +| `router.DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH.dflow_aggregator_v4.V0_1_0.from_solscan.json` | `router/dflow_aggregator_v4` | `router/dflow_aggregator_v4` | Aucune | +| `router.JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB.jupiter_aggregator_v4.V0_1_0.from_solscan.json` | `router/jupiter_aggregator_v4` | `router/jupiter_aggregator_v4` | Aucune | +| `router.JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4.jupiter_aggregator_v6.V0_1_0.from_solscan.json` | `router/jupiter_aggregator_v6` | `router/jupiter_aggregator_v6` | Aucune | +| `router.proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u.okx_labs_v2.V0_1_0.from_solscan.json` | `router/okx_labs_v2` | `router/okx_labs_v2` | Aucune | +| `rwa.XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm.ondo_global_markets.V0_1_0.from_solscan.json` | `rwa/ondo_global_markets` | `rwa/ondo_global_markets` | Aucune | +| `solana.11111111111111111111111111111111.core.system.V0_0_1.from_github_solana_program.json` | `solana/core/system` | `solana/core/system` | Aucune | +| `solana.AddressLookupTab1e1111111111111111111111111.core.address_lookup_table.V0_0_1.from_github_solana_program.json` | `solana/core/address_lookup_table` | `solana/core/address_lookup_table` | Aucune | +| `solana.BPFLoaderUpgradeab1e11111111111111111111111.core.loader_v3.V0_0_0.from_github_solana_program.json` | `solana/core/loader_v3` | `solana/core/loader_v3` | Aucune | +| `solana.ComputeBudget111111111111111111111111111111.core.compute_budget.V0_0_1.from_github_solana_program.json` | `solana/core/compute_budget` | `solana/core/compute_budget` | Aucune | +| `solana.Config1111111111111111111111111111111111111.core.config.V0_0_1.from_github_solana_program.json` | `solana/core/config` | `solana/core/config` | Aucune | +| `solana.Feature111111111111111111111111111111111111.core.feature.V0_0_1.from_github_solana_program.json` | `solana/core/feature` | `solana/core/feature` | Aucune | +| `solana.LoaderV411111111111111111111111111111111111.core.loader_v4.V0_0_0.from_github_solana_program.json` | `solana/core/loader_v4` | `solana/core/loader_v4` | Aucune | +| `solana.Stake11111111111111111111111111111111111111.core.stake.V4_3_1.from_github_solana_program.json` | `solana/core/stake` | `solana/core/stake` | Aucune | +| `spl.MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr.memo.v3.V3_0_1.from_github_solana_program.json` | `spl/memo/v3` | `spl/memo/v3` | Aucune | +| `spl.TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA.token.V3_3_0.from_github_solana_program.json` | `spl/token` | `spl/token` | Aucune | +| `spl.TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb.token_2022.V3_0_1.from_github_solana_program.json` | `spl/token_2022` | `spl/token_2022` | Aucune | +| `stable.HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn.swap_hylo_exchange.V0_1_4.from_solscan.json` | `stable/swap_hylo_exchange` | `stable/swap_hylo_exchange` | Aucune | +| `stable.JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr.swap_jupiter_stable.V0_1_0.from_solscan.json` | `stable/swap_jupiter_stable` | `stable/swap_jupiter_stable` | Aucune | +| `stable.NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P.swap_numeraire.V0_1_0.from_solscan.json` | `stable/swap_numeraire` | `stable/swap_numeraire` | Aucune | +| `stable.swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ.swap_stabble.V1_5_0.from_solscan.json` | `stable/swap_stabble` | `stable/swap_stabble` | Aucune | +| `staking.4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7.jito_tip_distribution.V0_1_5.from_solscan.json` | `—` | `staking/jito_tip_distribution` | Créer `staking/jito_tip_distribution` | +| `staking.FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr.kamino_farm.V1_6_5.from_solscan.json` | `staking/kamino_farm` | `staking/kamino_farm` | Aucune | +| `staking.MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD.marinade_finance.V0_1_0.from_solscan.json` | `staking/marinade_finance` | `staking/marinade_finance` | Aucune | +| `storage.recr1L3PCGKLbckBqMNcJhuuyU1zgo8nBhfLVsJNwr5.solana_record.V0_4_0.from_github_solana_program.json` | `—` | `storage/solana_record` | Créer `storage/solana_record` | +| `strategy.DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M.jupiter_dca.V0_1_0.from_solscan.json` | `strategy/jupiter_dca` | `strategy/jupiter_dca` | Déplacer `strategy/jupiter_dca` → `strategy/jupiter_dca` | +| `treasury.treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5.helium_treasury_management.V0_2_3.from_solscan.json` | `treasury/helium_treasury_management` | `treasury/helium_treasury_management` | Aucune | +| `vault.24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi.meteora.V0_7_2.from_solscan.json` | `vault/meteora` | `vault/meteora` | Aucune | +| `vault.6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc.kamino_yvaults.V0_1_0.from_solscan.json` | `vault/kamino_yvaults` | `vault/kamino_yvaults` | Aucune | +| `vault.CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s.carrot_defi.V0_1_0.from_solscan.json` | `vault/carrot_defi` | `vault/carrot_defi` | Aucune | +| `vault.HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ.hylo_stability_pool.V0_1_4.from_solscan.json` | `vault/hylo_stability_pool` | `vault/hylo_stability_pool` | Aucune | +| `vault.KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd.kamino_v2.V2_1_1.from_solscan.json` | `vault/kamino_v2` | `vault/kamino_v2` | Aucune | +| `vault.kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr.kamino.V0_1_0.from_solscan.json` | `vault/kamino` | `vault/kamino` | Aucune | +| `vesting.LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn.jupiter_lock.V0_4_0.from_solscan.json` | `admin/jupiter_lock` | `vesting/jupiter_lock` | Déplacer `admin/jupiter_lock` → `vesting/jupiter_lock` | +| `vesting.strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m.streamflow.V0_1_0.from_solscan.json` | `vesting/streamflow` | `vesting/streamflow` | Aucune | +| `wallet.JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw.jupiter_apepro_smart_wallet.V0_1_0.from_solscan.json` | `wallet/jupiter_apepro_smart_wallet` | `wallet/jupiter_apepro_smart_wallet` | Aucune | +| `weighted.swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW.swap_stabble.V1_5_0.from_solscan.json` | `weighted/swap_stabble` | `weighted/swap_stabble` | Aucune | diff --git a/docs/MISSING_PROGRAM_IDLS.md b/docs/MISSING_PROGRAM_IDLS.md new file mode 100644 index 0000000..31be90a --- /dev/null +++ b/docs/MISSING_PROGRAM_IDLS.md @@ -0,0 +1,22 @@ + + + +# Programmes ou IDL manquants + +Cette liste distingue l'absence d'un fichier dans `idls_v3` de l'absence d'une IDL officielle publiée. + +## Surfaces Bot3 déjà implémentées sans IDL correspondante dans l'archive + +| Classification `kb-lib` | Program ID | Situation | +|--------------------------------|------------------------------------------------|-------------------------------------------------| +| `spl/memo/v1` | `Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo` | aucune IDL correspondante dans `idls_v2` | +| `spl/memo/v4` | `Memo4c2pN8afCj432Lb7RMVKi9PbQnnW7ewFFaV3oAH` | aucune IDL correspondante dans `idls_v2` | +| `spl/associated_token_account` | `ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL` | aucune IDL officielle identifiée dans l'archive | +| `spl/elgamal_registry` | `E1Gama1Registry11111111111111111111111111111` | aucune IDL séparée identifiée dans l'archive | + +## Remarques + +- Le fichier Memo présent correspond à `MemoSq4...`, donc à la génération v3 dans la nomenclature Bot3. +- L'absence d'IDL ne signifie pas l'absence de source normative : les crates d'interface officielles, + le code runtime et les matrices wire restent utilisables. +- La liste devra être recalculée après chaque ajout de programme à `kb-program-ids`. diff --git a/docs/OPERATION_NAMING_CONVENTION.md b/docs/OPERATION_NAMING_CONVENTION.md new file mode 100644 index 0000000..14848f4 --- /dev/null +++ b/docs/OPERATION_NAMING_CONVENTION.md @@ -0,0 +1,268 @@ + + + +# Convention canonique des identités runtime et des codes d’opération + +## 1. Objet + +Ce document définit les chaînes stables utilisées par `khadhroony-bot3` dans le code, les plans d’exécution, les événements décodés, les sorties matérialisées, les journaux et PostgreSQL. + +Ces chaînes sont des contrats de données. Elles ne doivent pas être renommées localement, improvisées dans un test ou dérivées du nom d’une ancienne crate. Toute nouvelle surface doit être ajoutée à la matrice `test-fixtures/contract-matrices/OPERATION_NAMING_MATRIX.json` avant son premier remplissage persistant. + +## 2. Principe général + +Les valeurs persistées utilisent une hiérarchie en segments séparés par un point : + +```text +.[.][.] +``` + +Chaque segment utilise `snake_case`. Un underscore reste autorisé à l’intérieur d’un concept indivisible, par exemple `token_2022`, `compute_budget` ou `associated_token_account`. Il ne doit pas remplacer un séparateur hiérarchique. + +Correct : + +```text +solana.core.system.transfer +spl.memo.v4.add_memo +spl.token_2022.transfer_checked +spl.associated_token_account.create_idempotent +metadata.metaplex_token_metadata.create_metadata_account_v3 +``` + +Interdit : + +```text +solana_core.system.transfer +spl_memo_v4.add_memo +spl_token_2022.transfer_checked +spl_associated_token_account.create_idempotent +metadata_metaplex_token_metadata.create_metadata_account_v3 +``` + +## 2.1 Frontière avec les codes de registre + +La notation par points s’applique aux identités runtime, processeurs, surfaces, opérations et événements persistés. Elle ne s’applique pas aux codes techniques du registre `kb-program-ids`, qui restent des identifiants Rust/registre en `lower_snake_case` afin de préserver leur ordre lexical, leur compatibilité et leur rôle de clé interne. + +Exemples de codes de registre : + +```text +metadata_metaplex_token_metadata +spl_memo_v4 +spl_token +spl_token_2022 +``` + +Le même programme peut donc avoir : + +```text +registry code : spl_token_2022 +processor_name : spl.token_2022 +surface_code : spl.token_2022 +``` + +## 3. Catégories de noms + +### 3.1 Identité runtime d’un composant + +Format : + +```text +kb-lib...[.] +``` + +Exemples : + +```text +kb-lib.decoder.solana.core +kb-lib.executor.solana.core +kb-lib.decoder.spl.memo +kb-lib.executor.spl.token_2022 +kb-lib.materializer.transaction.annotations +``` + +Cette identité désigne le composant logiciel, pas une opération on-chain. + +### 3.2 `processor_name` + +Format : + +```text +.[.] +``` + +Exemples : + +```text +solana.core +spl.memo +spl.token +spl.token_2022 +spl.associated_token_account +spl.elgamal_registry +metadata.metaplex_token_metadata +materializer.transaction.annotations +materializer.token.accounts +materializer.risk +``` + +`processor_name` doit rester stable entre les campagnes et ne doit pas inclure une version. La version est stockée séparément dans `processor_version`. + +### 3.3 `surface_code` + +Format : + +```text +.[.] +``` + +La surface représente la frontière on-chain effectivement observée. + +Exemples : + +```text +solana.core.system +solana.core.compute_budget +solana.core.loader_v4 +spl.memo.v1 +spl.memo.v3 +spl.memo.v4 +spl.token +spl.token_2022 +spl.token_2022.confidential_transfer +spl.associated_token_account +metadata.metaplex_token_metadata +``` + +Une génération est ajoutée seulement lorsqu’elle change l’identité du programme ou le contrat observé. + +### 3.4 `operation_code` + +Format : + +```text +. +``` + +`operation_code` décrit une intention constructible par un exécuteur. Il peut être plus générique que l’événement observé lorsque l’exécuteur cible une seule génération actuelle. + +Exemples : + +```text +solana.core.system.transfer +spl.memo.add_memo +spl.token.transfer_checked +spl.token_2022.close_account +spl.associated_token_account.create +``` + +Pour Memo, l’exécuteur ne construit que Memo v4, mais l’intention reste `spl.memo.add_memo`. Le Program ID du plan fixe la génération réellement construite. + +### 3.5 `event_code` + +Format : + +```text +. +``` + +`event_code` décrit ce qui a été observé et conserve la génération lorsque celle-ci est significative. + +Exemples : + +```text +spl.memo.v1.add_memo +spl.memo.v3.add_memo +spl.memo.v4.add_memo +spl.token.transfer_checked +spl.token_2022.close_account +solana.core.system.transfer +``` + +### 3.6 `protocol_code` + +`protocol_code` identifie le protocole fonctionnel sans opération : + +```text +solana.core +spl.memo +spl.token +spl.token_2022 +spl.associated_token_account +spl.elgamal_registry +metadata.metaplex_token_metadata +``` + +Il ne doit pas réintroduire les anciennes formes `solana_native`, `spl_token` ou `spl_memo`. + +## 4. Correspondance entre Rust et les valeurs persistées + +Les symboles Rust suivent les règles Rust habituelles, tandis que leurs valeurs suivent cette convention : + +```rust +pub const EX_SPL_TOKEN_2022_TRANSFER_CHECKED_OPERATION: &str = + "spl.token_2022.transfer_checked"; +``` + +- symbole Rust : `SCREAMING_SNAKE_CASE` ; +- module Rust : `snake_case` ; +- valeur persistée : segments hiérarchiques séparés par `.` ; +- type Rust : `PascalCase`, par exemple `Token2022`. + +## 5. Stabilité et migrations + +Ces valeurs peuvent participer à : + +- des clés de ledger ; +- des contraintes d’unicité ; +- des clés d’idempotence ; +- des événements Decode ; +- des observations de couverture ; +- des sorties matérialisées ; +- des filtres SQL et frontend ; +- des preuves de scénarios Devnet. + +Un renommage après remplissage d’une base est donc une migration de données. Avant production, toute modification exige : + +1. une mise à jour coordonnée du code, des matrices et des règles ; +2. une décision explicite entre migration SQL et reconstruction des tables dérivées ; +3. une validation de l’idempotence ; +4. une vérification des filtres et APIs ; +5. une nouvelle preuve runtime. + +Pendant la phase actuelle de développement, les bases Devnet et recherche peuvent être recréées depuis les raws. + +## 6. Matrice normative + +La source machine-readable est : + +```text +test-fixtures/contract-matrices/OPERATION_NAMING_MATRIX.json +``` + +Chaque entrée documente au minimum : + +- `programId` ; +- `processorName` ; +- `surfaceCode` ; +- `operationCode` ; +- `eventCode` ; +- `decoderName` ; +- `executorName` ; +- `status` ; +- `source`. + +Une surface `decode_only` peut avoir `operationCode` et `executorName` à `null`. + +## 7. Règles d’ajout d’une nouvelle opération + +Avant de fusionner une nouvelle opération : + +1. choisir son domaine et sa famille ; +2. identifier le Program ID canonique dans `kb-program-ids` ; +3. définir `processor_name` et `surface_code` ; +4. définir séparément `operation_code` et `event_code` ; +5. ajouter les constantes Rust ; +6. ajouter ou mettre à jour la matrice normative ; +7. ajouter les tests de cohérence entre constantes et matrice ; +8. vérifier l’impact PostgreSQL avant tout backfill ou replay durable. + diff --git a/idls/001.README.md b/idls/001.README.md index 39b2aaa..dd2f018 100644 --- a/idls/001.README.md +++ b/idls/001.README.md @@ -1,62 +1,39 @@ -# IDL locales +# Répertoire IDL v3 -Ce répertoire contient les IDL téléchargées depuis des sources officielles ou de référence et utilisées pour auditer les décodeurs, matérialiseurs et exécuteurs. +Ce répertoire contient 91 fichiers IDL JSON issus exclusivement de `idls_v2.zip`. +Le contenu brut des JSON n'a pas été modifié ; seuls les noms de fichiers ont été normalisés. -## Règle d’admission - -Une IDL devient une source locale active lorsqu’un décodeur ou un exécuteur correspondant est développé. À ce moment-là, il faut : - -1. télécharger l’IDL utilisée ; -2. vérifier son Program ID et sa provenance ; -3. conserver son contenu JSON inchangé ; -4. la renommer selon la convention canonique ; -5. documenter sa version ou son commit lorsqu’ils sont connus ; -6. ajouter des tests comparant, selon le périmètre disponible, l’IDL, le runtime, les builders et l’interface officielle. - -Les fichiers JSON ne doivent pas recevoir de commentaires ni être reformattés uniquement pour satisfaire la documentation. - -## Convention de nommage - -Forme principale : +## Convention ```text -...json +..[.].V.from_.json ``` -Exemple actif : +- `famille-kb-lib` correspond au premier niveau fonctionnel de `kb-lib` : `solana`, `spl`, + `metadata`, `launchpad`, `fees`, `strategy`, etc. +- `program-id` est l'identifiant canonique du programme. +- `chemin-module` correspond au module fonctionnel cible sans les rôles `decoder` ou `executor`. +- `v1`, `v3`, `v4` désignent une génération de programme ou de surface. +- `V3_0_1` désigne la version déclarée par l'IDL. +- `from_solscan` et `from_github_solana_program` indiquent la provenance. -```text -metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s.metadata.metaplex_token_metadata.json -``` +## Documents -Lorsqu’il faut conserver plusieurs versions réellement distinctes d’une même IDL : +- `../docs/IDL_AUDIT.md` : inventaire, validation JSON, versions et empreintes. +- `../docs/MISSING_PROGRAM_IDLS.md` : programmes connus sans IDL présente ou sans IDL officielle identifiée. +- `../docs/IDL_TO_KB_LIB_NOMENCLATURE.md` : correspondance entre chaque IDL et le module `kb-lib`. -```text -....json -``` +## Décisions architecturales intégrées -Suffixes admis, par ordre de préférence : +- `admin/pump_fees` devient `fees/pump_fees`. +- `admin/jupiter_lock` devient `vesting/jupiter_lock`. +- `amm/metadao_futarchy_amm` devient `governance/metadao_futarchy`. +- `amm/virtuals` devient `launchpad/virtuals`. +- `router/jupiter_dca` devient `strategy/jupiter_dca`. +- une famille `storage` est proposée pour `storage/solana_record`. -```text -v -commit- -slot- -date-YYYY-MM-DD -``` - -La version ne doit jamais être inventée. Tant qu’une seule IDL est conservée pour un programme, le suffixe de version reste facultatif. - -## Classification - -- `protocol_type` représente la famille fonctionnelle stable, par exemple `metadata`, `launchpad`, `amm`, `clmm`, `lending`, `router`, `vault` ou `orderbook`. -- `protocol_code` représente le protocole ou la surface exacte, par exemple `metaplex_token_metadata`. -- La classification est validée lors de l’implémentation du décodeur ou de l’exécuteur ; les IDL de référence non encore utilisées ne doivent pas être renommées massivement sur une classification incertaine. - -## Intégrité - -Le renommage du fichier est autorisé. Le contenu de l’IDL doit rester identique à la source téléchargée. - -Les graphies externes telles que `token2022`, les noms de types Anchor et les identifiants publiés dans l’IDL ne doivent pas être adaptés à la nomenclature interne du workspace. +Ces changements de modules ne sont pas appliqués au code Rust dans cette archive ; ils servent de cible +pour la prochaine refactorisation de `kb-lib`. diff --git a/idls/24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi.meteora_vault.json b/idls/24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi.meteora_vault.json deleted file mode 100644 index 61034fa..0000000 --- a/idls/24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi.meteora_vault.json +++ /dev/null @@ -1 +0,0 @@ -{"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/2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c.lifinity_amm_v2.json b/idls/2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c.lifinity_amm_v2.json deleted file mode 100644 index 9d181e7..0000000 --- a/idls/2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c.lifinity_amm_v2.json +++ /dev/null @@ -1 +0,0 @@ -{"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/4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7.jito_tip_distribution.json b/idls/4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7.jito_tip_distribution.json deleted file mode 100644 index ddfecc4..0000000 --- a/idls/4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7.jito_tip_distribution.json +++ /dev/null @@ -1 +0,0 @@ -{"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/5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki.virtuals.json b/idls/5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki.virtuals.json deleted file mode 100644 index c0c7861..0000000 --- a/idls/5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki.virtuals.json +++ /dev/null @@ -1 +0,0 @@ -{"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/6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.pump_fun.json b/idls/6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.pump_fun.json deleted file mode 100644 index 670461a..0000000 --- a/idls/6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.pump_fun.json +++ /dev/null @@ -1 +0,0 @@ -{"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/6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc.kamino.json b/idls/6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc.kamino.json deleted file mode 100644 index eb8500e..0000000 --- a/idls/6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc.kamino.json +++ /dev/null @@ -1 +0,0 @@ -{"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/6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6.stabble_clmm.json b/idls/6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6.stabble_clmm.json deleted file mode 100644 index 24a105f..0000000 --- a/idls/6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6.stabble_clmm.json +++ /dev/null @@ -1 +0,0 @@ -{"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/6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn.layerzero_executor.json b/idls/6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn.layerzero_executor.json deleted file mode 100644 index 02f889a..0000000 --- a/idls/6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn.layerzero_executor.json +++ /dev/null @@ -1 +0,0 @@ -{"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/6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma.okx_lab_v1.json b/idls/6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma.okx_lab_v1.json deleted file mode 100644 index 723685a..0000000 --- a/idls/6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma.okx_lab_v1.json +++ /dev/null @@ -1 +0,0 @@ -{"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/76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6.layerzero_endpoint.json b/idls/76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6.layerzero_endpoint.json deleted file mode 100644 index acbb23a..0000000 --- a/idls/76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6.layerzero_endpoint.json +++ /dev/null @@ -1 +0,0 @@ -{"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/AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ.metadao_amm_v0.5.json b/idls/AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ.metadao_amm_v0.5.json deleted file mode 100644 index 1a3998f..0000000 --- a/idls/AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ.metadao_amm_v0.5.json +++ /dev/null @@ -1 +0,0 @@ -{"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/BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY.bubblegum.json b/idls/BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY.bubblegum.json deleted file mode 100644 index 8131dde..0000000 --- a/idls/BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY.bubblegum.json +++ /dev/null @@ -1 +0,0 @@ -{"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/BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.bonkswap.json b/idls/BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.bonkswap.json deleted file mode 100644 index 80b7b11..0000000 --- a/idls/BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.bonkswap.json +++ /dev/null @@ -1 +0,0 @@ -{"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/C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr.clone.json b/idls/C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr.clone.json deleted file mode 100644 index 9f57bed..0000000 --- a/idls/C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr.clone.json +++ /dev/null @@ -1 +0,0 @@ -{"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/CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.raydium_clmm.json b/idls/CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.raydium_clmm.json deleted file mode 100644 index de07bf6..0000000 --- a/idls/CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.raydium_clmm.json +++ /dev/null @@ -1 +0,0 @@ -{"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/CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe.cctp_v2.json b/idls/CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe.cctp_v2.json deleted file mode 100644 index 168bde5..0000000 --- a/idls/CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe.cctp_v2.json +++ /dev/null @@ -1 +0,0 @@ -{"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/CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3.cctp_v1.json b/idls/CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3.cctp_v1.json deleted file mode 100644 index 1c7342c..0000000 --- a/idls/CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3.cctp_v1.json +++ /dev/null @@ -1 +0,0 @@ -{"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/CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.raydium_cpmm.json b/idls/CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.raydium_cpmm.json deleted file mode 100644 index 8499ebe..0000000 --- a/idls/CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.raydium_cpmm.json +++ /dev/null @@ -1 +0,0 @@ -{"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/CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s.carrot.json b/idls/CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s.carrot.json deleted file mode 100644 index f3bbb6d..0000000 --- a/idls/CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s.carrot.json +++ /dev/null @@ -1 +0,0 @@ -{"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/DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M.jupiter_dca.json b/idls/DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M.jupiter_dca.json deleted file mode 100644 index bfcf77a..0000000 --- a/idls/DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M.jupiter_dca.json +++ /dev/null @@ -1 +0,0 @@ -{"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/DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH.dflow_v4.json b/idls/DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH.dflow_v4.json deleted file mode 100644 index d0a0765..0000000 --- a/idls/DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH.dflow_v4.json +++ /dev/null @@ -1 +0,0 @@ -{"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/DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB.saber_decimal.json b/idls/DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB.saber_decimal.json deleted file mode 100644 index e827bc7..0000000 --- a/idls/DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB.saber_decimal.json +++ /dev/null @@ -1 +0,0 @@ -{"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/Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB.meteora_pools_amm.json b/idls/Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB.meteora_pools_amm.json deleted file mode 100644 index 3c1bd2d..0000000 --- a/idls/Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB.meteora_pools_amm.json +++ /dev/null @@ -1 +0,0 @@ -{"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/EtrnLzgbS7nMMy5fbD42kXiUzGg8XQzJ972Xtk1cjWih.phoenix_eternal.json b/idls/EtrnLzgbS7nMMy5fbD42kXiUzGg8XQzJ972Xtk1cjWih.phoenix_eternal.json deleted file mode 100644 index e69de29..0000000 diff --git a/idls/FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq.metadao_futarchy.json b/idls/FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq.metadao_futarchy.json deleted file mode 100644 index 6d88d2c..0000000 --- a/idls/FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq.metadao_futarchy.json +++ /dev/null @@ -1 +0,0 @@ -{"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/FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr.kamino_farms.json b/idls/FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr.kamino_farms.json deleted file mode 100644 index 730916d..0000000 --- a/idls/FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr.kamino_farms.json +++ /dev/null @@ -1 +0,0 @@ -{"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/GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT.goosefx_gamma.json b/idls/GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT.goosefx_gamma.json deleted file mode 100644 index 6eadf43..0000000 --- a/idls/GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT.goosefx_gamma.json +++ /dev/null @@ -1 +0,0 @@ -{"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/GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn.goosefx_v2.json b/idls/GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn.goosefx_v2.json deleted file mode 100644 index da5ac1e..0000000 --- a/idls/GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn.goosefx_v2.json +++ /dev/null @@ -1 +0,0 @@ -{"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/Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1.guacswap.json b/idls/Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1.guacswap.json deleted file mode 100644 index 4f0b79b..0000000 --- a/idls/Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1.guacswap.json +++ /dev/null @@ -1 +0,0 @@ -{"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/HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn.hylo_exchange.json b/idls/HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn.hylo_exchange.json deleted file mode 100644 index 87e57a3..0000000 --- a/idls/HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn.hylo_exchange.json +++ /dev/null @@ -1 +0,0 @@ -{"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/HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq.pancakeswap.json b/idls/HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq.pancakeswap.json deleted file mode 100644 index ca82772..0000000 --- a/idls/HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq.pancakeswap.json +++ /dev/null @@ -1 +0,0 @@ -{"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/HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ.hylo_stability_pool.json b/idls/HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ.hylo_stability_pool.json deleted file mode 100644 index 8844cbd..0000000 --- a/idls/HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ.hylo_stability_pool.json +++ /dev/null @@ -1 +0,0 @@ -{"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/JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw.jupiter_aprepro_smart_wallet.json b/idls/JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw.jupiter_aprepro_smart_wallet.json deleted file mode 100644 index 7cc97ac..0000000 --- a/idls/JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw.jupiter_aprepro_smart_wallet.json +++ /dev/null @@ -1 +0,0 @@ -{"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/JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB.jupiter_v4.json b/idls/JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB.jupiter_v4.json deleted file mode 100644 index cd8a53a..0000000 --- a/idls/JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB.jupiter_v4.json +++ /dev/null @@ -1 +0,0 @@ -{"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/JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4.jupiter_v6.json b/idls/JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4.jupiter_v6.json deleted file mode 100644 index f385542..0000000 --- a/idls/JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4.jupiter_v6.json +++ /dev/null @@ -1 +0,0 @@ -{"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/JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr.jupiter_stable.json b/idls/JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr.jupiter_stable.json deleted file mode 100644 index 106f2b7..0000000 --- a/idls/JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr.jupiter_stable.json +++ /dev/null @@ -1 +0,0 @@ -{"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/KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD.kamino_lending.json b/idls/KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD.kamino_lending.json deleted file mode 100644 index 566e666..0000000 --- a/idls/KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD.kamino_lending.json +++ /dev/null @@ -1 +0,0 @@ -{"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/KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd.kamino_vault_v2.json b/idls/KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd.kamino_vault_v2.json deleted file mode 100644 index b4bf03e..0000000 --- a/idls/KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd.kamino_vault_v2.json +++ /dev/null @@ -1 +0,0 @@ -{"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/LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.meteora_dlmm.json b/idls/LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.meteora_dlmm.json deleted file mode 100644 index 31fdbda..0000000 --- a/idls/LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.meteora_dlmm.json +++ /dev/null @@ -1 +0,0 @@ -{"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/LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.raydium_launchlab.json b/idls/LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.raydium_launchlab.json deleted file mode 100644 index 52f4970..0000000 --- a/idls/LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.raydium_launchlab.json +++ /dev/null @@ -1 +0,0 @@ -{"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/LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.raydium_lock.json b/idls/LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.raydium_lock.json deleted file mode 100644 index eeb48fa..0000000 --- a/idls/LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.raydium_lock.json +++ /dev/null @@ -1 +0,0 @@ -{"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/LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn.jupiter_locker.json b/idls/LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn.jupiter_locker.json deleted file mode 100644 index fbbf423..0000000 --- a/idls/LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn.jupiter_locker.json +++ /dev/null @@ -1 +0,0 @@ -{"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/MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA.marginfi_v2.json b/idls/MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA.marginfi_v2.json deleted file mode 100644 index c829799..0000000 --- a/idls/MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA.marginfi_v2.json +++ /dev/null @@ -1 +0,0 @@ -{"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/MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD.marinade_finance.json b/idls/MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD.marinade_finance.json deleted file mode 100644 index 8b5674a..0000000 --- a/idls/MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD.marinade_finance.json +++ /dev/null @@ -1 +0,0 @@ -{"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/MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG.moonit.json b/idls/MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG.moonit.json deleted file mode 100644 index 8f66db1..0000000 --- a/idls/MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG.moonit.json +++ /dev/null @@ -1 +0,0 @@ -{"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/NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P.numeraire.json b/idls/NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P.numeraire.json deleted file mode 100644 index fb67676..0000000 --- a/idls/NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P.numeraire.json +++ /dev/null @@ -1 +0,0 @@ -{"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/PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu.jupiter_perpetuals.json b/idls/PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu.jupiter_perpetuals.json deleted file mode 100644 index f6b69b0..0000000 --- a/idls/PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu.jupiter_perpetuals.json +++ /dev/null @@ -1 +0,0 @@ -{"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/PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd.pumpup.json b/idls/PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd.pumpup.json deleted file mode 100644 index 3230b1d..0000000 --- a/idls/PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd.pumpup.json +++ /dev/null @@ -1 +0,0 @@ -{"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/REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2.byreal_clmm.json b/idls/REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2.byreal_clmm.json deleted file mode 100644 index 777071d..0000000 --- a/idls/REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2.byreal_clmm.json +++ /dev/null @@ -1 +0,0 @@ -{"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/SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf.squads.json b/idls/SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf.squads.json deleted file mode 100644 index 92bcbac..0000000 --- a/idls/SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf.squads.json +++ /dev/null @@ -1 +0,0 @@ -{"version":"2.0.0","name":"squads_multisig_program","instructions":[{"name":"programConfigInit","docs":["Initialize the program config."],"accounts":[{"name":"programConfig","isMut":true,"isSigner":false},{"name":"initializer","isMut":true,"isSigner":true,"docs":["The hard-coded account that is used to initialize the program config once."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ProgramConfigInitArgs"}}]},{"name":"programConfigSetAuthority","docs":["Set the `authority` parameter of the program config."],"accounts":[{"name":"programConfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"ProgramConfigSetAuthorityArgs"}}]},{"name":"programConfigSetMultisigCreationFee","docs":["Set the `multisig_creation_fee` parameter of the program config."],"accounts":[{"name":"programConfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"ProgramConfigSetMultisigCreationFeeArgs"}}]},{"name":"programConfigSetTreasury","docs":["Set the `treasury` parameter of the program config."],"accounts":[{"name":"programConfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"ProgramConfigSetTreasuryArgs"}}]},{"name":"multisigCreate","docs":["Create a multisig."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"createKey","isMut":false,"isSigner":true,"docs":["An ephemeral signer that is used as a seed for the Multisig PDA.","Must be a signer to prevent front-running attack by someone else but the original creator."]},{"name":"creator","isMut":true,"isSigner":true,"docs":["The creator of the multisig."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MultisigCreateArgs"}}]},{"name":"multisigCreateV2","docs":["Create a multisig."],"accounts":[{"name":"programConfig","isMut":false,"isSigner":false,"docs":["Global program config account."]},{"name":"treasury","isMut":true,"isSigner":false,"docs":["The treasury where the creation fee is transferred to."]},{"name":"multisig","isMut":true,"isSigner":false},{"name":"createKey","isMut":false,"isSigner":true,"docs":["An ephemeral signer that is used as a seed for the Multisig PDA.","Must be a signer to prevent front-running attack by someone else but the original creator."]},{"name":"creator","isMut":true,"isSigner":true,"docs":["The creator of the multisig."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MultisigCreateArgsV2"}}]},{"name":"multisigAddMember","docs":["Add a new member to the controlled multisig."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"configAuthority","isMut":false,"isSigner":true,"docs":["Multisig `config_authority` that must authorize the configuration change."]},{"name":"rentPayer","isMut":true,"isSigner":true,"isOptional":true,"docs":["The account that will be charged or credited in case the multisig account needs to reallocate space,","for example when adding a new member or a spending limit.","This is usually the same as `config_authority`, but can be a different account if needed."]},{"name":"systemProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["We might need it in case reallocation is needed."]}],"args":[{"name":"args","type":{"defined":"MultisigAddMemberArgs"}}]},{"name":"multisigRemoveMember","docs":["Remove a member/key from the controlled multisig."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"configAuthority","isMut":false,"isSigner":true,"docs":["Multisig `config_authority` that must authorize the configuration change."]},{"name":"rentPayer","isMut":true,"isSigner":true,"isOptional":true,"docs":["The account that will be charged or credited in case the multisig account needs to reallocate space,","for example when adding a new member or a spending limit.","This is usually the same as `config_authority`, but can be a different account if needed."]},{"name":"systemProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["We might need it in case reallocation is needed."]}],"args":[{"name":"args","type":{"defined":"MultisigRemoveMemberArgs"}}]},{"name":"multisigSetTimeLock","docs":["Set the `time_lock` config parameter for the controlled multisig."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"configAuthority","isMut":false,"isSigner":true,"docs":["Multisig `config_authority` that must authorize the configuration change."]},{"name":"rentPayer","isMut":true,"isSigner":true,"isOptional":true,"docs":["The account that will be charged or credited in case the multisig account needs to reallocate space,","for example when adding a new member or a spending limit.","This is usually the same as `config_authority`, but can be a different account if needed."]},{"name":"systemProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["We might need it in case reallocation is needed."]}],"args":[{"name":"args","type":{"defined":"MultisigSetTimeLockArgs"}}]},{"name":"multisigChangeThreshold","docs":["Set the `threshold` config parameter for the controlled multisig."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"configAuthority","isMut":false,"isSigner":true,"docs":["Multisig `config_authority` that must authorize the configuration change."]},{"name":"rentPayer","isMut":true,"isSigner":true,"isOptional":true,"docs":["The account that will be charged or credited in case the multisig account needs to reallocate space,","for example when adding a new member or a spending limit.","This is usually the same as `config_authority`, but can be a different account if needed."]},{"name":"systemProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["We might need it in case reallocation is needed."]}],"args":[{"name":"args","type":{"defined":"MultisigChangeThresholdArgs"}}]},{"name":"multisigSetConfigAuthority","docs":["Set the multisig `config_authority`."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"configAuthority","isMut":false,"isSigner":true,"docs":["Multisig `config_authority` that must authorize the configuration change."]},{"name":"rentPayer","isMut":true,"isSigner":true,"isOptional":true,"docs":["The account that will be charged or credited in case the multisig account needs to reallocate space,","for example when adding a new member or a spending limit.","This is usually the same as `config_authority`, but can be a different account if needed."]},{"name":"systemProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["We might need it in case reallocation is needed."]}],"args":[{"name":"args","type":{"defined":"MultisigSetConfigAuthorityArgs"}}]},{"name":"multisigSetRentCollector","docs":["Set the multisig `rent_collector`."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"configAuthority","isMut":false,"isSigner":true,"docs":["Multisig `config_authority` that must authorize the configuration change."]},{"name":"rentPayer","isMut":true,"isSigner":true,"isOptional":true,"docs":["The account that will be charged or credited in case the multisig account needs to reallocate space,","for example when adding a new member or a spending limit.","This is usually the same as `config_authority`, but can be a different account if needed."]},{"name":"systemProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["We might need it in case reallocation is needed."]}],"args":[{"name":"args","type":{"defined":"MultisigSetRentCollectorArgs"}}]},{"name":"multisigAddSpendingLimit","docs":["Create a new spending limit for the controlled multisig."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"configAuthority","isMut":false,"isSigner":true,"docs":["Multisig `config_authority` that must authorize the configuration change."]},{"name":"spendingLimit","isMut":true,"isSigner":false},{"name":"rentPayer","isMut":true,"isSigner":true,"docs":["This is usually the same as `config_authority`, but can be a different account if needed."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MultisigAddSpendingLimitArgs"}}]},{"name":"multisigRemoveSpendingLimit","docs":["Remove the spending limit from the controlled multisig."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"configAuthority","isMut":false,"isSigner":true,"docs":["Multisig `config_authority` that must authorize the configuration change."]},{"name":"spendingLimit","isMut":true,"isSigner":false},{"name":"rentCollector","isMut":true,"isSigner":false,"docs":["This is usually the same as `config_authority`, but can be a different account if needed."]}],"args":[{"name":"args","type":{"defined":"MultisigRemoveSpendingLimitArgs"}}]},{"name":"configTransactionCreate","docs":["Create a new config transaction."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"transaction","isMut":true,"isSigner":false},{"name":"creator","isMut":false,"isSigner":true,"docs":["The member of the multisig that is creating the transaction."]},{"name":"rentPayer","isMut":true,"isSigner":true,"docs":["The payer for the transaction account rent."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ConfigTransactionCreateArgs"}}]},{"name":"configTransactionExecute","docs":["Execute a config transaction.","The transaction must be `Approved`."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false,"docs":["The multisig account that owns the transaction."]},{"name":"member","isMut":false,"isSigner":true,"docs":["One of the multisig members with `Execute` permission."]},{"name":"proposal","isMut":true,"isSigner":false,"docs":["The proposal account associated with the transaction."]},{"name":"transaction","isMut":false,"isSigner":false,"docs":["The transaction to execute."]},{"name":"rentPayer","isMut":true,"isSigner":true,"isOptional":true,"docs":["The account that will be charged/credited in case the config transaction causes space reallocation,","for example when adding a new member, adding or removing a spending limit.","This is usually the same as `member`, but can be a different account if needed."]},{"name":"systemProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["We might need it in case reallocation is needed."]}],"args":[]},{"name":"vaultTransactionCreate","docs":["Create a new vault transaction."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"transaction","isMut":true,"isSigner":false},{"name":"creator","isMut":false,"isSigner":true,"docs":["The member of the multisig that is creating the transaction."]},{"name":"rentPayer","isMut":true,"isSigner":true,"docs":["The payer for the transaction account rent."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"VaultTransactionCreateArgs"}}]},{"name":"vaultTransactionExecute","docs":["Execute a vault transaction.","The transaction must be `Approved`."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"proposal","isMut":true,"isSigner":false,"docs":["The proposal account associated with the transaction."]},{"name":"transaction","isMut":false,"isSigner":false,"docs":["The transaction to execute."]},{"name":"member","isMut":false,"isSigner":true}],"args":[]},{"name":"batchCreate","docs":["Create a new batch."],"accounts":[{"name":"multisig","isMut":true,"isSigner":false},{"name":"batch","isMut":true,"isSigner":false},{"name":"creator","isMut":false,"isSigner":true,"docs":["The member of the multisig that is creating the batch."]},{"name":"rentPayer","isMut":true,"isSigner":true,"docs":["The payer for the batch account rent."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"BatchCreateArgs"}}]},{"name":"batchAddTransaction","docs":["Add a transaction to the batch."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false,"docs":["Multisig account this batch belongs to."]},{"name":"proposal","isMut":false,"isSigner":false,"docs":["The proposal account associated with the batch."]},{"name":"batch","isMut":true,"isSigner":false},{"name":"transaction","isMut":true,"isSigner":false,"docs":["`VaultBatchTransaction` account to initialize and add to the `batch`."]},{"name":"member","isMut":false,"isSigner":true,"docs":["Member of the multisig."]},{"name":"rentPayer","isMut":true,"isSigner":true,"docs":["The payer for the batch transaction account rent."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"BatchAddTransactionArgs"}}]},{"name":"batchExecuteTransaction","docs":["Execute a transaction from the batch."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false,"docs":["Multisig account this batch belongs to."]},{"name":"member","isMut":false,"isSigner":true,"docs":["Member of the multisig."]},{"name":"proposal","isMut":true,"isSigner":false,"docs":["The proposal account associated with the batch.","If `transaction` is the last in the batch, the `proposal` status will be set to `Executed`."]},{"name":"batch","isMut":true,"isSigner":false},{"name":"transaction","isMut":false,"isSigner":false,"docs":["Batch transaction to execute."]}],"args":[]},{"name":"proposalCreate","docs":["Create a new multisig proposal."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"proposal","isMut":true,"isSigner":false},{"name":"creator","isMut":false,"isSigner":true,"docs":["The member of the multisig that is creating the proposal."]},{"name":"rentPayer","isMut":true,"isSigner":true,"docs":["The payer for the proposal account rent."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ProposalCreateArgs"}}]},{"name":"proposalActivate","docs":["Update status of a multisig proposal from `Draft` to `Active`."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"member","isMut":true,"isSigner":true},{"name":"proposal","isMut":true,"isSigner":false}],"args":[]},{"name":"proposalApprove","docs":["Approve a multisig proposal on behalf of the `member`.","The proposal must be `Active`."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"member","isMut":true,"isSigner":true},{"name":"proposal","isMut":true,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ProposalVoteArgs"}}]},{"name":"proposalReject","docs":["Reject a multisig proposal on behalf of the `member`.","The proposal must be `Active`."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"member","isMut":true,"isSigner":true},{"name":"proposal","isMut":true,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ProposalVoteArgs"}}]},{"name":"proposalCancel","docs":["Cancel a multisig proposal on behalf of the `member`.","The proposal must be `Approved`."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"member","isMut":true,"isSigner":true},{"name":"proposal","isMut":true,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ProposalVoteArgs"}}]},{"name":"spendingLimitUse","docs":["Use a spending limit to transfer tokens from a multisig vault to a destination account."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false,"docs":["The multisig account the `spending_limit` is for."]},{"name":"member","isMut":false,"isSigner":true},{"name":"spendingLimit","isMut":true,"isSigner":false,"docs":["The SpendingLimit account to use."]},{"name":"vault","isMut":true,"isSigner":false,"docs":["Multisig vault account to transfer tokens from."]},{"name":"destination","isMut":true,"isSigner":false,"docs":["Destination account to transfer tokens to."]},{"name":"systemProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["In case `spending_limit.mint` is SOL."]},{"name":"mint","isMut":false,"isSigner":false,"isOptional":true,"docs":["The mint of the tokens to transfer in case `spending_limit.mint` is an SPL token."]},{"name":"vaultTokenAccount","isMut":true,"isSigner":false,"isOptional":true,"docs":["Multisig vault token account to transfer tokens from in case `spending_limit.mint` is an SPL token."]},{"name":"destinationTokenAccount","isMut":true,"isSigner":false,"isOptional":true,"docs":["Destination token account in case `spending_limit.mint` is an SPL token."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["In case `spending_limit.mint` is an SPL token."]}],"args":[{"name":"args","type":{"defined":"SpendingLimitUseArgs"}}]},{"name":"configTransactionAccountsClose","docs":["Closes a `ConfigTransaction` and the corresponding `Proposal`.","`transaction` can be closed if either:","- the `proposal` is in a terminal state: `Executed`, `Rejected`, or `Cancelled`.","- the `proposal` is stale."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"proposal","isMut":true,"isSigner":false},{"name":"transaction","isMut":true,"isSigner":false,"docs":["ConfigTransaction corresponding to the `proposal`."]},{"name":"rentCollector","isMut":true,"isSigner":false,"docs":["The rent collector."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"vaultTransactionAccountsClose","docs":["Closes a `VaultTransaction` and the corresponding `Proposal`.","`transaction` can be closed if either:","- the `proposal` is in a terminal state: `Executed`, `Rejected`, or `Cancelled`.","- the `proposal` is stale and not `Approved`."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"proposal","isMut":true,"isSigner":false},{"name":"transaction","isMut":true,"isSigner":false,"docs":["VaultTransaction corresponding to the `proposal`."]},{"name":"rentCollector","isMut":true,"isSigner":false,"docs":["The rent collector."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"vaultBatchTransactionAccountClose","docs":["Closes a `VaultBatchTransaction` belonging to the `batch` and `proposal`.","`transaction` can be closed if either:","- it's marked as executed within the `batch`;","- the `proposal` is in a terminal state: `Executed`, `Rejected`, or `Cancelled`.","- the `proposal` is stale and not `Approved`."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"proposal","isMut":false,"isSigner":false},{"name":"batch","isMut":true,"isSigner":false,"docs":["`Batch` corresponding to the `proposal`."]},{"name":"transaction","isMut":true,"isSigner":false,"docs":["`VaultBatchTransaction` account to close.","The transaction must be the current last one in the batch."]},{"name":"rentCollector","isMut":true,"isSigner":false,"docs":["The rent collector."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"batchAccountsClose","docs":["Closes Batch and the corresponding Proposal accounts for proposals in terminal states:","`Executed`, `Rejected`, or `Cancelled` or stale proposals that aren't `Approved`.","","This instruction is only allowed to be executed when all `VaultBatchTransaction` accounts","in the `batch` are already closed: `batch.size == 0`."],"accounts":[{"name":"multisig","isMut":false,"isSigner":false},{"name":"proposal","isMut":true,"isSigner":false},{"name":"batch","isMut":true,"isSigner":false,"docs":["`Batch` corresponding to the `proposal`."]},{"name":"rentCollector","isMut":true,"isSigner":false,"docs":["The rent collector."]},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"Batch","docs":["Stores data required for serial execution of a batch of multisig vault transactions.","Vault transaction is a transaction that's executed on behalf of the multisig vault PDA","and wraps arbitrary Solana instructions, typically calling into other Solana programs.","The transactions themselves are stored in separate PDAs associated with the this account."],"type":{"kind":"struct","fields":[{"name":"multisig","docs":["The multisig this belongs to."],"type":"publicKey"},{"name":"creator","docs":["Member of the Multisig who submitted the batch."],"type":"publicKey"},{"name":"index","docs":["Index of this batch within the multisig transactions."],"type":"u64"},{"name":"bump","docs":["PDA bump."],"type":"u8"},{"name":"vaultIndex","docs":["Index of the vault this batch belongs to."],"type":"u8"},{"name":"vaultBump","docs":["Derivation bump of the vault PDA this batch belongs to."],"type":"u8"},{"name":"size","docs":["Number of transactions in the batch."],"type":"u32"},{"name":"executedTransactionIndex","docs":["Index of the last executed transaction within the batch.","0 means that no transactions have been executed yet."],"type":"u32"}]}},{"name":"VaultBatchTransaction","docs":["Stores data required for execution of one transaction from a batch."],"type":{"kind":"struct","fields":[{"name":"bump","docs":["PDA bump."],"type":"u8"},{"name":"ephemeralSignerBumps","docs":["Derivation bumps for additional signers.","Some transactions require multiple signers. Often these additional signers are \"ephemeral\" keypairs","that are generated on the client with a sole purpose of signing the transaction and be discarded immediately after.","When wrapping such transactions into multisig ones, we replace these \"ephemeral\" signing keypairs","with PDAs derived from the transaction's `transaction_index` and controlled by the Multisig Program;","during execution the program includes the seeds of these PDAs into the `invoke_signed` calls,","thus \"signing\" on behalf of these PDAs."],"type":"bytes"},{"name":"message","docs":["data required for executing the transaction."],"type":{"defined":"VaultTransactionMessage"}}]}},{"name":"ConfigTransaction","docs":["Stores data required for execution of a multisig configuration transaction.","Config transaction can perform a predefined set of actions on the Multisig PDA, such as adding/removing members,","changing the threshold, etc."],"type":{"kind":"struct","fields":[{"name":"multisig","docs":["The multisig this belongs to."],"type":"publicKey"},{"name":"creator","docs":["Member of the Multisig who submitted the transaction."],"type":"publicKey"},{"name":"index","docs":["Index of this transaction within the multisig."],"type":"u64"},{"name":"bump","docs":["bump for the transaction seeds."],"type":"u8"},{"name":"actions","docs":["Action to be performed on the multisig."],"type":{"vec":{"defined":"ConfigAction"}}}]}},{"name":"Multisig","type":{"kind":"struct","fields":[{"name":"createKey","docs":["Key that is used to seed the multisig PDA."],"type":"publicKey"},{"name":"configAuthority","docs":["The authority that can change the multisig config.","This is a very important parameter as this authority can change the members and threshold.","","The convention is to set this to `Pubkey::default()`.","In this case, the multisig becomes autonomous, so every config change goes through","the normal process of voting by the members.","","However, if this parameter is set to any other key, all the config changes for this multisig","will need to be signed by the `config_authority`. We call such a multisig a \"controlled multisig\"."],"type":"publicKey"},{"name":"threshold","docs":["Threshold for signatures."],"type":"u16"},{"name":"timeLock","docs":["How many seconds must pass between transaction voting settlement and execution."],"type":"u32"},{"name":"transactionIndex","docs":["Last transaction index. 0 means no transactions have been created."],"type":"u64"},{"name":"staleTransactionIndex","docs":["Last stale transaction index. All transactions up until this index are stale.","This index is updated when multisig config (members/threshold/time_lock) changes."],"type":"u64"},{"name":"rentCollector","docs":["The address where the rent for the accounts related to executed, rejected, or cancelled","transactions can be reclaimed. If set to `None`, the rent reclamation feature is turned off."],"type":{"option":"publicKey"}},{"name":"bump","docs":["Bump for the multisig PDA seed."],"type":"u8"},{"name":"members","docs":["Members of the multisig."],"type":{"vec":{"defined":"Member"}}}]}},{"name":"ProgramConfig","docs":["Global program configuration account."],"type":{"kind":"struct","fields":[{"name":"authority","docs":["The authority which can update the config."],"type":"publicKey"},{"name":"multisigCreationFee","docs":["The lamports amount charged for creating a new multisig account.","This fee is sent to the `treasury` account."],"type":"u64"},{"name":"treasury","docs":["The treasury account to send charged fees to."],"type":"publicKey"},{"name":"reserved","docs":["Reserved for future use."],"type":{"array":["u8",64]}}]}},{"name":"Proposal","docs":["Stores the data required for tracking the status of a multisig proposal.","Each `Proposal` has a 1:1 association with a transaction account, e.g. a `VaultTransaction` or a `ConfigTransaction`;","the latter can be executed only after the `Proposal` has been approved and its time lock is released."],"type":{"kind":"struct","fields":[{"name":"multisig","docs":["The multisig this belongs to."],"type":"publicKey"},{"name":"transactionIndex","docs":["Index of the multisig transaction this proposal is associated with."],"type":"u64"},{"name":"status","docs":["The status of the transaction."],"type":{"defined":"ProposalStatus"}},{"name":"bump","docs":["PDA bump."],"type":"u8"},{"name":"approved","docs":["Keys that have approved/signed."],"type":{"vec":"publicKey"}},{"name":"rejected","docs":["Keys that have rejected."],"type":{"vec":"publicKey"}},{"name":"cancelled","docs":["Keys that have cancelled (Approved only)."],"type":{"vec":"publicKey"}}]}},{"name":"SpendingLimit","type":{"kind":"struct","fields":[{"name":"multisig","docs":["The multisig this belongs to."],"type":"publicKey"},{"name":"createKey","docs":["Key that is used to seed the SpendingLimit PDA."],"type":"publicKey"},{"name":"vaultIndex","docs":["The index of the vault that the spending limit is for."],"type":"u8"},{"name":"mint","docs":["The token mint the spending limit is for.","Pubkey::default() means SOL.","use NATIVE_MINT for Wrapped SOL."],"type":"publicKey"},{"name":"amount","docs":["The amount of tokens that can be spent in a period.","This amount is in decimals of the mint,","so 1 SOL would be `1_000_000_000` and 1 USDC would be `1_000_000`."],"type":"u64"},{"name":"period","docs":["The reset period of the spending limit.","When it passes, the remaining amount is reset, unless it's `Period::OneTime`."],"type":{"defined":"Period"}},{"name":"remainingAmount","docs":["The remaining amount of tokens that can be spent in the current period.","When reaches 0, the spending limit cannot be used anymore until the period reset."],"type":"u64"},{"name":"lastReset","docs":["Unix timestamp marking the last time the spending limit was reset (or created)."],"type":"i64"},{"name":"bump","docs":["PDA bump."],"type":"u8"},{"name":"members","docs":["Members of the multisig that can use the spending limit.","In case a member is removed from the multisig, the spending limit will remain existent","(until explicitly deleted), but the removed member will not be able to use it anymore."],"type":{"vec":"publicKey"}},{"name":"destinations","docs":["The destination addresses the spending limit is allowed to sent funds to.","If empty, funds can be sent to any address."],"type":{"vec":"publicKey"}}]}},{"name":"VaultTransaction","docs":["Stores data required for tracking the voting and execution status of a vault transaction.","Vault transaction is a transaction that's executed on behalf of the multisig vault PDA","and wraps arbitrary Solana instructions, typically calling into other Solana programs."],"type":{"kind":"struct","fields":[{"name":"multisig","docs":["The multisig this belongs to."],"type":"publicKey"},{"name":"creator","docs":["Member of the Multisig who submitted the transaction."],"type":"publicKey"},{"name":"index","docs":["Index of this transaction within the multisig."],"type":"u64"},{"name":"bump","docs":["bump for the transaction seeds."],"type":"u8"},{"name":"vaultIndex","docs":["Index of the vault this transaction belongs to."],"type":"u8"},{"name":"vaultBump","docs":["Derivation bump of the vault PDA this transaction belongs to."],"type":"u8"},{"name":"ephemeralSignerBumps","docs":["Derivation bumps for additional signers.","Some transactions require multiple signers. Often these additional signers are \"ephemeral\" keypairs","that are generated on the client with a sole purpose of signing the transaction and be discarded immediately after.","When wrapping such transactions into multisig ones, we replace these \"ephemeral\" signing keypairs","with PDAs derived from the MultisigTransaction's `transaction_index` and controlled by the Multisig Program;","during execution the program includes the seeds of these PDAs into the `invoke_signed` calls,","thus \"signing\" on behalf of these PDAs."],"type":"bytes"},{"name":"message","docs":["data required for executing the transaction."],"type":{"defined":"VaultTransactionMessage"}}]}}],"types":[{"name":"BatchAddTransactionArgs","type":{"kind":"struct","fields":[{"name":"ephemeralSigners","docs":["Number of ephemeral signing PDAs required by the transaction."],"type":"u8"},{"name":"transactionMessage","type":"bytes"}]}},{"name":"BatchCreateArgs","type":{"kind":"struct","fields":[{"name":"vaultIndex","docs":["Index of the vault this transaction belongs to."],"type":"u8"},{"name":"memo","type":{"option":"string"}}]}},{"name":"ConfigTransactionCreateArgs","type":{"kind":"struct","fields":[{"name":"actions","type":{"vec":{"defined":"ConfigAction"}}},{"name":"memo","type":{"option":"string"}}]}},{"name":"MultisigAddSpendingLimitArgs","type":{"kind":"struct","fields":[{"name":"createKey","docs":["Key that is used to seed the SpendingLimit PDA."],"type":"publicKey"},{"name":"vaultIndex","docs":["The index of the vault that the spending limit is for."],"type":"u8"},{"name":"mint","docs":["The token mint the spending limit is for."],"type":"publicKey"},{"name":"amount","docs":["The amount of tokens that can be spent in a period.","This amount is in decimals of the mint,","so 1 SOL would be `1_000_000_000` and 1 USDC would be `1_000_000`."],"type":"u64"},{"name":"period","docs":["The reset period of the spending limit.","When it passes, the remaining amount is reset, unless it's `Period::OneTime`."],"type":{"defined":"Period"}},{"name":"members","docs":["Members of the multisig that can use the spending limit.","In case a member is removed from the multisig, the spending limit will remain existent","(until explicitly deleted), but the removed member will not be able to use it anymore."],"type":{"vec":"publicKey"}},{"name":"destinations","docs":["The destination addresses the spending limit is allowed to sent funds to.","If empty, funds can be sent to any address."],"type":{"vec":"publicKey"}},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigAddMemberArgs","type":{"kind":"struct","fields":[{"name":"newMember","type":{"defined":"Member"}},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigRemoveMemberArgs","type":{"kind":"struct","fields":[{"name":"oldMember","type":"publicKey"},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigChangeThresholdArgs","type":{"kind":"struct","fields":[{"name":"newThreshold","type":"u16"},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigSetTimeLockArgs","type":{"kind":"struct","fields":[{"name":"timeLock","type":"u32"},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigSetConfigAuthorityArgs","type":{"kind":"struct","fields":[{"name":"configAuthority","type":"publicKey"},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigSetRentCollectorArgs","type":{"kind":"struct","fields":[{"name":"rentCollector","type":{"option":"publicKey"}},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigCreateArgs","type":{"kind":"struct","fields":[{"name":"configAuthority","docs":["The authority that can configure the multisig: add/remove members, change the threshold, etc.","Should be set to `None` for autonomous multisigs."],"type":{"option":"publicKey"}},{"name":"threshold","docs":["The number of signatures required to execute a transaction."],"type":"u16"},{"name":"members","docs":["The members of the multisig."],"type":{"vec":{"defined":"Member"}}},{"name":"timeLock","docs":["How many seconds must pass between transaction voting, settlement, and execution."],"type":"u32"},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigCreateArgsV2","type":{"kind":"struct","fields":[{"name":"configAuthority","docs":["The authority that can configure the multisig: add/remove members, change the threshold, etc.","Should be set to `None` for autonomous multisigs."],"type":{"option":"publicKey"}},{"name":"threshold","docs":["The number of signatures required to execute a transaction."],"type":"u16"},{"name":"members","docs":["The members of the multisig."],"type":{"vec":{"defined":"Member"}}},{"name":"timeLock","docs":["How many seconds must pass between transaction voting, settlement, and execution."],"type":"u32"},{"name":"rentCollector","docs":["The address where the rent for the accounts related to executed, rejected, or cancelled","transactions can be reclaimed. If set to `None`, the rent reclamation feature is turned off."],"type":{"option":"publicKey"}},{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"MultisigRemoveSpendingLimitArgs","type":{"kind":"struct","fields":[{"name":"memo","docs":["Memo is used for indexing only."],"type":{"option":"string"}}]}},{"name":"ProgramConfigInitArgs","type":{"kind":"struct","fields":[{"name":"authority","docs":["The authority that can configure the program config: change the treasury, etc."],"type":"publicKey"},{"name":"multisigCreationFee","docs":["The fee that is charged for creating a new multisig."],"type":"u64"},{"name":"treasury","docs":["The treasury where the creation fee is transferred to."],"type":"publicKey"}]}},{"name":"ProgramConfigSetAuthorityArgs","type":{"kind":"struct","fields":[{"name":"newAuthority","type":"publicKey"}]}},{"name":"ProgramConfigSetMultisigCreationFeeArgs","type":{"kind":"struct","fields":[{"name":"newMultisigCreationFee","type":"u64"}]}},{"name":"ProgramConfigSetTreasuryArgs","type":{"kind":"struct","fields":[{"name":"newTreasury","type":"publicKey"}]}},{"name":"ProposalCreateArgs","type":{"kind":"struct","fields":[{"name":"transactionIndex","docs":["Index of the multisig transaction this proposal is associated with."],"type":"u64"},{"name":"draft","docs":["Whether the proposal should be initialized with status `Draft`."],"type":"bool"}]}},{"name":"ProposalVoteArgs","type":{"kind":"struct","fields":[{"name":"memo","type":{"option":"string"}}]}},{"name":"SpendingLimitUseArgs","type":{"kind":"struct","fields":[{"name":"amount","docs":["Amount of tokens to transfer."],"type":"u64"},{"name":"decimals","docs":["Decimals of the token mint. Used for double-checking against incorrect order of magnitude of `amount`."],"type":"u8"},{"name":"memo","docs":["Memo used for indexing."],"type":{"option":"string"}}]}},{"name":"VaultTransactionCreateArgs","type":{"kind":"struct","fields":[{"name":"vaultIndex","docs":["Index of the vault this transaction belongs to."],"type":"u8"},{"name":"ephemeralSigners","docs":["Number of ephemeral signing PDAs required by the transaction."],"type":"u8"},{"name":"transactionMessage","type":"bytes"},{"name":"memo","type":{"option":"string"}}]}},{"name":"TransactionMessage","docs":["Unvalidated instruction data, must be treated as untrusted."],"type":{"kind":"struct","fields":[{"name":"numSigners","docs":["The number of signer pubkeys in the account_keys vec."],"type":"u8"},{"name":"numWritableSigners","docs":["The number of writable signer pubkeys in the account_keys vec."],"type":"u8"},{"name":"numWritableNonSigners","docs":["The number of writable non-signer pubkeys in the account_keys vec."],"type":"u8"},{"name":"accountKeys","docs":["The list of unique account public keys (including program IDs) that will be used in the provided instructions."],"type":{"defined":"SmallVec"}},{"name":"instructions","docs":["The list of instructions to execute."],"type":{"defined":"SmallVec"}},{"name":"addressTableLookups","docs":["List of address table lookups used to load additional accounts","for this transaction."],"type":{"defined":"SmallVec"}}]}},{"name":"CompiledInstruction","type":{"kind":"struct","fields":[{"name":"programIdIndex","type":"u8"},{"name":"accountIndexes","docs":["Indices into the tx's `account_keys` list indicating which accounts to pass to the instruction."],"type":{"defined":"SmallVec"}},{"name":"data","docs":["Instruction data."],"type":{"defined":"SmallVec"}}]}},{"name":"MessageAddressTableLookup","docs":["Address table lookups describe an on-chain address lookup table to use","for loading more readonly and writable accounts in a single tx."],"type":{"kind":"struct","fields":[{"name":"accountKey","docs":["Address lookup table account key"],"type":"publicKey"},{"name":"writableIndexes","docs":["List of indexes used to load writable account addresses"],"type":{"defined":"SmallVec"}},{"name":"readonlyIndexes","docs":["List of indexes used to load readonly account addresses"],"type":{"defined":"SmallVec"}}]}},{"name":"Member","type":{"kind":"struct","fields":[{"name":"key","type":"publicKey"},{"name":"permissions","type":{"defined":"Permissions"}}]}},{"name":"Permissions","docs":["Bitmask for permissions."],"type":{"kind":"struct","fields":[{"name":"mask","type":"u8"}]}},{"name":"VaultTransactionMessage","type":{"kind":"struct","fields":[{"name":"numSigners","docs":["The number of signer pubkeys in the account_keys vec."],"type":"u8"},{"name":"numWritableSigners","docs":["The number of writable signer pubkeys in the account_keys vec."],"type":"u8"},{"name":"numWritableNonSigners","docs":["The number of writable non-signer pubkeys in the account_keys vec."],"type":"u8"},{"name":"accountKeys","docs":["Unique account pubkeys (including program IDs) required for execution of the tx.","The signer pubkeys appear at the beginning of the vec, with writable pubkeys first, and read-only pubkeys following.","The non-signer pubkeys follow with writable pubkeys first and read-only ones following.","Program IDs are also stored at the end of the vec along with other non-signer non-writable pubkeys:","","```plaintext","[pubkey1, pubkey2, pubkey3, pubkey4, pubkey5, pubkey6, pubkey7, pubkey8]","|---writable---| |---readonly---| |---writable---| |---readonly---|","|------------signers-------------| |----------non-singers-----------|","```"],"type":{"vec":"publicKey"}},{"name":"instructions","docs":["List of instructions making up the tx."],"type":{"vec":{"defined":"MultisigCompiledInstruction"}}},{"name":"addressTableLookups","docs":["List of address table lookups used to load additional accounts","for this transaction."],"type":{"vec":{"defined":"MultisigMessageAddressTableLookup"}}}]}},{"name":"MultisigCompiledInstruction","docs":["Concise serialization schema for instructions that make up a transaction.","Closely mimics the Solana transaction wire format."],"type":{"kind":"struct","fields":[{"name":"programIdIndex","type":"u8"},{"name":"accountIndexes","docs":["Indices into the tx's `account_keys` list indicating which accounts to pass to the instruction."],"type":"bytes"},{"name":"data","docs":["Instruction data."],"type":"bytes"}]}},{"name":"MultisigMessageAddressTableLookup","docs":["Address table lookups describe an on-chain address lookup table to use","for loading more readonly and writable accounts into a transaction."],"type":{"kind":"struct","fields":[{"name":"accountKey","docs":["Address lookup table account key."],"type":"publicKey"},{"name":"writableIndexes","docs":["List of indexes used to load writable accounts."],"type":"bytes"},{"name":"readonlyIndexes","docs":["List of indexes used to load readonly accounts."],"type":"bytes"}]}},{"name":"Vote","type":{"kind":"enum","variants":[{"name":"Approve"},{"name":"Reject"},{"name":"Cancel"}]}},{"name":"ConfigAction","type":{"kind":"enum","variants":[{"name":"AddMember","fields":[{"name":"newMember","type":{"defined":"Member"}}]},{"name":"RemoveMember","fields":[{"name":"oldMember","type":"publicKey"}]},{"name":"ChangeThreshold","fields":[{"name":"newThreshold","type":"u16"}]},{"name":"SetTimeLock","fields":[{"name":"newTimeLock","type":"u32"}]},{"name":"AddSpendingLimit","fields":[{"name":"createKey","docs":["Key that is used to seed the SpendingLimit PDA."],"type":"publicKey"},{"name":"vaultIndex","docs":["The index of the vault that the spending limit is for."],"type":"u8"},{"name":"mint","docs":["The token mint the spending limit is for."],"type":"publicKey"},{"name":"amount","docs":["The amount of tokens that can be spent in a period.","This amount is in decimals of the mint,","so 1 SOL would be `1_000_000_000` and 1 USDC would be `1_000_000`."],"type":"u64"},{"name":"period","docs":["The reset period of the spending limit.","When it passes, the remaining amount is reset, unless it's `Period::OneTime`."],"type":{"defined":"Period"}},{"name":"members","docs":["Members of the multisig that can use the spending limit.","In case a member is removed from the multisig, the spending limit will remain existent","(until explicitly deleted), but the removed member will not be able to use it anymore."],"type":{"vec":"publicKey"}},{"name":"destinations","docs":["The destination addresses the spending limit is allowed to sent funds to.","If empty, funds can be sent to any address."],"type":{"vec":"publicKey"}}]},{"name":"RemoveSpendingLimit","fields":[{"name":"spendingLimit","type":"publicKey"}]},{"name":"SetRentCollector","fields":[{"name":"newRentCollector","type":{"option":"publicKey"}}]}]}},{"name":"Permission","type":{"kind":"enum","variants":[{"name":"Initiate"},{"name":"Vote"},{"name":"Execute"}]}},{"name":"ProposalStatus","docs":["The status of a proposal.","Each variant wraps a timestamp of when the status was set."],"type":{"kind":"enum","variants":[{"name":"Draft","fields":[{"name":"timestamp","type":"i64"}]},{"name":"Active","fields":[{"name":"timestamp","type":"i64"}]},{"name":"Rejected","fields":[{"name":"timestamp","type":"i64"}]},{"name":"Approved","fields":[{"name":"timestamp","type":"i64"}]},{"name":"Executing"},{"name":"Executed","fields":[{"name":"timestamp","type":"i64"}]},{"name":"Cancelled","fields":[{"name":"timestamp","type":"i64"}]}]}},{"name":"Period","docs":["The reset period of the spending limit."],"type":{"kind":"enum","variants":[{"name":"OneTime"},{"name":"Day"},{"name":"Week"},{"name":"Month"}]}}],"errors":[{"code":6000,"name":"DuplicateMember","msg":"Found multiple members with the same pubkey"},{"code":6001,"name":"EmptyMembers","msg":"Members array is empty"},{"code":6002,"name":"TooManyMembers","msg":"Too many members, can be up to 65535"},{"code":6003,"name":"InvalidThreshold","msg":"Invalid threshold, must be between 1 and number of members with Vote permission"},{"code":6004,"name":"Unauthorized","msg":"Attempted to perform an unauthorized action"},{"code":6005,"name":"NotAMember","msg":"Provided pubkey is not a member of multisig"},{"code":6006,"name":"InvalidTransactionMessage","msg":"TransactionMessage is malformed."},{"code":6007,"name":"StaleProposal","msg":"Proposal is stale"},{"code":6008,"name":"InvalidProposalStatus","msg":"Invalid proposal status"},{"code":6009,"name":"InvalidTransactionIndex","msg":"Invalid transaction index"},{"code":6010,"name":"AlreadyApproved","msg":"Member already approved the transaction"},{"code":6011,"name":"AlreadyRejected","msg":"Member already rejected the transaction"},{"code":6012,"name":"AlreadyCancelled","msg":"Member already cancelled the transaction"},{"code":6013,"name":"InvalidNumberOfAccounts","msg":"Wrong number of accounts provided"},{"code":6014,"name":"InvalidAccount","msg":"Invalid account provided"},{"code":6015,"name":"RemoveLastMember","msg":"Cannot remove last member"},{"code":6016,"name":"NoVoters","msg":"Members don't include any voters"},{"code":6017,"name":"NoProposers","msg":"Members don't include any proposers"},{"code":6018,"name":"NoExecutors","msg":"Members don't include any executors"},{"code":6019,"name":"InvalidStaleTransactionIndex","msg":"`stale_transaction_index` must be <= `transaction_index`"},{"code":6020,"name":"NotSupportedForControlled","msg":"Instruction not supported for controlled multisig"},{"code":6021,"name":"TimeLockNotReleased","msg":"Proposal time lock has not been released"},{"code":6022,"name":"NoActions","msg":"Config transaction must have at least one action"},{"code":6023,"name":"MissingAccount","msg":"Missing account"},{"code":6024,"name":"InvalidMint","msg":"Invalid mint"},{"code":6025,"name":"InvalidDestination","msg":"Invalid destination"},{"code":6026,"name":"SpendingLimitExceeded","msg":"Spending limit exceeded"},{"code":6027,"name":"DecimalsMismatch","msg":"Decimals don't match the mint"},{"code":6028,"name":"UnknownPermission","msg":"Member has unknown permission"},{"code":6029,"name":"ProtectedAccount","msg":"Account is protected, it cannot be passed into a CPI as writable"},{"code":6030,"name":"TimeLockExceedsMaxAllowed","msg":"Time lock exceeds the maximum allowed (90 days)"},{"code":6031,"name":"IllegalAccountOwner","msg":"Account is not owned by Multisig program"},{"code":6032,"name":"RentReclamationDisabled","msg":"Rent reclamation is disabled for this multisig"},{"code":6033,"name":"InvalidRentCollector","msg":"Invalid rent collector address"},{"code":6034,"name":"ProposalForAnotherMultisig","msg":"Proposal is for another multisig"},{"code":6035,"name":"TransactionForAnotherMultisig","msg":"Transaction is for another multisig"},{"code":6036,"name":"TransactionNotMatchingProposal","msg":"Transaction doesn't match proposal"},{"code":6037,"name":"TransactionNotLastInBatch","msg":"Transaction is not last in batch"},{"code":6038,"name":"BatchNotEmpty","msg":"Batch is not empty"},{"code":6039,"name":"SpendingLimitInvalidAmount","msg":"Invalid SpendingLimit amount"}]} \ No newline at end of file diff --git a/idls/T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint.printr.json b/idls/T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint.printr.json deleted file mode 100644 index 2899019..0000000 --- a/idls/T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint.printr.json +++ /dev/null @@ -1 +0,0 @@ -{"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/TCMPhJdwDryooaGtiocG1u3xcYbRpiJzb283XfCZsDp.tensor-cnft.json b/idls/TCMPhJdwDryooaGtiocG1u3xcYbRpiJzb283XfCZsDp.tensor-cnft.json deleted file mode 100644 index 088d031..0000000 --- a/idls/TCMPhJdwDryooaGtiocG1u3xcYbRpiJzb283XfCZsDp.tensor-cnft.json +++ /dev/null @@ -1 +0,0 @@ -{"version":"2.0.1","name":"tcomp","constants":[{"name":"CURRENT_TCOMP_VERSION","type":"u8","value":"1"},{"name":"TCOMP_FEE_BPS","type":"u16","value":"150"},{"name":"MAX_EXPIRY_SEC","type":"i64","value":"31536000"},{"name":"MAKER_BROKER_PCT","type":"u16","value":"0"},{"name":"LIST_STATE_SIZE","type":{"defined":"usize"},"value":"8 + 1 + 1 + (32 * 2) + 8 + 33 + 8 + (33 * 2) + 128"},{"name":"BID_STATE_SIZE","type":{"defined":"usize"},"value":"8 + 1 + 1 + (32 * 2) + 1 + 32 + 2 + 33 + 4 * 2 + 8 + 33 + 8 + (33 * 3) + 128"}],"instructions":[{"name":"tcompNoop","accounts":[{"name":"tcompSigner","isMut":false,"isSigner":true}],"args":[{"name":"event","type":{"defined":"TcompEvent"}}]},{"name":"withdrawFees","accounts":[{"name":"tswap","isMut":true,"isSigner":false},{"name":"tcomp","isMut":true,"isSigner":false},{"name":"cosigner","isMut":false,"isSigner":true,"docs":["We ask also for a signature just to make sure this wallet can actually sign things"]},{"name":"owner","isMut":true,"isSigner":true},{"name":"destination","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"buy","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"treeAuthority","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},{"name":"bubblegumProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"listState","isMut":true,"isSigner":false},{"name":"buyer","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"owner","isMut":true,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"root","type":{"array":["u8",32]}},{"name":"metaHash","type":{"array":["u8",32]}},{"name":"creatorShares","type":"bytes"},{"name":"creatorVerified","type":{"vec":"bool"}},{"name":"sellerFeeBasisPoints","type":"u16"},{"name":"maxAmount","type":"u64"},{"name":"optionalRoyaltyPct","type":{"option":"u16"}}]},{"name":"buySpl","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"tcompAta","isMut":true,"isSigner":false},{"name":"treeAuthority","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},{"name":"bubblegumProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"listState","isMut":true,"isSigner":false},{"name":"buyer","isMut":false,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"payerSource","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":false},{"name":"ownerDest","isMut":true,"isSigner":false},{"name":"currency","isMut":false,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"takerBrokerAta","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBrokerAta","isMut":true,"isSigner":false,"isOptional":true},{"name":"rentDest","isMut":true,"isSigner":false},{"name":"rentPayer","isMut":true,"isSigner":true}],"args":[{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"root","type":{"array":["u8",32]}},{"name":"metaHash","type":{"array":["u8",32]}},{"name":"creatorShares","type":"bytes"},{"name":"creatorVerified","type":{"vec":"bool"}},{"name":"sellerFeeBasisPoints","type":"u16"},{"name":"maxAmount","type":"u64"},{"name":"optionalRoyaltyPct","type":{"option":"u16"}}]},{"name":"buyCore","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"listState","isMut":true,"isSigner":false},{"name":"asset","isMut":true,"isSigner":false},{"name":"collection","isMut":false,"isSigner":false,"isOptional":true},{"name":"buyer","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"owner","isMut":true,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"rentDest","isMut":true,"isSigner":false},{"name":"mplCoreProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxAmount","type":"u64"}]},{"name":"list","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"owner","isMut":false,"isSigner":false},{"name":"delegate","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},{"name":"bubblegumProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"listState","isMut":true,"isSigner":false},{"name":"rentPayer","isMut":true,"isSigner":true}],"args":[{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"amount","type":"u64"},{"name":"expireInSec","type":{"option":"u64"}},{"name":"currency","type":{"option":"publicKey"}},{"name":"privateTaker","type":{"option":"publicKey"}},{"name":"makerBroker","type":{"option":"publicKey"}}]},{"name":"delist","accounts":[{"name":"treeAuthority","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},{"name":"bubblegumProgram","isMut":false,"isSigner":false},{"name":"listState","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}}]},{"name":"edit","accounts":[{"name":"listState","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"tcompProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"},{"name":"expireInSec","type":{"option":"u64"}},{"name":"currency","type":{"option":"publicKey"}},{"name":"privateTaker","type":{"option":"publicKey"}},{"name":"makerBroker","type":{"option":"publicKey"}}]},{"name":"listCore","accounts":[{"name":"asset","isMut":true,"isSigner":false},{"name":"collection","isMut":false,"isSigner":false,"isOptional":true},{"name":"listState","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"mplCoreProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true}],"args":[{"name":"amount","type":"u64"},{"name":"expireInSec","type":{"option":"u64"}},{"name":"currency","type":{"option":"publicKey"}},{"name":"privateTaker","type":{"option":"publicKey"}},{"name":"makerBroker","type":{"option":"publicKey"}}]},{"name":"delistCore","accounts":[{"name":"asset","isMut":true,"isSigner":false},{"name":"collection","isMut":false,"isSigner":false,"isOptional":true},{"name":"owner","isMut":true,"isSigner":true},{"name":"listState","isMut":true,"isSigner":false},{"name":"mplCoreProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rentDest","isMut":true,"isSigner":true}],"args":[]},{"name":"bid","accounts":[{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"cosigner","isMut":false,"isSigner":true},{"name":"rentPayer","isMut":true,"isSigner":true}],"args":[{"name":"bidId","type":"publicKey"},{"name":"target","type":{"defined":"Target"}},{"name":"targetId","type":"publicKey"},{"name":"field","type":{"option":{"defined":"Field"}}},{"name":"fieldId","type":{"option":"publicKey"}},{"name":"amount","type":"u64"},{"name":"quantity","type":"u32"},{"name":"expireInSec","type":{"option":"u64"}},{"name":"currency","type":{"option":"publicKey"}},{"name":"privateTaker","type":{"option":"publicKey"}},{"name":"makerBroker","type":{"option":"publicKey"}}]},{"name":"cancelBid","accounts":[{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[]},{"name":"closeExpiredBid","accounts":[{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[]},{"name":"closeExpiredListing","accounts":[{"name":"listState","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"bubblegumProgram","isMut":false,"isSigner":false},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}}]},{"name":"closeExpiredListingCore","accounts":[{"name":"listState","isMut":true,"isSigner":false},{"name":"asset","isMut":true,"isSigner":false},{"name":"collection","isMut":false,"isSigner":false,"isOptional":true},{"name":"owner","isMut":false,"isSigner":false},{"name":"mplCoreProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[]},{"name":"takeBidMetaHash","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"seller","isMut":true,"isSigner":false},{"name":"delegate","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},{"name":"bubblegumProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"tensorswapProgram","isMut":false,"isSigner":false},{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"whitelist","isMut":false,"isSigner":false},{"name":"cosigner","isMut":false,"isSigner":true},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"root","type":{"array":["u8",32]}},{"name":"metaHash","type":{"array":["u8",32]}},{"name":"creatorShares","type":"bytes"},{"name":"creatorVerified","type":{"vec":"bool"}},{"name":"sellerFeeBasisPoints","type":"u16"},{"name":"minAmount","type":"u64"},{"name":"optionalRoyaltyPct","type":{"option":"u16"}}]},{"name":"takeBidFullMeta","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"seller","isMut":true,"isSigner":false},{"name":"delegate","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},{"name":"bubblegumProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"tensorswapProgram","isMut":false,"isSigner":false},{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"whitelist","isMut":false,"isSigner":false},{"name":"cosigner","isMut":false,"isSigner":true},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"root","type":{"array":["u8",32]}},{"name":"metaArgs","type":{"defined":"TMetadataArgs"}},{"name":"minAmount","type":"u64"},{"name":"optionalRoyaltyPct","type":{"option":"u16"}}]},{"name":"takeBidLegacy","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"seller","isMut":true,"isSigner":true},{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"whitelist","isMut":false,"isSigner":false},{"name":"nftSellerAcc","isMut":true,"isSigner":false},{"name":"nftMint","isMut":false,"isSigner":false},{"name":"nftMetadata","isMut":true,"isSigner":false},{"name":"ownerAtaAcc","isMut":true,"isSigner":false},{"name":"nftEdition","isMut":false,"isSigner":false},{"name":"ownerTokenRecord","isMut":true,"isSigner":false},{"name":"destTokenRecord","isMut":true,"isSigner":false},{"name":"pnftShared","accounts":[{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false},{"name":"authorizationRulesProgram","isMut":false,"isSigner":false}]},{"name":"nftEscrow","isMut":true,"isSigner":false,"docs":["Implicitly checked via transfer. Will fail if wrong account"]},{"name":"tempEscrowTokenRecord","isMut":true,"isSigner":false},{"name":"authRules","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"tensorswapProgram","isMut":false,"isSigner":false},{"name":"cosigner","isMut":false,"isSigner":true},{"name":"mintProof","isMut":false,"isSigner":false,"docs":["intentionally not deserializing, it would be dummy in the case of VOC/FVC based verification"]},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[{"name":"minAmount","type":"u64"},{"name":"optionalRoyaltyPct","type":{"option":"u16"}},{"name":"rulesAccPresent","type":"bool"},{"name":"authorizationData","type":{"option":{"defined":"AuthorizationDataLocal"}}}]},{"name":"takeBidT22","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"seller","isMut":true,"isSigner":true},{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"whitelist","isMut":false,"isSigner":false},{"name":"nftSellerAcc","isMut":true,"isSigner":false},{"name":"nftMint","isMut":false,"isSigner":false},{"name":"ownerAtaAcc","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"tensorswapProgram","isMut":false,"isSigner":false},{"name":"cosigner","isMut":false,"isSigner":true},{"name":"mintProof","isMut":false,"isSigner":false,"docs":["intentionally not deserializing, it would be dummy in the case of VOC/FVC based verification"]},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[{"name":"minAmount","type":"u64"}]},{"name":"takeBidWns","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"seller","isMut":true,"isSigner":true},{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"whitelist","isMut":false,"isSigner":false},{"name":"nftSellerAcc","isMut":true,"isSigner":false},{"name":"nftMint","isMut":false,"isSigner":false},{"name":"ownerAtaAcc","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"tensorswapProgram","isMut":false,"isSigner":false},{"name":"cosigner","isMut":false,"isSigner":true},{"name":"mintProof","isMut":false,"isSigner":false,"docs":["intentionally not deserializing, it would be dummy in the case of VOC/FVC based verification"]},{"name":"rentDest","isMut":true,"isSigner":false},{"name":"approveAccount","isMut":true,"isSigner":false},{"name":"distribution","isMut":true,"isSigner":false},{"name":"wnsProgram","isMut":false,"isSigner":false},{"name":"distributionProgram","isMut":false,"isSigner":false},{"name":"extraMetas","isMut":false,"isSigner":false}],"args":[{"name":"minAmount","type":"u64"}]},{"name":"takeBidCore","accounts":[{"name":"tcomp","isMut":true,"isSigner":false},{"name":"seller","isMut":true,"isSigner":true},{"name":"bidState","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":false},{"name":"takerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"makerBroker","isMut":true,"isSigner":false,"isOptional":true},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"whitelist","isMut":false,"isSigner":false},{"name":"asset","isMut":true,"isSigner":false},{"name":"collection","isMut":false,"isSigner":false,"isOptional":true},{"name":"mplCoreProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tcompProgram","isMut":false,"isSigner":false},{"name":"tensorswapProgram","isMut":false,"isSigner":false},{"name":"cosigner","isMut":false,"isSigner":true},{"name":"mintProof","isMut":false,"isSigner":false,"docs":["intentionally not deserializing, it would be dummy in the case of VOC/FVC based verification"]},{"name":"rentDest","isMut":true,"isSigner":false}],"args":[{"name":"minAmount","type":"u64"}]}],"accounts":[{"name":"ListState","type":{"kind":"struct","fields":[{"name":"version","type":"u8"},{"name":"bump","type":{"array":["u8",1]}},{"name":"owner","type":"publicKey"},{"name":"assetId","type":"publicKey"},{"name":"amount","type":"u64"},{"name":"currency","type":{"option":"publicKey"}},{"name":"expiry","type":"i64"},{"name":"privateTaker","type":{"option":"publicKey"}},{"name":"makerBroker","type":{"option":"publicKey"}},{"name":"rentPayer","docs":["owner is the rent payer when this is PublicKey::default"],"type":"publicKey"},{"name":"reserved","type":{"array":["u8",32]}},{"name":"reserved1","type":{"array":["u8",64]}}]}},{"name":"BidState","type":{"kind":"struct","fields":[{"name":"version","type":"u8"},{"name":"bump","type":{"array":["u8",1]}},{"name":"owner","type":"publicKey"},{"name":"bidId","docs":["Randomly picked pubkey used in bid seeds. To avoid dangling bids can use assetId here."],"type":"publicKey"},{"name":"target","type":{"defined":"Target"}},{"name":"targetId","type":"publicKey"},{"name":"field","type":{"option":{"defined":"Field"}}},{"name":"fieldId","type":{"option":"publicKey"}},{"name":"quantity","type":"u32"},{"name":"filledQuantity","type":"u32"},{"name":"amount","type":"u64"},{"name":"currency","type":{"option":"publicKey"}},{"name":"expiry","type":"i64"},{"name":"privateTaker","type":{"option":"publicKey"}},{"name":"makerBroker","type":{"option":"publicKey"}},{"name":"margin","type":{"option":"publicKey"}},{"name":"updatedAt","type":"i64"},{"name":"cosigner","type":"publicKey"},{"name":"rentPayer","docs":["owner is the rent payer when this is PublicKey::default"],"type":"publicKey"},{"name":"reserved","type":{"array":["u8",8]}},{"name":"reserved1","type":{"array":["u8",16]}},{"name":"reserved2","type":{"array":["u8",32]}}]}}],"types":[{"name":"TUses","type":{"kind":"struct","fields":[{"name":"useMethod","type":{"defined":"TUseMethod"}},{"name":"remaining","type":"u64"},{"name":"total","type":"u64"}]}},{"name":"TCollection","type":{"kind":"struct","fields":[{"name":"verified","type":"bool"},{"name":"key","type":"publicKey"}]}},{"name":"TMetadataArgs","type":{"kind":"struct","fields":[{"name":"name","docs":["The name of the asset"],"type":"string"},{"name":"symbol","docs":["The symbol for the asset"],"type":"string"},{"name":"uri","docs":["URI pointing to JSON representing the asset"],"type":"string"},{"name":"sellerFeeBasisPoints","docs":["Royalty basis points that goes to creators in secondary sales (0-10000)"],"type":"u16"},{"name":"primarySaleHappened","type":"bool"},{"name":"isMutable","type":"bool"},{"name":"editionNonce","docs":["nonce for easy calculation of editions, if present"],"type":{"option":"u8"}},{"name":"tokenStandard","docs":["Since we cannot easily change Metadata, we add the new DataV2 fields here at the end."],"type":{"option":{"defined":"TTokenStandard"}}},{"name":"collection","docs":["Collection"],"type":{"option":{"defined":"TCollection"}}},{"name":"uses","docs":["Uses"],"type":{"option":{"defined":"TUses"}}},{"name":"tokenProgramVersion","type":{"defined":"TTokenProgramVersion"}},{"name":"creatorShares","type":"bytes"},{"name":"creatorVerified","type":{"vec":"bool"}}]}},{"name":"MakeEvent","type":{"kind":"struct","fields":[{"name":"maker","type":"publicKey"},{"name":"bidId","type":{"option":"publicKey"}},{"name":"target","type":{"defined":"Target"}},{"name":"targetId","type":"publicKey"},{"name":"field","type":{"option":{"defined":"Field"}}},{"name":"fieldId","type":{"option":"publicKey"}},{"name":"amount","type":"u64"},{"name":"quantity","type":"u32"},{"name":"currency","type":{"option":"publicKey"}},{"name":"expiry","type":"i64"},{"name":"privateTaker","type":{"option":"publicKey"}},{"name":"assetId","type":{"option":"publicKey"}}]}},{"name":"TakeEvent","type":{"kind":"struct","fields":[{"name":"taker","type":"publicKey"},{"name":"bidId","type":{"option":"publicKey"}},{"name":"target","type":{"defined":"Target"}},{"name":"targetId","type":"publicKey"},{"name":"field","type":{"option":{"defined":"Field"}}},{"name":"fieldId","type":{"option":"publicKey"}},{"name":"amount","type":"u64"},{"name":"quantity","type":"u32"},{"name":"tcompFee","type":"u64"},{"name":"takerBrokerFee","type":"u64"},{"name":"makerBrokerFee","type":"u64"},{"name":"creatorFee","type":"u64"},{"name":"currency","type":{"option":"publicKey"}},{"name":"assetId","type":{"option":"publicKey"}}]}},{"name":"AuthorizationDataLocal","type":{"kind":"struct","fields":[{"name":"payload","type":{"vec":{"defined":"TaggedPayload"}}}]}},{"name":"TaggedPayload","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"payload","type":{"defined":"PayloadTypeLocal"}}]}},{"name":"SeedsVecLocal","type":{"kind":"struct","fields":[{"name":"seeds","docs":["The vector of derivation seeds."],"type":{"vec":"bytes"}}]}},{"name":"ProofInfoLocal","type":{"kind":"struct","fields":[{"name":"proof","docs":["The merkle proof."],"type":{"vec":{"array":["u8",32]}}}]}},{"name":"TTokenProgramVersion","type":{"kind":"enum","variants":[{"name":"Original"},{"name":"Token2022"}]}},{"name":"TTokenStandard","type":{"kind":"enum","variants":[{"name":"NonFungible"},{"name":"FungibleAsset"},{"name":"Fungible"},{"name":"NonFungibleEdition"}]}},{"name":"TUseMethod","type":{"kind":"enum","variants":[{"name":"Burn"},{"name":"Multiple"},{"name":"Single"}]}},{"name":"TcompEvent","type":{"kind":"enum","variants":[{"name":"Maker","fields":[{"defined":"MakeEvent"}]},{"name":"Taker","fields":[{"defined":"TakeEvent"}]}]}},{"name":"PayloadTypeLocal","type":{"kind":"enum","variants":[{"name":"Pubkey","fields":["publicKey"]},{"name":"Seeds","fields":[{"defined":"SeedsVecLocal"}]},{"name":"MerkleProof","fields":[{"defined":"ProofInfoLocal"}]},{"name":"Number","fields":["u64"]}]}},{"name":"Target","type":{"kind":"enum","variants":[{"name":"AssetId"},{"name":"Whitelist"}]}},{"name":"Field","type":{"kind":"enum","variants":[{"name":"Name"}]}}],"errors":[{"code":6100,"name":"ArithmeticError","msg":"arithmetic error"},{"code":6101,"name":"ExpiryTooLarge","msg":"expiry too large"},{"code":6102,"name":"BadOwner","msg":"bad owner"},{"code":6103,"name":"BadListState","msg":"bad list state"},{"code":6104,"name":"BadRoyaltiesPct","msg":"royalties pct must be between 0 and 100"},{"code":6105,"name":"PriceMismatch","msg":"price mismatch"},{"code":6106,"name":"CreatorMismatch","msg":"creator mismatch"},{"code":6107,"name":"InsufficientBalance","msg":"insufficient balance"},{"code":6108,"name":"BidExpired","msg":"bid has expired"},{"code":6109,"name":"TakerNotAllowed","msg":"taker not allowed"},{"code":6110,"name":"BadBidField","msg":"cannot pass bid field"},{"code":6111,"name":"BidNotYetExpired","msg":"bid not yet expired"},{"code":6112,"name":"BadMargin","msg":"bad margin"},{"code":6113,"name":"WrongIxForBidTarget","msg":"wrong ix for bid target called"},{"code":6114,"name":"WrongTargetId","msg":"wrong target id"},{"code":6115,"name":"MissingFvc","msg":"creator array missing first verified creator"},{"code":6116,"name":"MissingCollection","msg":"metadata missing collection"},{"code":6117,"name":"CannotModifyTarget","msg":"cannot modify bid target, create a new bid"},{"code":6118,"name":"TargetIdMustEqualBidId","msg":"target id and bid id must be the same for single bids"},{"code":6119,"name":"CurrencyNotYetEnabled","msg":"currency not yet enabled"},{"code":6120,"name":"MakerBrokerNotYetEnabled","msg":"maker broker not yet enabled"},{"code":6121,"name":"OptionalRoyaltiesNotYetEnabled","msg":"optional royalties not yet enabled"},{"code":6122,"name":"WrongStateVersion","msg":"wrong state version"},{"code":6123,"name":"WrongBidFieldId","msg":"wrong field id"},{"code":6124,"name":"BrokerMismatch","msg":"broker mismatch"},{"code":6125,"name":"AssetIdMismatch","msg":"asset id mismatch"},{"code":6126,"name":"ListingExpired","msg":"listing has expired"},{"code":6127,"name":"ListingNotYetExpired","msg":"listing not yet expired"},{"code":6128,"name":"BadQuantity","msg":"bad quantity passed in"},{"code":6129,"name":"BidFullyFilled","msg":"bid fully filled"},{"code":6130,"name":"BadWhitelist","msg":"bad whitelist"},{"code":6131,"name":"ForbiddenCollection","msg":"forbidden collection"},{"code":6132,"name":"BadCosigner","msg":"bad cosigner"},{"code":6133,"name":"BadMintProof","msg":"bad mint proof"},{"code":6134,"name":"CurrencyMismatch","msg":"Currency mismatch"},{"code":6135,"name":"BidBalanceNotEmptied","msg":"The bid balance was not emptied"},{"code":6136,"name":"BadRentDest","msg":"Bad rent dest."},{"code":6137,"name":"CurrencyNotYetWhitelisted","msg":"currency not yet whitelisted"},{"code":6138,"name":"MakerBrokerNotYetWhitelisted","msg":"maker broker not yet whitelisted"},{"code":6139,"name":"WrongTokenRecordDerivation","msg":"token record derivation is wrong"}]} diff --git a/idls/WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx.metdao_bid_wall.json b/idls/WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx.metdao_bid_wall.json deleted file mode 100644 index 45aa0a6..0000000 --- a/idls/WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx.metdao_bid_wall.json +++ /dev/null @@ -1 +0,0 @@ -{"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/WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb.woofi.json b/idls/WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb.woofi.json deleted file mode 100644 index dd5fa49..0000000 --- a/idls/WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb.woofi.json +++ /dev/null @@ -1 +0,0 @@ -{"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/XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm.ondo_gm.json b/idls/XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm.ondo_gm.json deleted file mode 100644 index c58d355..0000000 --- a/idls/XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm.ondo_gm.json +++ /dev/null @@ -1 +0,0 @@ -{"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/ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD.zeta.json b/idls/ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD.zeta.json deleted file mode 100644 index 789b291..0000000 --- a/idls/ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD.zeta.json +++ /dev/null @@ -1 +0,0 @@ -{"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/idls/adapter.DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB.saber_decimal_wrapper.V0_0_0.from_solscan.json b/idls/adapter.DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB.saber_decimal_wrapper.V0_0_0.from_solscan.json new file mode 100644 index 0000000..b180f74 --- /dev/null +++ b/idls/adapter.DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB.saber_decimal_wrapper.V0_0_0.from_solscan.json @@ -0,0 +1,348 @@ +{ + "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/adapter.TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR.spl_token_wrap.V0_1_0.from_github_solana_program.json b/idls/adapter.TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR.spl_token_wrap.V0_1_0.from_github_solana_program.json new file mode 100644 index 0000000..603d5c6 --- /dev/null +++ b/idls/adapter.TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR.spl_token_wrap.V0_1_0.from_github_solana_program.json @@ -0,0 +1,1011 @@ +{ + "kind": "rootNode", + "standard": "codama", + "version": "1.7.0", + "program": { + "kind": "programNode", + "name": "tokenWrap", + "publicKey": "TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR", + "version": "0.1.0", + "accounts": [ + { + "kind": "accountNode", + "name": "backpointer", + "size": 32, + "docs": [ + "Account to store the address of the unwrapped mint." + ], + "data": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "unwrappedMint", + "type": { + "kind": "publicKeyTypeNode" + } + } + ] + }, + "pda": { + "kind": "pdaLinkNode", + "name": "backpointer" + } + } + ], + "instructions": [ + { + "kind": "instructionNode", + "name": "createMint", + "docs": [ + "Create a wrapped token mint. Assumes caller has pre-funded wrapped mint", + "and backpointer account. Supports both directions:", + "- spl-token to token-2022", + "- token-2022 to spl-token", + "- token-2022 to token-2022 w/ new extensions" + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "wrappedMint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + " Unallocated wrapped mint account to create (PDA), address must be:", + "`get_wrapped_mint_address(unwrapped_mint_address, wrapped_token_program_id)`" + ] + }, + { + "kind": "instructionAccountNode", + "name": "backpointer", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "Unallocated wrapped backpointer account to create (PDA)", + "`get_wrapped_mint_backpointer_address(wrapped_mint_address)`" + ] + }, + { + "kind": "instructionAccountNode", + "name": "unwrappedMint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The existing mint" + ] + }, + { + "kind": "instructionAccountNode", + "name": "systemProgram", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "The system program" + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "11111111111111111111111111111111" + } + }, + { + "kind": "instructionAccountNode", + "name": "wrappedTokenProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token program used to create the wrapped mint" + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + }, + { + "kind": "instructionArgumentNode", + "name": "idempotent", + "defaultValueStrategy": "optional", + "docs": [ + "Whether the creation should fail if the wrapped mint already exists." + ], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + "defaultValue": { + "kind": "booleanValueNode", + "boolean": false + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "wrap", + "docs": [ + "Move a user's unwrapped tokens into an escrow account and mint the same", + "number of wrapped tokens into the provided account." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "recipientWrappedTokenAccount", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token account to receive the wrapped tokens." + ] + }, + { + "kind": "instructionAccountNode", + "name": "wrappedMint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "Wrapped mint, must be initialized, address must be:", + "`get_wrapped_mint_address(unwrapped_mint_address, wrapped_token_program_id)`" + ] + }, + { + "kind": "instructionAccountNode", + "name": "wrappedMintAuthority", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The PDA authority of the wrapped mint, address must be", + "`get_wrapped_mint_authority(wrapped_mint)`" + ] + }, + { + "kind": "instructionAccountNode", + "name": "unwrappedTokenProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token program of the unwrapped tokens." + ] + }, + { + "kind": "instructionAccountNode", + "name": "wrappedTokenProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token program of the wrapped tokens." + ] + }, + { + "kind": "instructionAccountNode", + "name": "unwrappedTokenAccount", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source token account for the unwrapped tokens." + ] + }, + { + "kind": "instructionAccountNode", + "name": "unwrappedMint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint of the unwrapped tokens." + ] + }, + { + "kind": "instructionAccountNode", + "name": "unwrappedEscrow", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The escrow account that holds the unwrapped tokens.", + "Address must be ATA: get_escrow_address(unwrapped_mint, unwrapped_token_program, wrapped_token_program)" + ] + }, + { + "kind": "instructionAccountNode", + "name": "transferAuthority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The authority to transfer the unwrapped tokens." + ], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "docs": [ + "The amount of tokens to wrap." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "unwrap", + "docs": [ + "Burns wrapped tokens and releases unwrapped tokens from the escrow account." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "unwrappedEscrow", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The escrow account holding the unwrapped tokens.", + "Address must be ATA: get_escrow_address(unwrapped_mint, unwrapped_token_program, wrapped_token_program)" + ] + }, + { + "kind": "instructionAccountNode", + "name": "recipientUnwrappedToken", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to receive the unwrapped tokens." + ] + }, + { + "kind": "instructionAccountNode", + "name": "wrappedMintAuthority", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The PDA authority of the wrapped mint,", + "address must be: `get_wrapped_mint_authority(wrapped_mint)`" + ] + }, + { + "kind": "instructionAccountNode", + "name": "unwrappedMint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint of the unwrapped tokens" + ] + }, + { + "kind": "instructionAccountNode", + "name": "wrappedTokenProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token program of the wrapped tokens" + ] + }, + { + "kind": "instructionAccountNode", + "name": "unwrappedTokenProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token program of the unwrapped tokens" + ] + }, + { + "kind": "instructionAccountNode", + "name": "wrappedTokenAccount", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source token account for the wrapped tokens" + ] + }, + { + "kind": "instructionAccountNode", + "name": "wrappedMint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The wrapped mint account, address must be:", + "`get_wrapped_mint_address(unwrapped_mint_address, wrapped_token_program_id)`" + ] + }, + { + "kind": "instructionAccountNode", + "name": "transferAuthority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The authority to burn the wrapped tokens." + ], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 2 + } + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "docs": [ + "The amount of tokens to unwrap." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "closeStuckEscrow", + "docs": [ + "Closes a stuck escrow `ATA`. This is for the edge case where an", + "unwrapped mint with a close authority is closed and then a new mint", + "is created at the same address but with a different size, leaving", + "the escrow `ATA` in a bad state.", + "This instruction will close the old escrow `ATA`, returning the lamports", + "to the destination account. It will only work if the current escrow has", + "different extensions than the mint. The client is then responsible", + "for calling `create_associated_token_account` to recreate it." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "escrow", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "Escrow account to close (ATA)" + ] + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "Destination for lamports from closed account" + ] + }, + { + "kind": "instructionAccountNode", + "name": "unwrappedMint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Unwrapped mint" + ] + }, + { + "kind": "instructionAccountNode", + "name": "wrappedMint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Wrapped mint" + ] + }, + { + "kind": "instructionAccountNode", + "name": "wrappedMintAuthority", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Wrapped mint authority (PDA)" + ] + }, + { + "kind": "instructionAccountNode", + "name": "token2022Program", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token-2022 program" + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 3 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "syncMetadataToToken2022", + "docs": [ + "This instruction copies the metadata fields from an unwrapped mint to", + "its wrapped mint `TokenMetadata` extension.", + "", + "Supports (unwrapped to wrapped):", + "- Token-2022 to Token-2022", + "- SPL-token to Token-2022", + "", + "If source mint is a Token-2022, it must have a `MetadataPointer` and the", + "account it points to must be provided. If source mint is an SPL-Token,", + "the `Metaplex` PDA must be provided.", + "", + "If the `TokenMetadata` extension on the wrapped mint if not present, it", + "will initialize it. The client is responsible for funding the wrapped", + "mint account with enough lamports to cover the rent for the", + "additional space required by the `TokenMetadata` extension and/or", + "metadata sync." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "wrappedMint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "Wrapped mint" + ] + }, + { + "kind": "instructionAccountNode", + "name": "wrappedMintAuthority", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Wrapped mint authority PDA" + ] + }, + { + "kind": "instructionAccountNode", + "name": "unwrappedMint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Unwrapped mint" + ] + }, + { + "kind": "instructionAccountNode", + "name": "token2022Program", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Token-2022 program" + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" + } + }, + { + "kind": "instructionAccountNode", + "name": "sourceMetadata", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Source metadata account. Required if metadata pointer", + "indicates external account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "ownerProgram", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Owner program. Required when metadata account is", + "owned by a third-party program." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 4 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "syncMetadataToSplToken", + "docs": [ + "This instruction copies the metadata fields from an unwrapped mint to", + "its wrapped mint `Metaplex` metadata account.", + "", + "Supports (unwrapped to wrapped):", + "- Token-2022 to SPL-token", + "- SPL-token to SPL-token", + "", + "This instruction will create the `Metaplex` metadata account if it", + "doesn't exist, or update it if it does. The `wrapped_mint_authority`", + "PDA must be pre-funded with enough lamports to cover the rent for", + "the `Metaplex` metadata account's creation or updates, as it will", + "act as the payer for the `Metaplex` program CPI.", + "", + "If source mint is a Token-2022, it must have a `MetadataPointer` and the", + "account it points to must be provided. If source mint is an SPL-Token,", + "the `Metaplex` PDA must be provided." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "metaplexMetadata", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "`Metaplex` metadata account" + ] + }, + { + "kind": "instructionAccountNode", + "name": "wrappedMintAuthority", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "Wrapped mint authority (PDA)" + ] + }, + { + "kind": "instructionAccountNode", + "name": "wrappedMint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Wrapped SPL Token mint" + ] + }, + { + "kind": "instructionAccountNode", + "name": "unwrappedMint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Unwrapped mint" + ] + }, + { + "kind": "instructionAccountNode", + "name": "metaplexProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "`Metaplex` Token Metadata Program" + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" + } + }, + { + "kind": "instructionAccountNode", + "name": "systemProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "System program" + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "11111111111111111111111111111111" + } + }, + { + "kind": "instructionAccountNode", + "name": "rentSysvar", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Rent sysvar" + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRent111111111111111111111111111111111" + } + }, + { + "kind": "instructionAccountNode", + "name": "sourceMetadata", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Source metadata account. Required if unwrapped mint", + "is an SPL-Token or, if a Token-2022, its metadata pointer indicates", + "an external account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "ownerProgram", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Owner program. Required when metadata account is", + "owned by a third-party program." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 5 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + } + ], + "definedTypes": [], + "pdas": [ + { + "kind": "pdaNode", + "name": "backpointer", + "seeds": [ + { + "kind": "constantPdaSeedNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "value": { + "kind": "stringValueNode", + "string": "backpointer" + } + }, + { + "kind": "variablePdaSeedNode", + "name": "wrappedMint", + "type": { + "kind": "publicKeyTypeNode" + } + } + ] + }, + { + "kind": "pdaNode", + "name": "wrappedMint", + "seeds": [ + { + "kind": "constantPdaSeedNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "value": { + "kind": "stringValueNode", + "string": "mint" + } + }, + { + "kind": "variablePdaSeedNode", + "name": "unwrappedMint", + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "variablePdaSeedNode", + "name": "wrappedTokenProgram", + "type": { + "kind": "publicKeyTypeNode" + } + } + ] + }, + { + "kind": "pdaNode", + "name": "wrappedMintAuthority", + "seeds": [ + { + "kind": "constantPdaSeedNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "value": { + "kind": "stringValueNode", + "string": "authority" + } + }, + { + "kind": "variablePdaSeedNode", + "name": "wrappedMint", + "type": { + "kind": "publicKeyTypeNode" + } + } + ] + } + ], + "events": [], + "errors": [ + { + "kind": "errorNode", + "name": "wrappedMintMismatch", + "code": 0, + "message": "Wrapped mint account address does not match expected PDA" + }, + { + "kind": "errorNode", + "name": "backpointerMismatch", + "code": 1, + "message": "Wrapped backpointer account address does not match expected PDA" + }, + { + "kind": "errorNode", + "name": "zeroWrapAmount", + "code": 2, + "message": "Wrap amount should be positive" + }, + { + "kind": "errorNode", + "name": "mintAuthorityMismatch", + "code": 3, + "message": "Wrapped mint authority does not match expected PDA" + }, + { + "kind": "errorNode", + "name": "escrowOwnerMismatch", + "code": 4, + "message": "Unwrapped escrow token owner is not set to expected PDA" + }, + { + "kind": "errorNode", + "name": "invalidWrappedMintOwner", + "code": 5, + "message": "Wrapped mint account owner is not the expected token program" + }, + { + "kind": "errorNode", + "name": "invalidBackpointerOwner", + "code": 6, + "message": "Wrapped backpointer account owner is not the expected token wrap program" + }, + { + "kind": "errorNode", + "name": "escrowMismatch", + "code": 7, + "message": "Escrow account address does not match expected ATA" + }, + { + "kind": "errorNode", + "name": "escrowInGoodState", + "code": 8, + "message": "The escrow account is in a good state and cannot be recreated" + }, + { + "kind": "errorNode", + "name": "unwrappedMintHasNoMetadata", + "code": 9, + "message": "Unwrapped mint does not have the TokenMetadata extension" + }, + { + "kind": "errorNode", + "name": "metaplexMetadataMismatch", + "code": 10, + "message": "Metaplex metadata account address does not match expected PDA" + }, + { + "kind": "errorNode", + "name": "metadataPointerMissing", + "code": 11, + "message": "Metadata pointer extension missing on mint" + }, + { + "kind": "errorNode", + "name": "metadataPointerUnset", + "code": 12, + "message": "Metadata pointer is unset (None)" + }, + { + "kind": "errorNode", + "name": "metadataPointerMismatch", + "code": 13, + "message": "Provided source metadata account does not match pointer" + }, + { + "kind": "errorNode", + "name": "externalProgramReturnedNoData", + "code": 14, + "message": "External metadata program returned no data" + }, + { + "kind": "errorNode", + "name": "noSyncingToToken2022", + "code": 15, + "message": "Instruction can only be used with spl-token wrapped mints" + } + ], + "constants": [] + }, + "additionalPrograms": [] +} \ No newline at end of file diff --git a/idls/amm.2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c.lifinity_swap_v2.V0_1_1.from_solscan.json b/idls/amm.2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c.lifinity_swap_v2.V0_1_1.from_solscan.json new file mode 100644 index 0000000..822a338 --- /dev/null +++ b/idls/amm.2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c.lifinity_swap_v2.V0_1_1.from_solscan.json @@ -0,0 +1,837 @@ +{ + "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/amm.AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ.metadao_v0_5.V0_5_0.from_solscan.json b/idls/amm.AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ.metadao_v0_5.V0_5_0.from_solscan.json new file mode 100644 index 0000000..a0581ab --- /dev/null +++ b/idls/amm.AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ.metadao_v0_5.V0_5_0.from_solscan.json @@ -0,0 +1,841 @@ +{ + "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/amm.BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.bonk_swap.V0_1_1.from_solscan.json b/idls/amm.BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.bonk_swap.V0_1_1.from_solscan.json new file mode 100644 index 0000000..dea3703 --- /dev/null +++ b/idls/amm.BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.bonk_swap.V0_1_1.from_solscan.json @@ -0,0 +1,3186 @@ +{ + "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/amm.Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB.meteora_damm_v1.V0_5_2.from_solscan.json b/idls/amm.Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB.meteora_damm_v1.V0_5_2.from_solscan.json new file mode 100644 index 0000000..c7bd4ea --- /dev/null +++ b/idls/amm.Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB.meteora_damm_v1.V0_5_2.from_solscan.json @@ -0,0 +1,4464 @@ +{ + "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/amm.GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT.goosefx_gamma.V0_2_0.from_solscan.json b/idls/amm.GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT.goosefx_gamma.V0_2_0.from_solscan.json new file mode 100644 index 0000000..557299f --- /dev/null +++ b/idls/amm.GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT.goosefx_gamma.V0_2_0.from_solscan.json @@ -0,0 +1,4502 @@ +{ + "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/amm.GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn.goosefx_v2.V0_3_0.from_solscan.json b/idls/amm.GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn.goosefx_v2.V0_3_0.from_solscan.json new file mode 100644 index 0000000..aabe868 --- /dev/null +++ b/idls/amm.GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn.goosefx_v2.V0_3_0.from_solscan.json @@ -0,0 +1,1186 @@ +{ + "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/amm.Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1.guac_swap.V0_1_1.from_solscan.json b/idls/amm.Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1.guac_swap.V0_1_1.from_solscan.json new file mode 100644 index 0000000..a6408a6 --- /dev/null +++ b/idls/amm.Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1.guac_swap.V0_1_1.from_solscan.json @@ -0,0 +1,2843 @@ +{ + "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/amm.WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb.woofi.V0_1_0.from_solscan.json b/idls/amm.WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb.woofi.V0_1_0.from_solscan.json new file mode 100644 index 0000000..aee507b --- /dev/null +++ b/idls/amm.WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb.woofi.V0_1_0.from_solscan.json @@ -0,0 +1,2102 @@ +{ + "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/amm.cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG.meteora_damm_v2.V0_2_0.from_solscan.json b/idls/amm.cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG.meteora_damm_v2.V0_2_0.from_solscan.json new file mode 100644 index 0000000..b113034 --- /dev/null +++ b/idls/amm.cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG.meteora_damm_v2.V0_2_0.from_solscan.json @@ -0,0 +1,7953 @@ +{ + "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/amm.pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.pump_swap.V0_1_0.from_solscan.json b/idls/amm.pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.pump_swap.V0_1_0.from_solscan.json new file mode 100644 index 0000000..8835c1d --- /dev/null +++ b/idls/amm.pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.pump_swap.V0_1_0.from_solscan.json @@ -0,0 +1,6648 @@ +{ + "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/amm.vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ.vertigo.V0_1_0.from_solscan.json b/idls/amm.vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ.vertigo.V0_1_0.from_solscan.json new file mode 100644 index 0000000..a415006 --- /dev/null +++ b/idls/amm.vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ.vertigo.V0_1_0.from_solscan.json @@ -0,0 +1,1015 @@ +{ + "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/boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.boop_fun.json b/idls/boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.boop_fun.json deleted file mode 100644 index e130eea..0000000 --- a/idls/boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.boop_fun.json +++ /dev/null @@ -1 +0,0 @@ -{"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/bridge.6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn.layer_zero_executor.V0_1_0.from_solscan.json b/idls/bridge.6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn.layer_zero_executor.V0_1_0.from_solscan.json new file mode 100644 index 0000000..3b29135 --- /dev/null +++ b/idls/bridge.6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn.layer_zero_executor.V0_1_0.from_solscan.json @@ -0,0 +1,996 @@ +{ + "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/bridge.76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6.layer_zero_endpoint.V0_1_0.from_solscan.json b/idls/bridge.76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6.layer_zero_endpoint.V0_1_0.from_solscan.json new file mode 100644 index 0000000..6691dc7 --- /dev/null +++ b/idls/bridge.76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6.layer_zero_endpoint.V0_1_0.from_solscan.json @@ -0,0 +1,3696 @@ +{ + "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/bridge.CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe.circle_cctp_token_messenger_minter_v2.V0_2_0.from_solscan.json b/idls/bridge.CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe.circle_cctp_token_messenger_minter_v2.V0_2_0.from_solscan.json new file mode 100644 index 0000000..e30d02f --- /dev/null +++ b/idls/bridge.CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe.circle_cctp_token_messenger_minter_v2.V0_2_0.from_solscan.json @@ -0,0 +1,4441 @@ +{ + "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/bridge.CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3.circle_cctp_token_messenger_minter.V0_1_0.from_solscan.json b/idls/bridge.CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3.circle_cctp_token_messenger_minter.V0_1_0.from_solscan.json new file mode 100644 index 0000000..f949f3d --- /dev/null +++ b/idls/bridge.CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3.circle_cctp_token_messenger_minter.V0_1_0.from_solscan.json @@ -0,0 +1,1760 @@ +{ + "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/clmm.6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6.stabble.V0_1_0.from_solscan.json b/idls/clmm.6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6.stabble.V0_1_0.from_solscan.json new file mode 100644 index 0000000..19651e7 --- /dev/null +++ b/idls/clmm.6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6.stabble.V0_1_0.from_solscan.json @@ -0,0 +1,4364 @@ +{ + "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/clmm.CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.raydium.V0_1_0.from_solscan.json b/idls/clmm.CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.raydium.V0_1_0.from_solscan.json new file mode 100644 index 0000000..2a9c306 --- /dev/null +++ b/idls/clmm.CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.raydium.V0_1_0.from_solscan.json @@ -0,0 +1,6941 @@ +{ + "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/clmm.HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq.pancake_swap.V0_1_0.from_solscan.json b/idls/clmm.HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq.pancake_swap.V0_1_0.from_solscan.json new file mode 100644 index 0000000..8cb0b08 --- /dev/null +++ b/idls/clmm.HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq.pancake_swap.V0_1_0.from_solscan.json @@ -0,0 +1,5833 @@ +{ + "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/clmm.REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2.byreal.V0_1_0.from_solscan.json b/idls/clmm.REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2.byreal.V0_1_0.from_solscan.json new file mode 100644 index 0000000..62b5548 --- /dev/null +++ b/idls/clmm.REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2.byreal.V0_1_0.from_solscan.json @@ -0,0 +1,7529 @@ +{ + "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/clmm.fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9.fusion.V1_1_4.from_solscan.json b/idls/clmm.fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9.fusion.V1_1_4.from_solscan.json new file mode 100644 index 0000000..11a42d7 --- /dev/null +++ b/idls/clmm.fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9.fusion.V1_1_4.from_solscan.json @@ -0,0 +1,3085 @@ +{ + "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/clmm.whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.orca_whirlpool.V0_9_0.from_solscan.json b/idls/clmm.whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.orca_whirlpool.V0_9_0.from_solscan.json new file mode 100644 index 0000000..031f6cc --- /dev/null +++ b/idls/clmm.whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.orca_whirlpool.V0_9_0.from_solscan.json @@ -0,0 +1,6730 @@ +{ + "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/cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG.meteora_damm_v2.json b/idls/cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG.meteora_damm_v2.json deleted file mode 100644 index cef0305..0000000 --- a/idls/cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG.meteora_damm_v2.json +++ /dev/null @@ -1 +0,0 @@ -{"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/cpmm.CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.raydium.V0_2_0.from_solscan.json b/idls/cpmm.CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.raydium.V0_2_0.from_solscan.json new file mode 100644 index 0000000..8ee7b6a --- /dev/null +++ b/idls/cpmm.CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.raydium.V0_2_0.from_solscan.json @@ -0,0 +1,3084 @@ +{ + "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/dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.drift_v2.json b/idls/dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.drift_v2.json deleted file mode 100644 index ce5f81e..0000000 --- a/idls/dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.drift_v2.json +++ /dev/null @@ -1 +0,0 @@ -{"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/dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.meteora_dbc.json b/idls/dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.meteora_dbc.json deleted file mode 100644 index 98ed38b..0000000 --- a/idls/dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.meteora_dbc.json +++ /dev/null @@ -1 +0,0 @@ -{"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/dlmm.LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.meteora.V0_12_0.from_solscan.json b/idls/dlmm.LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.meteora.V0_12_0.from_solscan.json new file mode 100644 index 0000000..21d40c0 --- /dev/null +++ b/idls/dlmm.LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.meteora.V0_12_0.from_solscan.json @@ -0,0 +1,11929 @@ +{ + "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/fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9.fusion_amm.json b/idls/fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9.fusion_amm.json deleted file mode 100644 index 9991644..0000000 --- a/idls/fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9.fusion_amm.json +++ /dev/null @@ -1 +0,0 @@ -{"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/fees.pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.pump_fees.V0_1_0.from_solscan.json b/idls/fees.pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.pump_fees.V0_1_0.from_solscan.json new file mode 100644 index 0000000..f293912 --- /dev/null +++ b/idls/fees.pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.pump_fees.V0_1_0.from_solscan.json @@ -0,0 +1,7111 @@ +{ + "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/governance.FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq.metadao_futarchy.V0_6_1.from_solscan.json b/idls/governance.FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq.metadao_futarchy.V0_6_1.from_solscan.json new file mode 100644 index 0000000..20e7071 --- /dev/null +++ b/idls/governance.FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq.metadao_futarchy.V0_6_1.from_solscan.json @@ -0,0 +1,3833 @@ +{ + "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/governance.SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf.squads_multisig.V2_0_0.from_solscan.json b/idls/governance.SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf.squads_multisig.V2_0_0.from_solscan.json new file mode 100644 index 0000000..6ac3be7 --- /dev/null +++ b/idls/governance.SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf.squads_multisig.V2_0_0.from_solscan.json @@ -0,0 +1,3267 @@ +{ + "version": "2.0.0", + "name": "squads_multisig_program", + "instructions": [ + { + "name": "programConfigInit", + "docs": [ + "Initialize the program config." + ], + "accounts": [ + { + "name": "programConfig", + "isMut": true, + "isSigner": false + }, + { + "name": "initializer", + "isMut": true, + "isSigner": true, + "docs": [ + "The hard-coded account that is used to initialize the program config once." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "ProgramConfigInitArgs" + } + } + ] + }, + { + "name": "programConfigSetAuthority", + "docs": [ + "Set the `authority` parameter of the program config." + ], + "accounts": [ + { + "name": "programConfig", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "ProgramConfigSetAuthorityArgs" + } + } + ] + }, + { + "name": "programConfigSetMultisigCreationFee", + "docs": [ + "Set the `multisig_creation_fee` parameter of the program config." + ], + "accounts": [ + { + "name": "programConfig", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "ProgramConfigSetMultisigCreationFeeArgs" + } + } + ] + }, + { + "name": "programConfigSetTreasury", + "docs": [ + "Set the `treasury` parameter of the program config." + ], + "accounts": [ + { + "name": "programConfig", + "isMut": true, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": true + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "ProgramConfigSetTreasuryArgs" + } + } + ] + }, + { + "name": "multisigCreate", + "docs": [ + "Create a multisig." + ], + "accounts": [ + { + "name": "multisig", + "isMut": true, + "isSigner": false + }, + { + "name": "createKey", + "isMut": false, + "isSigner": true, + "docs": [ + "An ephemeral signer that is used as a seed for the Multisig PDA.", + "Must be a signer to prevent front-running attack by someone else but the original creator." + ] + }, + { + "name": "creator", + "isMut": true, + "isSigner": true, + "docs": [ + "The creator of the multisig." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "MultisigCreateArgs" + } + } + ] + }, + { + "name": "multisigCreateV2", + "docs": [ + "Create a multisig." + ], + "accounts": [ + { + "name": "programConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "Global program config account." + ] + }, + { + "name": "treasury", + "isMut": true, + "isSigner": false, + "docs": [ + "The treasury where the creation fee is transferred to." + ] + }, + { + "name": "multisig", + "isMut": true, + "isSigner": false + }, + { + "name": "createKey", + "isMut": false, + "isSigner": true, + "docs": [ + "An ephemeral signer that is used as a seed for the Multisig PDA.", + "Must be a signer to prevent front-running attack by someone else but the original creator." + ] + }, + { + "name": "creator", + "isMut": true, + "isSigner": true, + "docs": [ + "The creator of the multisig." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "MultisigCreateArgsV2" + } + } + ] + }, + { + "name": "multisigAddMember", + "docs": [ + "Add a new member to the controlled multisig." + ], + "accounts": [ + { + "name": "multisig", + "isMut": true, + "isSigner": false + }, + { + "name": "configAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Multisig `config_authority` that must authorize the configuration change." + ] + }, + { + "name": "rentPayer", + "isMut": true, + "isSigner": true, + "isOptional": true, + "docs": [ + "The account that will be charged or credited in case the multisig account needs to reallocate space,", + "for example when adding a new member or a spending limit.", + "This is usually the same as `config_authority`, but can be a different account if needed." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "We might need it in case reallocation is needed." + ] + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "MultisigAddMemberArgs" + } + } + ] + }, + { + "name": "multisigRemoveMember", + "docs": [ + "Remove a member/key from the controlled multisig." + ], + "accounts": [ + { + "name": "multisig", + "isMut": true, + "isSigner": false + }, + { + "name": "configAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Multisig `config_authority` that must authorize the configuration change." + ] + }, + { + "name": "rentPayer", + "isMut": true, + "isSigner": true, + "isOptional": true, + "docs": [ + "The account that will be charged or credited in case the multisig account needs to reallocate space,", + "for example when adding a new member or a spending limit.", + "This is usually the same as `config_authority`, but can be a different account if needed." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "We might need it in case reallocation is needed." + ] + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "MultisigRemoveMemberArgs" + } + } + ] + }, + { + "name": "multisigSetTimeLock", + "docs": [ + "Set the `time_lock` config parameter for the controlled multisig." + ], + "accounts": [ + { + "name": "multisig", + "isMut": true, + "isSigner": false + }, + { + "name": "configAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Multisig `config_authority` that must authorize the configuration change." + ] + }, + { + "name": "rentPayer", + "isMut": true, + "isSigner": true, + "isOptional": true, + "docs": [ + "The account that will be charged or credited in case the multisig account needs to reallocate space,", + "for example when adding a new member or a spending limit.", + "This is usually the same as `config_authority`, but can be a different account if needed." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "We might need it in case reallocation is needed." + ] + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "MultisigSetTimeLockArgs" + } + } + ] + }, + { + "name": "multisigChangeThreshold", + "docs": [ + "Set the `threshold` config parameter for the controlled multisig." + ], + "accounts": [ + { + "name": "multisig", + "isMut": true, + "isSigner": false + }, + { + "name": "configAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Multisig `config_authority` that must authorize the configuration change." + ] + }, + { + "name": "rentPayer", + "isMut": true, + "isSigner": true, + "isOptional": true, + "docs": [ + "The account that will be charged or credited in case the multisig account needs to reallocate space,", + "for example when adding a new member or a spending limit.", + "This is usually the same as `config_authority`, but can be a different account if needed." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "We might need it in case reallocation is needed." + ] + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "MultisigChangeThresholdArgs" + } + } + ] + }, + { + "name": "multisigSetConfigAuthority", + "docs": [ + "Set the multisig `config_authority`." + ], + "accounts": [ + { + "name": "multisig", + "isMut": true, + "isSigner": false + }, + { + "name": "configAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Multisig `config_authority` that must authorize the configuration change." + ] + }, + { + "name": "rentPayer", + "isMut": true, + "isSigner": true, + "isOptional": true, + "docs": [ + "The account that will be charged or credited in case the multisig account needs to reallocate space,", + "for example when adding a new member or a spending limit.", + "This is usually the same as `config_authority`, but can be a different account if needed." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "We might need it in case reallocation is needed." + ] + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "MultisigSetConfigAuthorityArgs" + } + } + ] + }, + { + "name": "multisigSetRentCollector", + "docs": [ + "Set the multisig `rent_collector`." + ], + "accounts": [ + { + "name": "multisig", + "isMut": true, + "isSigner": false + }, + { + "name": "configAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Multisig `config_authority` that must authorize the configuration change." + ] + }, + { + "name": "rentPayer", + "isMut": true, + "isSigner": true, + "isOptional": true, + "docs": [ + "The account that will be charged or credited in case the multisig account needs to reallocate space,", + "for example when adding a new member or a spending limit.", + "This is usually the same as `config_authority`, but can be a different account if needed." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "We might need it in case reallocation is needed." + ] + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "MultisigSetRentCollectorArgs" + } + } + ] + }, + { + "name": "multisigAddSpendingLimit", + "docs": [ + "Create a new spending limit for the controlled multisig." + ], + "accounts": [ + { + "name": "multisig", + "isMut": false, + "isSigner": false + }, + { + "name": "configAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Multisig `config_authority` that must authorize the configuration change." + ] + }, + { + "name": "spendingLimit", + "isMut": true, + "isSigner": false + }, + { + "name": "rentPayer", + "isMut": true, + "isSigner": true, + "docs": [ + "This is usually the same as `config_authority`, but can be a different account if needed." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "MultisigAddSpendingLimitArgs" + } + } + ] + }, + { + "name": "multisigRemoveSpendingLimit", + "docs": [ + "Remove the spending limit from the controlled multisig." + ], + "accounts": [ + { + "name": "multisig", + "isMut": false, + "isSigner": false + }, + { + "name": "configAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Multisig `config_authority` that must authorize the configuration change." + ] + }, + { + "name": "spendingLimit", + "isMut": true, + "isSigner": false + }, + { + "name": "rentCollector", + "isMut": true, + "isSigner": false, + "docs": [ + "This is usually the same as `config_authority`, but can be a different account if needed." + ] + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "MultisigRemoveSpendingLimitArgs" + } + } + ] + }, + { + "name": "configTransactionCreate", + "docs": [ + "Create a new config transaction." + ], + "accounts": [ + { + "name": "multisig", + "isMut": true, + "isSigner": false + }, + { + "name": "transaction", + "isMut": true, + "isSigner": false + }, + { + "name": "creator", + "isMut": false, + "isSigner": true, + "docs": [ + "The member of the multisig that is creating the transaction." + ] + }, + { + "name": "rentPayer", + "isMut": true, + "isSigner": true, + "docs": [ + "The payer for the transaction account rent." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "ConfigTransactionCreateArgs" + } + } + ] + }, + { + "name": "configTransactionExecute", + "docs": [ + "Execute a config transaction.", + "The transaction must be `Approved`." + ], + "accounts": [ + { + "name": "multisig", + "isMut": true, + "isSigner": false, + "docs": [ + "The multisig account that owns the transaction." + ] + }, + { + "name": "member", + "isMut": false, + "isSigner": true, + "docs": [ + "One of the multisig members with `Execute` permission." + ] + }, + { + "name": "proposal", + "isMut": true, + "isSigner": false, + "docs": [ + "The proposal account associated with the transaction." + ] + }, + { + "name": "transaction", + "isMut": false, + "isSigner": false, + "docs": [ + "The transaction to execute." + ] + }, + { + "name": "rentPayer", + "isMut": true, + "isSigner": true, + "isOptional": true, + "docs": [ + "The account that will be charged/credited in case the config transaction causes space reallocation,", + "for example when adding a new member, adding or removing a spending limit.", + "This is usually the same as `member`, but can be a different account if needed." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "We might need it in case reallocation is needed." + ] + } + ], + "args": [] + }, + { + "name": "vaultTransactionCreate", + "docs": [ + "Create a new vault transaction." + ], + "accounts": [ + { + "name": "multisig", + "isMut": true, + "isSigner": false + }, + { + "name": "transaction", + "isMut": true, + "isSigner": false + }, + { + "name": "creator", + "isMut": false, + "isSigner": true, + "docs": [ + "The member of the multisig that is creating the transaction." + ] + }, + { + "name": "rentPayer", + "isMut": true, + "isSigner": true, + "docs": [ + "The payer for the transaction account rent." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "VaultTransactionCreateArgs" + } + } + ] + }, + { + "name": "vaultTransactionExecute", + "docs": [ + "Execute a vault transaction.", + "The transaction must be `Approved`." + ], + "accounts": [ + { + "name": "multisig", + "isMut": false, + "isSigner": false + }, + { + "name": "proposal", + "isMut": true, + "isSigner": false, + "docs": [ + "The proposal account associated with the transaction." + ] + }, + { + "name": "transaction", + "isMut": false, + "isSigner": false, + "docs": [ + "The transaction to execute." + ] + }, + { + "name": "member", + "isMut": false, + "isSigner": true + } + ], + "args": [] + }, + { + "name": "batchCreate", + "docs": [ + "Create a new batch." + ], + "accounts": [ + { + "name": "multisig", + "isMut": true, + "isSigner": false + }, + { + "name": "batch", + "isMut": true, + "isSigner": false + }, + { + "name": "creator", + "isMut": false, + "isSigner": true, + "docs": [ + "The member of the multisig that is creating the batch." + ] + }, + { + "name": "rentPayer", + "isMut": true, + "isSigner": true, + "docs": [ + "The payer for the batch account rent." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "BatchCreateArgs" + } + } + ] + }, + { + "name": "batchAddTransaction", + "docs": [ + "Add a transaction to the batch." + ], + "accounts": [ + { + "name": "multisig", + "isMut": false, + "isSigner": false, + "docs": [ + "Multisig account this batch belongs to." + ] + }, + { + "name": "proposal", + "isMut": false, + "isSigner": false, + "docs": [ + "The proposal account associated with the batch." + ] + }, + { + "name": "batch", + "isMut": true, + "isSigner": false + }, + { + "name": "transaction", + "isMut": true, + "isSigner": false, + "docs": [ + "`VaultBatchTransaction` account to initialize and add to the `batch`." + ] + }, + { + "name": "member", + "isMut": false, + "isSigner": true, + "docs": [ + "Member of the multisig." + ] + }, + { + "name": "rentPayer", + "isMut": true, + "isSigner": true, + "docs": [ + "The payer for the batch transaction account rent." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "BatchAddTransactionArgs" + } + } + ] + }, + { + "name": "batchExecuteTransaction", + "docs": [ + "Execute a transaction from the batch." + ], + "accounts": [ + { + "name": "multisig", + "isMut": false, + "isSigner": false, + "docs": [ + "Multisig account this batch belongs to." + ] + }, + { + "name": "member", + "isMut": false, + "isSigner": true, + "docs": [ + "Member of the multisig." + ] + }, + { + "name": "proposal", + "isMut": true, + "isSigner": false, + "docs": [ + "The proposal account associated with the batch.", + "If `transaction` is the last in the batch, the `proposal` status will be set to `Executed`." + ] + }, + { + "name": "batch", + "isMut": true, + "isSigner": false + }, + { + "name": "transaction", + "isMut": false, + "isSigner": false, + "docs": [ + "Batch transaction to execute." + ] + } + ], + "args": [] + }, + { + "name": "proposalCreate", + "docs": [ + "Create a new multisig proposal." + ], + "accounts": [ + { + "name": "multisig", + "isMut": false, + "isSigner": false + }, + { + "name": "proposal", + "isMut": true, + "isSigner": false + }, + { + "name": "creator", + "isMut": false, + "isSigner": true, + "docs": [ + "The member of the multisig that is creating the proposal." + ] + }, + { + "name": "rentPayer", + "isMut": true, + "isSigner": true, + "docs": [ + "The payer for the proposal account rent." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "ProposalCreateArgs" + } + } + ] + }, + { + "name": "proposalActivate", + "docs": [ + "Update status of a multisig proposal from `Draft` to `Active`." + ], + "accounts": [ + { + "name": "multisig", + "isMut": false, + "isSigner": false + }, + { + "name": "member", + "isMut": true, + "isSigner": true + }, + { + "name": "proposal", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "proposalApprove", + "docs": [ + "Approve a multisig proposal on behalf of the `member`.", + "The proposal must be `Active`." + ], + "accounts": [ + { + "name": "multisig", + "isMut": false, + "isSigner": false + }, + { + "name": "member", + "isMut": true, + "isSigner": true + }, + { + "name": "proposal", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "ProposalVoteArgs" + } + } + ] + }, + { + "name": "proposalReject", + "docs": [ + "Reject a multisig proposal on behalf of the `member`.", + "The proposal must be `Active`." + ], + "accounts": [ + { + "name": "multisig", + "isMut": false, + "isSigner": false + }, + { + "name": "member", + "isMut": true, + "isSigner": true + }, + { + "name": "proposal", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "ProposalVoteArgs" + } + } + ] + }, + { + "name": "proposalCancel", + "docs": [ + "Cancel a multisig proposal on behalf of the `member`.", + "The proposal must be `Approved`." + ], + "accounts": [ + { + "name": "multisig", + "isMut": false, + "isSigner": false + }, + { + "name": "member", + "isMut": true, + "isSigner": true + }, + { + "name": "proposal", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "ProposalVoteArgs" + } + } + ] + }, + { + "name": "spendingLimitUse", + "docs": [ + "Use a spending limit to transfer tokens from a multisig vault to a destination account." + ], + "accounts": [ + { + "name": "multisig", + "isMut": false, + "isSigner": false, + "docs": [ + "The multisig account the `spending_limit` is for." + ] + }, + { + "name": "member", + "isMut": false, + "isSigner": true + }, + { + "name": "spendingLimit", + "isMut": true, + "isSigner": false, + "docs": [ + "The SpendingLimit account to use." + ] + }, + { + "name": "vault", + "isMut": true, + "isSigner": false, + "docs": [ + "Multisig vault account to transfer tokens from." + ] + }, + { + "name": "destination", + "isMut": true, + "isSigner": false, + "docs": [ + "Destination account to transfer tokens to." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "In case `spending_limit.mint` is SOL." + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "The mint of the tokens to transfer in case `spending_limit.mint` is an SPL token." + ] + }, + { + "name": "vaultTokenAccount", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Multisig vault token account to transfer tokens from in case `spending_limit.mint` is an SPL token." + ] + }, + { + "name": "destinationTokenAccount", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Destination token account in case `spending_limit.mint` is an SPL token." + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "In case `spending_limit.mint` is an SPL token." + ] + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "SpendingLimitUseArgs" + } + } + ] + }, + { + "name": "configTransactionAccountsClose", + "docs": [ + "Closes a `ConfigTransaction` and the corresponding `Proposal`.", + "`transaction` can be closed if either:", + "- the `proposal` is in a terminal state: `Executed`, `Rejected`, or `Cancelled`.", + "- the `proposal` is stale." + ], + "accounts": [ + { + "name": "multisig", + "isMut": false, + "isSigner": false + }, + { + "name": "proposal", + "isMut": true, + "isSigner": false + }, + { + "name": "transaction", + "isMut": true, + "isSigner": false, + "docs": [ + "ConfigTransaction corresponding to the `proposal`." + ] + }, + { + "name": "rentCollector", + "isMut": true, + "isSigner": false, + "docs": [ + "The rent collector." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "vaultTransactionAccountsClose", + "docs": [ + "Closes a `VaultTransaction` and the corresponding `Proposal`.", + "`transaction` can be closed if either:", + "- the `proposal` is in a terminal state: `Executed`, `Rejected`, or `Cancelled`.", + "- the `proposal` is stale and not `Approved`." + ], + "accounts": [ + { + "name": "multisig", + "isMut": false, + "isSigner": false + }, + { + "name": "proposal", + "isMut": true, + "isSigner": false + }, + { + "name": "transaction", + "isMut": true, + "isSigner": false, + "docs": [ + "VaultTransaction corresponding to the `proposal`." + ] + }, + { + "name": "rentCollector", + "isMut": true, + "isSigner": false, + "docs": [ + "The rent collector." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "vaultBatchTransactionAccountClose", + "docs": [ + "Closes a `VaultBatchTransaction` belonging to the `batch` and `proposal`.", + "`transaction` can be closed if either:", + "- it's marked as executed within the `batch`;", + "- the `proposal` is in a terminal state: `Executed`, `Rejected`, or `Cancelled`.", + "- the `proposal` is stale and not `Approved`." + ], + "accounts": [ + { + "name": "multisig", + "isMut": false, + "isSigner": false + }, + { + "name": "proposal", + "isMut": false, + "isSigner": false + }, + { + "name": "batch", + "isMut": true, + "isSigner": false, + "docs": [ + "`Batch` corresponding to the `proposal`." + ] + }, + { + "name": "transaction", + "isMut": true, + "isSigner": false, + "docs": [ + "`VaultBatchTransaction` account to close.", + "The transaction must be the current last one in the batch." + ] + }, + { + "name": "rentCollector", + "isMut": true, + "isSigner": false, + "docs": [ + "The rent collector." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "batchAccountsClose", + "docs": [ + "Closes Batch and the corresponding Proposal accounts for proposals in terminal states:", + "`Executed`, `Rejected`, or `Cancelled` or stale proposals that aren't `Approved`.", + "", + "This instruction is only allowed to be executed when all `VaultBatchTransaction` accounts", + "in the `batch` are already closed: `batch.size == 0`." + ], + "accounts": [ + { + "name": "multisig", + "isMut": false, + "isSigner": false + }, + { + "name": "proposal", + "isMut": true, + "isSigner": false + }, + { + "name": "batch", + "isMut": true, + "isSigner": false, + "docs": [ + "`Batch` corresponding to the `proposal`." + ] + }, + { + "name": "rentCollector", + "isMut": true, + "isSigner": false, + "docs": [ + "The rent collector." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + } + ], + "accounts": [ + { + "name": "Batch", + "docs": [ + "Stores data required for serial execution of a batch of multisig vault transactions.", + "Vault transaction is a transaction that's executed on behalf of the multisig vault PDA", + "and wraps arbitrary Solana instructions, typically calling into other Solana programs.", + "The transactions themselves are stored in separate PDAs associated with the this account." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "multisig", + "docs": [ + "The multisig this belongs to." + ], + "type": "publicKey" + }, + { + "name": "creator", + "docs": [ + "Member of the Multisig who submitted the batch." + ], + "type": "publicKey" + }, + { + "name": "index", + "docs": [ + "Index of this batch within the multisig transactions." + ], + "type": "u64" + }, + { + "name": "bump", + "docs": [ + "PDA bump." + ], + "type": "u8" + }, + { + "name": "vaultIndex", + "docs": [ + "Index of the vault this batch belongs to." + ], + "type": "u8" + }, + { + "name": "vaultBump", + "docs": [ + "Derivation bump of the vault PDA this batch belongs to." + ], + "type": "u8" + }, + { + "name": "size", + "docs": [ + "Number of transactions in the batch." + ], + "type": "u32" + }, + { + "name": "executedTransactionIndex", + "docs": [ + "Index of the last executed transaction within the batch.", + "0 means that no transactions have been executed yet." + ], + "type": "u32" + } + ] + } + }, + { + "name": "VaultBatchTransaction", + "docs": [ + "Stores data required for execution of one transaction from a batch." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "docs": [ + "PDA bump." + ], + "type": "u8" + }, + { + "name": "ephemeralSignerBumps", + "docs": [ + "Derivation bumps for additional signers.", + "Some transactions require multiple signers. Often these additional signers are \"ephemeral\" keypairs", + "that are generated on the client with a sole purpose of signing the transaction and be discarded immediately after.", + "When wrapping such transactions into multisig ones, we replace these \"ephemeral\" signing keypairs", + "with PDAs derived from the transaction's `transaction_index` and controlled by the Multisig Program;", + "during execution the program includes the seeds of these PDAs into the `invoke_signed` calls,", + "thus \"signing\" on behalf of these PDAs." + ], + "type": "bytes" + }, + { + "name": "message", + "docs": [ + "data required for executing the transaction." + ], + "type": { + "defined": "VaultTransactionMessage" + } + } + ] + } + }, + { + "name": "ConfigTransaction", + "docs": [ + "Stores data required for execution of a multisig configuration transaction.", + "Config transaction can perform a predefined set of actions on the Multisig PDA, such as adding/removing members,", + "changing the threshold, etc." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "multisig", + "docs": [ + "The multisig this belongs to." + ], + "type": "publicKey" + }, + { + "name": "creator", + "docs": [ + "Member of the Multisig who submitted the transaction." + ], + "type": "publicKey" + }, + { + "name": "index", + "docs": [ + "Index of this transaction within the multisig." + ], + "type": "u64" + }, + { + "name": "bump", + "docs": [ + "bump for the transaction seeds." + ], + "type": "u8" + }, + { + "name": "actions", + "docs": [ + "Action to be performed on the multisig." + ], + "type": { + "vec": { + "defined": "ConfigAction" + } + } + } + ] + } + }, + { + "name": "Multisig", + "type": { + "kind": "struct", + "fields": [ + { + "name": "createKey", + "docs": [ + "Key that is used to seed the multisig PDA." + ], + "type": "publicKey" + }, + { + "name": "configAuthority", + "docs": [ + "The authority that can change the multisig config.", + "This is a very important parameter as this authority can change the members and threshold.", + "", + "The convention is to set this to `Pubkey::default()`.", + "In this case, the multisig becomes autonomous, so every config change goes through", + "the normal process of voting by the members.", + "", + "However, if this parameter is set to any other key, all the config changes for this multisig", + "will need to be signed by the `config_authority`. We call such a multisig a \"controlled multisig\"." + ], + "type": "publicKey" + }, + { + "name": "threshold", + "docs": [ + "Threshold for signatures." + ], + "type": "u16" + }, + { + "name": "timeLock", + "docs": [ + "How many seconds must pass between transaction voting settlement and execution." + ], + "type": "u32" + }, + { + "name": "transactionIndex", + "docs": [ + "Last transaction index. 0 means no transactions have been created." + ], + "type": "u64" + }, + { + "name": "staleTransactionIndex", + "docs": [ + "Last stale transaction index. All transactions up until this index are stale.", + "This index is updated when multisig config (members/threshold/time_lock) changes." + ], + "type": "u64" + }, + { + "name": "rentCollector", + "docs": [ + "The address where the rent for the accounts related to executed, rejected, or cancelled", + "transactions can be reclaimed. If set to `None`, the rent reclamation feature is turned off." + ], + "type": { + "option": "publicKey" + } + }, + { + "name": "bump", + "docs": [ + "Bump for the multisig PDA seed." + ], + "type": "u8" + }, + { + "name": "members", + "docs": [ + "Members of the multisig." + ], + "type": { + "vec": { + "defined": "Member" + } + } + } + ] + } + }, + { + "name": "ProgramConfig", + "docs": [ + "Global program configuration account." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "authority", + "docs": [ + "The authority which can update the config." + ], + "type": "publicKey" + }, + { + "name": "multisigCreationFee", + "docs": [ + "The lamports amount charged for creating a new multisig account.", + "This fee is sent to the `treasury` account." + ], + "type": "u64" + }, + { + "name": "treasury", + "docs": [ + "The treasury account to send charged fees to." + ], + "type": "publicKey" + }, + { + "name": "reserved", + "docs": [ + "Reserved for future use." + ], + "type": { + "array": [ + "u8", + 64 + ] + } + } + ] + } + }, + { + "name": "Proposal", + "docs": [ + "Stores the data required for tracking the status of a multisig proposal.", + "Each `Proposal` has a 1:1 association with a transaction account, e.g. a `VaultTransaction` or a `ConfigTransaction`;", + "the latter can be executed only after the `Proposal` has been approved and its time lock is released." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "multisig", + "docs": [ + "The multisig this belongs to." + ], + "type": "publicKey" + }, + { + "name": "transactionIndex", + "docs": [ + "Index of the multisig transaction this proposal is associated with." + ], + "type": "u64" + }, + { + "name": "status", + "docs": [ + "The status of the transaction." + ], + "type": { + "defined": "ProposalStatus" + } + }, + { + "name": "bump", + "docs": [ + "PDA bump." + ], + "type": "u8" + }, + { + "name": "approved", + "docs": [ + "Keys that have approved/signed." + ], + "type": { + "vec": "publicKey" + } + }, + { + "name": "rejected", + "docs": [ + "Keys that have rejected." + ], + "type": { + "vec": "publicKey" + } + }, + { + "name": "cancelled", + "docs": [ + "Keys that have cancelled (Approved only)." + ], + "type": { + "vec": "publicKey" + } + } + ] + } + }, + { + "name": "SpendingLimit", + "type": { + "kind": "struct", + "fields": [ + { + "name": "multisig", + "docs": [ + "The multisig this belongs to." + ], + "type": "publicKey" + }, + { + "name": "createKey", + "docs": [ + "Key that is used to seed the SpendingLimit PDA." + ], + "type": "publicKey" + }, + { + "name": "vaultIndex", + "docs": [ + "The index of the vault that the spending limit is for." + ], + "type": "u8" + }, + { + "name": "mint", + "docs": [ + "The token mint the spending limit is for.", + "Pubkey::default() means SOL.", + "use NATIVE_MINT for Wrapped SOL." + ], + "type": "publicKey" + }, + { + "name": "amount", + "docs": [ + "The amount of tokens that can be spent in a period.", + "This amount is in decimals of the mint,", + "so 1 SOL would be `1_000_000_000` and 1 USDC would be `1_000_000`." + ], + "type": "u64" + }, + { + "name": "period", + "docs": [ + "The reset period of the spending limit.", + "When it passes, the remaining amount is reset, unless it's `Period::OneTime`." + ], + "type": { + "defined": "Period" + } + }, + { + "name": "remainingAmount", + "docs": [ + "The remaining amount of tokens that can be spent in the current period.", + "When reaches 0, the spending limit cannot be used anymore until the period reset." + ], + "type": "u64" + }, + { + "name": "lastReset", + "docs": [ + "Unix timestamp marking the last time the spending limit was reset (or created)." + ], + "type": "i64" + }, + { + "name": "bump", + "docs": [ + "PDA bump." + ], + "type": "u8" + }, + { + "name": "members", + "docs": [ + "Members of the multisig that can use the spending limit.", + "In case a member is removed from the multisig, the spending limit will remain existent", + "(until explicitly deleted), but the removed member will not be able to use it anymore." + ], + "type": { + "vec": "publicKey" + } + }, + { + "name": "destinations", + "docs": [ + "The destination addresses the spending limit is allowed to sent funds to.", + "If empty, funds can be sent to any address." + ], + "type": { + "vec": "publicKey" + } + } + ] + } + }, + { + "name": "VaultTransaction", + "docs": [ + "Stores data required for tracking the voting and execution status of a vault transaction.", + "Vault transaction is a transaction that's executed on behalf of the multisig vault PDA", + "and wraps arbitrary Solana instructions, typically calling into other Solana programs." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "multisig", + "docs": [ + "The multisig this belongs to." + ], + "type": "publicKey" + }, + { + "name": "creator", + "docs": [ + "Member of the Multisig who submitted the transaction." + ], + "type": "publicKey" + }, + { + "name": "index", + "docs": [ + "Index of this transaction within the multisig." + ], + "type": "u64" + }, + { + "name": "bump", + "docs": [ + "bump for the transaction seeds." + ], + "type": "u8" + }, + { + "name": "vaultIndex", + "docs": [ + "Index of the vault this transaction belongs to." + ], + "type": "u8" + }, + { + "name": "vaultBump", + "docs": [ + "Derivation bump of the vault PDA this transaction belongs to." + ], + "type": "u8" + }, + { + "name": "ephemeralSignerBumps", + "docs": [ + "Derivation bumps for additional signers.", + "Some transactions require multiple signers. Often these additional signers are \"ephemeral\" keypairs", + "that are generated on the client with a sole purpose of signing the transaction and be discarded immediately after.", + "When wrapping such transactions into multisig ones, we replace these \"ephemeral\" signing keypairs", + "with PDAs derived from the MultisigTransaction's `transaction_index` and controlled by the Multisig Program;", + "during execution the program includes the seeds of these PDAs into the `invoke_signed` calls,", + "thus \"signing\" on behalf of these PDAs." + ], + "type": "bytes" + }, + { + "name": "message", + "docs": [ + "data required for executing the transaction." + ], + "type": { + "defined": "VaultTransactionMessage" + } + } + ] + } + } + ], + "types": [ + { + "name": "BatchAddTransactionArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "ephemeralSigners", + "docs": [ + "Number of ephemeral signing PDAs required by the transaction." + ], + "type": "u8" + }, + { + "name": "transactionMessage", + "type": "bytes" + } + ] + } + }, + { + "name": "BatchCreateArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "vaultIndex", + "docs": [ + "Index of the vault this transaction belongs to." + ], + "type": "u8" + }, + { + "name": "memo", + "type": { + "option": "string" + } + } + ] + } + }, + { + "name": "ConfigTransactionCreateArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "actions", + "type": { + "vec": { + "defined": "ConfigAction" + } + } + }, + { + "name": "memo", + "type": { + "option": "string" + } + } + ] + } + }, + { + "name": "MultisigAddSpendingLimitArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "createKey", + "docs": [ + "Key that is used to seed the SpendingLimit PDA." + ], + "type": "publicKey" + }, + { + "name": "vaultIndex", + "docs": [ + "The index of the vault that the spending limit is for." + ], + "type": "u8" + }, + { + "name": "mint", + "docs": [ + "The token mint the spending limit is for." + ], + "type": "publicKey" + }, + { + "name": "amount", + "docs": [ + "The amount of tokens that can be spent in a period.", + "This amount is in decimals of the mint,", + "so 1 SOL would be `1_000_000_000` and 1 USDC would be `1_000_000`." + ], + "type": "u64" + }, + { + "name": "period", + "docs": [ + "The reset period of the spending limit.", + "When it passes, the remaining amount is reset, unless it's `Period::OneTime`." + ], + "type": { + "defined": "Period" + } + }, + { + "name": "members", + "docs": [ + "Members of the multisig that can use the spending limit.", + "In case a member is removed from the multisig, the spending limit will remain existent", + "(until explicitly deleted), but the removed member will not be able to use it anymore." + ], + "type": { + "vec": "publicKey" + } + }, + { + "name": "destinations", + "docs": [ + "The destination addresses the spending limit is allowed to sent funds to.", + "If empty, funds can be sent to any address." + ], + "type": { + "vec": "publicKey" + } + }, + { + "name": "memo", + "docs": [ + "Memo is used for indexing only." + ], + "type": { + "option": "string" + } + } + ] + } + }, + { + "name": "MultisigAddMemberArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "newMember", + "type": { + "defined": "Member" + } + }, + { + "name": "memo", + "docs": [ + "Memo is used for indexing only." + ], + "type": { + "option": "string" + } + } + ] + } + }, + { + "name": "MultisigRemoveMemberArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "oldMember", + "type": "publicKey" + }, + { + "name": "memo", + "docs": [ + "Memo is used for indexing only." + ], + "type": { + "option": "string" + } + } + ] + } + }, + { + "name": "MultisigChangeThresholdArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "newThreshold", + "type": "u16" + }, + { + "name": "memo", + "docs": [ + "Memo is used for indexing only." + ], + "type": { + "option": "string" + } + } + ] + } + }, + { + "name": "MultisigSetTimeLockArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "timeLock", + "type": "u32" + }, + { + "name": "memo", + "docs": [ + "Memo is used for indexing only." + ], + "type": { + "option": "string" + } + } + ] + } + }, + { + "name": "MultisigSetConfigAuthorityArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "configAuthority", + "type": "publicKey" + }, + { + "name": "memo", + "docs": [ + "Memo is used for indexing only." + ], + "type": { + "option": "string" + } + } + ] + } + }, + { + "name": "MultisigSetRentCollectorArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "rentCollector", + "type": { + "option": "publicKey" + } + }, + { + "name": "memo", + "docs": [ + "Memo is used for indexing only." + ], + "type": { + "option": "string" + } + } + ] + } + }, + { + "name": "MultisigCreateArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "configAuthority", + "docs": [ + "The authority that can configure the multisig: add/remove members, change the threshold, etc.", + "Should be set to `None` for autonomous multisigs." + ], + "type": { + "option": "publicKey" + } + }, + { + "name": "threshold", + "docs": [ + "The number of signatures required to execute a transaction." + ], + "type": "u16" + }, + { + "name": "members", + "docs": [ + "The members of the multisig." + ], + "type": { + "vec": { + "defined": "Member" + } + } + }, + { + "name": "timeLock", + "docs": [ + "How many seconds must pass between transaction voting, settlement, and execution." + ], + "type": "u32" + }, + { + "name": "memo", + "docs": [ + "Memo is used for indexing only." + ], + "type": { + "option": "string" + } + } + ] + } + }, + { + "name": "MultisigCreateArgsV2", + "type": { + "kind": "struct", + "fields": [ + { + "name": "configAuthority", + "docs": [ + "The authority that can configure the multisig: add/remove members, change the threshold, etc.", + "Should be set to `None` for autonomous multisigs." + ], + "type": { + "option": "publicKey" + } + }, + { + "name": "threshold", + "docs": [ + "The number of signatures required to execute a transaction." + ], + "type": "u16" + }, + { + "name": "members", + "docs": [ + "The members of the multisig." + ], + "type": { + "vec": { + "defined": "Member" + } + } + }, + { + "name": "timeLock", + "docs": [ + "How many seconds must pass between transaction voting, settlement, and execution." + ], + "type": "u32" + }, + { + "name": "rentCollector", + "docs": [ + "The address where the rent for the accounts related to executed, rejected, or cancelled", + "transactions can be reclaimed. If set to `None`, the rent reclamation feature is turned off." + ], + "type": { + "option": "publicKey" + } + }, + { + "name": "memo", + "docs": [ + "Memo is used for indexing only." + ], + "type": { + "option": "string" + } + } + ] + } + }, + { + "name": "MultisigRemoveSpendingLimitArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "memo", + "docs": [ + "Memo is used for indexing only." + ], + "type": { + "option": "string" + } + } + ] + } + }, + { + "name": "ProgramConfigInitArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "authority", + "docs": [ + "The authority that can configure the program config: change the treasury, etc." + ], + "type": "publicKey" + }, + { + "name": "multisigCreationFee", + "docs": [ + "The fee that is charged for creating a new multisig." + ], + "type": "u64" + }, + { + "name": "treasury", + "docs": [ + "The treasury where the creation fee is transferred to." + ], + "type": "publicKey" + } + ] + } + }, + { + "name": "ProgramConfigSetAuthorityArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "newAuthority", + "type": "publicKey" + } + ] + } + }, + { + "name": "ProgramConfigSetMultisigCreationFeeArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "newMultisigCreationFee", + "type": "u64" + } + ] + } + }, + { + "name": "ProgramConfigSetTreasuryArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "newTreasury", + "type": "publicKey" + } + ] + } + }, + { + "name": "ProposalCreateArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "transactionIndex", + "docs": [ + "Index of the multisig transaction this proposal is associated with." + ], + "type": "u64" + }, + { + "name": "draft", + "docs": [ + "Whether the proposal should be initialized with status `Draft`." + ], + "type": "bool" + } + ] + } + }, + { + "name": "ProposalVoteArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "memo", + "type": { + "option": "string" + } + } + ] + } + }, + { + "name": "SpendingLimitUseArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "docs": [ + "Amount of tokens to transfer." + ], + "type": "u64" + }, + { + "name": "decimals", + "docs": [ + "Decimals of the token mint. Used for double-checking against incorrect order of magnitude of `amount`." + ], + "type": "u8" + }, + { + "name": "memo", + "docs": [ + "Memo used for indexing." + ], + "type": { + "option": "string" + } + } + ] + } + }, + { + "name": "VaultTransactionCreateArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "vaultIndex", + "docs": [ + "Index of the vault this transaction belongs to." + ], + "type": "u8" + }, + { + "name": "ephemeralSigners", + "docs": [ + "Number of ephemeral signing PDAs required by the transaction." + ], + "type": "u8" + }, + { + "name": "transactionMessage", + "type": "bytes" + }, + { + "name": "memo", + "type": { + "option": "string" + } + } + ] + } + }, + { + "name": "TransactionMessage", + "docs": [ + "Unvalidated instruction data, must be treated as untrusted." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "numSigners", + "docs": [ + "The number of signer pubkeys in the account_keys vec." + ], + "type": "u8" + }, + { + "name": "numWritableSigners", + "docs": [ + "The number of writable signer pubkeys in the account_keys vec." + ], + "type": "u8" + }, + { + "name": "numWritableNonSigners", + "docs": [ + "The number of writable non-signer pubkeys in the account_keys vec." + ], + "type": "u8" + }, + { + "name": "accountKeys", + "docs": [ + "The list of unique account public keys (including program IDs) that will be used in the provided instructions." + ], + "type": { + "defined": "SmallVec" + } + }, + { + "name": "instructions", + "docs": [ + "The list of instructions to execute." + ], + "type": { + "defined": "SmallVec" + } + }, + { + "name": "addressTableLookups", + "docs": [ + "List of address table lookups used to load additional accounts", + "for this transaction." + ], + "type": { + "defined": "SmallVec" + } + } + ] + } + }, + { + "name": "CompiledInstruction", + "type": { + "kind": "struct", + "fields": [ + { + "name": "programIdIndex", + "type": "u8" + }, + { + "name": "accountIndexes", + "docs": [ + "Indices into the tx's `account_keys` list indicating which accounts to pass to the instruction." + ], + "type": { + "defined": "SmallVec" + } + }, + { + "name": "data", + "docs": [ + "Instruction data." + ], + "type": { + "defined": "SmallVec" + } + } + ] + } + }, + { + "name": "MessageAddressTableLookup", + "docs": [ + "Address table lookups describe an on-chain address lookup table to use", + "for loading more readonly and writable accounts in a single tx." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "accountKey", + "docs": [ + "Address lookup table account key" + ], + "type": "publicKey" + }, + { + "name": "writableIndexes", + "docs": [ + "List of indexes used to load writable account addresses" + ], + "type": { + "defined": "SmallVec" + } + }, + { + "name": "readonlyIndexes", + "docs": [ + "List of indexes used to load readonly account addresses" + ], + "type": { + "defined": "SmallVec" + } + } + ] + } + }, + { + "name": "Member", + "type": { + "kind": "struct", + "fields": [ + { + "name": "key", + "type": "publicKey" + }, + { + "name": "permissions", + "type": { + "defined": "Permissions" + } + } + ] + } + }, + { + "name": "Permissions", + "docs": [ + "Bitmask for permissions." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "mask", + "type": "u8" + } + ] + } + }, + { + "name": "VaultTransactionMessage", + "type": { + "kind": "struct", + "fields": [ + { + "name": "numSigners", + "docs": [ + "The number of signer pubkeys in the account_keys vec." + ], + "type": "u8" + }, + { + "name": "numWritableSigners", + "docs": [ + "The number of writable signer pubkeys in the account_keys vec." + ], + "type": "u8" + }, + { + "name": "numWritableNonSigners", + "docs": [ + "The number of writable non-signer pubkeys in the account_keys vec." + ], + "type": "u8" + }, + { + "name": "accountKeys", + "docs": [ + "Unique account pubkeys (including program IDs) required for execution of the tx.", + "The signer pubkeys appear at the beginning of the vec, with writable pubkeys first, and read-only pubkeys following.", + "The non-signer pubkeys follow with writable pubkeys first and read-only ones following.", + "Program IDs are also stored at the end of the vec along with other non-signer non-writable pubkeys:", + "", + "```plaintext", + "[pubkey1, pubkey2, pubkey3, pubkey4, pubkey5, pubkey6, pubkey7, pubkey8]", + "|---writable---| |---readonly---| |---writable---| |---readonly---|", + "|------------signers-------------| |----------non-singers-----------|", + "```" + ], + "type": { + "vec": "publicKey" + } + }, + { + "name": "instructions", + "docs": [ + "List of instructions making up the tx." + ], + "type": { + "vec": { + "defined": "MultisigCompiledInstruction" + } + } + }, + { + "name": "addressTableLookups", + "docs": [ + "List of address table lookups used to load additional accounts", + "for this transaction." + ], + "type": { + "vec": { + "defined": "MultisigMessageAddressTableLookup" + } + } + } + ] + } + }, + { + "name": "MultisigCompiledInstruction", + "docs": [ + "Concise serialization schema for instructions that make up a transaction.", + "Closely mimics the Solana transaction wire format." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "programIdIndex", + "type": "u8" + }, + { + "name": "accountIndexes", + "docs": [ + "Indices into the tx's `account_keys` list indicating which accounts to pass to the instruction." + ], + "type": "bytes" + }, + { + "name": "data", + "docs": [ + "Instruction data." + ], + "type": "bytes" + } + ] + } + }, + { + "name": "MultisigMessageAddressTableLookup", + "docs": [ + "Address table lookups describe an on-chain address lookup table to use", + "for loading more readonly and writable accounts into a transaction." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "accountKey", + "docs": [ + "Address lookup table account key." + ], + "type": "publicKey" + }, + { + "name": "writableIndexes", + "docs": [ + "List of indexes used to load writable accounts." + ], + "type": "bytes" + }, + { + "name": "readonlyIndexes", + "docs": [ + "List of indexes used to load readonly accounts." + ], + "type": "bytes" + } + ] + } + }, + { + "name": "Vote", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Approve" + }, + { + "name": "Reject" + }, + { + "name": "Cancel" + } + ] + } + }, + { + "name": "ConfigAction", + "type": { + "kind": "enum", + "variants": [ + { + "name": "AddMember", + "fields": [ + { + "name": "newMember", + "type": { + "defined": "Member" + } + } + ] + }, + { + "name": "RemoveMember", + "fields": [ + { + "name": "oldMember", + "type": "publicKey" + } + ] + }, + { + "name": "ChangeThreshold", + "fields": [ + { + "name": "newThreshold", + "type": "u16" + } + ] + }, + { + "name": "SetTimeLock", + "fields": [ + { + "name": "newTimeLock", + "type": "u32" + } + ] + }, + { + "name": "AddSpendingLimit", + "fields": [ + { + "name": "createKey", + "docs": [ + "Key that is used to seed the SpendingLimit PDA." + ], + "type": "publicKey" + }, + { + "name": "vaultIndex", + "docs": [ + "The index of the vault that the spending limit is for." + ], + "type": "u8" + }, + { + "name": "mint", + "docs": [ + "The token mint the spending limit is for." + ], + "type": "publicKey" + }, + { + "name": "amount", + "docs": [ + "The amount of tokens that can be spent in a period.", + "This amount is in decimals of the mint,", + "so 1 SOL would be `1_000_000_000` and 1 USDC would be `1_000_000`." + ], + "type": "u64" + }, + { + "name": "period", + "docs": [ + "The reset period of the spending limit.", + "When it passes, the remaining amount is reset, unless it's `Period::OneTime`." + ], + "type": { + "defined": "Period" + } + }, + { + "name": "members", + "docs": [ + "Members of the multisig that can use the spending limit.", + "In case a member is removed from the multisig, the spending limit will remain existent", + "(until explicitly deleted), but the removed member will not be able to use it anymore." + ], + "type": { + "vec": "publicKey" + } + }, + { + "name": "destinations", + "docs": [ + "The destination addresses the spending limit is allowed to sent funds to.", + "If empty, funds can be sent to any address." + ], + "type": { + "vec": "publicKey" + } + } + ] + }, + { + "name": "RemoveSpendingLimit", + "fields": [ + { + "name": "spendingLimit", + "type": "publicKey" + } + ] + }, + { + "name": "SetRentCollector", + "fields": [ + { + "name": "newRentCollector", + "type": { + "option": "publicKey" + } + } + ] + } + ] + } + }, + { + "name": "Permission", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Initiate" + }, + { + "name": "Vote" + }, + { + "name": "Execute" + } + ] + } + }, + { + "name": "ProposalStatus", + "docs": [ + "The status of a proposal.", + "Each variant wraps a timestamp of when the status was set." + ], + "type": { + "kind": "enum", + "variants": [ + { + "name": "Draft", + "fields": [ + { + "name": "timestamp", + "type": "i64" + } + ] + }, + { + "name": "Active", + "fields": [ + { + "name": "timestamp", + "type": "i64" + } + ] + }, + { + "name": "Rejected", + "fields": [ + { + "name": "timestamp", + "type": "i64" + } + ] + }, + { + "name": "Approved", + "fields": [ + { + "name": "timestamp", + "type": "i64" + } + ] + }, + { + "name": "Executing" + }, + { + "name": "Executed", + "fields": [ + { + "name": "timestamp", + "type": "i64" + } + ] + }, + { + "name": "Cancelled", + "fields": [ + { + "name": "timestamp", + "type": "i64" + } + ] + } + ] + } + }, + { + "name": "Period", + "docs": [ + "The reset period of the spending limit." + ], + "type": { + "kind": "enum", + "variants": [ + { + "name": "OneTime" + }, + { + "name": "Day" + }, + { + "name": "Week" + }, + { + "name": "Month" + } + ] + } + } + ], + "errors": [ + { + "code": 6000, + "name": "DuplicateMember", + "msg": "Found multiple members with the same pubkey" + }, + { + "code": 6001, + "name": "EmptyMembers", + "msg": "Members array is empty" + }, + { + "code": 6002, + "name": "TooManyMembers", + "msg": "Too many members, can be up to 65535" + }, + { + "code": 6003, + "name": "InvalidThreshold", + "msg": "Invalid threshold, must be between 1 and number of members with Vote permission" + }, + { + "code": 6004, + "name": "Unauthorized", + "msg": "Attempted to perform an unauthorized action" + }, + { + "code": 6005, + "name": "NotAMember", + "msg": "Provided pubkey is not a member of multisig" + }, + { + "code": 6006, + "name": "InvalidTransactionMessage", + "msg": "TransactionMessage is malformed." + }, + { + "code": 6007, + "name": "StaleProposal", + "msg": "Proposal is stale" + }, + { + "code": 6008, + "name": "InvalidProposalStatus", + "msg": "Invalid proposal status" + }, + { + "code": 6009, + "name": "InvalidTransactionIndex", + "msg": "Invalid transaction index" + }, + { + "code": 6010, + "name": "AlreadyApproved", + "msg": "Member already approved the transaction" + }, + { + "code": 6011, + "name": "AlreadyRejected", + "msg": "Member already rejected the transaction" + }, + { + "code": 6012, + "name": "AlreadyCancelled", + "msg": "Member already cancelled the transaction" + }, + { + "code": 6013, + "name": "InvalidNumberOfAccounts", + "msg": "Wrong number of accounts provided" + }, + { + "code": 6014, + "name": "InvalidAccount", + "msg": "Invalid account provided" + }, + { + "code": 6015, + "name": "RemoveLastMember", + "msg": "Cannot remove last member" + }, + { + "code": 6016, + "name": "NoVoters", + "msg": "Members don't include any voters" + }, + { + "code": 6017, + "name": "NoProposers", + "msg": "Members don't include any proposers" + }, + { + "code": 6018, + "name": "NoExecutors", + "msg": "Members don't include any executors" + }, + { + "code": 6019, + "name": "InvalidStaleTransactionIndex", + "msg": "`stale_transaction_index` must be <= `transaction_index`" + }, + { + "code": 6020, + "name": "NotSupportedForControlled", + "msg": "Instruction not supported for controlled multisig" + }, + { + "code": 6021, + "name": "TimeLockNotReleased", + "msg": "Proposal time lock has not been released" + }, + { + "code": 6022, + "name": "NoActions", + "msg": "Config transaction must have at least one action" + }, + { + "code": 6023, + "name": "MissingAccount", + "msg": "Missing account" + }, + { + "code": 6024, + "name": "InvalidMint", + "msg": "Invalid mint" + }, + { + "code": 6025, + "name": "InvalidDestination", + "msg": "Invalid destination" + }, + { + "code": 6026, + "name": "SpendingLimitExceeded", + "msg": "Spending limit exceeded" + }, + { + "code": 6027, + "name": "DecimalsMismatch", + "msg": "Decimals don't match the mint" + }, + { + "code": 6028, + "name": "UnknownPermission", + "msg": "Member has unknown permission" + }, + { + "code": 6029, + "name": "ProtectedAccount", + "msg": "Account is protected, it cannot be passed into a CPI as writable" + }, + { + "code": 6030, + "name": "TimeLockExceedsMaxAllowed", + "msg": "Time lock exceeds the maximum allowed (90 days)" + }, + { + "code": 6031, + "name": "IllegalAccountOwner", + "msg": "Account is not owned by Multisig program" + }, + { + "code": 6032, + "name": "RentReclamationDisabled", + "msg": "Rent reclamation is disabled for this multisig" + }, + { + "code": 6033, + "name": "InvalidRentCollector", + "msg": "Invalid rent collector address" + }, + { + "code": 6034, + "name": "ProposalForAnotherMultisig", + "msg": "Proposal is for another multisig" + }, + { + "code": 6035, + "name": "TransactionForAnotherMultisig", + "msg": "Transaction is for another multisig" + }, + { + "code": 6036, + "name": "TransactionNotMatchingProposal", + "msg": "Transaction doesn't match proposal" + }, + { + "code": 6037, + "name": "TransactionNotLastInBatch", + "msg": "Transaction is not last in batch" + }, + { + "code": 6038, + "name": "BatchNotEmpty", + "msg": "Batch is not empty" + }, + { + "code": 6039, + "name": "SpendingLimitInvalidAmount", + "msg": "Invalid SpendingLimit amount" + } + ] +} \ No newline at end of file diff --git a/idls/governance.WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx.metadao_bid_wall.V0_7_0.from_solscan.json b/idls/governance.WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx.metadao_bid_wall.V0_7_0.from_solscan.json new file mode 100644 index 0000000..c6f3451 --- /dev/null +++ b/idls/governance.WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx.metadao_bid_wall.V0_7_0.from_solscan.json @@ -0,0 +1,741 @@ +{ + "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/j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X.jupiter_limit_order_v2.json b/idls/j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X.jupiter_limit_order_v2.json deleted file mode 100644 index 4d7c8c5..0000000 --- a/idls/j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X.jupiter_limit_order_v2.json +++ /dev/null @@ -1 +0,0 @@ -{"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/jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu.jupiter_limit_order.json b/idls/jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu.jupiter_limit_order.json deleted file mode 100644 index 1f67468..0000000 --- a/idls/jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu.jupiter_limit_order.json +++ /dev/null @@ -1 +0,0 @@ -{"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/kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr.kamino_vault.json b/idls/kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr.kamino_vault.json deleted file mode 100644 index 231f87f..0000000 --- a/idls/kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr.kamino_vault.json +++ /dev/null @@ -1 +0,0 @@ -{"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/launchpad.5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki.virtuals.V0_1_0.from_solscan.json b/idls/launchpad.5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki.virtuals.V0_1_0.from_solscan.json new file mode 100644 index 0000000..4dd224e --- /dev/null +++ b/idls/launchpad.5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki.virtuals.V0_1_0.from_solscan.json @@ -0,0 +1,3373 @@ +{ + "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/launchpad.6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.pump_fun.V0_1_0.from_solscan.json b/idls/launchpad.6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.pump_fun.V0_1_0.from_solscan.json new file mode 100644 index 0000000..34eaf8d --- /dev/null +++ b/idls/launchpad.6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.pump_fun.V0_1_0.from_solscan.json @@ -0,0 +1,10944 @@ +{ + "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/launchpad.LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.raydium_launchlab.V0_2_0.from_solscan.json b/idls/launchpad.LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.raydium_launchlab.V0_2_0.from_solscan.json new file mode 100644 index 0000000..3ac76e6 --- /dev/null +++ b/idls/launchpad.LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.raydium_launchlab.V0_2_0.from_solscan.json @@ -0,0 +1,6172 @@ +{ + "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/launchpad.MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG.moonit.V0_1_0.from_solscan.json b/idls/launchpad.MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG.moonit.V0_1_0.from_solscan.json new file mode 100644 index 0000000..2d8cdf1 --- /dev/null +++ b/idls/launchpad.MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG.moonit.V0_1_0.from_solscan.json @@ -0,0 +1,995 @@ +{ + "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/launchpad.PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd.pump_pumpup_ai.V0_1_0.from_solscan.json b/idls/launchpad.PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd.pump_pumpup_ai.V0_1_0.from_solscan.json new file mode 100644 index 0000000..5eb100f --- /dev/null +++ b/idls/launchpad.PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd.pump_pumpup_ai.V0_1_0.from_solscan.json @@ -0,0 +1,5034 @@ +{ + "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/launchpad.T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint.printr.V1_0_0.from_solscan.json b/idls/launchpad.T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint.printr.V1_0_0.from_solscan.json new file mode 100644 index 0000000..af1622d --- /dev/null +++ b/idls/launchpad.T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint.printr.V1_0_0.from_solscan.json @@ -0,0 +1,8260 @@ +{ + "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/launchpad.boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.boop_fun.V0_3_0.from_solscan.json b/idls/launchpad.boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.boop_fun.V0_3_0.from_solscan.json new file mode 100644 index 0000000..aa08e1e --- /dev/null +++ b/idls/launchpad.boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.boop_fun.V0_3_0.from_solscan.json @@ -0,0 +1,9440 @@ +{ + "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/launchpad.dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.meteora_dbc.V0_1_10.from_solscan.json b/idls/launchpad.dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.meteora_dbc.V0_1_10.from_solscan.json new file mode 100644 index 0000000..50c67fe --- /dev/null +++ b/idls/launchpad.dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.meteora_dbc.V0_1_10.from_solscan.json @@ -0,0 +1,6634 @@ +{ + "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/launchpad.moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM.metadao_ico.V0_7_0.from_solscan.json b/idls/launchpad.moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM.metadao_ico.V0_7_0.from_solscan.json new file mode 100644 index 0000000..338f10a --- /dev/null +++ b/idls/launchpad.moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM.metadao_ico.V0_7_0.from_solscan.json @@ -0,0 +1,2193 @@ +{ + "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/launchpad.waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF.orca_wavebreak.V1_1_5.from_solscan.json b/idls/launchpad.waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF.orca_wavebreak.V1_1_5.from_solscan.json new file mode 100644 index 0000000..cdccbe7 --- /dev/null +++ b/idls/launchpad.waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF.orca_wavebreak.V1_1_5.from_solscan.json @@ -0,0 +1,5570 @@ +{ + "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/lending.C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr.clone.V0_1_0.from_solscan.json b/idls/lending.C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr.clone.V0_1_0.from_solscan.json new file mode 100644 index 0000000..ab4e1eb --- /dev/null +++ b/idls/lending.C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr.clone.V0_1_0.from_solscan.json @@ -0,0 +1,2484 @@ +{ + "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/lending.KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD.kamino.V1_23_0.from_solscan.json b/idls/lending.KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD.kamino.V1_23_0.from_solscan.json new file mode 100644 index 0000000..3042442 --- /dev/null +++ b/idls/lending.KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD.kamino.V1_23_0.from_solscan.json @@ -0,0 +1,8685 @@ +{ + "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/lending.MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA.marginfi_v2.V0_1_8.from_solscan.json b/idls/lending.MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA.marginfi_v2.V0_1_8.from_solscan.json new file mode 100644 index 0000000..5e69bf6 --- /dev/null +++ b/idls/lending.MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA.marginfi_v2.V0_1_8.from_solscan.json @@ -0,0 +1,18042 @@ +{ + "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/lock.LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.raydium_lp.V0_1_0.from_solscan.json b/idls/lock.LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.raydium_lp.V0_1_0.from_solscan.json new file mode 100644 index 0000000..a5b8b72 --- /dev/null +++ b/idls/lock.LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.raydium_lp.V0_1_0.from_solscan.json @@ -0,0 +1,864 @@ +{ + "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/metadata.ProgM6JCCvbYkfKqJYHePx4xxSUSqJp7rh8Lyv7nk7S.solana_program_metadata.V0_0_0.from_github_solana_program.json b/idls/metadata.ProgM6JCCvbYkfKqJYHePx4xxSUSqJp7rh8Lyv7nk7S.solana_program_metadata.V0_0_0.from_github_solana_program.json new file mode 100644 index 0000000..4ff4e9a --- /dev/null +++ b/idls/metadata.ProgM6JCCvbYkfKqJYHePx4xxSUSqJp7rh8Lyv7nk7S.solana_program_metadata.V0_0_0.from_github_solana_program.json @@ -0,0 +1,1548 @@ +{ + "kind": "rootNode", + "standard": "codama", + "version": "1.0.0", + "program": { + "kind": "programNode", + "name": "programMetadata", + "publicKey": "ProgM6JCCvbYkfKqJYHePx4xxSUSqJp7rh8Lyv7nk7S", + "version": "0.0.0", + "pdas": [ + { + "kind": "pdaNode", + "name": "canonical", + "docs": [ + "The canonical derivation for metadata accounts managed by the program authority itself." + ], + "seeds": [ + { + "kind": "variablePdaSeedNode", + "name": "program", + "docs": [ + "The program to which the metadata belongs." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "variablePdaSeedNode", + "name": "seed", + "docs": [ + "The seed deriving the metadata account." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "seed" + } + } + ] + }, + { + "kind": "pdaNode", + "name": "nonCanonical", + "docs": [ + "The derivation for metadata accounts managed by third-party authorities." + ], + "seeds": [ + { + "kind": "variablePdaSeedNode", + "name": "program", + "docs": [ + "The program to which the metadata belongs." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "variablePdaSeedNode", + "name": "authority", + "docs": [ + "The third-party authority managing this metadata account." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "variablePdaSeedNode", + "name": "seed", + "docs": [ + "The seed deriving the metadata account." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "seed" + } + } + ] + }, + { + "kind": "pdaNode", + "name": "metadata", + "docs": [ + "The derivation for metadata accounts, canonical or not, depending if an authority is provided." + ], + "seeds": [ + { + "kind": "variablePdaSeedNode", + "name": "program", + "docs": [ + "The program to which the metadata belongs." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "variablePdaSeedNode", + "name": "authority", + "docs": [ + "The third-party authority managing this metadata account, if non-canonical." + ], + "type": { + "kind": "remainderOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "variablePdaSeedNode", + "name": "seed", + "docs": [ + "The seed deriving the metadata account." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "seed" + } + } + ] + } + ], + "accounts": [ + { + "kind": "accountNode", + "name": "buffer", + "docs": [], + "data": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "discriminator", + "docs": [], + "type": { + "kind": "definedTypeLinkNode", + "name": "accountDiscriminator" + }, + "defaultValue": { + "kind": "enumValueNode", + "enum": { + "kind": "definedTypeLinkNode", + "name": "accountDiscriminator" + }, + "variant": "buffer" + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "structFieldTypeNode", + "name": "program", + "docs": [], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "authority", + "docs": [], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "canonical", + "docs": [], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "seed", + "docs": [], + "type": { + "kind": "postOffsetTypeNode", + "offset": 14, + "strategy": "padded", + "type": { + "kind": "definedTypeLinkNode", + "name": "seed" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "data", + "docs": [], + "type": { + "kind": "bytesTypeNode" + } + } + ] + }, + "pda": { + "kind": "pdaLinkNode", + "name": "metadata" + } + }, + { + "kind": "accountNode", + "name": "metadata", + "docs": [], + "data": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "discriminator", + "docs": [], + "type": { + "kind": "definedTypeLinkNode", + "name": "accountDiscriminator" + }, + "defaultValue": { + "kind": "enumValueNode", + "enum": { + "kind": "definedTypeLinkNode", + "name": "accountDiscriminator" + }, + "variant": "metadata" + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "structFieldTypeNode", + "name": "program", + "docs": [], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "authority", + "docs": [], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "mutable", + "docs": [], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "canonical", + "docs": [], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "seed", + "docs": [], + "type": { + "kind": "definedTypeLinkNode", + "name": "seed" + } + }, + { + "kind": "structFieldTypeNode", + "name": "encoding", + "docs": [], + "type": { + "kind": "definedTypeLinkNode", + "name": "encoding" + } + }, + { + "kind": "structFieldTypeNode", + "name": "compression", + "docs": [], + "type": { + "kind": "definedTypeLinkNode", + "name": "compression" + } + }, + { + "kind": "structFieldTypeNode", + "name": "format", + "docs": [], + "type": { + "kind": "definedTypeLinkNode", + "name": "format" + } + }, + { + "kind": "structFieldTypeNode", + "name": "dataSource", + "docs": [], + "type": { + "kind": "definedTypeLinkNode", + "name": "dataSource" + } + }, + { + "kind": "structFieldTypeNode", + "name": "dataLength", + "docs": [], + "type": { + "kind": "postOffsetTypeNode", + "offset": 5, + "strategy": "padded", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "data", + "docs": [], + "type": { + "kind": "bytesTypeNode" + } + } + ] + }, + "pda": { + "kind": "pdaLinkNode", + "name": "metadata" + } + } + ], + "instructions": [ + { + "kind": "instructionNode", + "name": "write", + "docs": [], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "buffer", + "docs": [ + "The buffer to write to." + ], + "isSigner": false, + "isWritable": true + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "docs": [ + "The authority of the buffer." + ], + "isSigner": true, + "isWritable": false + }, + { + "kind": "instructionAccountNode", + "name": "sourceBuffer", + "docs": [ + "Buffer to copy the data from.", + "You may use the `data` argument instead of this account to pass data directly." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValueStrategy": "omitted", + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + }, + { + "kind": "instructionArgumentNode", + "name": "offset", + "docs": [ + "The offset to write to." + ], + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "data", + "docs": [ + "The data to write at the provided offset.", + "You may use the `source_buffer` account instead of this argument to copy from an existing buffer." + ], + "defaultValue": { + "kind": "noneValueNode" + }, + "type": { + "kind": "remainderOptionTypeNode", + "item": { + "kind": "bytesTypeNode" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "initialize", + "docs": [], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "metadata", + "docs": [ + "Metadata account the initialize." + ], + "isSigner": false, + "isWritable": true, + "defaultValue": { + "kind": "conditionalValueNode", + "condition": { + "kind": "accountValueNode", + "name": "programData" + }, + "ifTrue": { + "kind": "pdaValueNode", + "pda": { + "kind": "pdaLinkNode", + "name": "canonical" + }, + "seeds": [ + { + "kind": "pdaSeedValueNode", + "name": "program", + "value": { + "kind": "accountValueNode", + "name": "program" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "seed", + "value": { + "kind": "argumentValueNode", + "name": "seed" + } + } + ] + }, + "ifFalse": { + "kind": "pdaValueNode", + "pda": { + "kind": "pdaLinkNode", + "name": "nonCanonical" + }, + "seeds": [ + { + "kind": "pdaSeedValueNode", + "name": "program", + "value": { + "kind": "accountValueNode", + "name": "program" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "authority", + "value": { + "kind": "accountValueNode", + "name": "authority" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "seed", + "value": { + "kind": "argumentValueNode", + "name": "seed" + } + } + ] + } + } + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "docs": [ + "Authority (for canonical, must match program upgrade authority)." + ], + "isSigner": true, + "isWritable": false + }, + { + "kind": "instructionAccountNode", + "name": "program", + "docs": [ + "Program account." + ], + "isSigner": false, + "isWritable": false + }, + { + "kind": "instructionAccountNode", + "name": "programData", + "docs": [ + "Program data account." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true + }, + { + "kind": "instructionAccountNode", + "name": "system", + "docs": [ + "System program." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true, + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "11111111111111111111111111111111" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValueStrategy": "omitted", + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + }, + { + "kind": "instructionArgumentNode", + "name": "seed", + "docs": [], + "type": { + "kind": "definedTypeLinkNode", + "name": "seed" + } + }, + { + "kind": "instructionArgumentNode", + "name": "encoding", + "docs": [], + "type": { + "kind": "definedTypeLinkNode", + "name": "encoding" + } + }, + { + "kind": "instructionArgumentNode", + "name": "compression", + "docs": [], + "type": { + "kind": "definedTypeLinkNode", + "name": "compression" + } + }, + { + "kind": "instructionArgumentNode", + "name": "format", + "docs": [], + "type": { + "kind": "definedTypeLinkNode", + "name": "format" + } + }, + { + "kind": "instructionArgumentNode", + "name": "dataSource", + "docs": [], + "type": { + "kind": "definedTypeLinkNode", + "name": "dataSource" + } + }, + { + "kind": "instructionArgumentNode", + "name": "data", + "docs": [], + "defaultValue": { + "kind": "noneValueNode" + }, + "type": { + "kind": "remainderOptionTypeNode", + "item": { + "kind": "bytesTypeNode" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "setAuthority", + "docs": [], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "docs": [ + "Metadata or buffer account." + ], + "isSigner": false, + "isWritable": true + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "docs": [ + "Current authority account." + ], + "isSigner": true, + "isWritable": false + }, + { + "kind": "instructionAccountNode", + "name": "program", + "docs": [ + "Program account." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true + }, + { + "kind": "instructionAccountNode", + "name": "programData", + "docs": [ + "Program data account." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValueStrategy": "omitted", + "defaultValue": { + "kind": "numberValueNode", + "number": 2 + } + }, + { + "kind": "instructionArgumentNode", + "name": "newAuthority", + "docs": [], + "type": { + "kind": "optionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "setData", + "docs": [], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "metadata", + "docs": [ + "Metadata account." + ], + "isSigner": false, + "isWritable": true + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "docs": [ + "Authority account." + ], + "isSigner": true, + "isWritable": false + }, + { + "kind": "instructionAccountNode", + "name": "buffer", + "docs": [ + "Buffer account to copy data from." + ], + "isSigner": false, + "isWritable": true, + "isOptional": true + }, + { + "kind": "instructionAccountNode", + "name": "program", + "docs": [ + "Program account." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true + }, + { + "kind": "instructionAccountNode", + "name": "programData", + "docs": [ + "Program data account." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValueStrategy": "omitted", + "defaultValue": { + "kind": "numberValueNode", + "number": 3 + } + }, + { + "kind": "instructionArgumentNode", + "name": "encoding", + "docs": [], + "type": { + "kind": "definedTypeLinkNode", + "name": "encoding" + } + }, + { + "kind": "instructionArgumentNode", + "name": "compression", + "docs": [], + "type": { + "kind": "definedTypeLinkNode", + "name": "compression" + } + }, + { + "kind": "instructionArgumentNode", + "name": "format", + "docs": [], + "type": { + "kind": "definedTypeLinkNode", + "name": "format" + } + }, + { + "kind": "instructionArgumentNode", + "name": "dataSource", + "docs": [], + "type": { + "kind": "definedTypeLinkNode", + "name": "dataSource" + } + }, + { + "kind": "instructionArgumentNode", + "name": "data", + "defaultValue": { + "kind": "noneValueNode" + }, + "docs": [], + "type": { + "kind": "remainderOptionTypeNode", + "item": { + "kind": "bytesTypeNode" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "setImmutable", + "docs": [], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "metadata", + "docs": [ + "Metadata account." + ], + "isSigner": false, + "isWritable": true + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "docs": [ + "Authority account." + ], + "isSigner": true, + "isWritable": false + }, + { + "kind": "instructionAccountNode", + "name": "program", + "docs": [ + "Program account." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true + }, + { + "kind": "instructionAccountNode", + "name": "programData", + "docs": [ + "Program data account." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValueStrategy": "omitted", + "defaultValue": { + "kind": "numberValueNode", + "number": 4 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "trim", + "docs": [], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "docs": [ + "Buffer or metadata account." + ], + "isSigner": false, + "isWritable": true + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "docs": [ + "Authority account." + ], + "isSigner": true, + "isWritable": false + }, + { + "kind": "instructionAccountNode", + "name": "program", + "docs": [ + "Program account." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true + }, + { + "kind": "instructionAccountNode", + "name": "programData", + "docs": [ + "Program data account." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "docs": [ + "Destination account." + ], + "isSigner": false, + "isWritable": true + }, + { + "kind": "instructionAccountNode", + "name": "rent", + "docs": [ + "Rent sysvar account." + ], + "isSigner": false, + "isWritable": false, + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRent111111111111111111111111111111111" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValueStrategy": "omitted", + "defaultValue": { + "kind": "numberValueNode", + "number": 5 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "close", + "docs": [], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "docs": [ + "Account to close." + ], + "isSigner": false, + "isWritable": true + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "docs": [ + "Authority account." + ], + "isSigner": true, + "isWritable": false + }, + { + "kind": "instructionAccountNode", + "name": "program", + "docs": [ + "Program account." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true + }, + { + "kind": "instructionAccountNode", + "name": "programData", + "docs": [ + "Program data account." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "docs": [ + "Destination account." + ], + "isSigner": false, + "isWritable": true + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValueStrategy": "omitted", + "defaultValue": { + "kind": "numberValueNode", + "number": 6 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "allocate", + "docs": [], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "buffer", + "docs": [ + "Buffer account to allocate." + ], + "isSigner": false, + "isWritable": true + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "docs": [ + "Authority account." + ], + "isSigner": true, + "isWritable": false + }, + { + "kind": "instructionAccountNode", + "name": "program", + "docs": [ + "Program account." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true + }, + { + "kind": "instructionAccountNode", + "name": "programData", + "docs": [ + "Program data account." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true + }, + { + "kind": "instructionAccountNode", + "name": "system", + "docs": [ + "System program." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true, + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "11111111111111111111111111111111" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValueStrategy": "omitted", + "defaultValue": { + "kind": "numberValueNode", + "number": 7 + } + }, + { + "kind": "instructionArgumentNode", + "name": "seed", + "docs": [ + "The seed of the metadata for PDA buffers." + ], + "defaultValue": { + "kind": "noneValueNode" + }, + "type": { + "kind": "remainderOptionTypeNode", + "item": { + "kind": "definedTypeLinkNode", + "name": "seed" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "extend", + "docs": [], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "docs": [ + "Buffer or metadata account." + ], + "isSigner": false, + "isWritable": true + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "docs": [ + "Authority account." + ], + "isSigner": true, + "isWritable": false + }, + { + "kind": "instructionAccountNode", + "name": "program", + "docs": [ + "Program account." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true + }, + { + "kind": "instructionAccountNode", + "name": "programData", + "docs": [ + "Program data account." + ], + "isSigner": false, + "isWritable": false, + "isOptional": true + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValueStrategy": "omitted", + "defaultValue": { + "kind": "numberValueNode", + "number": 8 + } + }, + { + "kind": "instructionArgumentNode", + "name": "length", + "docs": [ + "Length (in bytes) to add to the account size." + ], + "type": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + } + ], + "definedTypes": [ + { + "kind": "definedTypeNode", + "name": "seed", + "docs": [], + "type": { + "kind": "fixedSizeTypeNode", + "size": 16, + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + } + } + }, + { + "kind": "definedTypeNode", + "name": "accountDiscriminator", + "docs": [], + "type": { + "kind": "enumTypeNode", + "variants": [ + { + "kind": "enumEmptyVariantTypeNode", + "name": "empty" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "buffer" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "metadata" + } + ], + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "definedTypeNode", + "name": "encoding", + "docs": [], + "type": { + "kind": "enumTypeNode", + "variants": [ + { + "kind": "enumEmptyVariantTypeNode", + "name": "none" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "utf8" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "base58" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "base64" + } + ], + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "definedTypeNode", + "name": "compression", + "docs": [], + "type": { + "kind": "enumTypeNode", + "variants": [ + { + "kind": "enumEmptyVariantTypeNode", + "name": "none" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "gzip" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "zlib" + } + ], + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "definedTypeNode", + "name": "format", + "docs": [], + "type": { + "kind": "enumTypeNode", + "variants": [ + { + "kind": "enumEmptyVariantTypeNode", + "name": "none" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "json" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "yaml" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "toml" + } + ], + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "definedTypeNode", + "name": "dataSource", + "docs": [], + "type": { + "kind": "enumTypeNode", + "variants": [ + { + "kind": "enumEmptyVariantTypeNode", + "name": "direct" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "url" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "external" + } + ], + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "definedTypeNode", + "name": "externalData", + "docs": [], + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "address", + "docs": [], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "offset", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "length", + "docs": [], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + } + ] + } + } + ], + "errors": [ + { + "kind": "errorNode", + "name": "notExecutableAccount", + "code": 0, + "message": "The program account is not executable", + "docs": [ + "NotExecutableAccount: The program account is not executable" + ] + }, + { + "kind": "errorNode", + "name": "invalidProgramState", + "code": 1, + "message": "The program state is invalid", + "docs": [ + "InvalidProgramState: The program state is invalid" + ] + }, + { + "kind": "errorNode", + "name": "invalidProgramDataAccount", + "code": 2, + "message": "The program data account is invalid", + "docs": [ + "InvalidProgramDataAccount: The program data account is invalid" + ] + }, + { + "kind": "errorNode", + "name": "immutableMetadataAccount", + "code": 3, + "message": "The metadata account is immutable", + "docs": [ + "ImmutableMetadataAccount: The metadata account is immutable" + ] + }, + { + "kind": "errorNode", + "name": "invalidDataLength", + "code": 4, + "message": "The account data length is invalid", + "docs": [ + "InvalidDataLength: The account data length is invalid" + ] + } + ] + }, + "additionalPrograms": [] +} \ No newline at end of file diff --git a/idls/metadata.metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s.metaplex_token_metadata.V1_14_0.from_solscan.json b/idls/metadata.metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s.metaplex_token_metadata.V1_14_0.from_solscan.json new file mode 100644 index 0000000..583f4dc --- /dev/null +++ b/idls/metadata.metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s.metaplex_token_metadata.V1_14_0.from_solscan.json @@ -0,0 +1,7978 @@ +{ + "version": "1.14.0", + "name": "token_metadata", + "instructions": [ + { + "name": "CreateMetadataAccount", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata key (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of token asset" + ] + }, + { + "name": "mintAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Mint authority" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "payer" + ] + }, + { + "name": "updateAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "update authority info" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "Rent info" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 0 + } + }, + { + "name": "UpdateMetadataAccount", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "updateAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Update authority key" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 1 + } + }, + { + "name": "DeprecatedCreateMasterEdition", + "accounts": [ + { + "name": "edition", + "isMut": true, + "isSigner": false, + "docs": [ + "Unallocated edition V1 account with address as pda of ['metadata', program id, mint, 'edition']" + ] + }, + { + "name": "mint", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata mint" + ] + }, + { + "name": "printingMint", + "isMut": true, + "isSigner": false, + "docs": [ + "Printing mint - A mint you control that can mint tokens that can be exchanged for limited editions of your master edition via the MintNewEditionFromMasterEditionViaToken endpoint" + ] + }, + { + "name": "oneTimePrintingAuthorizationMint", + "isMut": true, + "isSigner": false, + "docs": [ + "One time authorization printing mint - A mint you control that prints tokens that gives the bearer permission to mint any number of tokens from the printing mint one time via an endpoint with the token-metadata program for your metadata. Also burns the token." + ] + }, + { + "name": "updateAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Current Update authority key" + ] + }, + { + "name": "printingMintAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Printing mint authority - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY." + ] + }, + { + "name": "mintAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Mint authority on the metadata's mint - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY" + ] + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "payer", + "isMut": false, + "isSigner": true, + "docs": [ + "payer" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Token program" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "Rent info" + ] + }, + { + "name": "oneTimePrintingAuthorizationMintAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "One time authorization printing mint authority - must be provided if using max supply. THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY." + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 2 + } + }, + { + "name": "DeprecatedMintNewEditionFromMasterEditionViaPrintingToken", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "New Metadata key (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "edition", + "isMut": true, + "isSigner": false, + "docs": [ + "New Edition V1 (pda of ['metadata', program id, mint id, 'edition'])" + ] + }, + { + "name": "masterEdition", + "isMut": true, + "isSigner": false, + "docs": [ + "Master Record Edition V1 (pda of ['metadata', program id, master metadata mint id, 'edition'])" + ] + }, + { + "name": "mint", + "isMut": true, + "isSigner": false, + "docs": [ + "Mint of new token - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY" + ] + }, + { + "name": "mintAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Mint authority of new mint" + ] + }, + { + "name": "printingMint", + "isMut": true, + "isSigner": false, + "docs": [ + "Printing Mint of master record edition" + ] + }, + { + "name": "masterTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Token account containing Printing mint token to be transferred" + ] + }, + { + "name": "editionMarker", + "isMut": true, + "isSigner": false, + "docs": [ + "Edition pda to mark creation - will be checked for pre-existence. (pda of ['metadata', program id, master mint id, edition_number])" + ] + }, + { + "name": "burnAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Burn authority for this token" + ] + }, + { + "name": "payer", + "isMut": false, + "isSigner": true, + "docs": [ + "payer" + ] + }, + { + "name": "masterUpdateAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "update authority info for new metadata account" + ] + }, + { + "name": "masterMetadata", + "isMut": false, + "isSigner": false, + "docs": [ + "Master record metadata account" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Token program" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "Rent info" + ] + }, + { + "name": "reservationList", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Reservation List - If present, and you are on this list, you can get an edition number given by your position on the list." + ] + } + ], + "args": [], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 3 + } + }, + { + "name": "UpdatePrimarySaleHappenedViaToken", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata key (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": [ + "Owner on the token account" + ] + }, + { + "name": "token", + "isMut": false, + "isSigner": false, + "docs": [ + "Account containing tokens from the metadata's mint" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 4 + } + }, + { + "name": "DeprecatedSetReservationList", + "accounts": [ + { + "name": "masterEdition", + "isMut": true, + "isSigner": false, + "docs": [ + "Master Edition V1 key (pda of ['metadata', program id, mint id, 'edition'])" + ] + }, + { + "name": "reservationList", + "isMut": true, + "isSigner": false, + "docs": [ + "PDA for ReservationList of ['metadata', program id, master edition key, 'reservation', resource-key]" + ] + }, + { + "name": "resource", + "isMut": false, + "isSigner": true, + "docs": [ + "The resource you tied the reservation list too" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 5 + } + }, + { + "name": "DeprecatedCreateReservationList", + "accounts": [ + { + "name": "reservationList", + "isMut": true, + "isSigner": false, + "docs": [ + "PDA for ReservationList of ['metadata', program id, master edition key, 'reservation', resource-key]" + ] + }, + { + "name": "payer", + "isMut": false, + "isSigner": true, + "docs": [ + "Payer" + ] + }, + { + "name": "updateAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Update authority" + ] + }, + { + "name": "masterEdition", + "isMut": false, + "isSigner": false, + "docs": [ + " Master Edition V1 key (pda of ['metadata', program id, mint id, 'edition'])" + ] + }, + { + "name": "resource", + "isMut": false, + "isSigner": false, + "docs": [ + "A resource you wish to tie the reservation list to. This is so your later visitors who come to redeem can derive your reservation list PDA with something they can easily get at. You choose what this should be." + ] + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false, + "docs": [ + "Metadata key (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "Rent info" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 6 + } + }, + { + "name": "SignMetadata", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "creator", + "isMut": false, + "isSigner": true, + "docs": [ + "Creator" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 7 + } + }, + { + "name": "DeprecatedMintPrintingTokensViaToken", + "accounts": [ + { + "name": "destination", + "isMut": true, + "isSigner": false, + "docs": [ + "Destination account" + ] + }, + { + "name": "token", + "isMut": true, + "isSigner": false, + "docs": [ + "Token account containing one time authorization token" + ] + }, + { + "name": "oneTimePrintingAuthorizationMint", + "isMut": true, + "isSigner": false, + "docs": [ + "One time authorization mint" + ] + }, + { + "name": "printingMint", + "isMut": true, + "isSigner": false, + "docs": [ + "Printing mint" + ] + }, + { + "name": "burnAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Burn authority" + ] + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false, + "docs": [ + "Metadata key (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "masterEdition", + "isMut": false, + "isSigner": false, + "docs": [ + "Master Edition V1 key (pda of ['metadata', program id, mint id, 'edition'])" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Token program" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "Rent" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 8 + } + }, + { + "name": "DeprecatedMintPrintingTokens", + "accounts": [ + { + "name": "destination", + "isMut": true, + "isSigner": false, + "docs": [ + "Destination account" + ] + }, + { + "name": "printingMint", + "isMut": true, + "isSigner": false, + "docs": [ + "Printing mint" + ] + }, + { + "name": "updateAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Update authority" + ] + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false, + "docs": [ + "Metadata key (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "masterEdition", + "isMut": false, + "isSigner": false, + "docs": [ + "Master Edition V1 key (pda of ['metadata', program id, mint id, 'edition'])" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Token program" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "Rent" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 9 + } + }, + { + "name": "CreateMasterEdition", + "accounts": [ + { + "name": "edition", + "isMut": true, + "isSigner": false, + "docs": [ + "Unallocated edition V2 account with address as pda of ['metadata', program id, mint, 'edition']" + ] + }, + { + "name": "mint", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata mint" + ] + }, + { + "name": "updateAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Update authority" + ] + }, + { + "name": "mintAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Mint authority on the metadata's mint - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "payer" + ] + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Token program" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "Rent info" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 10 + } + }, + { + "name": "MintNewEditionFromMasterEditionViaToken", + "accounts": [ + { + "name": "newMetadata", + "isMut": true, + "isSigner": false, + "docs": [ + "New Metadata key (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "newEdition", + "isMut": true, + "isSigner": false, + "docs": [ + "New Edition (pda of ['metadata', program id, mint id, 'edition'])" + ] + }, + { + "name": "masterEdition", + "isMut": true, + "isSigner": false, + "docs": [ + "Master Record Edition V2 (pda of ['metadata', program id, master metadata mint id, 'edition'])" + ] + }, + { + "name": "newMint", + "isMut": true, + "isSigner": false, + "docs": [ + "Mint of new token - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY" + ] + }, + { + "name": "editionMarkPda", + "isMut": true, + "isSigner": false, + "docs": [ + "Edition pda to mark creation - will be checked for pre-existence. (pda of ['metadata', program id, master metadata mint id, 'edition', edition_number]) where edition_number is NOT the edition number you pass in args but actually edition_number = floor(edition/EDITION_MARKER_BIT_SIZE)." + ] + }, + { + "name": "newMintAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Mint authority of new mint" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "payer" + ] + }, + { + "name": "tokenAccountOwner", + "isMut": false, + "isSigner": true, + "docs": [ + "owner of token account containing master token (#8)" + ] + }, + { + "name": "tokenAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "token account containing token from master metadata mint" + ] + }, + { + "name": "newMetadataUpdateAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "Update authority info for new metadata" + ] + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false, + "docs": [ + "Master record metadata account" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Token program" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Rent info" + ] + } + ], + "args": [ + { + "name": "mintNewEditionFromMasterEditionViaTokenArgs", + "type": { + "defined": "MintNewEditionFromMasterEditionViaTokenArgs" + } + } + ], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 11 + } + }, + { + "name": "ConvertMasterEditionV1ToV2", + "accounts": [ + { + "name": "masterEdition", + "isMut": true, + "isSigner": false, + "docs": [ + "Master Record Edition V1 (pda of ['metadata', program id, master metadata mint id, 'edition'])" + ] + }, + { + "name": "oneTimeAuth", + "isMut": true, + "isSigner": false, + "docs": [ + "One time authorization mint" + ] + }, + { + "name": "printingMint", + "isMut": true, + "isSigner": false, + "docs": [ + "Printing mint" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 12 + } + }, + { + "name": "MintNewEditionFromMasterEditionViaVaultProxy", + "accounts": [ + { + "name": "newMetadata", + "isMut": true, + "isSigner": false, + "docs": [ + "New Metadata key (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "newEdition", + "isMut": true, + "isSigner": false, + "docs": [ + "New Edition (pda of ['metadata', program id, mint id, 'edition'])" + ] + }, + { + "name": "masterEdition", + "isMut": true, + "isSigner": false, + "docs": [ + "Master Record Edition V2 (pda of ['metadata', program id, master metadata mint id, 'edition']" + ] + }, + { + "name": "newMint", + "isMut": true, + "isSigner": false, + "docs": [ + "Mint of new token - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY" + ] + }, + { + "name": "editionMarkPda", + "isMut": true, + "isSigner": false, + "docs": [ + "Edition pda to mark creation - will be checked for pre-existence. (pda of ['metadata', program id, master metadata mint id, 'edition', edition_number]) where edition_number is NOT the edition number you pass in args but actually edition_number = floor(edition/EDITION_MARKER_BIT_SIZE)." + ] + }, + { + "name": "newMintAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Mint authority of new mint" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "payer" + ] + }, + { + "name": "vaultAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Vault authority" + ] + }, + { + "name": "safetyDepositStore", + "isMut": false, + "isSigner": false, + "docs": [ + "Safety deposit token store account" + ] + }, + { + "name": "safetyDepositBox", + "isMut": false, + "isSigner": false, + "docs": [ + "Safety deposit box" + ] + }, + { + "name": "vault", + "isMut": false, + "isSigner": false, + "docs": [ + "Vault" + ] + }, + { + "name": "newMetadataUpdateAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "Update authority info for new metadata" + ] + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false, + "docs": [ + "Master record metadata account" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Token program" + ] + }, + { + "name": "tokenVaultProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Token vault program" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Rent info" + ] + } + ], + "args": [ + { + "name": "mintNewEditionFromMasterEditionViaTokenArgs", + "type": { + "defined": "MintNewEditionFromMasterEditionViaTokenArgs" + } + } + ], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 13 + } + }, + { + "name": "PuffMetadata", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 14 + } + }, + { + "name": "UpdateMetadataAccountV2", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "updateAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Update authority key" + ] + } + ], + "args": [ + { + "name": "updateMetadataAccountArgsV2", + "type": { + "defined": "UpdateMetadataAccountArgsV2" + } + } + ], + "discriminant": { + "type": "u8", + "value": 15 + } + }, + { + "name": "CreateMetadataAccountV2", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata key (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of token asset" + ] + }, + { + "name": "mintAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Mint authority" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "payer" + ] + }, + { + "name": "updateAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "update authority info" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Rent info" + ] + } + ], + "args": [], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 16 + } + }, + { + "name": "CreateMasterEditionV3", + "accounts": [ + { + "name": "edition", + "isMut": true, + "isSigner": false, + "docs": [ + "Unallocated edition V2 account with address as pda of ['metadata', program id, mint, 'edition']" + ] + }, + { + "name": "mint", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata mint" + ] + }, + { + "name": "updateAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Update authority" + ] + }, + { + "name": "mintAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Mint authority on the metadata's mint - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "payer" + ] + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Token program" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Rent info" + ] + } + ], + "args": [ + { + "name": "createMasterEditionArgs", + "type": { + "defined": "CreateMasterEditionArgs" + } + } + ], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 17 + } + }, + { + "name": "VerifyCollection", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "collectionAuthority", + "isMut": true, + "isSigner": true, + "docs": [ + "Collection Update authority" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "payer" + ] + }, + { + "name": "collectionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of the Collection" + ] + }, + { + "name": "collection", + "isMut": false, + "isSigner": false, + "docs": [ + "Metadata Account of the Collection" + ] + }, + { + "name": "collectionMasterEditionAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "MasterEdition2 Account of the Collection Token" + ] + }, + { + "name": "collectionAuthorityRecord", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Collection Authority Record PDA" + ] + } + ], + "args": [], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 18 + } + }, + { + "name": "Utilize", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "tokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Token Account Of NFT" + ] + }, + { + "name": "mint", + "isMut": true, + "isSigner": false, + "docs": [ + "Mint of the Metadata" + ] + }, + { + "name": "useAuthority", + "isMut": true, + "isSigner": true, + "docs": [ + "A Use Authority / Can be the current Owner of the NFT" + ] + }, + { + "name": "owner", + "isMut": false, + "isSigner": false, + "docs": [ + "Owner" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Token program" + ] + }, + { + "name": "ataProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Associated Token program" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "Rent info" + ] + }, + { + "name": "useAuthorityRecord", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Use Authority Record PDA If present the program Assumes a delegated use authority" + ] + }, + { + "name": "burner", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Program As Signer (Burner)" + ] + } + ], + "args": [ + { + "name": "utilizeArgs", + "type": { + "defined": "UtilizeArgs" + } + } + ], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 19 + } + }, + { + "name": "ApproveUseAuthority", + "accounts": [ + { + "name": "useAuthorityRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "Use Authority Record PDA" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "Owner" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "Payer" + ] + }, + { + "name": "user", + "isMut": false, + "isSigner": false, + "docs": [ + "A Use Authority" + ] + }, + { + "name": "ownerTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Owned Token Account Of Mint" + ] + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of Metadata" + ] + }, + { + "name": "burner", + "isMut": false, + "isSigner": false, + "docs": [ + "Program As Signer (Burner)" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Token program" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Rent info" + ] + } + ], + "args": [ + { + "name": "approveUseAuthorityArgs", + "type": { + "defined": "ApproveUseAuthorityArgs" + } + } + ], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 20 + } + }, + { + "name": "RevokeUseAuthority", + "accounts": [ + { + "name": "useAuthorityRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "Use Authority Record PDA" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "Owner" + ] + }, + { + "name": "user", + "isMut": false, + "isSigner": false, + "docs": [ + "A Use Authority" + ] + }, + { + "name": "ownerTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Owned Token Account Of Mint" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of Metadata" + ] + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Token program" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Rent info" + ] + } + ], + "args": [], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 21 + } + }, + { + "name": "UnverifyCollection", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "collectionAuthority", + "isMut": true, + "isSigner": true, + "docs": [ + "Collection Authority" + ] + }, + { + "name": "collectionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of the Collection" + ] + }, + { + "name": "collection", + "isMut": false, + "isSigner": false, + "docs": [ + "Metadata Account of the Collection" + ] + }, + { + "name": "collectionMasterEditionAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "MasterEdition2 Account of the Collection Token" + ] + }, + { + "name": "collectionAuthorityRecord", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Collection Authority Record PDA" + ] + } + ], + "args": [], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 22 + } + }, + { + "name": "ApproveCollectionAuthority", + "accounts": [ + { + "name": "collectionAuthorityRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "Collection Authority Record PDA" + ] + }, + { + "name": "newCollectionAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "A Collection Authority" + ] + }, + { + "name": "updateAuthority", + "isMut": true, + "isSigner": true, + "docs": [ + "Update Authority of Collection NFT" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "Payer" + ] + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false, + "docs": [ + "Collection Metadata account" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of Collection Metadata" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Rent info" + ] + } + ], + "args": [], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 23 + } + }, + { + "name": "RevokeCollectionAuthority", + "accounts": [ + { + "name": "collectionAuthorityRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "Collection Authority Record PDA" + ] + }, + { + "name": "delegateAuthority", + "isMut": true, + "isSigner": false, + "docs": [ + "Delegated Collection Authority" + ] + }, + { + "name": "revokeAuthority", + "isMut": true, + "isSigner": true, + "docs": [ + "Update Authority, or Delegated Authority, of Collection NFT" + ] + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of Metadata" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 24 + } + }, + { + "name": "SetAndVerifyCollection", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "collectionAuthority", + "isMut": true, + "isSigner": true, + "docs": [ + "Collection Update authority" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "Payer" + ] + }, + { + "name": "updateAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "Update Authority of Collection NFT and NFT" + ] + }, + { + "name": "collectionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of the Collection" + ] + }, + { + "name": "collection", + "isMut": false, + "isSigner": false, + "docs": [ + "Metadata Account of the Collection" + ] + }, + { + "name": "collectionMasterEditionAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "MasterEdition2 Account of the Collection Token" + ] + }, + { + "name": "collectionAuthorityRecord", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Collection Authority Record PDA" + ] + } + ], + "args": [], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 25 + } + }, + { + "name": "FreezeDelegatedAccount", + "accounts": [ + { + "name": "delegate", + "isMut": true, + "isSigner": true, + "docs": [ + "Delegate" + ] + }, + { + "name": "tokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Token account to freeze" + ] + }, + { + "name": "edition", + "isMut": false, + "isSigner": false, + "docs": [ + "Edition" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Token mint" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Token Program" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 26 + } + }, + { + "name": "ThawDelegatedAccount", + "accounts": [ + { + "name": "delegate", + "isMut": true, + "isSigner": true, + "docs": [ + "Delegate" + ] + }, + { + "name": "tokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Token account to thaw" + ] + }, + { + "name": "edition", + "isMut": false, + "isSigner": false, + "docs": [ + "Edition" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Token mint" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Token Program" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 27 + } + }, + { + "name": "RemoveCreatorVerification", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "creator", + "isMut": false, + "isSigner": true, + "docs": [ + "Creator" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 28 + } + }, + { + "name": "BurnNft", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "NFT owner" + ] + }, + { + "name": "mint", + "isMut": true, + "isSigner": false, + "docs": [ + "Mint of the NFT" + ] + }, + { + "name": "tokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Token account to close" + ] + }, + { + "name": "masterEditionAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "MasterEdition2 of the NFT" + ] + }, + { + "name": "splTokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "SPL Token Program" + ] + }, + { + "name": "collectionMetadata", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Metadata of the Collection" + ] + } + ], + "args": [], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 29 + } + }, + { + "name": "VerifySizedCollectionItem", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "collectionAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Collection Update authority" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "payer" + ] + }, + { + "name": "collectionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of the Collection" + ] + }, + { + "name": "collection", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata Account of the Collection" + ] + }, + { + "name": "collectionMasterEditionAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "MasterEdition2 Account of the Collection Token" + ] + }, + { + "name": "collectionAuthorityRecord", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Collection Authority Record PDA" + ] + } + ], + "args": [], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 30 + } + }, + { + "name": "UnverifySizedCollectionItem", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "collectionAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Collection Authority" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "payer" + ] + }, + { + "name": "collectionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of the Collection" + ] + }, + { + "name": "collection", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata Account of the Collection" + ] + }, + { + "name": "collectionMasterEditionAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "MasterEdition2 Account of the Collection Token" + ] + }, + { + "name": "collectionAuthorityRecord", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Collection Authority Record PDA" + ] + } + ], + "args": [], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 31 + } + }, + { + "name": "SetAndVerifySizedCollectionItem", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "collectionAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Collection Update authority" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "payer" + ] + }, + { + "name": "updateAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "Update Authority of Collection NFT and NFT" + ] + }, + { + "name": "collectionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of the Collection" + ] + }, + { + "name": "collection", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata Account of the Collection" + ] + }, + { + "name": "collectionMasterEditionAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "MasterEdition2 Account of the Collection Token" + ] + }, + { + "name": "collectionAuthorityRecord", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Collection Authority Record PDA" + ] + } + ], + "args": [], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 32 + } + }, + { + "name": "CreateMetadataAccountV3", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata key (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of token asset" + ] + }, + { + "name": "mintAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Mint authority" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "payer" + ] + }, + { + "name": "updateAuthority", + "isMut": false, + "isSigner": false, + "isOptionalSigner": true, + "docs": [ + "update authority info" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Rent info" + ] + } + ], + "args": [ + { + "name": "createMetadataAccountArgsV3", + "type": { + "defined": "CreateMetadataAccountArgsV3" + } + } + ], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 33 + } + }, + { + "name": "SetCollectionSize", + "accounts": [ + { + "name": "collectionMetadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Collection Metadata account" + ] + }, + { + "name": "collectionAuthority", + "isMut": true, + "isSigner": true, + "docs": [ + "Collection Update authority" + ] + }, + { + "name": "collectionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of the Collection" + ] + }, + { + "name": "collectionAuthorityRecord", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Collection Authority Record PDA" + ] + } + ], + "args": [ + { + "name": "setCollectionSizeArgs", + "type": { + "defined": "SetCollectionSizeArgs" + } + } + ], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 34 + } + }, + { + "name": "SetTokenStandard", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "updateAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Metadata update authority" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint account" + ] + }, + { + "name": "edition", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Edition account" + ] + } + ], + "args": [], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 35 + } + }, + { + "name": "BubblegumSetCollectionSize", + "accounts": [ + { + "name": "collectionMetadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Collection Metadata account" + ] + }, + { + "name": "collectionAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Collection Update authority" + ] + }, + { + "name": "collectionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of the Collection" + ] + }, + { + "name": "bubblegumSigner", + "isMut": false, + "isSigner": true, + "docs": [ + "Signing PDA of Bubblegum program" + ] + }, + { + "name": "collectionAuthorityRecord", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Collection Authority Record PDA" + ] + } + ], + "args": [ + { + "name": "setCollectionSizeArgs", + "type": { + "defined": "SetCollectionSizeArgs" + } + } + ], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 36 + } + }, + { + "name": "BurnEditionNft", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "NFT owner" + ] + }, + { + "name": "printEditionMint", + "isMut": true, + "isSigner": false, + "docs": [ + "Mint of the print edition NFT" + ] + }, + { + "name": "masterEditionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of the original/master NFT" + ] + }, + { + "name": "printEditionTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Token account the print edition NFT is in" + ] + }, + { + "name": "masterEditionTokenAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "Token account the Master Edition NFT is in" + ] + }, + { + "name": "masterEditionAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "MasterEdition2 of the original NFT" + ] + }, + { + "name": "printEditionAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Print Edition account of the NFT" + ] + }, + { + "name": "editionMarkerAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Edition Marker PDA of the NFT" + ] + }, + { + "name": "splTokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "SPL Token Program" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 37 + } + }, + { + "name": "CreateEscrowAccount", + "accounts": [ + { + "name": "escrow", + "isMut": true, + "isSigner": false, + "docs": [ + "Escrow account" + ] + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint account" + ] + }, + { + "name": "tokenAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "Token account of the token" + ] + }, + { + "name": "edition", + "isMut": false, + "isSigner": false, + "docs": [ + "Edition account" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "Wallet paying for the transaction and new account" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "sysvarInstructions", + "isMut": false, + "isSigner": false, + "docs": [ + "Instructions sysvar account" + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "isOptional": true, + "docs": [ + "Authority/creator of the escrow account" + ] + } + ], + "args": [], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 38 + } + }, + { + "name": "CloseEscrowAccount", + "accounts": [ + { + "name": "escrow", + "isMut": true, + "isSigner": false, + "docs": [ + "Escrow account" + ] + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint account" + ] + }, + { + "name": "tokenAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "Token account" + ] + }, + { + "name": "edition", + "isMut": false, + "isSigner": false, + "docs": [ + "Edition account" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "Wallet paying for the transaction and new account" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "sysvarInstructions", + "isMut": false, + "isSigner": false, + "docs": [ + "Instructions sysvar account" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 39 + } + }, + { + "name": "TransferOutOfEscrow", + "accounts": [ + { + "name": "escrow", + "isMut": false, + "isSigner": false, + "docs": [ + "Escrow account" + ] + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "Wallet paying for the transaction and new account" + ] + }, + { + "name": "attributeMint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint account for the new attribute" + ] + }, + { + "name": "attributeSrc", + "isMut": true, + "isSigner": false, + "docs": [ + "Token account source for the new attribute" + ] + }, + { + "name": "attributeDst", + "isMut": true, + "isSigner": false, + "docs": [ + "Token account, owned by TM, destination for the new attribute" + ] + }, + { + "name": "escrowMint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint account that the escrow is attached" + ] + }, + { + "name": "escrowAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "Token account that holds the token the escrow is attached to" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "ataProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Associated Token program" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Token program" + ] + }, + { + "name": "sysvarInstructions", + "isMut": false, + "isSigner": false, + "docs": [ + "Instructions sysvar account" + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "isOptional": true, + "docs": [ + "Authority/creator of the escrow account" + ] + } + ], + "args": [ + { + "name": "transferOutOfEscrowArgs", + "type": { + "defined": "TransferOutOfEscrowArgs" + } + } + ], + "legacyOptionalAccountsStrategy": true, + "discriminant": { + "type": "u8", + "value": 40 + } + }, + { + "name": "Burn", + "accounts": [ + { + "name": "authority", + "isMut": true, + "isSigner": true, + "docs": [ + "Asset owner or Utility delegate" + ] + }, + { + "name": "collectionMetadata", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Metadata of the Collection" + ] + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "edition", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Edition of the asset" + ] + }, + { + "name": "mint", + "isMut": true, + "isSigner": false, + "docs": [ + "Mint of token asset" + ] + }, + { + "name": "token", + "isMut": true, + "isSigner": false, + "docs": [ + "Token account to close" + ] + }, + { + "name": "masterEdition", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Master edition account" + ] + }, + { + "name": "masterEditionMint", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Master edition mint of the asset" + ] + }, + { + "name": "masterEditionToken", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Master edition token account" + ] + }, + { + "name": "editionMarker", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Edition marker account" + ] + }, + { + "name": "tokenRecord", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token record account" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "sysvarInstructions", + "isMut": false, + "isSigner": false, + "docs": [ + "Instructions sysvar account" + ] + }, + { + "name": "splTokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "SPL Token Program" + ] + } + ], + "args": [ + { + "name": "burnArgs", + "type": { + "defined": "BurnArgs" + } + } + ], + "discriminant": { + "type": "u8", + "value": 41 + } + }, + { + "name": "Create", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Unallocated metadata account with address as pda of ['metadata', program id, mint id]" + ] + }, + { + "name": "masterEdition", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Unallocated edition account with address as pda of ['metadata', program id, mint, 'edition']" + ] + }, + { + "name": "mint", + "isMut": true, + "isSigner": false, + "docs": [ + "Mint of token asset" + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Mint authority" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "Payer" + ] + }, + { + "name": "updateAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "Update authority for the metadata account" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "sysvarInstructions", + "isMut": false, + "isSigner": false, + "docs": [ + "Instructions sysvar account" + ] + }, + { + "name": "splTokenProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "SPL Token program" + ] + } + ], + "args": [ + { + "name": "createArgs", + "type": { + "defined": "CreateArgs" + } + } + ], + "discriminant": { + "type": "u8", + "value": 42 + } + }, + { + "name": "Mint", + "accounts": [ + { + "name": "token", + "isMut": true, + "isSigner": false, + "docs": [ + "Token or Associated Token account" + ] + }, + { + "name": "tokenOwner", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Owner of the token account" + ] + }, + { + "name": "metadata", + "isMut": false, + "isSigner": false, + "docs": [ + "Metadata account (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "masterEdition", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Master Edition account" + ] + }, + { + "name": "tokenRecord", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token record account" + ] + }, + { + "name": "mint", + "isMut": true, + "isSigner": false, + "docs": [ + "Mint of token asset" + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "(Mint or Update) authority" + ] + }, + { + "name": "delegateRecord", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Metadata delegate record" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "Payer" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "sysvarInstructions", + "isMut": false, + "isSigner": false, + "docs": [ + "Instructions sysvar account" + ] + }, + { + "name": "splTokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "SPL Token program" + ] + }, + { + "name": "splAtaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "SPL Associated Token Account program" + ] + }, + { + "name": "authorizationRulesProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules program" + ] + }, + { + "name": "authorizationRules", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules account" + ] + } + ], + "args": [ + { + "name": "mintArgs", + "type": { + "defined": "MintArgs" + } + } + ], + "discriminant": { + "type": "u8", + "value": 43 + } + }, + { + "name": "Delegate", + "accounts": [ + { + "name": "delegateRecord", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Delegate record account" + ] + }, + { + "name": "delegate", + "isMut": false, + "isSigner": false, + "docs": [ + "Owner of the delegated account" + ] + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "masterEdition", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Master Edition account" + ] + }, + { + "name": "tokenRecord", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token record account" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of metadata" + ] + }, + { + "name": "token", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token account of mint" + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Update authority or token owner" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "Payer" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System Program" + ] + }, + { + "name": "sysvarInstructions", + "isMut": false, + "isSigner": false, + "docs": [ + "Instructions sysvar account" + ] + }, + { + "name": "splTokenProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "SPL Token Program" + ] + }, + { + "name": "authorizationRulesProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules Program" + ] + }, + { + "name": "authorizationRules", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules account" + ] + } + ], + "args": [ + { + "name": "delegateArgs", + "type": { + "defined": "DelegateArgs" + } + } + ], + "discriminant": { + "type": "u8", + "value": 44 + } + }, + { + "name": "Revoke", + "accounts": [ + { + "name": "delegateRecord", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Delegate record account" + ] + }, + { + "name": "delegate", + "isMut": false, + "isSigner": false, + "docs": [ + "Owner of the delegated account" + ] + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "masterEdition", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Master Edition account" + ] + }, + { + "name": "tokenRecord", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token record account" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of metadata" + ] + }, + { + "name": "token", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token account of mint" + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Update authority or token owner" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "Payer" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System Program" + ] + }, + { + "name": "sysvarInstructions", + "isMut": false, + "isSigner": false, + "docs": [ + "Instructions sysvar account" + ] + }, + { + "name": "splTokenProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "SPL Token Program" + ] + }, + { + "name": "authorizationRulesProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules Program" + ] + }, + { + "name": "authorizationRules", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules account" + ] + } + ], + "args": [ + { + "name": "revokeArgs", + "type": { + "defined": "RevokeArgs" + } + } + ], + "discriminant": { + "type": "u8", + "value": 45 + } + }, + { + "name": "Lock", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Delegate or freeze authority" + ] + }, + { + "name": "tokenOwner", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token owner account" + ] + }, + { + "name": "token", + "isMut": true, + "isSigner": false, + "docs": [ + "Token account" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint account" + ] + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "edition", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Edition account" + ] + }, + { + "name": "tokenRecord", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token record account" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "Payer" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "sysvarInstructions", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "splTokenProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "SPL Token Program" + ] + }, + { + "name": "authorizationRulesProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules Program" + ] + }, + { + "name": "authorizationRules", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules account" + ] + } + ], + "args": [ + { + "name": "lockArgs", + "type": { + "defined": "LockArgs" + } + } + ], + "discriminant": { + "type": "u8", + "value": 46 + } + }, + { + "name": "Unlock", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Delegate or freeze authority" + ] + }, + { + "name": "tokenOwner", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token owner account" + ] + }, + { + "name": "token", + "isMut": true, + "isSigner": false, + "docs": [ + "Token account" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint account" + ] + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "edition", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Edition account" + ] + }, + { + "name": "tokenRecord", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token record account" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "Payer" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "sysvarInstructions", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "splTokenProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "SPL Token Program" + ] + }, + { + "name": "authorizationRulesProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules Program" + ] + }, + { + "name": "authorizationRules", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules account" + ] + } + ], + "args": [ + { + "name": "unlockArgs", + "type": { + "defined": "UnlockArgs" + } + } + ], + "discriminant": { + "type": "u8", + "value": 47 + } + }, + { + "name": "Migrate", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "edition", + "isMut": true, + "isSigner": false, + "docs": [ + "Edition account" + ] + }, + { + "name": "token", + "isMut": true, + "isSigner": false, + "docs": [ + "Token account" + ] + }, + { + "name": "tokenOwner", + "isMut": false, + "isSigner": false, + "docs": [ + "Token account owner" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint account" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "Payer" + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Update authority" + ] + }, + { + "name": "collectionMetadata", + "isMut": false, + "isSigner": false, + "docs": [ + "Collection metadata account" + ] + }, + { + "name": "delegateRecord", + "isMut": false, + "isSigner": false, + "docs": [ + "Delegate record account" + ] + }, + { + "name": "tokenRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "Token record account" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "sysvarInstructions", + "isMut": false, + "isSigner": false, + "docs": [ + "Instruction sysvar account" + ] + }, + { + "name": "splTokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "SPL Token Program" + ] + }, + { + "name": "authorizationRulesProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules Program" + ] + }, + { + "name": "authorizationRules", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules account" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 48 + } + }, + { + "name": "Transfer", + "accounts": [ + { + "name": "token", + "isMut": true, + "isSigner": false, + "docs": [ + "Token account" + ] + }, + { + "name": "tokenOwner", + "isMut": false, + "isSigner": false, + "docs": [ + "Token account owner" + ] + }, + { + "name": "destination", + "isMut": true, + "isSigner": false, + "docs": [ + "Destination token account" + ] + }, + { + "name": "destinationOwner", + "isMut": false, + "isSigner": false, + "docs": [ + "Destination token account owner" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of token asset" + ] + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "edition", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Edition of token asset" + ] + }, + { + "name": "ownerTokenRecord", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Owner token record account" + ] + }, + { + "name": "destinationTokenRecord", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Destination token record account" + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Transfer authority (token owner or delegate)" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "Payer" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System Program" + ] + }, + { + "name": "sysvarInstructions", + "isMut": false, + "isSigner": false, + "docs": [ + "Instructions sysvar account" + ] + }, + { + "name": "splTokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "SPL Token Program" + ] + }, + { + "name": "splAtaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "SPL Associated Token Account program" + ] + }, + { + "name": "authorizationRulesProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules Program" + ] + }, + { + "name": "authorizationRules", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules account" + ] + } + ], + "args": [ + { + "name": "transferArgs", + "type": { + "defined": "TransferArgs" + } + } + ], + "discriminant": { + "type": "u8", + "value": 49 + } + }, + { + "name": "Update", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Update authority or delegate" + ] + }, + { + "name": "delegateRecord", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Delegate record PDA" + ] + }, + { + "name": "token", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token account" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint account" + ] + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "edition", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Edition account" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "Payer" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "sysvarInstructions", + "isMut": false, + "isSigner": false, + "docs": [ + "Instructions sysvar account" + ] + }, + { + "name": "authorizationRulesProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules Program" + ] + }, + { + "name": "authorizationRules", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules account" + ] + } + ], + "args": [ + { + "name": "updateArgs", + "type": { + "defined": "UpdateArgs" + } + } + ], + "discriminant": { + "type": "u8", + "value": 50 + } + }, + { + "name": "Use", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Token owner or delegate" + ] + }, + { + "name": "delegateRecord", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Delegate record PDA" + ] + }, + { + "name": "token", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token account" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint account" + ] + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "edition", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Edition account" + ] + }, + { + "name": "payer", + "isMut": false, + "isSigner": true, + "docs": [ + "Payer" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "sysvarInstructions", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "splTokenProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "SPL Token Program" + ] + }, + { + "name": "authorizationRulesProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules Program" + ] + }, + { + "name": "authorizationRules", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token Authorization Rules account" + ] + } + ], + "args": [ + { + "name": "useArgs", + "type": { + "defined": "UseArgs" + } + } + ], + "discriminant": { + "type": "u8", + "value": 51 + } + }, + { + "name": "Verify", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Creator to verify, collection update authority or delegate" + ] + }, + { + "name": "delegateRecord", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Delegate record PDA" + ] + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "collectionMint", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Mint of the Collection" + ] + }, + { + "name": "collectionMetadata", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Metadata Account of the Collection" + ] + }, + { + "name": "collectionMasterEdition", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Master Edition Account of the Collection Token" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "sysvarInstructions", + "isMut": false, + "isSigner": false, + "docs": [ + "Instructions sysvar account" + ] + } + ], + "args": [ + { + "name": "verificationArgs", + "type": { + "defined": "VerificationArgs" + } + } + ], + "discriminant": { + "type": "u8", + "value": 52 + } + }, + { + "name": "Unverify", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Creator to verify, collection (or metadata if parent burned) update authority or delegate" + ] + }, + { + "name": "delegateRecord", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Delegate record PDA" + ] + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata account" + ] + }, + { + "name": "collectionMint", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Mint of the Collection" + ] + }, + { + "name": "collectionMetadata", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Metadata Account of the Collection" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + }, + { + "name": "sysvarInstructions", + "isMut": false, + "isSigner": false, + "docs": [ + "Instructions sysvar account" + ] + } + ], + "args": [ + { + "name": "verificationArgs", + "type": { + "defined": "VerificationArgs" + } + } + ], + "discriminant": { + "type": "u8", + "value": 53 + } + }, + { + "name": "Collect", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Authority to collect fees" + ] + }, + { + "name": "recipient", + "isMut": false, + "isSigner": false, + "docs": [ + "The account to transfer collected fees to" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 54 + } + }, + { + "name": "Print", + "accounts": [ + { + "name": "editionMetadata", + "isMut": true, + "isSigner": false, + "docs": [ + "New Metadata key (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "edition", + "isMut": true, + "isSigner": false, + "docs": [ + "New Edition (pda of ['metadata', program id, mint id, 'edition'])" + ] + }, + { + "name": "editionMint", + "isMut": true, + "isSigner": false, + "docs": [ + "Mint of new token - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY" + ] + }, + { + "name": "editionTokenAccountOwner", + "isMut": false, + "isSigner": false, + "docs": [ + "Owner of the token account of new token" + ] + }, + { + "name": "editionTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Token account of new token" + ] + }, + { + "name": "editionMintAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Mint authority of new mint" + ] + }, + { + "name": "editionTokenRecord", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token record account" + ] + }, + { + "name": "masterEdition", + "isMut": true, + "isSigner": false, + "docs": [ + "Master Record Edition V2 (pda of ['metadata', program id, master metadata mint id, 'edition'])" + ] + }, + { + "name": "editionMarkerPda", + "isMut": true, + "isSigner": false, + "docs": [ + "Edition pda to mark creation - will be checked for pre-existence. (pda of ['metadata', program id, master metadata mint id, 'edition', edition_number]) where edition_number is NOT the edition number you pass in args but actually edition_number = floor(edition/EDITION_MARKER_BIT_SIZE)." + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "payer" + ] + }, + { + "name": "masterTokenAccountOwner", + "isMut": false, + "isSigner": false, + "isOptionalSigner": true, + "docs": [ + "owner of token account containing master token" + ] + }, + { + "name": "masterTokenAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "token account containing token from master metadata mint" + ] + }, + { + "name": "masterMetadata", + "isMut": false, + "isSigner": false, + "docs": [ + "Master record metadata account" + ] + }, + { + "name": "updateAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "The update authority of the master edition." + ] + }, + { + "name": "splTokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "Token program" + ] + }, + { + "name": "splAtaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "SPL Associated Token Account program" + ] + }, + { + "name": "sysvarInstructions", + "isMut": false, + "isSigner": false, + "docs": [ + "Instructions sysvar account" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + } + ], + "args": [ + { + "name": "printArgs", + "type": { + "defined": "PrintArgs" + } + } + ], + "discriminant": { + "type": "u8", + "value": 55 + } + }, + { + "name": "Resize", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "The metadata account of the digital asset" + ] + }, + { + "name": "edition", + "isMut": true, + "isSigner": false, + "docs": [ + "The master edition or edition account of the digital asset, an uninitialized account for fungible assets" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false, + "docs": [ + "Mint of token asset" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": false, + "isOptionalSigner": true, + "docs": [ + "The recipient of the excess rent and authority if the authority account is not present" + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "isOptional": true, + "docs": [ + "Owner of the asset for (p)NFTs, or mint authority for fungible assets, if different from the payer" + ] + }, + { + "name": "token", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Token or Associated Token account" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 56 + } + }, + { + "name": "CloseAccounts", + "accounts": [ + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "docs": [ + "Metadata (pda of ['metadata', program id, mint id])" + ] + }, + { + "name": "edition", + "isMut": true, + "isSigner": false, + "docs": [ + "Edition of the asset" + ] + }, + { + "name": "mint", + "isMut": true, + "isSigner": false, + "docs": [ + "Mint of token asset" + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Authority to close ownerless accounts" + ] + }, + { + "name": "destination", + "isMut": true, + "isSigner": false, + "docs": [ + "The destination account that will receive the rent." + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 57 + } + } + ], + "accounts": [ + { + "name": "CollectionAuthorityRecord", + "type": { + "kind": "struct", + "fields": [ + { + "name": "key", + "type": { + "defined": "Key" + } + }, + { + "name": "bump", + "type": "u8" + }, + { + "name": "updateAuthority", + "type": { + "option": "publicKey" + } + } + ] + } + }, + { + "name": "MetadataDelegateRecord", + "type": { + "kind": "struct", + "fields": [ + { + "name": "key", + "type": { + "defined": "Key" + } + }, + { + "name": "bump", + "type": "u8" + }, + { + "name": "mint", + "type": "publicKey" + }, + { + "name": "delegate", + "type": "publicKey" + }, + { + "name": "updateAuthority", + "type": "publicKey" + } + ] + } + }, + { + "name": "HolderDelegateRecord", + "type": { + "kind": "struct", + "fields": [ + { + "name": "key", + "type": { + "defined": "Key" + } + }, + { + "name": "bump", + "type": "u8" + }, + { + "name": "mint", + "type": "publicKey" + }, + { + "name": "delegate", + "type": "publicKey" + }, + { + "name": "updateAuthority", + "type": "publicKey" + } + ] + } + }, + { + "name": "Edition", + "type": { + "kind": "struct", + "fields": [ + { + "name": "key", + "type": { + "defined": "Key" + } + }, + { + "name": "parent", + "type": "publicKey" + }, + { + "name": "edition", + "type": "u64" + } + ] + } + }, + { + "name": "EditionMarker", + "type": { + "kind": "struct", + "fields": [ + { + "name": "key", + "type": { + "defined": "Key" + } + }, + { + "name": "ledger", + "type": { + "array": [ + "u8", + 31 + ] + } + } + ] + } + }, + { + "name": "EditionMarkerV2", + "type": { + "kind": "struct", + "fields": [ + { + "name": "key", + "type": { + "defined": "Key" + } + }, + { + "name": "ledger", + "type": "bytes" + } + ] + } + }, + { + "name": "TokenOwnedEscrow", + "type": { + "kind": "struct", + "fields": [ + { + "name": "key", + "type": { + "defined": "Key" + } + }, + { + "name": "baseToken", + "type": "publicKey" + }, + { + "name": "authority", + "type": { + "defined": "EscrowAuthority" + } + }, + { + "name": "bump", + "type": "u8" + } + ] + } + }, + { + "name": "MasterEditionV2", + "type": { + "kind": "struct", + "fields": [ + { + "name": "key", + "type": { + "defined": "Key" + } + }, + { + "name": "supply", + "type": "u64" + }, + { + "name": "maxSupply", + "type": { + "option": "u64" + } + } + ] + } + }, + { + "name": "MasterEditionV1", + "type": { + "kind": "struct", + "fields": [ + { + "name": "key", + "type": { + "defined": "Key" + } + }, + { + "name": "supply", + "type": "u64" + }, + { + "name": "maxSupply", + "type": { + "option": "u64" + } + }, + { + "name": "printingMint", + "type": "publicKey" + }, + { + "name": "oneTimePrintingAuthorizationMint", + "type": "publicKey" + } + ] + } + }, + { + "name": "Metadata", + "type": { + "kind": "struct", + "fields": [ + { + "name": "key", + "type": { + "defined": "Key" + } + }, + { + "name": "updateAuthority", + "type": "publicKey" + }, + { + "name": "mint", + "type": "publicKey" + }, + { + "name": "data", + "type": { + "defined": "Data" + } + }, + { + "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": "collectionDetails", + "type": { + "option": { + "defined": "CollectionDetails" + } + } + }, + { + "name": "programmableConfig", + "type": { + "option": { + "defined": "ProgrammableConfig" + } + } + } + ] + } + }, + { + "name": "TokenRecord", + "type": { + "kind": "struct", + "fields": [ + { + "name": "key", + "type": { + "defined": "Key" + } + }, + { + "name": "bump", + "type": "u8" + }, + { + "name": "state", + "type": { + "defined": "TokenState" + } + }, + { + "name": "ruleSetRevision", + "type": { + "option": "u64" + } + }, + { + "name": "delegate", + "type": { + "option": "publicKey" + } + }, + { + "name": "delegateRole", + "type": { + "option": { + "defined": "TokenDelegateRole" + } + } + }, + { + "name": "lockedTransfer", + "type": { + "option": "publicKey" + } + } + ] + } + }, + { + "name": "ReservationListV2", + "type": { + "kind": "struct", + "fields": [ + { + "name": "key", + "type": { + "defined": "Key" + } + }, + { + "name": "masterEdition", + "type": "publicKey" + }, + { + "name": "supplySnapshot", + "type": { + "option": "u64" + } + }, + { + "name": "reservations", + "type": { + "vec": { + "defined": "Reservation" + } + } + }, + { + "name": "totalReservationSpots", + "type": "u64" + }, + { + "name": "currentReservationSpots", + "type": "u64" + } + ] + } + }, + { + "name": "ReservationListV1", + "type": { + "kind": "struct", + "fields": [ + { + "name": "key", + "type": { + "defined": "Key" + } + }, + { + "name": "masterEdition", + "type": "publicKey" + }, + { + "name": "supplySnapshot", + "type": { + "option": "u64" + } + }, + { + "name": "reservations", + "type": { + "vec": { + "defined": "ReservationV1" + } + } + } + ] + } + }, + { + "name": "UseAuthorityRecord", + "type": { + "kind": "struct", + "fields": [ + { + "name": "key", + "type": { + "defined": "Key" + } + }, + { + "name": "allowedUses", + "type": "u64" + }, + { + "name": "bump", + "type": "u8" + } + ] + } + } + ], + "types": [ + { + "name": "SetCollectionSizeArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "size", + "type": "u64" + } + ] + } + }, + { + "name": "CreateMasterEditionArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxSupply", + "type": { + "option": "u64" + } + } + ] + } + }, + { + "name": "MintNewEditionFromMasterEditionViaTokenArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "edition", + "type": "u64" + } + ] + } + }, + { + "name": "TransferOutOfEscrowArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + } + ] + } + }, + { + "name": "CreateMetadataAccountArgsV3", + "type": { + "kind": "struct", + "fields": [ + { + "name": "data", + "type": { + "defined": "DataV2" + } + }, + { + "name": "isMutable", + "type": "bool" + }, + { + "name": "collectionDetails", + "type": { + "option": { + "defined": "CollectionDetails" + } + } + } + ] + } + }, + { + "name": "UpdateMetadataAccountArgsV2", + "type": { + "kind": "struct", + "fields": [ + { + "name": "data", + "type": { + "option": { + "defined": "DataV2" + } + } + }, + { + "name": "updateAuthority", + "type": { + "option": "publicKey" + } + }, + { + "name": "primarySaleHappened", + "type": { + "option": "bool" + } + }, + { + "name": "isMutable", + "type": { + "option": "bool" + } + } + ] + } + }, + { + "name": "ApproveUseAuthorityArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "numberOfUses", + "type": "u64" + } + ] + } + }, + { + "name": "UtilizeArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "numberOfUses", + "type": "u64" + } + ] + } + }, + { + "name": "AuthorizationData", + "type": { + "kind": "struct", + "fields": [ + { + "name": "payload", + "type": { + "defined": "Payload" + } + } + ] + } + }, + { + "name": "AssetData", + "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": "Creator" + } + } + } + }, + { + "name": "primarySaleHappened", + "type": "bool" + }, + { + "name": "isMutable", + "type": "bool" + }, + { + "name": "tokenStandard", + "type": { + "defined": "TokenStandard" + } + }, + { + "name": "collection", + "type": { + "option": { + "defined": "Collection" + } + } + }, + { + "name": "uses", + "type": { + "option": { + "defined": "Uses" + } + } + }, + { + "name": "collectionDetails", + "type": { + "option": { + "defined": "CollectionDetails" + } + } + }, + { + "name": "ruleSet", + "type": { + "option": "publicKey" + } + } + ] + } + }, + { + "name": "Collection", + "type": { + "kind": "struct", + "fields": [ + { + "name": "verified", + "type": "bool" + }, + { + "name": "key", + "type": "publicKey" + } + ] + } + }, + { + "name": "Creator", + "type": { + "kind": "struct", + "fields": [ + { + "name": "address", + "type": "publicKey" + }, + { + "name": "verified", + "type": "bool" + }, + { + "name": "share", + "type": "u8" + } + ] + } + }, + { + "name": "Data", + "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": "Creator" + } + } + } + } + ] + } + }, + { + "name": "DataV2", + "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": "Creator" + } + } + } + }, + { + "name": "collection", + "type": { + "option": { + "defined": "Collection" + } + } + }, + { + "name": "uses", + "type": { + "option": { + "defined": "Uses" + } + } + } + ] + } + }, + { + "name": "Reservation", + "type": { + "kind": "struct", + "fields": [ + { + "name": "address", + "type": "publicKey" + }, + { + "name": "spotsRemaining", + "type": "u64" + }, + { + "name": "totalSpots", + "type": "u64" + } + ] + } + }, + { + "name": "ReservationV1", + "type": { + "kind": "struct", + "fields": [ + { + "name": "address", + "type": "publicKey" + }, + { + "name": "spotsRemaining", + "type": "u8" + }, + { + "name": "totalSpots", + "type": "u8" + } + ] + } + }, + { + "name": "SeedsVec", + "type": { + "kind": "struct", + "fields": [ + { + "name": "seeds", + "type": { + "vec": "bytes" + } + } + ] + } + }, + { + "name": "ProofInfo", + "type": { + "kind": "struct", + "fields": [ + { + "name": "proof", + "type": { + "vec": { + "array": [ + "u8", + 32 + ] + } + } + } + ] + } + }, + { + "name": "Payload", + "type": { + "kind": "struct", + "fields": [ + { + "name": "map", + "type": { + "hashMap": [ + "string", + { + "defined": "PayloadType" + } + ] + } + } + ] + } + }, + { + "name": "Uses", + "type": { + "kind": "struct", + "fields": [ + { + "name": "useMethod", + "type": { + "defined": "UseMethod" + } + }, + { + "name": "remaining", + "type": "u64" + }, + { + "name": "total", + "type": "u64" + } + ] + } + }, + { + "name": "BurnArgs", + "type": { + "kind": "enum", + "variants": [ + { + "name": "V1", + "fields": [ + { + "name": "amount", + "type": "u64" + } + ] + } + ] + } + }, + { + "name": "DelegateArgs", + "type": { + "kind": "enum", + "variants": [ + { + "name": "CollectionV1", + "fields": [ + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "SaleV1", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "TransferV1", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "DataV1", + "fields": [ + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "UtilityV1", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "StakingV1", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "StandardV1", + "fields": [ + { + "name": "amount", + "type": "u64" + } + ] + }, + { + "name": "LockedTransferV1", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "locked_address", + "type": "publicKey" + }, + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "ProgrammableConfigV1", + "fields": [ + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "AuthorityItemV1", + "fields": [ + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "DataItemV1", + "fields": [ + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "CollectionItemV1", + "fields": [ + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "ProgrammableConfigItemV1", + "fields": [ + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "PrintDelegateV1", + "fields": [ + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + } + ] + } + }, + { + "name": "RevokeArgs", + "type": { + "kind": "enum", + "variants": [ + { + "name": "CollectionV1" + }, + { + "name": "SaleV1" + }, + { + "name": "TransferV1" + }, + { + "name": "DataV1" + }, + { + "name": "UtilityV1" + }, + { + "name": "StakingV1" + }, + { + "name": "StandardV1" + }, + { + "name": "LockedTransferV1" + }, + { + "name": "ProgrammableConfigV1" + }, + { + "name": "MigrationV1" + }, + { + "name": "AuthorityItemV1" + }, + { + "name": "DataItemV1" + }, + { + "name": "CollectionItemV1" + }, + { + "name": "ProgrammableConfigItemV1" + }, + { + "name": "PrintDelegateV1" + } + ] + } + }, + { + "name": "MetadataDelegateRole", + "type": { + "kind": "enum", + "variants": [ + { + "name": "AuthorityItem" + }, + { + "name": "Collection" + }, + { + "name": "Use" + }, + { + "name": "Data" + }, + { + "name": "ProgrammableConfig" + }, + { + "name": "DataItem" + }, + { + "name": "CollectionItem" + }, + { + "name": "ProgrammableConfigItem" + } + ] + } + }, + { + "name": "HolderDelegateRole", + "type": { + "kind": "enum", + "variants": [ + { + "name": "PrintDelegate" + } + ] + } + }, + { + "name": "CreateArgs", + "type": { + "kind": "enum", + "variants": [ + { + "name": "V1", + "fields": [ + { + "name": "asset_data", + "type": { + "defined": "AssetData" + } + }, + { + "name": "decimals", + "type": { + "option": "u8" + } + }, + { + "name": "print_supply", + "type": { + "option": { + "defined": "PrintSupply" + } + } + } + ] + } + ] + } + }, + { + "name": "MintArgs", + "type": { + "kind": "enum", + "variants": [ + { + "name": "V1", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + } + ] + } + }, + { + "name": "TransferArgs", + "type": { + "kind": "enum", + "variants": [ + { + "name": "V1", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + } + ] + } + }, + { + "name": "UpdateArgs", + "type": { + "kind": "enum", + "variants": [ + { + "name": "V1", + "fields": [ + { + "name": "new_update_authority", + "type": { + "option": "publicKey" + } + }, + { + "name": "data", + "type": { + "option": { + "defined": "Data" + } + } + }, + { + "name": "primary_sale_happened", + "type": { + "option": "bool" + } + }, + { + "name": "is_mutable", + "type": { + "option": "bool" + } + }, + { + "name": "collection", + "type": { + "defined": "CollectionToggle" + } + }, + { + "name": "collection_details", + "type": { + "defined": "CollectionDetailsToggle" + } + }, + { + "name": "uses", + "type": { + "defined": "UsesToggle" + } + }, + { + "name": "rule_set", + "type": { + "defined": "RuleSetToggle" + } + }, + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "AsUpdateAuthorityV2", + "fields": [ + { + "name": "new_update_authority", + "type": { + "option": "publicKey" + } + }, + { + "name": "data", + "type": { + "option": { + "defined": "Data" + } + } + }, + { + "name": "primary_sale_happened", + "type": { + "option": "bool" + } + }, + { + "name": "is_mutable", + "type": { + "option": "bool" + } + }, + { + "name": "collection", + "type": { + "defined": "CollectionToggle" + } + }, + { + "name": "collection_details", + "type": { + "defined": "CollectionDetailsToggle" + } + }, + { + "name": "uses", + "type": { + "defined": "UsesToggle" + } + }, + { + "name": "rule_set", + "type": { + "defined": "RuleSetToggle" + } + }, + { + "name": "token_standard", + "type": { + "option": { + "defined": "TokenStandard" + } + } + }, + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "AsAuthorityItemDelegateV2", + "fields": [ + { + "name": "new_update_authority", + "type": { + "option": "publicKey" + } + }, + { + "name": "primary_sale_happened", + "type": { + "option": "bool" + } + }, + { + "name": "is_mutable", + "type": { + "option": "bool" + } + }, + { + "name": "token_standard", + "type": { + "option": { + "defined": "TokenStandard" + } + } + }, + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "AsCollectionDelegateV2", + "fields": [ + { + "name": "collection", + "type": { + "defined": "CollectionToggle" + } + }, + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "AsDataDelegateV2", + "fields": [ + { + "name": "data", + "type": { + "option": { + "defined": "Data" + } + } + }, + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "AsProgrammableConfigDelegateV2", + "fields": [ + { + "name": "rule_set", + "type": { + "defined": "RuleSetToggle" + } + }, + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "AsDataItemDelegateV2", + "fields": [ + { + "name": "data", + "type": { + "option": { + "defined": "Data" + } + } + }, + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "AsCollectionItemDelegateV2", + "fields": [ + { + "name": "collection", + "type": { + "defined": "CollectionToggle" + } + }, + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + }, + { + "name": "AsProgrammableConfigItemDelegateV2", + "fields": [ + { + "name": "rule_set", + "type": { + "defined": "RuleSetToggle" + } + }, + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + } + ] + } + }, + { + "name": "CollectionToggle", + "type": { + "kind": "enum", + "variants": [ + { + "name": "None" + }, + { + "name": "Clear" + }, + { + "name": "Set", + "fields": [ + { + "defined": "Collection" + } + ] + } + ] + } + }, + { + "name": "UsesToggle", + "type": { + "kind": "enum", + "variants": [ + { + "name": "None" + }, + { + "name": "Clear" + }, + { + "name": "Set", + "fields": [ + { + "defined": "Uses" + } + ] + } + ] + } + }, + { + "name": "CollectionDetailsToggle", + "type": { + "kind": "enum", + "variants": [ + { + "name": "None" + }, + { + "name": "Clear" + }, + { + "name": "Set", + "fields": [ + { + "defined": "CollectionDetails" + } + ] + } + ] + } + }, + { + "name": "RuleSetToggle", + "type": { + "kind": "enum", + "variants": [ + { + "name": "None" + }, + { + "name": "Clear" + }, + { + "name": "Set", + "fields": [ + "publicKey" + ] + } + ] + } + }, + { + "name": "PrintArgs", + "type": { + "kind": "enum", + "variants": [ + { + "name": "V1", + "fields": [ + { + "name": "edition", + "type": "u64" + } + ] + }, + { + "name": "V2", + "fields": [ + { + "name": "edition", + "type": "u64" + } + ] + } + ] + } + }, + { + "name": "LockArgs", + "type": { + "kind": "enum", + "variants": [ + { + "name": "V1", + "fields": [ + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + } + ] + } + }, + { + "name": "UnlockArgs", + "type": { + "kind": "enum", + "variants": [ + { + "name": "V1", + "fields": [ + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + } + ] + } + }, + { + "name": "UseArgs", + "type": { + "kind": "enum", + "variants": [ + { + "name": "V1", + "fields": [ + { + "name": "authorization_data", + "type": { + "option": { + "defined": "AuthorizationData" + } + } + } + ] + } + ] + } + }, + { + "name": "VerificationArgs", + "type": { + "kind": "enum", + "variants": [ + { + "name": "CreatorV1" + }, + { + "name": "CollectionV1" + } + ] + } + }, + { + "name": "TokenStandard", + "type": { + "kind": "enum", + "variants": [ + { + "name": "NonFungible" + }, + { + "name": "FungibleAsset" + }, + { + "name": "Fungible" + }, + { + "name": "NonFungibleEdition" + }, + { + "name": "ProgrammableNonFungible" + }, + { + "name": "ProgrammableNonFungibleEdition" + } + ] + } + }, + { + "name": "Key", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Uninitialized" + }, + { + "name": "EditionV1" + }, + { + "name": "MasterEditionV1" + }, + { + "name": "ReservationListV1" + }, + { + "name": "MetadataV1" + }, + { + "name": "ReservationListV2" + }, + { + "name": "MasterEditionV2" + }, + { + "name": "EditionMarker" + }, + { + "name": "UseAuthorityRecord" + }, + { + "name": "CollectionAuthorityRecord" + }, + { + "name": "TokenOwnedEscrow" + }, + { + "name": "TokenRecord" + }, + { + "name": "MetadataDelegate" + }, + { + "name": "EditionMarkerV2" + }, + { + "name": "HolderDelegate" + } + ] + } + }, + { + "name": "CollectionDetails", + "type": { + "kind": "enum", + "variants": [ + { + "name": "V1", + "fields": [ + { + "name": "size", + "type": "u64" + } + ] + }, + { + "name": "V2", + "fields": [ + { + "name": "padding", + "type": { + "array": [ + "u8", + 8 + ] + } + } + ] + } + ] + } + }, + { + "name": "EscrowAuthority", + "type": { + "kind": "enum", + "variants": [ + { + "name": "TokenOwner" + }, + { + "name": "Creator", + "fields": [ + "publicKey" + ] + } + ] + } + }, + { + "name": "PrintSupply", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Zero" + }, + { + "name": "Limited", + "fields": [ + "u64" + ] + }, + { + "name": "Unlimited" + } + ] + } + }, + { + "name": "ProgrammableConfig", + "type": { + "kind": "enum", + "variants": [ + { + "name": "V1", + "fields": [ + { + "name": "rule_set", + "type": { + "option": "publicKey" + } + } + ] + } + ] + } + }, + { + "name": "MigrationType", + "type": { + "kind": "enum", + "variants": [ + { + "name": "CollectionV1" + }, + { + "name": "ProgrammableV1" + } + ] + } + }, + { + "name": "TokenState", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Unlocked" + }, + { + "name": "Locked" + }, + { + "name": "Listed" + } + ] + } + }, + { + "name": "TokenDelegateRole", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Sale" + }, + { + "name": "Transfer" + }, + { + "name": "Utility" + }, + { + "name": "Staking" + }, + { + "name": "Standard" + }, + { + "name": "LockedTransfer" + }, + { + "name": "Migration" + } + ] + } + }, + { + "name": "AuthorityType", + "type": { + "kind": "enum", + "variants": [ + { + "name": "None" + }, + { + "name": "Metadata" + }, + { + "name": "Holder" + }, + { + "name": "MetadataDelegate" + }, + { + "name": "TokenDelegate" + } + ] + } + }, + { + "name": "PayloadKey", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Amount" + }, + { + "name": "Authority" + }, + { + "name": "AuthoritySeeds" + }, + { + "name": "Delegate" + }, + { + "name": "DelegateSeeds" + }, + { + "name": "Destination" + }, + { + "name": "DestinationSeeds" + }, + { + "name": "Holder" + }, + { + "name": "Source" + }, + { + "name": "SourceSeeds" + } + ] + } + }, + { + "name": "PayloadType", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Pubkey", + "fields": [ + "publicKey" + ] + }, + { + "name": "Seeds", + "fields": [ + { + "defined": "SeedsVec" + } + ] + }, + { + "name": "MerkleProof", + "fields": [ + { + "defined": "ProofInfo" + } + ] + }, + { + "name": "Number", + "fields": [ + "u64" + ] + } + ] + } + }, + { + "name": "UseMethod", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Burn" + }, + { + "name": "Multiple" + }, + { + "name": "Single" + } + ] + } + } + ], + "errors": [ + { + "code": 0, + "name": "InstructionUnpackError", + "msg": "" + }, + { + "code": 1, + "name": "InstructionPackError", + "msg": "" + }, + { + "code": 2, + "name": "NotRentExempt", + "msg": "Lamport balance below rent-exempt threshold" + }, + { + "code": 3, + "name": "AlreadyInitialized", + "msg": "Already initialized" + }, + { + "code": 4, + "name": "Uninitialized", + "msg": "Uninitialized" + }, + { + "code": 5, + "name": "InvalidMetadataKey", + "msg": " Metadata's key must match seed of ['metadata', program id, mint] provided" + }, + { + "code": 6, + "name": "InvalidEditionKey", + "msg": "Edition's key must match seed of ['metadata', program id, name, 'edition'] provided" + }, + { + "code": 7, + "name": "UpdateAuthorityIncorrect", + "msg": "Update Authority given does not match" + }, + { + "code": 8, + "name": "UpdateAuthorityIsNotSigner", + "msg": "Update Authority needs to be signer to update metadata" + }, + { + "code": 9, + "name": "NotMintAuthority", + "msg": "You must be the mint authority and signer on this transaction" + }, + { + "code": 10, + "name": "InvalidMintAuthority", + "msg": "Mint authority provided does not match the authority on the mint" + }, + { + "code": 11, + "name": "NameTooLong", + "msg": "Name too long" + }, + { + "code": 12, + "name": "SymbolTooLong", + "msg": "Symbol too long" + }, + { + "code": 13, + "name": "UriTooLong", + "msg": "URI too long" + }, + { + "code": 14, + "name": "UpdateAuthorityMustBeEqualToMetadataAuthorityAndSigner", + "msg": "" + }, + { + "code": 15, + "name": "MintMismatch", + "msg": "Mint given does not match mint on Metadata" + }, + { + "code": 16, + "name": "EditionsMustHaveExactlyOneToken", + "msg": "Editions must have exactly one token" + }, + { + "code": 17, + "name": "MaxEditionsMintedAlready", + "msg": "" + }, + { + "code": 18, + "name": "TokenMintToFailed", + "msg": "" + }, + { + "code": 19, + "name": "MasterRecordMismatch", + "msg": "" + }, + { + "code": 20, + "name": "DestinationMintMismatch", + "msg": "" + }, + { + "code": 21, + "name": "EditionAlreadyMinted", + "msg": "" + }, + { + "code": 22, + "name": "PrintingMintDecimalsShouldBeZero", + "msg": "" + }, + { + "code": 23, + "name": "OneTimePrintingAuthorizationMintDecimalsShouldBeZero", + "msg": "" + }, + { + "code": 24, + "name": "EditionMintDecimalsShouldBeZero", + "msg": "EditionMintDecimalsShouldBeZero" + }, + { + "code": 25, + "name": "TokenBurnFailed", + "msg": "" + }, + { + "code": 26, + "name": "TokenAccountOneTimeAuthMintMismatch", + "msg": "" + }, + { + "code": 27, + "name": "DerivedKeyInvalid", + "msg": "Derived key invalid" + }, + { + "code": 28, + "name": "PrintingMintMismatch", + "msg": "The Printing mint does not match that on the master edition!" + }, + { + "code": 29, + "name": "OneTimePrintingAuthMintMismatch", + "msg": "The One Time Printing Auth mint does not match that on the master edition!" + }, + { + "code": 30, + "name": "TokenAccountMintMismatch", + "msg": "The mint of the token account does not match the Printing mint!" + }, + { + "code": 31, + "name": "TokenAccountMintMismatchV2", + "msg": "The mint of the token account does not match the master metadata mint!" + }, + { + "code": 32, + "name": "NotEnoughTokens", + "msg": "Not enough tokens to mint a limited edition" + }, + { + "code": 33, + "name": "PrintingMintAuthorizationAccountMismatch", + "msg": "" + }, + { + "code": 34, + "name": "AuthorizationTokenAccountOwnerMismatch", + "msg": "" + }, + { + "code": 35, + "name": "Disabled", + "msg": "" + }, + { + "code": 36, + "name": "CreatorsTooLong", + "msg": "Creators list too long" + }, + { + "code": 37, + "name": "CreatorsMustBeAtleastOne", + "msg": "Creators must be at least one if set" + }, + { + "code": 38, + "name": "MustBeOneOfCreators", + "msg": "" + }, + { + "code": 39, + "name": "NoCreatorsPresentOnMetadata", + "msg": "This metadata does not have creators" + }, + { + "code": 40, + "name": "CreatorNotFound", + "msg": "This creator address was not found" + }, + { + "code": 41, + "name": "InvalidBasisPoints", + "msg": "Basis points cannot be more than 10000" + }, + { + "code": 42, + "name": "PrimarySaleCanOnlyBeFlippedToTrue", + "msg": "Primary sale can only be flipped to true and is immutable" + }, + { + "code": 43, + "name": "OwnerMismatch", + "msg": "Owner does not match that on the account given" + }, + { + "code": 44, + "name": "NoBalanceInAccountForAuthorization", + "msg": "This account has no tokens to be used for authorization" + }, + { + "code": 45, + "name": "ShareTotalMustBe100", + "msg": "Share total must equal 100 for creator array" + }, + { + "code": 46, + "name": "ReservationExists", + "msg": "" + }, + { + "code": 47, + "name": "ReservationDoesNotExist", + "msg": "" + }, + { + "code": 48, + "name": "ReservationNotSet", + "msg": "" + }, + { + "code": 49, + "name": "ReservationAlreadyMade", + "msg": "" + }, + { + "code": 50, + "name": "BeyondMaxAddressSize", + "msg": "" + }, + { + "code": 51, + "name": "NumericalOverflowError", + "msg": "NumericalOverflowError" + }, + { + "code": 52, + "name": "ReservationBreachesMaximumSupply", + "msg": "" + }, + { + "code": 53, + "name": "AddressNotInReservation", + "msg": "" + }, + { + "code": 54, + "name": "CannotVerifyAnotherCreator", + "msg": "You cannot unilaterally verify another creator, they must sign" + }, + { + "code": 55, + "name": "CannotUnverifyAnotherCreator", + "msg": "You cannot unilaterally unverify another creator" + }, + { + "code": 56, + "name": "SpotMismatch", + "msg": "" + }, + { + "code": 57, + "name": "IncorrectOwner", + "msg": "Incorrect account owner" + }, + { + "code": 58, + "name": "PrintingWouldBreachMaximumSupply", + "msg": "" + }, + { + "code": 59, + "name": "DataIsImmutable", + "msg": "Data is immutable" + }, + { + "code": 60, + "name": "DuplicateCreatorAddress", + "msg": "No duplicate creator addresses" + }, + { + "code": 61, + "name": "ReservationSpotsRemainingShouldMatchTotalSpotsAtStart", + "msg": "" + }, + { + "code": 62, + "name": "InvalidTokenProgram", + "msg": "Invalid token program" + }, + { + "code": 63, + "name": "DataTypeMismatch", + "msg": "Data type mismatch" + }, + { + "code": 64, + "name": "BeyondAlottedAddressSize", + "msg": "" + }, + { + "code": 65, + "name": "ReservationNotComplete", + "msg": "" + }, + { + "code": 66, + "name": "TriedToReplaceAnExistingReservation", + "msg": "" + }, + { + "code": 67, + "name": "InvalidOperation", + "msg": "Invalid operation" + }, + { + "code": 68, + "name": "InvalidOwner", + "msg": "Invalid Owner" + }, + { + "code": 69, + "name": "PrintingMintSupplyMustBeZeroForConversion", + "msg": "Printing mint supply must be zero for conversion" + }, + { + "code": 70, + "name": "OneTimeAuthMintSupplyMustBeZeroForConversion", + "msg": "One Time Auth mint supply must be zero for conversion" + }, + { + "code": 71, + "name": "InvalidEditionIndex", + "msg": "You tried to insert one edition too many into an edition mark pda" + }, + { + "code": 72, + "name": "ReservationArrayShouldBeSizeOne", + "msg": "" + }, + { + "code": 73, + "name": "IsMutableCanOnlyBeFlippedToFalse", + "msg": "Is Mutable can only be flipped to false" + }, + { + "code": 74, + "name": "CollectionCannotBeVerifiedInThisInstruction", + "msg": "Collection cannot be verified in this instruction" + }, + { + "code": 75, + "name": "Removed", + "msg": "This instruction was deprecated in a previous release and is now removed" + }, + { + "code": 76, + "name": "MustBeBurned", + "msg": "" + }, + { + "code": 77, + "name": "InvalidUseMethod", + "msg": "This use method is invalid" + }, + { + "code": 78, + "name": "CannotChangeUseMethodAfterFirstUse", + "msg": "Cannot Change Use Method after the first use" + }, + { + "code": 79, + "name": "CannotChangeUsesAfterFirstUse", + "msg": "Cannot Change Remaining or Available uses after the first use" + }, + { + "code": 80, + "name": "CollectionNotFound", + "msg": "Collection Not Found on Metadata" + }, + { + "code": 81, + "name": "InvalidCollectionUpdateAuthority", + "msg": "Collection Update Authority is invalid" + }, + { + "code": 82, + "name": "CollectionMustBeAUniqueMasterEdition", + "msg": "Collection Must Be a Unique Master Edition v2" + }, + { + "code": 83, + "name": "UseAuthorityRecordAlreadyExists", + "msg": "The Use Authority Record Already Exists, to modify it Revoke, then Approve" + }, + { + "code": 84, + "name": "UseAuthorityRecordAlreadyRevoked", + "msg": "The Use Authority Record is empty or already revoked" + }, + { + "code": 85, + "name": "Unusable", + "msg": "This token has no uses" + }, + { + "code": 86, + "name": "NotEnoughUses", + "msg": "There are not enough Uses left on this token." + }, + { + "code": 87, + "name": "CollectionAuthorityRecordAlreadyExists", + "msg": "This Collection Authority Record Already Exists." + }, + { + "code": 88, + "name": "CollectionAuthorityDoesNotExist", + "msg": "This Collection Authority Record Does Not Exist." + }, + { + "code": 89, + "name": "InvalidUseAuthorityRecord", + "msg": "This Use Authority Record is invalid." + }, + { + "code": 90, + "name": "InvalidCollectionAuthorityRecord", + "msg": "" + }, + { + "code": 91, + "name": "InvalidFreezeAuthority", + "msg": "Metadata does not match the freeze authority on the mint" + }, + { + "code": 92, + "name": "InvalidDelegate", + "msg": "All tokens in this account have not been delegated to this user." + }, + { + "code": 93, + "name": "CannotAdjustVerifiedCreator", + "msg": "" + }, + { + "code": 94, + "name": "CannotRemoveVerifiedCreator", + "msg": "Verified creators cannot be removed." + }, + { + "code": 95, + "name": "CannotWipeVerifiedCreators", + "msg": "" + }, + { + "code": 96, + "name": "NotAllowedToChangeSellerFeeBasisPoints", + "msg": "" + }, + { + "code": 97, + "name": "EditionOverrideCannotBeZero", + "msg": "Edition override cannot be zero" + }, + { + "code": 98, + "name": "InvalidUser", + "msg": "Invalid User" + }, + { + "code": 99, + "name": "RevokeCollectionAuthoritySignerIncorrect", + "msg": "Revoke Collection Authority signer is incorrect" + }, + { + "code": 100, + "name": "TokenCloseFailed", + "msg": "" + }, + { + "code": 101, + "name": "UnsizedCollection", + "msg": "Can't use this function on unsized collection" + }, + { + "code": 102, + "name": "SizedCollection", + "msg": "Can't use this function on a sized collection" + }, + { + "code": 103, + "name": "MissingCollectionMetadata", + "msg": "Missing collection metadata account" + }, + { + "code": 104, + "name": "NotAMemberOfCollection", + "msg": "This NFT is not a member of the specified collection." + }, + { + "code": 105, + "name": "NotVerifiedMemberOfCollection", + "msg": "This NFT is not a verified member of the specified collection." + }, + { + "code": 106, + "name": "NotACollectionParent", + "msg": "This NFT is not a collection parent NFT." + }, + { + "code": 107, + "name": "CouldNotDetermineTokenStandard", + "msg": "Could not determine a TokenStandard type." + }, + { + "code": 108, + "name": "MissingEditionAccount", + "msg": "This mint account has an edition but none was provided." + }, + { + "code": 109, + "name": "NotAMasterEdition", + "msg": "This edition is not a Master Edition" + }, + { + "code": 110, + "name": "MasterEditionHasPrints", + "msg": "This Master Edition has existing prints" + }, + { + "code": 111, + "name": "BorshDeserializationError", + "msg": "" + }, + { + "code": 112, + "name": "CannotUpdateVerifiedCollection", + "msg": "Cannot update a verified collection in this command" + }, + { + "code": 113, + "name": "CollectionMasterEditionAccountInvalid", + "msg": "Edition account doesnt match collection " + }, + { + "code": 114, + "name": "AlreadyVerified", + "msg": "Item is already verified." + }, + { + "code": 115, + "name": "AlreadyUnverified", + "msg": "" + }, + { + "code": 116, + "name": "NotAPrintEdition", + "msg": "This edition is not a Print Edition" + }, + { + "code": 117, + "name": "InvalidMasterEdition", + "msg": "Invalid Master Edition" + }, + { + "code": 118, + "name": "InvalidPrintEdition", + "msg": "Invalid Print Edition" + }, + { + "code": 119, + "name": "InvalidEditionMarker", + "msg": "Invalid Edition Marker" + }, + { + "code": 120, + "name": "ReservationListDeprecated", + "msg": "Reservation List is Deprecated" + }, + { + "code": 121, + "name": "PrintEditionDoesNotMatchMasterEdition", + "msg": "Print Edition does not match Master Edition" + }, + { + "code": 122, + "name": "EditionNumberGreaterThanMaxSupply", + "msg": "Edition Number greater than max supply" + }, + { + "code": 123, + "name": "MustUnverify", + "msg": "Must unverify before migrating collections." + }, + { + "code": 124, + "name": "InvalidEscrowBumpSeed", + "msg": "Invalid Escrow Account Bump Seed" + }, + { + "code": 125, + "name": "MustBeEscrowAuthority", + "msg": "Must Escrow Authority" + }, + { + "code": 126, + "name": "InvalidSystemProgram", + "msg": "Invalid System Program" + }, + { + "code": 127, + "name": "MustBeNonFungible", + "msg": "Must be a Non Fungible Token" + }, + { + "code": 128, + "name": "InsufficientTokens", + "msg": "Insufficient tokens for transfer" + }, + { + "code": 129, + "name": "BorshSerializationError", + "msg": "Borsh Serialization Error" + }, + { + "code": 130, + "name": "NoFreezeAuthoritySet", + "msg": "Cannot create NFT with no Freeze Authority." + }, + { + "code": 131, + "name": "InvalidCollectionSizeChange", + "msg": "Invalid collection size change" + }, + { + "code": 132, + "name": "InvalidBubblegumSigner", + "msg": "Invalid bubblegum signer" + }, + { + "code": 133, + "name": "EscrowParentHasDelegate", + "msg": "Escrow parent cannot have a delegate" + }, + { + "code": 134, + "name": "MintIsNotSigner", + "msg": "Mint needs to be signer to initialize the account" + }, + { + "code": 135, + "name": "InvalidTokenStandard", + "msg": "Invalid token standard" + }, + { + "code": 136, + "name": "InvalidMintForTokenStandard", + "msg": "Invalid mint account for specified token standard" + }, + { + "code": 137, + "name": "InvalidAuthorizationRules", + "msg": "Invalid authorization rules account" + }, + { + "code": 138, + "name": "MissingAuthorizationRules", + "msg": "Missing authorization rules account" + }, + { + "code": 139, + "name": "MissingProgrammableConfig", + "msg": "Missing programmable configuration" + }, + { + "code": 140, + "name": "InvalidProgrammableConfig", + "msg": "Invalid programmable configuration" + }, + { + "code": 141, + "name": "DelegateAlreadyExists", + "msg": "Delegate already exists" + }, + { + "code": 142, + "name": "DelegateNotFound", + "msg": "Delegate not found" + }, + { + "code": 143, + "name": "MissingAccountInBuilder", + "msg": "Required account not set in instruction builder" + }, + { + "code": 144, + "name": "MissingArgumentInBuilder", + "msg": "Required argument not set in instruction builder" + }, + { + "code": 145, + "name": "FeatureNotSupported", + "msg": "Feature not supported currently" + }, + { + "code": 146, + "name": "InvalidSystemWallet", + "msg": "Invalid system wallet" + }, + { + "code": 147, + "name": "OnlySaleDelegateCanTransfer", + "msg": "Only the sale delegate can transfer while its set" + }, + { + "code": 148, + "name": "MissingTokenAccount", + "msg": "Missing token account" + }, + { + "code": 149, + "name": "MissingSplTokenProgram", + "msg": "Missing SPL token program" + }, + { + "code": 150, + "name": "MissingAuthorizationRulesProgram", + "msg": "Missing authorization rules program" + }, + { + "code": 151, + "name": "InvalidDelegateRoleForTransfer", + "msg": "Invalid delegate role for transfer" + }, + { + "code": 152, + "name": "InvalidTransferAuthority", + "msg": "Invalid transfer authority" + }, + { + "code": 153, + "name": "InstructionNotSupported", + "msg": "Instruction not supported for ProgrammableNonFungible assets" + }, + { + "code": 154, + "name": "KeyMismatch", + "msg": "Public key does not match expected value" + }, + { + "code": 155, + "name": "LockedToken", + "msg": "Token is locked" + }, + { + "code": 156, + "name": "UnlockedToken", + "msg": "Token is unlocked" + }, + { + "code": 157, + "name": "MissingDelegateRole", + "msg": "Missing delegate role" + }, + { + "code": 158, + "name": "InvalidAuthorityType", + "msg": "Invalid authority type" + }, + { + "code": 159, + "name": "MissingTokenRecord", + "msg": "Missing token record account" + }, + { + "code": 160, + "name": "MintSupplyMustBeZero", + "msg": "Mint supply must be zero for programmable assets" + }, + { + "code": 161, + "name": "DataIsEmptyOrZeroed", + "msg": "Data is empty or zeroed" + }, + { + "code": 162, + "name": "MissingTokenOwnerAccount", + "msg": "Missing token owner" + }, + { + "code": 163, + "name": "InvalidMasterEditionAccountLength", + "msg": "Master edition account has an invalid length" + }, + { + "code": 164, + "name": "IncorrectTokenState", + "msg": "Incorrect token state" + }, + { + "code": 165, + "name": "InvalidDelegateRole", + "msg": "Invalid delegate role" + }, + { + "code": 166, + "name": "MissingPrintSupply", + "msg": "Print supply is required for non-fungibles" + }, + { + "code": 167, + "name": "MissingMasterEditionAccount", + "msg": "Missing master edition account" + }, + { + "code": 168, + "name": "AmountMustBeGreaterThanZero", + "msg": "Amount must be greater than zero" + }, + { + "code": 169, + "name": "InvalidDelegateArgs", + "msg": "Invalid delegate args" + }, + { + "code": 170, + "name": "MissingLockedTransferAddress", + "msg": "Missing address for locked transfer" + }, + { + "code": 171, + "name": "InvalidLockedTransferAddress", + "msg": "Invalid destination address for locked transfer" + }, + { + "code": 172, + "name": "DataIncrementLimitExceeded", + "msg": "Exceeded account realloc increase limit" + }, + { + "code": 173, + "name": "CannotUpdateAssetWithDelegate", + "msg": "Cannot update the rule set of a programmable asset that has a delegate" + }, + { + "code": 174, + "name": "InvalidAmount", + "msg": "Invalid token amount for this operation or token standard" + }, + { + "code": 175, + "name": "MissingMasterEditionMintAccount", + "msg": "Missing master edition mint account" + }, + { + "code": 176, + "name": "MissingMasterEditionTokenAccount", + "msg": "Missing master edition token account" + }, + { + "code": 177, + "name": "MissingEditionMarkerAccount", + "msg": "Missing edition marker account" + }, + { + "code": 178, + "name": "CannotBurnWithDelegate", + "msg": "Cannot burn while persistent delegate is set" + }, + { + "code": 179, + "name": "MissingEdition", + "msg": "Missing edition account" + }, + { + "code": 180, + "name": "InvalidAssociatedTokenAccountProgram", + "msg": "Invalid Associated Token Account Program" + }, + { + "code": 181, + "name": "InvalidInstructionsSysvar", + "msg": "Invalid InstructionsSysvar" + }, + { + "code": 182, + "name": "InvalidParentAccounts", + "msg": "Invalid or Unneeded parent accounts" + }, + { + "code": 183, + "name": "InvalidUpdateArgs", + "msg": "Authority cannot apply all update args" + }, + { + "code": 184, + "name": "InsufficientTokenBalance", + "msg": "Token account does not have enough tokens" + }, + { + "code": 185, + "name": "MissingCollectionMint", + "msg": "Missing collection account" + }, + { + "code": 186, + "name": "MissingCollectionMasterEdition", + "msg": "Missing collection master edition account" + }, + { + "code": 187, + "name": "InvalidTokenRecord", + "msg": "Invalid token record account" + }, + { + "code": 188, + "name": "InvalidCloseAuthority", + "msg": "The close authority needs to be revoked by the Utility Delegate" + }, + { + "code": 189, + "name": "InvalidInstruction", + "msg": "Invalid or removed instruction" + }, + { + "code": 190, + "name": "MissingDelegateRecord", + "msg": "Missing delegate record" + }, + { + "code": 191, + "name": "InvalidFeeAccount", + "msg": "" + }, + { + "code": 192, + "name": "InvalidMetadataFlags", + "msg": "" + }, + { + "code": 193, + "name": "CannotChangeUpdateAuthorityWithDelegate", + "msg": "Cannot change the update authority with a delegate" + }, + { + "code": 194, + "name": "InvalidMintExtensionType", + "msg": "Invalid mint extension type" + }, + { + "code": 195, + "name": "InvalidMintCloseAuthority", + "msg": "Invalid mint close authority" + }, + { + "code": 196, + "name": "InvalidMetadataPointer", + "msg": "Invalid metadata pointer" + }, + { + "code": 197, + "name": "InvalidTokenExtensionType", + "msg": "Invalid token extension type" + }, + { + "code": 198, + "name": "MissingImmutableOwnerExtension", + "msg": "Missing immutable owner extension" + }, + { + "code": 199, + "name": "ExpectedUninitializedAccount", + "msg": "Expected account to be uninitialized" + }, + { + "code": 200, + "name": "InvalidEditionAccountLength", + "msg": "Edition account has an invalid length" + }, + { + "code": 201, + "name": "AccountAlreadyResized", + "msg": "Account has already been resized" + }, + { + "code": 202, + "name": "ConditionsForClosingNotMet", + "msg": "Conditions for closing not met" + } + ], + "metadata": { + "origin": "shank", + "address": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s", + "binaryVersion": "0.3.0", + "libVersion": "0.3.0" + } +} \ No newline at end of file diff --git a/idls/metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s.metadata.metaplex_token_metadata.json b/idls/metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s.metadata.metaplex_token_metadata.json deleted file mode 100644 index 5df4a24..0000000 --- a/idls/metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s.metadata.metaplex_token_metadata.json +++ /dev/null @@ -1,7978 +0,0 @@ -{ - "version": "1.14.0", - "name": "token_metadata", - "instructions": [ - { - "name": "CreateMetadataAccount", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata key (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of token asset" - ] - }, - { - "name": "mintAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Mint authority" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "payer" - ] - }, - { - "name": "updateAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "update authority info" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "rent", - "isMut": false, - "isSigner": false, - "docs": [ - "Rent info" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 0 - } - }, - { - "name": "UpdateMetadataAccount", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "updateAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Update authority key" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 1 - } - }, - { - "name": "DeprecatedCreateMasterEdition", - "accounts": [ - { - "name": "edition", - "isMut": true, - "isSigner": false, - "docs": [ - "Unallocated edition V1 account with address as pda of ['metadata', program id, mint, 'edition']" - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata mint" - ] - }, - { - "name": "printingMint", - "isMut": true, - "isSigner": false, - "docs": [ - "Printing mint - A mint you control that can mint tokens that can be exchanged for limited editions of your master edition via the MintNewEditionFromMasterEditionViaToken endpoint" - ] - }, - { - "name": "oneTimePrintingAuthorizationMint", - "isMut": true, - "isSigner": false, - "docs": [ - "One time authorization printing mint - A mint you control that prints tokens that gives the bearer permission to mint any number of tokens from the printing mint one time via an endpoint with the token-metadata program for your metadata. Also burns the token." - ] - }, - { - "name": "updateAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Current Update authority key" - ] - }, - { - "name": "printingMintAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Printing mint authority - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY." - ] - }, - { - "name": "mintAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Mint authority on the metadata's mint - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY" - ] - }, - { - "name": "metadata", - "isMut": false, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "payer", - "isMut": false, - "isSigner": true, - "docs": [ - "payer" - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Token program" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "rent", - "isMut": false, - "isSigner": false, - "docs": [ - "Rent info" - ] - }, - { - "name": "oneTimePrintingAuthorizationMintAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "One time authorization printing mint authority - must be provided if using max supply. THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY." - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 2 - } - }, - { - "name": "DeprecatedMintNewEditionFromMasterEditionViaPrintingToken", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "New Metadata key (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "edition", - "isMut": true, - "isSigner": false, - "docs": [ - "New Edition V1 (pda of ['metadata', program id, mint id, 'edition'])" - ] - }, - { - "name": "masterEdition", - "isMut": true, - "isSigner": false, - "docs": [ - "Master Record Edition V1 (pda of ['metadata', program id, master metadata mint id, 'edition'])" - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false, - "docs": [ - "Mint of new token - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY" - ] - }, - { - "name": "mintAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Mint authority of new mint" - ] - }, - { - "name": "printingMint", - "isMut": true, - "isSigner": false, - "docs": [ - "Printing Mint of master record edition" - ] - }, - { - "name": "masterTokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "Token account containing Printing mint token to be transferred" - ] - }, - { - "name": "editionMarker", - "isMut": true, - "isSigner": false, - "docs": [ - "Edition pda to mark creation - will be checked for pre-existence. (pda of ['metadata', program id, master mint id, edition_number])" - ] - }, - { - "name": "burnAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Burn authority for this token" - ] - }, - { - "name": "payer", - "isMut": false, - "isSigner": true, - "docs": [ - "payer" - ] - }, - { - "name": "masterUpdateAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "update authority info for new metadata account" - ] - }, - { - "name": "masterMetadata", - "isMut": false, - "isSigner": false, - "docs": [ - "Master record metadata account" - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Token program" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "rent", - "isMut": false, - "isSigner": false, - "docs": [ - "Rent info" - ] - }, - { - "name": "reservationList", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Reservation List - If present, and you are on this list, you can get an edition number given by your position on the list." - ] - } - ], - "args": [], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 3 - } - }, - { - "name": "UpdatePrimarySaleHappenedViaToken", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata key (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "owner", - "isMut": false, - "isSigner": true, - "docs": [ - "Owner on the token account" - ] - }, - { - "name": "token", - "isMut": false, - "isSigner": false, - "docs": [ - "Account containing tokens from the metadata's mint" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 4 - } - }, - { - "name": "DeprecatedSetReservationList", - "accounts": [ - { - "name": "masterEdition", - "isMut": true, - "isSigner": false, - "docs": [ - "Master Edition V1 key (pda of ['metadata', program id, mint id, 'edition'])" - ] - }, - { - "name": "reservationList", - "isMut": true, - "isSigner": false, - "docs": [ - "PDA for ReservationList of ['metadata', program id, master edition key, 'reservation', resource-key]" - ] - }, - { - "name": "resource", - "isMut": false, - "isSigner": true, - "docs": [ - "The resource you tied the reservation list too" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 5 - } - }, - { - "name": "DeprecatedCreateReservationList", - "accounts": [ - { - "name": "reservationList", - "isMut": true, - "isSigner": false, - "docs": [ - "PDA for ReservationList of ['metadata', program id, master edition key, 'reservation', resource-key]" - ] - }, - { - "name": "payer", - "isMut": false, - "isSigner": true, - "docs": [ - "Payer" - ] - }, - { - "name": "updateAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Update authority" - ] - }, - { - "name": "masterEdition", - "isMut": false, - "isSigner": false, - "docs": [ - " Master Edition V1 key (pda of ['metadata', program id, mint id, 'edition'])" - ] - }, - { - "name": "resource", - "isMut": false, - "isSigner": false, - "docs": [ - "A resource you wish to tie the reservation list to. This is so your later visitors who come to redeem can derive your reservation list PDA with something they can easily get at. You choose what this should be." - ] - }, - { - "name": "metadata", - "isMut": false, - "isSigner": false, - "docs": [ - "Metadata key (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "rent", - "isMut": false, - "isSigner": false, - "docs": [ - "Rent info" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 6 - } - }, - { - "name": "SignMetadata", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "creator", - "isMut": false, - "isSigner": true, - "docs": [ - "Creator" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 7 - } - }, - { - "name": "DeprecatedMintPrintingTokensViaToken", - "accounts": [ - { - "name": "destination", - "isMut": true, - "isSigner": false, - "docs": [ - "Destination account" - ] - }, - { - "name": "token", - "isMut": true, - "isSigner": false, - "docs": [ - "Token account containing one time authorization token" - ] - }, - { - "name": "oneTimePrintingAuthorizationMint", - "isMut": true, - "isSigner": false, - "docs": [ - "One time authorization mint" - ] - }, - { - "name": "printingMint", - "isMut": true, - "isSigner": false, - "docs": [ - "Printing mint" - ] - }, - { - "name": "burnAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Burn authority" - ] - }, - { - "name": "metadata", - "isMut": false, - "isSigner": false, - "docs": [ - "Metadata key (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "masterEdition", - "isMut": false, - "isSigner": false, - "docs": [ - "Master Edition V1 key (pda of ['metadata', program id, mint id, 'edition'])" - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Token program" - ] - }, - { - "name": "rent", - "isMut": false, - "isSigner": false, - "docs": [ - "Rent" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 8 - } - }, - { - "name": "DeprecatedMintPrintingTokens", - "accounts": [ - { - "name": "destination", - "isMut": true, - "isSigner": false, - "docs": [ - "Destination account" - ] - }, - { - "name": "printingMint", - "isMut": true, - "isSigner": false, - "docs": [ - "Printing mint" - ] - }, - { - "name": "updateAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Update authority" - ] - }, - { - "name": "metadata", - "isMut": false, - "isSigner": false, - "docs": [ - "Metadata key (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "masterEdition", - "isMut": false, - "isSigner": false, - "docs": [ - "Master Edition V1 key (pda of ['metadata', program id, mint id, 'edition'])" - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Token program" - ] - }, - { - "name": "rent", - "isMut": false, - "isSigner": false, - "docs": [ - "Rent" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 9 - } - }, - { - "name": "CreateMasterEdition", - "accounts": [ - { - "name": "edition", - "isMut": true, - "isSigner": false, - "docs": [ - "Unallocated edition V2 account with address as pda of ['metadata', program id, mint, 'edition']" - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata mint" - ] - }, - { - "name": "updateAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Update authority" - ] - }, - { - "name": "mintAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Mint authority on the metadata's mint - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "payer" - ] - }, - { - "name": "metadata", - "isMut": false, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Token program" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "rent", - "isMut": false, - "isSigner": false, - "docs": [ - "Rent info" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 10 - } - }, - { - "name": "MintNewEditionFromMasterEditionViaToken", - "accounts": [ - { - "name": "newMetadata", - "isMut": true, - "isSigner": false, - "docs": [ - "New Metadata key (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "newEdition", - "isMut": true, - "isSigner": false, - "docs": [ - "New Edition (pda of ['metadata', program id, mint id, 'edition'])" - ] - }, - { - "name": "masterEdition", - "isMut": true, - "isSigner": false, - "docs": [ - "Master Record Edition V2 (pda of ['metadata', program id, master metadata mint id, 'edition'])" - ] - }, - { - "name": "newMint", - "isMut": true, - "isSigner": false, - "docs": [ - "Mint of new token - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY" - ] - }, - { - "name": "editionMarkPda", - "isMut": true, - "isSigner": false, - "docs": [ - "Edition pda to mark creation - will be checked for pre-existence. (pda of ['metadata', program id, master metadata mint id, 'edition', edition_number]) where edition_number is NOT the edition number you pass in args but actually edition_number = floor(edition/EDITION_MARKER_BIT_SIZE)." - ] - }, - { - "name": "newMintAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Mint authority of new mint" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "payer" - ] - }, - { - "name": "tokenAccountOwner", - "isMut": false, - "isSigner": true, - "docs": [ - "owner of token account containing master token (#8)" - ] - }, - { - "name": "tokenAccount", - "isMut": false, - "isSigner": false, - "docs": [ - "token account containing token from master metadata mint" - ] - }, - { - "name": "newMetadataUpdateAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "Update authority info for new metadata" - ] - }, - { - "name": "metadata", - "isMut": false, - "isSigner": false, - "docs": [ - "Master record metadata account" - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Token program" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "rent", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Rent info" - ] - } - ], - "args": [ - { - "name": "mintNewEditionFromMasterEditionViaTokenArgs", - "type": { - "defined": "MintNewEditionFromMasterEditionViaTokenArgs" - } - } - ], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 11 - } - }, - { - "name": "ConvertMasterEditionV1ToV2", - "accounts": [ - { - "name": "masterEdition", - "isMut": true, - "isSigner": false, - "docs": [ - "Master Record Edition V1 (pda of ['metadata', program id, master metadata mint id, 'edition'])" - ] - }, - { - "name": "oneTimeAuth", - "isMut": true, - "isSigner": false, - "docs": [ - "One time authorization mint" - ] - }, - { - "name": "printingMint", - "isMut": true, - "isSigner": false, - "docs": [ - "Printing mint" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 12 - } - }, - { - "name": "MintNewEditionFromMasterEditionViaVaultProxy", - "accounts": [ - { - "name": "newMetadata", - "isMut": true, - "isSigner": false, - "docs": [ - "New Metadata key (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "newEdition", - "isMut": true, - "isSigner": false, - "docs": [ - "New Edition (pda of ['metadata', program id, mint id, 'edition'])" - ] - }, - { - "name": "masterEdition", - "isMut": true, - "isSigner": false, - "docs": [ - "Master Record Edition V2 (pda of ['metadata', program id, master metadata mint id, 'edition']" - ] - }, - { - "name": "newMint", - "isMut": true, - "isSigner": false, - "docs": [ - "Mint of new token - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY" - ] - }, - { - "name": "editionMarkPda", - "isMut": true, - "isSigner": false, - "docs": [ - "Edition pda to mark creation - will be checked for pre-existence. (pda of ['metadata', program id, master metadata mint id, 'edition', edition_number]) where edition_number is NOT the edition number you pass in args but actually edition_number = floor(edition/EDITION_MARKER_BIT_SIZE)." - ] - }, - { - "name": "newMintAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Mint authority of new mint" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "payer" - ] - }, - { - "name": "vaultAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Vault authority" - ] - }, - { - "name": "safetyDepositStore", - "isMut": false, - "isSigner": false, - "docs": [ - "Safety deposit token store account" - ] - }, - { - "name": "safetyDepositBox", - "isMut": false, - "isSigner": false, - "docs": [ - "Safety deposit box" - ] - }, - { - "name": "vault", - "isMut": false, - "isSigner": false, - "docs": [ - "Vault" - ] - }, - { - "name": "newMetadataUpdateAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "Update authority info for new metadata" - ] - }, - { - "name": "metadata", - "isMut": false, - "isSigner": false, - "docs": [ - "Master record metadata account" - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Token program" - ] - }, - { - "name": "tokenVaultProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Token vault program" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "rent", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Rent info" - ] - } - ], - "args": [ - { - "name": "mintNewEditionFromMasterEditionViaTokenArgs", - "type": { - "defined": "MintNewEditionFromMasterEditionViaTokenArgs" - } - } - ], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 13 - } - }, - { - "name": "PuffMetadata", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 14 - } - }, - { - "name": "UpdateMetadataAccountV2", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "updateAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Update authority key" - ] - } - ], - "args": [ - { - "name": "updateMetadataAccountArgsV2", - "type": { - "defined": "UpdateMetadataAccountArgsV2" - } - } - ], - "discriminant": { - "type": "u8", - "value": 15 - } - }, - { - "name": "CreateMetadataAccountV2", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata key (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of token asset" - ] - }, - { - "name": "mintAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Mint authority" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "payer" - ] - }, - { - "name": "updateAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "update authority info" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "rent", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Rent info" - ] - } - ], - "args": [], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 16 - } - }, - { - "name": "CreateMasterEditionV3", - "accounts": [ - { - "name": "edition", - "isMut": true, - "isSigner": false, - "docs": [ - "Unallocated edition V2 account with address as pda of ['metadata', program id, mint, 'edition']" - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata mint" - ] - }, - { - "name": "updateAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Update authority" - ] - }, - { - "name": "mintAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Mint authority on the metadata's mint - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "payer" - ] - }, - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Token program" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "rent", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Rent info" - ] - } - ], - "args": [ - { - "name": "createMasterEditionArgs", - "type": { - "defined": "CreateMasterEditionArgs" - } - } - ], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 17 - } - }, - { - "name": "VerifyCollection", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "collectionAuthority", - "isMut": true, - "isSigner": true, - "docs": [ - "Collection Update authority" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "payer" - ] - }, - { - "name": "collectionMint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of the Collection" - ] - }, - { - "name": "collection", - "isMut": false, - "isSigner": false, - "docs": [ - "Metadata Account of the Collection" - ] - }, - { - "name": "collectionMasterEditionAccount", - "isMut": false, - "isSigner": false, - "docs": [ - "MasterEdition2 Account of the Collection Token" - ] - }, - { - "name": "collectionAuthorityRecord", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Collection Authority Record PDA" - ] - } - ], - "args": [], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 18 - } - }, - { - "name": "Utilize", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "tokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "Token Account Of NFT" - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false, - "docs": [ - "Mint of the Metadata" - ] - }, - { - "name": "useAuthority", - "isMut": true, - "isSigner": true, - "docs": [ - "A Use Authority / Can be the current Owner of the NFT" - ] - }, - { - "name": "owner", - "isMut": false, - "isSigner": false, - "docs": [ - "Owner" - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Token program" - ] - }, - { - "name": "ataProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Associated Token program" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "rent", - "isMut": false, - "isSigner": false, - "docs": [ - "Rent info" - ] - }, - { - "name": "useAuthorityRecord", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Use Authority Record PDA If present the program Assumes a delegated use authority" - ] - }, - { - "name": "burner", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Program As Signer (Burner)" - ] - } - ], - "args": [ - { - "name": "utilizeArgs", - "type": { - "defined": "UtilizeArgs" - } - } - ], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 19 - } - }, - { - "name": "ApproveUseAuthority", - "accounts": [ - { - "name": "useAuthorityRecord", - "isMut": true, - "isSigner": false, - "docs": [ - "Use Authority Record PDA" - ] - }, - { - "name": "owner", - "isMut": true, - "isSigner": true, - "docs": [ - "Owner" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "Payer" - ] - }, - { - "name": "user", - "isMut": false, - "isSigner": false, - "docs": [ - "A Use Authority" - ] - }, - { - "name": "ownerTokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "Owned Token Account Of Mint" - ] - }, - { - "name": "metadata", - "isMut": false, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of Metadata" - ] - }, - { - "name": "burner", - "isMut": false, - "isSigner": false, - "docs": [ - "Program As Signer (Burner)" - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Token program" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "rent", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Rent info" - ] - } - ], - "args": [ - { - "name": "approveUseAuthorityArgs", - "type": { - "defined": "ApproveUseAuthorityArgs" - } - } - ], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 20 - } - }, - { - "name": "RevokeUseAuthority", - "accounts": [ - { - "name": "useAuthorityRecord", - "isMut": true, - "isSigner": false, - "docs": [ - "Use Authority Record PDA" - ] - }, - { - "name": "owner", - "isMut": true, - "isSigner": true, - "docs": [ - "Owner" - ] - }, - { - "name": "user", - "isMut": false, - "isSigner": false, - "docs": [ - "A Use Authority" - ] - }, - { - "name": "ownerTokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "Owned Token Account Of Mint" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of Metadata" - ] - }, - { - "name": "metadata", - "isMut": false, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Token program" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "rent", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Rent info" - ] - } - ], - "args": [], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 21 - } - }, - { - "name": "UnverifyCollection", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "collectionAuthority", - "isMut": true, - "isSigner": true, - "docs": [ - "Collection Authority" - ] - }, - { - "name": "collectionMint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of the Collection" - ] - }, - { - "name": "collection", - "isMut": false, - "isSigner": false, - "docs": [ - "Metadata Account of the Collection" - ] - }, - { - "name": "collectionMasterEditionAccount", - "isMut": false, - "isSigner": false, - "docs": [ - "MasterEdition2 Account of the Collection Token" - ] - }, - { - "name": "collectionAuthorityRecord", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Collection Authority Record PDA" - ] - } - ], - "args": [], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 22 - } - }, - { - "name": "ApproveCollectionAuthority", - "accounts": [ - { - "name": "collectionAuthorityRecord", - "isMut": true, - "isSigner": false, - "docs": [ - "Collection Authority Record PDA" - ] - }, - { - "name": "newCollectionAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "A Collection Authority" - ] - }, - { - "name": "updateAuthority", - "isMut": true, - "isSigner": true, - "docs": [ - "Update Authority of Collection NFT" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "Payer" - ] - }, - { - "name": "metadata", - "isMut": false, - "isSigner": false, - "docs": [ - "Collection Metadata account" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of Collection Metadata" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "rent", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Rent info" - ] - } - ], - "args": [], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 23 - } - }, - { - "name": "RevokeCollectionAuthority", - "accounts": [ - { - "name": "collectionAuthorityRecord", - "isMut": true, - "isSigner": false, - "docs": [ - "Collection Authority Record PDA" - ] - }, - { - "name": "delegateAuthority", - "isMut": true, - "isSigner": false, - "docs": [ - "Delegated Collection Authority" - ] - }, - { - "name": "revokeAuthority", - "isMut": true, - "isSigner": true, - "docs": [ - "Update Authority, or Delegated Authority, of Collection NFT" - ] - }, - { - "name": "metadata", - "isMut": false, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of Metadata" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 24 - } - }, - { - "name": "SetAndVerifyCollection", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "collectionAuthority", - "isMut": true, - "isSigner": true, - "docs": [ - "Collection Update authority" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "Payer" - ] - }, - { - "name": "updateAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "Update Authority of Collection NFT and NFT" - ] - }, - { - "name": "collectionMint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of the Collection" - ] - }, - { - "name": "collection", - "isMut": false, - "isSigner": false, - "docs": [ - "Metadata Account of the Collection" - ] - }, - { - "name": "collectionMasterEditionAccount", - "isMut": false, - "isSigner": false, - "docs": [ - "MasterEdition2 Account of the Collection Token" - ] - }, - { - "name": "collectionAuthorityRecord", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Collection Authority Record PDA" - ] - } - ], - "args": [], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 25 - } - }, - { - "name": "FreezeDelegatedAccount", - "accounts": [ - { - "name": "delegate", - "isMut": true, - "isSigner": true, - "docs": [ - "Delegate" - ] - }, - { - "name": "tokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "Token account to freeze" - ] - }, - { - "name": "edition", - "isMut": false, - "isSigner": false, - "docs": [ - "Edition" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Token mint" - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Token Program" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 26 - } - }, - { - "name": "ThawDelegatedAccount", - "accounts": [ - { - "name": "delegate", - "isMut": true, - "isSigner": true, - "docs": [ - "Delegate" - ] - }, - { - "name": "tokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "Token account to thaw" - ] - }, - { - "name": "edition", - "isMut": false, - "isSigner": false, - "docs": [ - "Edition" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Token mint" - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Token Program" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 27 - } - }, - { - "name": "RemoveCreatorVerification", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "creator", - "isMut": false, - "isSigner": true, - "docs": [ - "Creator" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 28 - } - }, - { - "name": "BurnNft", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "owner", - "isMut": true, - "isSigner": true, - "docs": [ - "NFT owner" - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false, - "docs": [ - "Mint of the NFT" - ] - }, - { - "name": "tokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "Token account to close" - ] - }, - { - "name": "masterEditionAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "MasterEdition2 of the NFT" - ] - }, - { - "name": "splTokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "SPL Token Program" - ] - }, - { - "name": "collectionMetadata", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Metadata of the Collection" - ] - } - ], - "args": [], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 29 - } - }, - { - "name": "VerifySizedCollectionItem", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "collectionAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Collection Update authority" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "payer" - ] - }, - { - "name": "collectionMint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of the Collection" - ] - }, - { - "name": "collection", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata Account of the Collection" - ] - }, - { - "name": "collectionMasterEditionAccount", - "isMut": false, - "isSigner": false, - "docs": [ - "MasterEdition2 Account of the Collection Token" - ] - }, - { - "name": "collectionAuthorityRecord", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Collection Authority Record PDA" - ] - } - ], - "args": [], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 30 - } - }, - { - "name": "UnverifySizedCollectionItem", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "collectionAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Collection Authority" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "payer" - ] - }, - { - "name": "collectionMint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of the Collection" - ] - }, - { - "name": "collection", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata Account of the Collection" - ] - }, - { - "name": "collectionMasterEditionAccount", - "isMut": false, - "isSigner": false, - "docs": [ - "MasterEdition2 Account of the Collection Token" - ] - }, - { - "name": "collectionAuthorityRecord", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Collection Authority Record PDA" - ] - } - ], - "args": [], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 31 - } - }, - { - "name": "SetAndVerifySizedCollectionItem", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "collectionAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Collection Update authority" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "payer" - ] - }, - { - "name": "updateAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "Update Authority of Collection NFT and NFT" - ] - }, - { - "name": "collectionMint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of the Collection" - ] - }, - { - "name": "collection", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata Account of the Collection" - ] - }, - { - "name": "collectionMasterEditionAccount", - "isMut": false, - "isSigner": false, - "docs": [ - "MasterEdition2 Account of the Collection Token" - ] - }, - { - "name": "collectionAuthorityRecord", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Collection Authority Record PDA" - ] - } - ], - "args": [], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 32 - } - }, - { - "name": "CreateMetadataAccountV3", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata key (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of token asset" - ] - }, - { - "name": "mintAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Mint authority" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "payer" - ] - }, - { - "name": "updateAuthority", - "isMut": false, - "isSigner": false, - "isOptionalSigner": true, - "docs": [ - "update authority info" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "rent", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Rent info" - ] - } - ], - "args": [ - { - "name": "createMetadataAccountArgsV3", - "type": { - "defined": "CreateMetadataAccountArgsV3" - } - } - ], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 33 - } - }, - { - "name": "SetCollectionSize", - "accounts": [ - { - "name": "collectionMetadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Collection Metadata account" - ] - }, - { - "name": "collectionAuthority", - "isMut": true, - "isSigner": true, - "docs": [ - "Collection Update authority" - ] - }, - { - "name": "collectionMint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of the Collection" - ] - }, - { - "name": "collectionAuthorityRecord", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Collection Authority Record PDA" - ] - } - ], - "args": [ - { - "name": "setCollectionSizeArgs", - "type": { - "defined": "SetCollectionSizeArgs" - } - } - ], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 34 - } - }, - { - "name": "SetTokenStandard", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "updateAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Metadata update authority" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint account" - ] - }, - { - "name": "edition", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Edition account" - ] - } - ], - "args": [], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 35 - } - }, - { - "name": "BubblegumSetCollectionSize", - "accounts": [ - { - "name": "collectionMetadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Collection Metadata account" - ] - }, - { - "name": "collectionAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Collection Update authority" - ] - }, - { - "name": "collectionMint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of the Collection" - ] - }, - { - "name": "bubblegumSigner", - "isMut": false, - "isSigner": true, - "docs": [ - "Signing PDA of Bubblegum program" - ] - }, - { - "name": "collectionAuthorityRecord", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Collection Authority Record PDA" - ] - } - ], - "args": [ - { - "name": "setCollectionSizeArgs", - "type": { - "defined": "SetCollectionSizeArgs" - } - } - ], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 36 - } - }, - { - "name": "BurnEditionNft", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "owner", - "isMut": true, - "isSigner": true, - "docs": [ - "NFT owner" - ] - }, - { - "name": "printEditionMint", - "isMut": true, - "isSigner": false, - "docs": [ - "Mint of the print edition NFT" - ] - }, - { - "name": "masterEditionMint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of the original/master NFT" - ] - }, - { - "name": "printEditionTokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "Token account the print edition NFT is in" - ] - }, - { - "name": "masterEditionTokenAccount", - "isMut": false, - "isSigner": false, - "docs": [ - "Token account the Master Edition NFT is in" - ] - }, - { - "name": "masterEditionAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "MasterEdition2 of the original NFT" - ] - }, - { - "name": "printEditionAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "Print Edition account of the NFT" - ] - }, - { - "name": "editionMarkerAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "Edition Marker PDA of the NFT" - ] - }, - { - "name": "splTokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "SPL Token Program" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 37 - } - }, - { - "name": "CreateEscrowAccount", - "accounts": [ - { - "name": "escrow", - "isMut": true, - "isSigner": false, - "docs": [ - "Escrow account" - ] - }, - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint account" - ] - }, - { - "name": "tokenAccount", - "isMut": false, - "isSigner": false, - "docs": [ - "Token account of the token" - ] - }, - { - "name": "edition", - "isMut": false, - "isSigner": false, - "docs": [ - "Edition account" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "Wallet paying for the transaction and new account" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "sysvarInstructions", - "isMut": false, - "isSigner": false, - "docs": [ - "Instructions sysvar account" - ] - }, - { - "name": "authority", - "isMut": false, - "isSigner": true, - "isOptional": true, - "docs": [ - "Authority/creator of the escrow account" - ] - } - ], - "args": [], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 38 - } - }, - { - "name": "CloseEscrowAccount", - "accounts": [ - { - "name": "escrow", - "isMut": true, - "isSigner": false, - "docs": [ - "Escrow account" - ] - }, - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint account" - ] - }, - { - "name": "tokenAccount", - "isMut": false, - "isSigner": false, - "docs": [ - "Token account" - ] - }, - { - "name": "edition", - "isMut": false, - "isSigner": false, - "docs": [ - "Edition account" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "Wallet paying for the transaction and new account" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "sysvarInstructions", - "isMut": false, - "isSigner": false, - "docs": [ - "Instructions sysvar account" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 39 - } - }, - { - "name": "TransferOutOfEscrow", - "accounts": [ - { - "name": "escrow", - "isMut": false, - "isSigner": false, - "docs": [ - "Escrow account" - ] - }, - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "Wallet paying for the transaction and new account" - ] - }, - { - "name": "attributeMint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint account for the new attribute" - ] - }, - { - "name": "attributeSrc", - "isMut": true, - "isSigner": false, - "docs": [ - "Token account source for the new attribute" - ] - }, - { - "name": "attributeDst", - "isMut": true, - "isSigner": false, - "docs": [ - "Token account, owned by TM, destination for the new attribute" - ] - }, - { - "name": "escrowMint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint account that the escrow is attached" - ] - }, - { - "name": "escrowAccount", - "isMut": false, - "isSigner": false, - "docs": [ - "Token account that holds the token the escrow is attached to" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "ataProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Associated Token program" - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Token program" - ] - }, - { - "name": "sysvarInstructions", - "isMut": false, - "isSigner": false, - "docs": [ - "Instructions sysvar account" - ] - }, - { - "name": "authority", - "isMut": false, - "isSigner": true, - "isOptional": true, - "docs": [ - "Authority/creator of the escrow account" - ] - } - ], - "args": [ - { - "name": "transferOutOfEscrowArgs", - "type": { - "defined": "TransferOutOfEscrowArgs" - } - } - ], - "legacyOptionalAccountsStrategy": true, - "discriminant": { - "type": "u8", - "value": 40 - } - }, - { - "name": "Burn", - "accounts": [ - { - "name": "authority", - "isMut": true, - "isSigner": true, - "docs": [ - "Asset owner or Utility delegate" - ] - }, - { - "name": "collectionMetadata", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Metadata of the Collection" - ] - }, - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "edition", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Edition of the asset" - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false, - "docs": [ - "Mint of token asset" - ] - }, - { - "name": "token", - "isMut": true, - "isSigner": false, - "docs": [ - "Token account to close" - ] - }, - { - "name": "masterEdition", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Master edition account" - ] - }, - { - "name": "masterEditionMint", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Master edition mint of the asset" - ] - }, - { - "name": "masterEditionToken", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Master edition token account" - ] - }, - { - "name": "editionMarker", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Edition marker account" - ] - }, - { - "name": "tokenRecord", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token record account" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "sysvarInstructions", - "isMut": false, - "isSigner": false, - "docs": [ - "Instructions sysvar account" - ] - }, - { - "name": "splTokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "SPL Token Program" - ] - } - ], - "args": [ - { - "name": "burnArgs", - "type": { - "defined": "BurnArgs" - } - } - ], - "discriminant": { - "type": "u8", - "value": 41 - } - }, - { - "name": "Create", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Unallocated metadata account with address as pda of ['metadata', program id, mint id]" - ] - }, - { - "name": "masterEdition", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Unallocated edition account with address as pda of ['metadata', program id, mint, 'edition']" - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false, - "docs": [ - "Mint of token asset" - ] - }, - { - "name": "authority", - "isMut": false, - "isSigner": true, - "docs": [ - "Mint authority" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "Payer" - ] - }, - { - "name": "updateAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "Update authority for the metadata account" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "sysvarInstructions", - "isMut": false, - "isSigner": false, - "docs": [ - "Instructions sysvar account" - ] - }, - { - "name": "splTokenProgram", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "SPL Token program" - ] - } - ], - "args": [ - { - "name": "createArgs", - "type": { - "defined": "CreateArgs" - } - } - ], - "discriminant": { - "type": "u8", - "value": 42 - } - }, - { - "name": "Mint", - "accounts": [ - { - "name": "token", - "isMut": true, - "isSigner": false, - "docs": [ - "Token or Associated Token account" - ] - }, - { - "name": "tokenOwner", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Owner of the token account" - ] - }, - { - "name": "metadata", - "isMut": false, - "isSigner": false, - "docs": [ - "Metadata account (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "masterEdition", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Master Edition account" - ] - }, - { - "name": "tokenRecord", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token record account" - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false, - "docs": [ - "Mint of token asset" - ] - }, - { - "name": "authority", - "isMut": false, - "isSigner": true, - "docs": [ - "(Mint or Update) authority" - ] - }, - { - "name": "delegateRecord", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Metadata delegate record" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "Payer" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "sysvarInstructions", - "isMut": false, - "isSigner": false, - "docs": [ - "Instructions sysvar account" - ] - }, - { - "name": "splTokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "SPL Token program" - ] - }, - { - "name": "splAtaProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "SPL Associated Token Account program" - ] - }, - { - "name": "authorizationRulesProgram", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules program" - ] - }, - { - "name": "authorizationRules", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules account" - ] - } - ], - "args": [ - { - "name": "mintArgs", - "type": { - "defined": "MintArgs" - } - } - ], - "discriminant": { - "type": "u8", - "value": 43 - } - }, - { - "name": "Delegate", - "accounts": [ - { - "name": "delegateRecord", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Delegate record account" - ] - }, - { - "name": "delegate", - "isMut": false, - "isSigner": false, - "docs": [ - "Owner of the delegated account" - ] - }, - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "masterEdition", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Master Edition account" - ] - }, - { - "name": "tokenRecord", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token record account" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of metadata" - ] - }, - { - "name": "token", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token account of mint" - ] - }, - { - "name": "authority", - "isMut": false, - "isSigner": true, - "docs": [ - "Update authority or token owner" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "Payer" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System Program" - ] - }, - { - "name": "sysvarInstructions", - "isMut": false, - "isSigner": false, - "docs": [ - "Instructions sysvar account" - ] - }, - { - "name": "splTokenProgram", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "SPL Token Program" - ] - }, - { - "name": "authorizationRulesProgram", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules Program" - ] - }, - { - "name": "authorizationRules", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules account" - ] - } - ], - "args": [ - { - "name": "delegateArgs", - "type": { - "defined": "DelegateArgs" - } - } - ], - "discriminant": { - "type": "u8", - "value": 44 - } - }, - { - "name": "Revoke", - "accounts": [ - { - "name": "delegateRecord", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Delegate record account" - ] - }, - { - "name": "delegate", - "isMut": false, - "isSigner": false, - "docs": [ - "Owner of the delegated account" - ] - }, - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "masterEdition", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Master Edition account" - ] - }, - { - "name": "tokenRecord", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token record account" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of metadata" - ] - }, - { - "name": "token", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token account of mint" - ] - }, - { - "name": "authority", - "isMut": false, - "isSigner": true, - "docs": [ - "Update authority or token owner" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "Payer" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System Program" - ] - }, - { - "name": "sysvarInstructions", - "isMut": false, - "isSigner": false, - "docs": [ - "Instructions sysvar account" - ] - }, - { - "name": "splTokenProgram", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "SPL Token Program" - ] - }, - { - "name": "authorizationRulesProgram", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules Program" - ] - }, - { - "name": "authorizationRules", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules account" - ] - } - ], - "args": [ - { - "name": "revokeArgs", - "type": { - "defined": "RevokeArgs" - } - } - ], - "discriminant": { - "type": "u8", - "value": 45 - } - }, - { - "name": "Lock", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true, - "docs": [ - "Delegate or freeze authority" - ] - }, - { - "name": "tokenOwner", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token owner account" - ] - }, - { - "name": "token", - "isMut": true, - "isSigner": false, - "docs": [ - "Token account" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint account" - ] - }, - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "edition", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Edition account" - ] - }, - { - "name": "tokenRecord", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token record account" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "Payer" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "sysvarInstructions", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "splTokenProgram", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "SPL Token Program" - ] - }, - { - "name": "authorizationRulesProgram", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules Program" - ] - }, - { - "name": "authorizationRules", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules account" - ] - } - ], - "args": [ - { - "name": "lockArgs", - "type": { - "defined": "LockArgs" - } - } - ], - "discriminant": { - "type": "u8", - "value": 46 - } - }, - { - "name": "Unlock", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true, - "docs": [ - "Delegate or freeze authority" - ] - }, - { - "name": "tokenOwner", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token owner account" - ] - }, - { - "name": "token", - "isMut": true, - "isSigner": false, - "docs": [ - "Token account" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint account" - ] - }, - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "edition", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Edition account" - ] - }, - { - "name": "tokenRecord", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token record account" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "Payer" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "sysvarInstructions", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "splTokenProgram", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "SPL Token Program" - ] - }, - { - "name": "authorizationRulesProgram", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules Program" - ] - }, - { - "name": "authorizationRules", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules account" - ] - } - ], - "args": [ - { - "name": "unlockArgs", - "type": { - "defined": "UnlockArgs" - } - } - ], - "discriminant": { - "type": "u8", - "value": 47 - } - }, - { - "name": "Migrate", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "edition", - "isMut": true, - "isSigner": false, - "docs": [ - "Edition account" - ] - }, - { - "name": "token", - "isMut": true, - "isSigner": false, - "docs": [ - "Token account" - ] - }, - { - "name": "tokenOwner", - "isMut": false, - "isSigner": false, - "docs": [ - "Token account owner" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint account" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "Payer" - ] - }, - { - "name": "authority", - "isMut": false, - "isSigner": true, - "docs": [ - "Update authority" - ] - }, - { - "name": "collectionMetadata", - "isMut": false, - "isSigner": false, - "docs": [ - "Collection metadata account" - ] - }, - { - "name": "delegateRecord", - "isMut": false, - "isSigner": false, - "docs": [ - "Delegate record account" - ] - }, - { - "name": "tokenRecord", - "isMut": true, - "isSigner": false, - "docs": [ - "Token record account" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "sysvarInstructions", - "isMut": false, - "isSigner": false, - "docs": [ - "Instruction sysvar account" - ] - }, - { - "name": "splTokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "SPL Token Program" - ] - }, - { - "name": "authorizationRulesProgram", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules Program" - ] - }, - { - "name": "authorizationRules", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules account" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 48 - } - }, - { - "name": "Transfer", - "accounts": [ - { - "name": "token", - "isMut": true, - "isSigner": false, - "docs": [ - "Token account" - ] - }, - { - "name": "tokenOwner", - "isMut": false, - "isSigner": false, - "docs": [ - "Token account owner" - ] - }, - { - "name": "destination", - "isMut": true, - "isSigner": false, - "docs": [ - "Destination token account" - ] - }, - { - "name": "destinationOwner", - "isMut": false, - "isSigner": false, - "docs": [ - "Destination token account owner" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of token asset" - ] - }, - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "edition", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Edition of token asset" - ] - }, - { - "name": "ownerTokenRecord", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Owner token record account" - ] - }, - { - "name": "destinationTokenRecord", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Destination token record account" - ] - }, - { - "name": "authority", - "isMut": false, - "isSigner": true, - "docs": [ - "Transfer authority (token owner or delegate)" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "Payer" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System Program" - ] - }, - { - "name": "sysvarInstructions", - "isMut": false, - "isSigner": false, - "docs": [ - "Instructions sysvar account" - ] - }, - { - "name": "splTokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "SPL Token Program" - ] - }, - { - "name": "splAtaProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "SPL Associated Token Account program" - ] - }, - { - "name": "authorizationRulesProgram", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules Program" - ] - }, - { - "name": "authorizationRules", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules account" - ] - } - ], - "args": [ - { - "name": "transferArgs", - "type": { - "defined": "TransferArgs" - } - } - ], - "discriminant": { - "type": "u8", - "value": 49 - } - }, - { - "name": "Update", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true, - "docs": [ - "Update authority or delegate" - ] - }, - { - "name": "delegateRecord", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Delegate record PDA" - ] - }, - { - "name": "token", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token account" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint account" - ] - }, - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "edition", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Edition account" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "Payer" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "sysvarInstructions", - "isMut": false, - "isSigner": false, - "docs": [ - "Instructions sysvar account" - ] - }, - { - "name": "authorizationRulesProgram", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules Program" - ] - }, - { - "name": "authorizationRules", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules account" - ] - } - ], - "args": [ - { - "name": "updateArgs", - "type": { - "defined": "UpdateArgs" - } - } - ], - "discriminant": { - "type": "u8", - "value": 50 - } - }, - { - "name": "Use", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true, - "docs": [ - "Token owner or delegate" - ] - }, - { - "name": "delegateRecord", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Delegate record PDA" - ] - }, - { - "name": "token", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token account" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint account" - ] - }, - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "edition", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Edition account" - ] - }, - { - "name": "payer", - "isMut": false, - "isSigner": true, - "docs": [ - "Payer" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "sysvarInstructions", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "splTokenProgram", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "SPL Token Program" - ] - }, - { - "name": "authorizationRulesProgram", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules Program" - ] - }, - { - "name": "authorizationRules", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token Authorization Rules account" - ] - } - ], - "args": [ - { - "name": "useArgs", - "type": { - "defined": "UseArgs" - } - } - ], - "discriminant": { - "type": "u8", - "value": 51 - } - }, - { - "name": "Verify", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true, - "docs": [ - "Creator to verify, collection update authority or delegate" - ] - }, - { - "name": "delegateRecord", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Delegate record PDA" - ] - }, - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "collectionMint", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Mint of the Collection" - ] - }, - { - "name": "collectionMetadata", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Metadata Account of the Collection" - ] - }, - { - "name": "collectionMasterEdition", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Master Edition Account of the Collection Token" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "sysvarInstructions", - "isMut": false, - "isSigner": false, - "docs": [ - "Instructions sysvar account" - ] - } - ], - "args": [ - { - "name": "verificationArgs", - "type": { - "defined": "VerificationArgs" - } - } - ], - "discriminant": { - "type": "u8", - "value": 52 - } - }, - { - "name": "Unverify", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true, - "docs": [ - "Creator to verify, collection (or metadata if parent burned) update authority or delegate" - ] - }, - { - "name": "delegateRecord", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Delegate record PDA" - ] - }, - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata account" - ] - }, - { - "name": "collectionMint", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Mint of the Collection" - ] - }, - { - "name": "collectionMetadata", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Metadata Account of the Collection" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - }, - { - "name": "sysvarInstructions", - "isMut": false, - "isSigner": false, - "docs": [ - "Instructions sysvar account" - ] - } - ], - "args": [ - { - "name": "verificationArgs", - "type": { - "defined": "VerificationArgs" - } - } - ], - "discriminant": { - "type": "u8", - "value": 53 - } - }, - { - "name": "Collect", - "accounts": [ - { - "name": "authority", - "isMut": false, - "isSigner": true, - "docs": [ - "Authority to collect fees" - ] - }, - { - "name": "recipient", - "isMut": false, - "isSigner": false, - "docs": [ - "The account to transfer collected fees to" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 54 - } - }, - { - "name": "Print", - "accounts": [ - { - "name": "editionMetadata", - "isMut": true, - "isSigner": false, - "docs": [ - "New Metadata key (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "edition", - "isMut": true, - "isSigner": false, - "docs": [ - "New Edition (pda of ['metadata', program id, mint id, 'edition'])" - ] - }, - { - "name": "editionMint", - "isMut": true, - "isSigner": false, - "docs": [ - "Mint of new token - THIS WILL TRANSFER AUTHORITY AWAY FROM THIS KEY" - ] - }, - { - "name": "editionTokenAccountOwner", - "isMut": false, - "isSigner": false, - "docs": [ - "Owner of the token account of new token" - ] - }, - { - "name": "editionTokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "Token account of new token" - ] - }, - { - "name": "editionMintAuthority", - "isMut": false, - "isSigner": true, - "docs": [ - "Mint authority of new mint" - ] - }, - { - "name": "editionTokenRecord", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token record account" - ] - }, - { - "name": "masterEdition", - "isMut": true, - "isSigner": false, - "docs": [ - "Master Record Edition V2 (pda of ['metadata', program id, master metadata mint id, 'edition'])" - ] - }, - { - "name": "editionMarkerPda", - "isMut": true, - "isSigner": false, - "docs": [ - "Edition pda to mark creation - will be checked for pre-existence. (pda of ['metadata', program id, master metadata mint id, 'edition', edition_number]) where edition_number is NOT the edition number you pass in args but actually edition_number = floor(edition/EDITION_MARKER_BIT_SIZE)." - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "payer" - ] - }, - { - "name": "masterTokenAccountOwner", - "isMut": false, - "isSigner": false, - "isOptionalSigner": true, - "docs": [ - "owner of token account containing master token" - ] - }, - { - "name": "masterTokenAccount", - "isMut": false, - "isSigner": false, - "docs": [ - "token account containing token from master metadata mint" - ] - }, - { - "name": "masterMetadata", - "isMut": false, - "isSigner": false, - "docs": [ - "Master record metadata account" - ] - }, - { - "name": "updateAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "The update authority of the master edition." - ] - }, - { - "name": "splTokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "Token program" - ] - }, - { - "name": "splAtaProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "SPL Associated Token Account program" - ] - }, - { - "name": "sysvarInstructions", - "isMut": false, - "isSigner": false, - "docs": [ - "Instructions sysvar account" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - } - ], - "args": [ - { - "name": "printArgs", - "type": { - "defined": "PrintArgs" - } - } - ], - "discriminant": { - "type": "u8", - "value": 55 - } - }, - { - "name": "Resize", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "The metadata account of the digital asset" - ] - }, - { - "name": "edition", - "isMut": true, - "isSigner": false, - "docs": [ - "The master edition or edition account of the digital asset, an uninitialized account for fungible assets" - ] - }, - { - "name": "mint", - "isMut": false, - "isSigner": false, - "docs": [ - "Mint of token asset" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": false, - "isOptionalSigner": true, - "docs": [ - "The recipient of the excess rent and authority if the authority account is not present" - ] - }, - { - "name": "authority", - "isMut": false, - "isSigner": true, - "isOptional": true, - "docs": [ - "Owner of the asset for (p)NFTs, or mint authority for fungible assets, if different from the payer" - ] - }, - { - "name": "token", - "isMut": false, - "isSigner": false, - "isOptional": true, - "docs": [ - "Token or Associated Token account" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "System program" - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 56 - } - }, - { - "name": "CloseAccounts", - "accounts": [ - { - "name": "metadata", - "isMut": true, - "isSigner": false, - "docs": [ - "Metadata (pda of ['metadata', program id, mint id])" - ] - }, - { - "name": "edition", - "isMut": true, - "isSigner": false, - "docs": [ - "Edition of the asset" - ] - }, - { - "name": "mint", - "isMut": true, - "isSigner": false, - "docs": [ - "Mint of token asset" - ] - }, - { - "name": "authority", - "isMut": false, - "isSigner": true, - "docs": [ - "Authority to close ownerless accounts" - ] - }, - { - "name": "destination", - "isMut": true, - "isSigner": false, - "docs": [ - "The destination account that will receive the rent." - ] - } - ], - "args": [], - "discriminant": { - "type": "u8", - "value": 57 - } - } - ], - "accounts": [ - { - "name": "CollectionAuthorityRecord", - "type": { - "kind": "struct", - "fields": [ - { - "name": "key", - "type": { - "defined": "Key" - } - }, - { - "name": "bump", - "type": "u8" - }, - { - "name": "updateAuthority", - "type": { - "option": "publicKey" - } - } - ] - } - }, - { - "name": "MetadataDelegateRecord", - "type": { - "kind": "struct", - "fields": [ - { - "name": "key", - "type": { - "defined": "Key" - } - }, - { - "name": "bump", - "type": "u8" - }, - { - "name": "mint", - "type": "publicKey" - }, - { - "name": "delegate", - "type": "publicKey" - }, - { - "name": "updateAuthority", - "type": "publicKey" - } - ] - } - }, - { - "name": "HolderDelegateRecord", - "type": { - "kind": "struct", - "fields": [ - { - "name": "key", - "type": { - "defined": "Key" - } - }, - { - "name": "bump", - "type": "u8" - }, - { - "name": "mint", - "type": "publicKey" - }, - { - "name": "delegate", - "type": "publicKey" - }, - { - "name": "updateAuthority", - "type": "publicKey" - } - ] - } - }, - { - "name": "Edition", - "type": { - "kind": "struct", - "fields": [ - { - "name": "key", - "type": { - "defined": "Key" - } - }, - { - "name": "parent", - "type": "publicKey" - }, - { - "name": "edition", - "type": "u64" - } - ] - } - }, - { - "name": "EditionMarker", - "type": { - "kind": "struct", - "fields": [ - { - "name": "key", - "type": { - "defined": "Key" - } - }, - { - "name": "ledger", - "type": { - "array": [ - "u8", - 31 - ] - } - } - ] - } - }, - { - "name": "EditionMarkerV2", - "type": { - "kind": "struct", - "fields": [ - { - "name": "key", - "type": { - "defined": "Key" - } - }, - { - "name": "ledger", - "type": "bytes" - } - ] - } - }, - { - "name": "TokenOwnedEscrow", - "type": { - "kind": "struct", - "fields": [ - { - "name": "key", - "type": { - "defined": "Key" - } - }, - { - "name": "baseToken", - "type": "publicKey" - }, - { - "name": "authority", - "type": { - "defined": "EscrowAuthority" - } - }, - { - "name": "bump", - "type": "u8" - } - ] - } - }, - { - "name": "MasterEditionV2", - "type": { - "kind": "struct", - "fields": [ - { - "name": "key", - "type": { - "defined": "Key" - } - }, - { - "name": "supply", - "type": "u64" - }, - { - "name": "maxSupply", - "type": { - "option": "u64" - } - } - ] - } - }, - { - "name": "MasterEditionV1", - "type": { - "kind": "struct", - "fields": [ - { - "name": "key", - "type": { - "defined": "Key" - } - }, - { - "name": "supply", - "type": "u64" - }, - { - "name": "maxSupply", - "type": { - "option": "u64" - } - }, - { - "name": "printingMint", - "type": "publicKey" - }, - { - "name": "oneTimePrintingAuthorizationMint", - "type": "publicKey" - } - ] - } - }, - { - "name": "Metadata", - "type": { - "kind": "struct", - "fields": [ - { - "name": "key", - "type": { - "defined": "Key" - } - }, - { - "name": "updateAuthority", - "type": "publicKey" - }, - { - "name": "mint", - "type": "publicKey" - }, - { - "name": "data", - "type": { - "defined": "Data" - } - }, - { - "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": "collectionDetails", - "type": { - "option": { - "defined": "CollectionDetails" - } - } - }, - { - "name": "programmableConfig", - "type": { - "option": { - "defined": "ProgrammableConfig" - } - } - } - ] - } - }, - { - "name": "TokenRecord", - "type": { - "kind": "struct", - "fields": [ - { - "name": "key", - "type": { - "defined": "Key" - } - }, - { - "name": "bump", - "type": "u8" - }, - { - "name": "state", - "type": { - "defined": "TokenState" - } - }, - { - "name": "ruleSetRevision", - "type": { - "option": "u64" - } - }, - { - "name": "delegate", - "type": { - "option": "publicKey" - } - }, - { - "name": "delegateRole", - "type": { - "option": { - "defined": "TokenDelegateRole" - } - } - }, - { - "name": "lockedTransfer", - "type": { - "option": "publicKey" - } - } - ] - } - }, - { - "name": "ReservationListV2", - "type": { - "kind": "struct", - "fields": [ - { - "name": "key", - "type": { - "defined": "Key" - } - }, - { - "name": "masterEdition", - "type": "publicKey" - }, - { - "name": "supplySnapshot", - "type": { - "option": "u64" - } - }, - { - "name": "reservations", - "type": { - "vec": { - "defined": "Reservation" - } - } - }, - { - "name": "totalReservationSpots", - "type": "u64" - }, - { - "name": "currentReservationSpots", - "type": "u64" - } - ] - } - }, - { - "name": "ReservationListV1", - "type": { - "kind": "struct", - "fields": [ - { - "name": "key", - "type": { - "defined": "Key" - } - }, - { - "name": "masterEdition", - "type": "publicKey" - }, - { - "name": "supplySnapshot", - "type": { - "option": "u64" - } - }, - { - "name": "reservations", - "type": { - "vec": { - "defined": "ReservationV1" - } - } - } - ] - } - }, - { - "name": "UseAuthorityRecord", - "type": { - "kind": "struct", - "fields": [ - { - "name": "key", - "type": { - "defined": "Key" - } - }, - { - "name": "allowedUses", - "type": "u64" - }, - { - "name": "bump", - "type": "u8" - } - ] - } - } - ], - "types": [ - { - "name": "SetCollectionSizeArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "size", - "type": "u64" - } - ] - } - }, - { - "name": "CreateMasterEditionArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "maxSupply", - "type": { - "option": "u64" - } - } - ] - } - }, - { - "name": "MintNewEditionFromMasterEditionViaTokenArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "edition", - "type": "u64" - } - ] - } - }, - { - "name": "TransferOutOfEscrowArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "amount", - "type": "u64" - } - ] - } - }, - { - "name": "CreateMetadataAccountArgsV3", - "type": { - "kind": "struct", - "fields": [ - { - "name": "data", - "type": { - "defined": "DataV2" - } - }, - { - "name": "isMutable", - "type": "bool" - }, - { - "name": "collectionDetails", - "type": { - "option": { - "defined": "CollectionDetails" - } - } - } - ] - } - }, - { - "name": "UpdateMetadataAccountArgsV2", - "type": { - "kind": "struct", - "fields": [ - { - "name": "data", - "type": { - "option": { - "defined": "DataV2" - } - } - }, - { - "name": "updateAuthority", - "type": { - "option": "publicKey" - } - }, - { - "name": "primarySaleHappened", - "type": { - "option": "bool" - } - }, - { - "name": "isMutable", - "type": { - "option": "bool" - } - } - ] - } - }, - { - "name": "ApproveUseAuthorityArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "numberOfUses", - "type": "u64" - } - ] - } - }, - { - "name": "UtilizeArgs", - "type": { - "kind": "struct", - "fields": [ - { - "name": "numberOfUses", - "type": "u64" - } - ] - } - }, - { - "name": "AuthorizationData", - "type": { - "kind": "struct", - "fields": [ - { - "name": "payload", - "type": { - "defined": "Payload" - } - } - ] - } - }, - { - "name": "AssetData", - "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": "Creator" - } - } - } - }, - { - "name": "primarySaleHappened", - "type": "bool" - }, - { - "name": "isMutable", - "type": "bool" - }, - { - "name": "tokenStandard", - "type": { - "defined": "TokenStandard" - } - }, - { - "name": "collection", - "type": { - "option": { - "defined": "Collection" - } - } - }, - { - "name": "uses", - "type": { - "option": { - "defined": "Uses" - } - } - }, - { - "name": "collectionDetails", - "type": { - "option": { - "defined": "CollectionDetails" - } - } - }, - { - "name": "ruleSet", - "type": { - "option": "publicKey" - } - } - ] - } - }, - { - "name": "Collection", - "type": { - "kind": "struct", - "fields": [ - { - "name": "verified", - "type": "bool" - }, - { - "name": "key", - "type": "publicKey" - } - ] - } - }, - { - "name": "Creator", - "type": { - "kind": "struct", - "fields": [ - { - "name": "address", - "type": "publicKey" - }, - { - "name": "verified", - "type": "bool" - }, - { - "name": "share", - "type": "u8" - } - ] - } - }, - { - "name": "Data", - "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": "Creator" - } - } - } - } - ] - } - }, - { - "name": "DataV2", - "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": "Creator" - } - } - } - }, - { - "name": "collection", - "type": { - "option": { - "defined": "Collection" - } - } - }, - { - "name": "uses", - "type": { - "option": { - "defined": "Uses" - } - } - } - ] - } - }, - { - "name": "Reservation", - "type": { - "kind": "struct", - "fields": [ - { - "name": "address", - "type": "publicKey" - }, - { - "name": "spotsRemaining", - "type": "u64" - }, - { - "name": "totalSpots", - "type": "u64" - } - ] - } - }, - { - "name": "ReservationV1", - "type": { - "kind": "struct", - "fields": [ - { - "name": "address", - "type": "publicKey" - }, - { - "name": "spotsRemaining", - "type": "u8" - }, - { - "name": "totalSpots", - "type": "u8" - } - ] - } - }, - { - "name": "SeedsVec", - "type": { - "kind": "struct", - "fields": [ - { - "name": "seeds", - "type": { - "vec": "bytes" - } - } - ] - } - }, - { - "name": "ProofInfo", - "type": { - "kind": "struct", - "fields": [ - { - "name": "proof", - "type": { - "vec": { - "array": [ - "u8", - 32 - ] - } - } - } - ] - } - }, - { - "name": "Payload", - "type": { - "kind": "struct", - "fields": [ - { - "name": "map", - "type": { - "hashMap": [ - "string", - { - "defined": "PayloadType" - } - ] - } - } - ] - } - }, - { - "name": "Uses", - "type": { - "kind": "struct", - "fields": [ - { - "name": "useMethod", - "type": { - "defined": "UseMethod" - } - }, - { - "name": "remaining", - "type": "u64" - }, - { - "name": "total", - "type": "u64" - } - ] - } - }, - { - "name": "BurnArgs", - "type": { - "kind": "enum", - "variants": [ - { - "name": "V1", - "fields": [ - { - "name": "amount", - "type": "u64" - } - ] - } - ] - } - }, - { - "name": "DelegateArgs", - "type": { - "kind": "enum", - "variants": [ - { - "name": "CollectionV1", - "fields": [ - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "SaleV1", - "fields": [ - { - "name": "amount", - "type": "u64" - }, - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "TransferV1", - "fields": [ - { - "name": "amount", - "type": "u64" - }, - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "DataV1", - "fields": [ - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "UtilityV1", - "fields": [ - { - "name": "amount", - "type": "u64" - }, - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "StakingV1", - "fields": [ - { - "name": "amount", - "type": "u64" - }, - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "StandardV1", - "fields": [ - { - "name": "amount", - "type": "u64" - } - ] - }, - { - "name": "LockedTransferV1", - "fields": [ - { - "name": "amount", - "type": "u64" - }, - { - "name": "locked_address", - "type": "publicKey" - }, - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "ProgrammableConfigV1", - "fields": [ - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "AuthorityItemV1", - "fields": [ - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "DataItemV1", - "fields": [ - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "CollectionItemV1", - "fields": [ - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "ProgrammableConfigItemV1", - "fields": [ - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "PrintDelegateV1", - "fields": [ - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - } - ] - } - }, - { - "name": "RevokeArgs", - "type": { - "kind": "enum", - "variants": [ - { - "name": "CollectionV1" - }, - { - "name": "SaleV1" - }, - { - "name": "TransferV1" - }, - { - "name": "DataV1" - }, - { - "name": "UtilityV1" - }, - { - "name": "StakingV1" - }, - { - "name": "StandardV1" - }, - { - "name": "LockedTransferV1" - }, - { - "name": "ProgrammableConfigV1" - }, - { - "name": "MigrationV1" - }, - { - "name": "AuthorityItemV1" - }, - { - "name": "DataItemV1" - }, - { - "name": "CollectionItemV1" - }, - { - "name": "ProgrammableConfigItemV1" - }, - { - "name": "PrintDelegateV1" - } - ] - } - }, - { - "name": "MetadataDelegateRole", - "type": { - "kind": "enum", - "variants": [ - { - "name": "AuthorityItem" - }, - { - "name": "Collection" - }, - { - "name": "Use" - }, - { - "name": "Data" - }, - { - "name": "ProgrammableConfig" - }, - { - "name": "DataItem" - }, - { - "name": "CollectionItem" - }, - { - "name": "ProgrammableConfigItem" - } - ] - } - }, - { - "name": "HolderDelegateRole", - "type": { - "kind": "enum", - "variants": [ - { - "name": "PrintDelegate" - } - ] - } - }, - { - "name": "CreateArgs", - "type": { - "kind": "enum", - "variants": [ - { - "name": "V1", - "fields": [ - { - "name": "asset_data", - "type": { - "defined": "AssetData" - } - }, - { - "name": "decimals", - "type": { - "option": "u8" - } - }, - { - "name": "print_supply", - "type": { - "option": { - "defined": "PrintSupply" - } - } - } - ] - } - ] - } - }, - { - "name": "MintArgs", - "type": { - "kind": "enum", - "variants": [ - { - "name": "V1", - "fields": [ - { - "name": "amount", - "type": "u64" - }, - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - } - ] - } - }, - { - "name": "TransferArgs", - "type": { - "kind": "enum", - "variants": [ - { - "name": "V1", - "fields": [ - { - "name": "amount", - "type": "u64" - }, - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - } - ] - } - }, - { - "name": "UpdateArgs", - "type": { - "kind": "enum", - "variants": [ - { - "name": "V1", - "fields": [ - { - "name": "new_update_authority", - "type": { - "option": "publicKey" - } - }, - { - "name": "data", - "type": { - "option": { - "defined": "Data" - } - } - }, - { - "name": "primary_sale_happened", - "type": { - "option": "bool" - } - }, - { - "name": "is_mutable", - "type": { - "option": "bool" - } - }, - { - "name": "collection", - "type": { - "defined": "CollectionToggle" - } - }, - { - "name": "collection_details", - "type": { - "defined": "CollectionDetailsToggle" - } - }, - { - "name": "uses", - "type": { - "defined": "UsesToggle" - } - }, - { - "name": "rule_set", - "type": { - "defined": "RuleSetToggle" - } - }, - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "AsUpdateAuthorityV2", - "fields": [ - { - "name": "new_update_authority", - "type": { - "option": "publicKey" - } - }, - { - "name": "data", - "type": { - "option": { - "defined": "Data" - } - } - }, - { - "name": "primary_sale_happened", - "type": { - "option": "bool" - } - }, - { - "name": "is_mutable", - "type": { - "option": "bool" - } - }, - { - "name": "collection", - "type": { - "defined": "CollectionToggle" - } - }, - { - "name": "collection_details", - "type": { - "defined": "CollectionDetailsToggle" - } - }, - { - "name": "uses", - "type": { - "defined": "UsesToggle" - } - }, - { - "name": "rule_set", - "type": { - "defined": "RuleSetToggle" - } - }, - { - "name": "token_standard", - "type": { - "option": { - "defined": "TokenStandard" - } - } - }, - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "AsAuthorityItemDelegateV2", - "fields": [ - { - "name": "new_update_authority", - "type": { - "option": "publicKey" - } - }, - { - "name": "primary_sale_happened", - "type": { - "option": "bool" - } - }, - { - "name": "is_mutable", - "type": { - "option": "bool" - } - }, - { - "name": "token_standard", - "type": { - "option": { - "defined": "TokenStandard" - } - } - }, - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "AsCollectionDelegateV2", - "fields": [ - { - "name": "collection", - "type": { - "defined": "CollectionToggle" - } - }, - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "AsDataDelegateV2", - "fields": [ - { - "name": "data", - "type": { - "option": { - "defined": "Data" - } - } - }, - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "AsProgrammableConfigDelegateV2", - "fields": [ - { - "name": "rule_set", - "type": { - "defined": "RuleSetToggle" - } - }, - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "AsDataItemDelegateV2", - "fields": [ - { - "name": "data", - "type": { - "option": { - "defined": "Data" - } - } - }, - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "AsCollectionItemDelegateV2", - "fields": [ - { - "name": "collection", - "type": { - "defined": "CollectionToggle" - } - }, - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - }, - { - "name": "AsProgrammableConfigItemDelegateV2", - "fields": [ - { - "name": "rule_set", - "type": { - "defined": "RuleSetToggle" - } - }, - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - } - ] - } - }, - { - "name": "CollectionToggle", - "type": { - "kind": "enum", - "variants": [ - { - "name": "None" - }, - { - "name": "Clear" - }, - { - "name": "Set", - "fields": [ - { - "defined": "Collection" - } - ] - } - ] - } - }, - { - "name": "UsesToggle", - "type": { - "kind": "enum", - "variants": [ - { - "name": "None" - }, - { - "name": "Clear" - }, - { - "name": "Set", - "fields": [ - { - "defined": "Uses" - } - ] - } - ] - } - }, - { - "name": "CollectionDetailsToggle", - "type": { - "kind": "enum", - "variants": [ - { - "name": "None" - }, - { - "name": "Clear" - }, - { - "name": "Set", - "fields": [ - { - "defined": "CollectionDetails" - } - ] - } - ] - } - }, - { - "name": "RuleSetToggle", - "type": { - "kind": "enum", - "variants": [ - { - "name": "None" - }, - { - "name": "Clear" - }, - { - "name": "Set", - "fields": [ - "publicKey" - ] - } - ] - } - }, - { - "name": "PrintArgs", - "type": { - "kind": "enum", - "variants": [ - { - "name": "V1", - "fields": [ - { - "name": "edition", - "type": "u64" - } - ] - }, - { - "name": "V2", - "fields": [ - { - "name": "edition", - "type": "u64" - } - ] - } - ] - } - }, - { - "name": "LockArgs", - "type": { - "kind": "enum", - "variants": [ - { - "name": "V1", - "fields": [ - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - } - ] - } - }, - { - "name": "UnlockArgs", - "type": { - "kind": "enum", - "variants": [ - { - "name": "V1", - "fields": [ - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - } - ] - } - }, - { - "name": "UseArgs", - "type": { - "kind": "enum", - "variants": [ - { - "name": "V1", - "fields": [ - { - "name": "authorization_data", - "type": { - "option": { - "defined": "AuthorizationData" - } - } - } - ] - } - ] - } - }, - { - "name": "VerificationArgs", - "type": { - "kind": "enum", - "variants": [ - { - "name": "CreatorV1" - }, - { - "name": "CollectionV1" - } - ] - } - }, - { - "name": "TokenStandard", - "type": { - "kind": "enum", - "variants": [ - { - "name": "NonFungible" - }, - { - "name": "FungibleAsset" - }, - { - "name": "Fungible" - }, - { - "name": "NonFungibleEdition" - }, - { - "name": "ProgrammableNonFungible" - }, - { - "name": "ProgrammableNonFungibleEdition" - } - ] - } - }, - { - "name": "Key", - "type": { - "kind": "enum", - "variants": [ - { - "name": "Uninitialized" - }, - { - "name": "EditionV1" - }, - { - "name": "MasterEditionV1" - }, - { - "name": "ReservationListV1" - }, - { - "name": "MetadataV1" - }, - { - "name": "ReservationListV2" - }, - { - "name": "MasterEditionV2" - }, - { - "name": "EditionMarker" - }, - { - "name": "UseAuthorityRecord" - }, - { - "name": "CollectionAuthorityRecord" - }, - { - "name": "TokenOwnedEscrow" - }, - { - "name": "TokenRecord" - }, - { - "name": "MetadataDelegate" - }, - { - "name": "EditionMarkerV2" - }, - { - "name": "HolderDelegate" - } - ] - } - }, - { - "name": "CollectionDetails", - "type": { - "kind": "enum", - "variants": [ - { - "name": "V1", - "fields": [ - { - "name": "size", - "type": "u64" - } - ] - }, - { - "name": "V2", - "fields": [ - { - "name": "padding", - "type": { - "array": [ - "u8", - 8 - ] - } - } - ] - } - ] - } - }, - { - "name": "EscrowAuthority", - "type": { - "kind": "enum", - "variants": [ - { - "name": "TokenOwner" - }, - { - "name": "Creator", - "fields": [ - "publicKey" - ] - } - ] - } - }, - { - "name": "PrintSupply", - "type": { - "kind": "enum", - "variants": [ - { - "name": "Zero" - }, - { - "name": "Limited", - "fields": [ - "u64" - ] - }, - { - "name": "Unlimited" - } - ] - } - }, - { - "name": "ProgrammableConfig", - "type": { - "kind": "enum", - "variants": [ - { - "name": "V1", - "fields": [ - { - "name": "rule_set", - "type": { - "option": "publicKey" - } - } - ] - } - ] - } - }, - { - "name": "MigrationType", - "type": { - "kind": "enum", - "variants": [ - { - "name": "CollectionV1" - }, - { - "name": "ProgrammableV1" - } - ] - } - }, - { - "name": "TokenState", - "type": { - "kind": "enum", - "variants": [ - { - "name": "Unlocked" - }, - { - "name": "Locked" - }, - { - "name": "Listed" - } - ] - } - }, - { - "name": "TokenDelegateRole", - "type": { - "kind": "enum", - "variants": [ - { - "name": "Sale" - }, - { - "name": "Transfer" - }, - { - "name": "Utility" - }, - { - "name": "Staking" - }, - { - "name": "Standard" - }, - { - "name": "LockedTransfer" - }, - { - "name": "Migration" - } - ] - } - }, - { - "name": "AuthorityType", - "type": { - "kind": "enum", - "variants": [ - { - "name": "None" - }, - { - "name": "Metadata" - }, - { - "name": "Holder" - }, - { - "name": "MetadataDelegate" - }, - { - "name": "TokenDelegate" - } - ] - } - }, - { - "name": "PayloadKey", - "type": { - "kind": "enum", - "variants": [ - { - "name": "Amount" - }, - { - "name": "Authority" - }, - { - "name": "AuthoritySeeds" - }, - { - "name": "Delegate" - }, - { - "name": "DelegateSeeds" - }, - { - "name": "Destination" - }, - { - "name": "DestinationSeeds" - }, - { - "name": "Holder" - }, - { - "name": "Source" - }, - { - "name": "SourceSeeds" - } - ] - } - }, - { - "name": "PayloadType", - "type": { - "kind": "enum", - "variants": [ - { - "name": "Pubkey", - "fields": [ - "publicKey" - ] - }, - { - "name": "Seeds", - "fields": [ - { - "defined": "SeedsVec" - } - ] - }, - { - "name": "MerkleProof", - "fields": [ - { - "defined": "ProofInfo" - } - ] - }, - { - "name": "Number", - "fields": [ - "u64" - ] - } - ] - } - }, - { - "name": "UseMethod", - "type": { - "kind": "enum", - "variants": [ - { - "name": "Burn" - }, - { - "name": "Multiple" - }, - { - "name": "Single" - } - ] - } - } - ], - "errors": [ - { - "code": 0, - "name": "InstructionUnpackError", - "msg": "" - }, - { - "code": 1, - "name": "InstructionPackError", - "msg": "" - }, - { - "code": 2, - "name": "NotRentExempt", - "msg": "Lamport balance below rent-exempt threshold" - }, - { - "code": 3, - "name": "AlreadyInitialized", - "msg": "Already initialized" - }, - { - "code": 4, - "name": "Uninitialized", - "msg": "Uninitialized" - }, - { - "code": 5, - "name": "InvalidMetadataKey", - "msg": " Metadata's key must match seed of ['metadata', program id, mint] provided" - }, - { - "code": 6, - "name": "InvalidEditionKey", - "msg": "Edition's key must match seed of ['metadata', program id, name, 'edition'] provided" - }, - { - "code": 7, - "name": "UpdateAuthorityIncorrect", - "msg": "Update Authority given does not match" - }, - { - "code": 8, - "name": "UpdateAuthorityIsNotSigner", - "msg": "Update Authority needs to be signer to update metadata" - }, - { - "code": 9, - "name": "NotMintAuthority", - "msg": "You must be the mint authority and signer on this transaction" - }, - { - "code": 10, - "name": "InvalidMintAuthority", - "msg": "Mint authority provided does not match the authority on the mint" - }, - { - "code": 11, - "name": "NameTooLong", - "msg": "Name too long" - }, - { - "code": 12, - "name": "SymbolTooLong", - "msg": "Symbol too long" - }, - { - "code": 13, - "name": "UriTooLong", - "msg": "URI too long" - }, - { - "code": 14, - "name": "UpdateAuthorityMustBeEqualToMetadataAuthorityAndSigner", - "msg": "" - }, - { - "code": 15, - "name": "MintMismatch", - "msg": "Mint given does not match mint on Metadata" - }, - { - "code": 16, - "name": "EditionsMustHaveExactlyOneToken", - "msg": "Editions must have exactly one token" - }, - { - "code": 17, - "name": "MaxEditionsMintedAlready", - "msg": "" - }, - { - "code": 18, - "name": "TokenMintToFailed", - "msg": "" - }, - { - "code": 19, - "name": "MasterRecordMismatch", - "msg": "" - }, - { - "code": 20, - "name": "DestinationMintMismatch", - "msg": "" - }, - { - "code": 21, - "name": "EditionAlreadyMinted", - "msg": "" - }, - { - "code": 22, - "name": "PrintingMintDecimalsShouldBeZero", - "msg": "" - }, - { - "code": 23, - "name": "OneTimePrintingAuthorizationMintDecimalsShouldBeZero", - "msg": "" - }, - { - "code": 24, - "name": "EditionMintDecimalsShouldBeZero", - "msg": "EditionMintDecimalsShouldBeZero" - }, - { - "code": 25, - "name": "TokenBurnFailed", - "msg": "" - }, - { - "code": 26, - "name": "TokenAccountOneTimeAuthMintMismatch", - "msg": "" - }, - { - "code": 27, - "name": "DerivedKeyInvalid", - "msg": "Derived key invalid" - }, - { - "code": 28, - "name": "PrintingMintMismatch", - "msg": "The Printing mint does not match that on the master edition!" - }, - { - "code": 29, - "name": "OneTimePrintingAuthMintMismatch", - "msg": "The One Time Printing Auth mint does not match that on the master edition!" - }, - { - "code": 30, - "name": "TokenAccountMintMismatch", - "msg": "The mint of the token account does not match the Printing mint!" - }, - { - "code": 31, - "name": "TokenAccountMintMismatchV2", - "msg": "The mint of the token account does not match the master metadata mint!" - }, - { - "code": 32, - "name": "NotEnoughTokens", - "msg": "Not enough tokens to mint a limited edition" - }, - { - "code": 33, - "name": "PrintingMintAuthorizationAccountMismatch", - "msg": "" - }, - { - "code": 34, - "name": "AuthorizationTokenAccountOwnerMismatch", - "msg": "" - }, - { - "code": 35, - "name": "Disabled", - "msg": "" - }, - { - "code": 36, - "name": "CreatorsTooLong", - "msg": "Creators list too long" - }, - { - "code": 37, - "name": "CreatorsMustBeAtleastOne", - "msg": "Creators must be at least one if set" - }, - { - "code": 38, - "name": "MustBeOneOfCreators", - "msg": "" - }, - { - "code": 39, - "name": "NoCreatorsPresentOnMetadata", - "msg": "This metadata does not have creators" - }, - { - "code": 40, - "name": "CreatorNotFound", - "msg": "This creator address was not found" - }, - { - "code": 41, - "name": "InvalidBasisPoints", - "msg": "Basis points cannot be more than 10000" - }, - { - "code": 42, - "name": "PrimarySaleCanOnlyBeFlippedToTrue", - "msg": "Primary sale can only be flipped to true and is immutable" - }, - { - "code": 43, - "name": "OwnerMismatch", - "msg": "Owner does not match that on the account given" - }, - { - "code": 44, - "name": "NoBalanceInAccountForAuthorization", - "msg": "This account has no tokens to be used for authorization" - }, - { - "code": 45, - "name": "ShareTotalMustBe100", - "msg": "Share total must equal 100 for creator array" - }, - { - "code": 46, - "name": "ReservationExists", - "msg": "" - }, - { - "code": 47, - "name": "ReservationDoesNotExist", - "msg": "" - }, - { - "code": 48, - "name": "ReservationNotSet", - "msg": "" - }, - { - "code": 49, - "name": "ReservationAlreadyMade", - "msg": "" - }, - { - "code": 50, - "name": "BeyondMaxAddressSize", - "msg": "" - }, - { - "code": 51, - "name": "NumericalOverflowError", - "msg": "NumericalOverflowError" - }, - { - "code": 52, - "name": "ReservationBreachesMaximumSupply", - "msg": "" - }, - { - "code": 53, - "name": "AddressNotInReservation", - "msg": "" - }, - { - "code": 54, - "name": "CannotVerifyAnotherCreator", - "msg": "You cannot unilaterally verify another creator, they must sign" - }, - { - "code": 55, - "name": "CannotUnverifyAnotherCreator", - "msg": "You cannot unilaterally unverify another creator" - }, - { - "code": 56, - "name": "SpotMismatch", - "msg": "" - }, - { - "code": 57, - "name": "IncorrectOwner", - "msg": "Incorrect account owner" - }, - { - "code": 58, - "name": "PrintingWouldBreachMaximumSupply", - "msg": "" - }, - { - "code": 59, - "name": "DataIsImmutable", - "msg": "Data is immutable" - }, - { - "code": 60, - "name": "DuplicateCreatorAddress", - "msg": "No duplicate creator addresses" - }, - { - "code": 61, - "name": "ReservationSpotsRemainingShouldMatchTotalSpotsAtStart", - "msg": "" - }, - { - "code": 62, - "name": "InvalidTokenProgram", - "msg": "Invalid token program" - }, - { - "code": 63, - "name": "DataTypeMismatch", - "msg": "Data type mismatch" - }, - { - "code": 64, - "name": "BeyondAlottedAddressSize", - "msg": "" - }, - { - "code": 65, - "name": "ReservationNotComplete", - "msg": "" - }, - { - "code": 66, - "name": "TriedToReplaceAnExistingReservation", - "msg": "" - }, - { - "code": 67, - "name": "InvalidOperation", - "msg": "Invalid operation" - }, - { - "code": 68, - "name": "InvalidOwner", - "msg": "Invalid Owner" - }, - { - "code": 69, - "name": "PrintingMintSupplyMustBeZeroForConversion", - "msg": "Printing mint supply must be zero for conversion" - }, - { - "code": 70, - "name": "OneTimeAuthMintSupplyMustBeZeroForConversion", - "msg": "One Time Auth mint supply must be zero for conversion" - }, - { - "code": 71, - "name": "InvalidEditionIndex", - "msg": "You tried to insert one edition too many into an edition mark pda" - }, - { - "code": 72, - "name": "ReservationArrayShouldBeSizeOne", - "msg": "" - }, - { - "code": 73, - "name": "IsMutableCanOnlyBeFlippedToFalse", - "msg": "Is Mutable can only be flipped to false" - }, - { - "code": 74, - "name": "CollectionCannotBeVerifiedInThisInstruction", - "msg": "Collection cannot be verified in this instruction" - }, - { - "code": 75, - "name": "Removed", - "msg": "This instruction was deprecated in a previous release and is now removed" - }, - { - "code": 76, - "name": "MustBeBurned", - "msg": "" - }, - { - "code": 77, - "name": "InvalidUseMethod", - "msg": "This use method is invalid" - }, - { - "code": 78, - "name": "CannotChangeUseMethodAfterFirstUse", - "msg": "Cannot Change Use Method after the first use" - }, - { - "code": 79, - "name": "CannotChangeUsesAfterFirstUse", - "msg": "Cannot Change Remaining or Available uses after the first use" - }, - { - "code": 80, - "name": "CollectionNotFound", - "msg": "Collection Not Found on Metadata" - }, - { - "code": 81, - "name": "InvalidCollectionUpdateAuthority", - "msg": "Collection Update Authority is invalid" - }, - { - "code": 82, - "name": "CollectionMustBeAUniqueMasterEdition", - "msg": "Collection Must Be a Unique Master Edition v2" - }, - { - "code": 83, - "name": "UseAuthorityRecordAlreadyExists", - "msg": "The Use Authority Record Already Exists, to modify it Revoke, then Approve" - }, - { - "code": 84, - "name": "UseAuthorityRecordAlreadyRevoked", - "msg": "The Use Authority Record is empty or already revoked" - }, - { - "code": 85, - "name": "Unusable", - "msg": "This token has no uses" - }, - { - "code": 86, - "name": "NotEnoughUses", - "msg": "There are not enough Uses left on this token." - }, - { - "code": 87, - "name": "CollectionAuthorityRecordAlreadyExists", - "msg": "This Collection Authority Record Already Exists." - }, - { - "code": 88, - "name": "CollectionAuthorityDoesNotExist", - "msg": "This Collection Authority Record Does Not Exist." - }, - { - "code": 89, - "name": "InvalidUseAuthorityRecord", - "msg": "This Use Authority Record is invalid." - }, - { - "code": 90, - "name": "InvalidCollectionAuthorityRecord", - "msg": "" - }, - { - "code": 91, - "name": "InvalidFreezeAuthority", - "msg": "Metadata does not match the freeze authority on the mint" - }, - { - "code": 92, - "name": "InvalidDelegate", - "msg": "All tokens in this account have not been delegated to this user." - }, - { - "code": 93, - "name": "CannotAdjustVerifiedCreator", - "msg": "" - }, - { - "code": 94, - "name": "CannotRemoveVerifiedCreator", - "msg": "Verified creators cannot be removed." - }, - { - "code": 95, - "name": "CannotWipeVerifiedCreators", - "msg": "" - }, - { - "code": 96, - "name": "NotAllowedToChangeSellerFeeBasisPoints", - "msg": "" - }, - { - "code": 97, - "name": "EditionOverrideCannotBeZero", - "msg": "Edition override cannot be zero" - }, - { - "code": 98, - "name": "InvalidUser", - "msg": "Invalid User" - }, - { - "code": 99, - "name": "RevokeCollectionAuthoritySignerIncorrect", - "msg": "Revoke Collection Authority signer is incorrect" - }, - { - "code": 100, - "name": "TokenCloseFailed", - "msg": "" - }, - { - "code": 101, - "name": "UnsizedCollection", - "msg": "Can't use this function on unsized collection" - }, - { - "code": 102, - "name": "SizedCollection", - "msg": "Can't use this function on a sized collection" - }, - { - "code": 103, - "name": "MissingCollectionMetadata", - "msg": "Missing collection metadata account" - }, - { - "code": 104, - "name": "NotAMemberOfCollection", - "msg": "This NFT is not a member of the specified collection." - }, - { - "code": 105, - "name": "NotVerifiedMemberOfCollection", - "msg": "This NFT is not a verified member of the specified collection." - }, - { - "code": 106, - "name": "NotACollectionParent", - "msg": "This NFT is not a collection parent NFT." - }, - { - "code": 107, - "name": "CouldNotDetermineTokenStandard", - "msg": "Could not determine a TokenStandard type." - }, - { - "code": 108, - "name": "MissingEditionAccount", - "msg": "This mint account has an edition but none was provided." - }, - { - "code": 109, - "name": "NotAMasterEdition", - "msg": "This edition is not a Master Edition" - }, - { - "code": 110, - "name": "MasterEditionHasPrints", - "msg": "This Master Edition has existing prints" - }, - { - "code": 111, - "name": "BorshDeserializationError", - "msg": "" - }, - { - "code": 112, - "name": "CannotUpdateVerifiedCollection", - "msg": "Cannot update a verified collection in this command" - }, - { - "code": 113, - "name": "CollectionMasterEditionAccountInvalid", - "msg": "Edition account doesnt match collection " - }, - { - "code": 114, - "name": "AlreadyVerified", - "msg": "Item is already verified." - }, - { - "code": 115, - "name": "AlreadyUnverified", - "msg": "" - }, - { - "code": 116, - "name": "NotAPrintEdition", - "msg": "This edition is not a Print Edition" - }, - { - "code": 117, - "name": "InvalidMasterEdition", - "msg": "Invalid Master Edition" - }, - { - "code": 118, - "name": "InvalidPrintEdition", - "msg": "Invalid Print Edition" - }, - { - "code": 119, - "name": "InvalidEditionMarker", - "msg": "Invalid Edition Marker" - }, - { - "code": 120, - "name": "ReservationListDeprecated", - "msg": "Reservation List is Deprecated" - }, - { - "code": 121, - "name": "PrintEditionDoesNotMatchMasterEdition", - "msg": "Print Edition does not match Master Edition" - }, - { - "code": 122, - "name": "EditionNumberGreaterThanMaxSupply", - "msg": "Edition Number greater than max supply" - }, - { - "code": 123, - "name": "MustUnverify", - "msg": "Must unverify before migrating collections." - }, - { - "code": 124, - "name": "InvalidEscrowBumpSeed", - "msg": "Invalid Escrow Account Bump Seed" - }, - { - "code": 125, - "name": "MustBeEscrowAuthority", - "msg": "Must Escrow Authority" - }, - { - "code": 126, - "name": "InvalidSystemProgram", - "msg": "Invalid System Program" - }, - { - "code": 127, - "name": "MustBeNonFungible", - "msg": "Must be a Non Fungible Token" - }, - { - "code": 128, - "name": "InsufficientTokens", - "msg": "Insufficient tokens for transfer" - }, - { - "code": 129, - "name": "BorshSerializationError", - "msg": "Borsh Serialization Error" - }, - { - "code": 130, - "name": "NoFreezeAuthoritySet", - "msg": "Cannot create NFT with no Freeze Authority." - }, - { - "code": 131, - "name": "InvalidCollectionSizeChange", - "msg": "Invalid collection size change" - }, - { - "code": 132, - "name": "InvalidBubblegumSigner", - "msg": "Invalid bubblegum signer" - }, - { - "code": 133, - "name": "EscrowParentHasDelegate", - "msg": "Escrow parent cannot have a delegate" - }, - { - "code": 134, - "name": "MintIsNotSigner", - "msg": "Mint needs to be signer to initialize the account" - }, - { - "code": 135, - "name": "InvalidTokenStandard", - "msg": "Invalid token standard" - }, - { - "code": 136, - "name": "InvalidMintForTokenStandard", - "msg": "Invalid mint account for specified token standard" - }, - { - "code": 137, - "name": "InvalidAuthorizationRules", - "msg": "Invalid authorization rules account" - }, - { - "code": 138, - "name": "MissingAuthorizationRules", - "msg": "Missing authorization rules account" - }, - { - "code": 139, - "name": "MissingProgrammableConfig", - "msg": "Missing programmable configuration" - }, - { - "code": 140, - "name": "InvalidProgrammableConfig", - "msg": "Invalid programmable configuration" - }, - { - "code": 141, - "name": "DelegateAlreadyExists", - "msg": "Delegate already exists" - }, - { - "code": 142, - "name": "DelegateNotFound", - "msg": "Delegate not found" - }, - { - "code": 143, - "name": "MissingAccountInBuilder", - "msg": "Required account not set in instruction builder" - }, - { - "code": 144, - "name": "MissingArgumentInBuilder", - "msg": "Required argument not set in instruction builder" - }, - { - "code": 145, - "name": "FeatureNotSupported", - "msg": "Feature not supported currently" - }, - { - "code": 146, - "name": "InvalidSystemWallet", - "msg": "Invalid system wallet" - }, - { - "code": 147, - "name": "OnlySaleDelegateCanTransfer", - "msg": "Only the sale delegate can transfer while its set" - }, - { - "code": 148, - "name": "MissingTokenAccount", - "msg": "Missing token account" - }, - { - "code": 149, - "name": "MissingSplTokenProgram", - "msg": "Missing SPL token program" - }, - { - "code": 150, - "name": "MissingAuthorizationRulesProgram", - "msg": "Missing authorization rules program" - }, - { - "code": 151, - "name": "InvalidDelegateRoleForTransfer", - "msg": "Invalid delegate role for transfer" - }, - { - "code": 152, - "name": "InvalidTransferAuthority", - "msg": "Invalid transfer authority" - }, - { - "code": 153, - "name": "InstructionNotSupported", - "msg": "Instruction not supported for ProgrammableNonFungible assets" - }, - { - "code": 154, - "name": "KeyMismatch", - "msg": "Public key does not match expected value" - }, - { - "code": 155, - "name": "LockedToken", - "msg": "Token is locked" - }, - { - "code": 156, - "name": "UnlockedToken", - "msg": "Token is unlocked" - }, - { - "code": 157, - "name": "MissingDelegateRole", - "msg": "Missing delegate role" - }, - { - "code": 158, - "name": "InvalidAuthorityType", - "msg": "Invalid authority type" - }, - { - "code": 159, - "name": "MissingTokenRecord", - "msg": "Missing token record account" - }, - { - "code": 160, - "name": "MintSupplyMustBeZero", - "msg": "Mint supply must be zero for programmable assets" - }, - { - "code": 161, - "name": "DataIsEmptyOrZeroed", - "msg": "Data is empty or zeroed" - }, - { - "code": 162, - "name": "MissingTokenOwnerAccount", - "msg": "Missing token owner" - }, - { - "code": 163, - "name": "InvalidMasterEditionAccountLength", - "msg": "Master edition account has an invalid length" - }, - { - "code": 164, - "name": "IncorrectTokenState", - "msg": "Incorrect token state" - }, - { - "code": 165, - "name": "InvalidDelegateRole", - "msg": "Invalid delegate role" - }, - { - "code": 166, - "name": "MissingPrintSupply", - "msg": "Print supply is required for non-fungibles" - }, - { - "code": 167, - "name": "MissingMasterEditionAccount", - "msg": "Missing master edition account" - }, - { - "code": 168, - "name": "AmountMustBeGreaterThanZero", - "msg": "Amount must be greater than zero" - }, - { - "code": 169, - "name": "InvalidDelegateArgs", - "msg": "Invalid delegate args" - }, - { - "code": 170, - "name": "MissingLockedTransferAddress", - "msg": "Missing address for locked transfer" - }, - { - "code": 171, - "name": "InvalidLockedTransferAddress", - "msg": "Invalid destination address for locked transfer" - }, - { - "code": 172, - "name": "DataIncrementLimitExceeded", - "msg": "Exceeded account realloc increase limit" - }, - { - "code": 173, - "name": "CannotUpdateAssetWithDelegate", - "msg": "Cannot update the rule set of a programmable asset that has a delegate" - }, - { - "code": 174, - "name": "InvalidAmount", - "msg": "Invalid token amount for this operation or token standard" - }, - { - "code": 175, - "name": "MissingMasterEditionMintAccount", - "msg": "Missing master edition mint account" - }, - { - "code": 176, - "name": "MissingMasterEditionTokenAccount", - "msg": "Missing master edition token account" - }, - { - "code": 177, - "name": "MissingEditionMarkerAccount", - "msg": "Missing edition marker account" - }, - { - "code": 178, - "name": "CannotBurnWithDelegate", - "msg": "Cannot burn while persistent delegate is set" - }, - { - "code": 179, - "name": "MissingEdition", - "msg": "Missing edition account" - }, - { - "code": 180, - "name": "InvalidAssociatedTokenAccountProgram", - "msg": "Invalid Associated Token Account Program" - }, - { - "code": 181, - "name": "InvalidInstructionsSysvar", - "msg": "Invalid InstructionsSysvar" - }, - { - "code": 182, - "name": "InvalidParentAccounts", - "msg": "Invalid or Unneeded parent accounts" - }, - { - "code": 183, - "name": "InvalidUpdateArgs", - "msg": "Authority cannot apply all update args" - }, - { - "code": 184, - "name": "InsufficientTokenBalance", - "msg": "Token account does not have enough tokens" - }, - { - "code": 185, - "name": "MissingCollectionMint", - "msg": "Missing collection account" - }, - { - "code": 186, - "name": "MissingCollectionMasterEdition", - "msg": "Missing collection master edition account" - }, - { - "code": 187, - "name": "InvalidTokenRecord", - "msg": "Invalid token record account" - }, - { - "code": 188, - "name": "InvalidCloseAuthority", - "msg": "The close authority needs to be revoked by the Utility Delegate" - }, - { - "code": 189, - "name": "InvalidInstruction", - "msg": "Invalid or removed instruction" - }, - { - "code": 190, - "name": "MissingDelegateRecord", - "msg": "Missing delegate record" - }, - { - "code": 191, - "name": "InvalidFeeAccount", - "msg": "" - }, - { - "code": 192, - "name": "InvalidMetadataFlags", - "msg": "" - }, - { - "code": 193, - "name": "CannotChangeUpdateAuthorityWithDelegate", - "msg": "Cannot change the update authority with a delegate" - }, - { - "code": 194, - "name": "InvalidMintExtensionType", - "msg": "Invalid mint extension type" - }, - { - "code": 195, - "name": "InvalidMintCloseAuthority", - "msg": "Invalid mint close authority" - }, - { - "code": 196, - "name": "InvalidMetadataPointer", - "msg": "Invalid metadata pointer" - }, - { - "code": 197, - "name": "InvalidTokenExtensionType", - "msg": "Invalid token extension type" - }, - { - "code": 198, - "name": "MissingImmutableOwnerExtension", - "msg": "Missing immutable owner extension" - }, - { - "code": 199, - "name": "ExpectedUninitializedAccount", - "msg": "Expected account to be uninitialized" - }, - { - "code": 200, - "name": "InvalidEditionAccountLength", - "msg": "Edition account has an invalid length" - }, - { - "code": 201, - "name": "AccountAlreadyResized", - "msg": "Account has already been resized" - }, - { - "code": 202, - "name": "ConditionsForClosingNotMet", - "msg": "Conditions for closing not met" - } - ], - "metadata": { - "origin": "shank", - "address": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s", - "binaryVersion": "0.3.0", - "libVersion": "0.3.0" - } -} \ No newline at end of file diff --git a/idls/moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM.metadao_launchpad.json b/idls/moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM.metadao_launchpad.json deleted file mode 100644 index 0bf7c0c..0000000 --- a/idls/moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM.metadao_launchpad.json +++ /dev/null @@ -1 +0,0 @@ -{"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/nft.BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY.metaplex_bubblegum.V0_12_0.from_solscan.json b/idls/nft.BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY.metaplex_bubblegum.V0_12_0.from_solscan.json new file mode 100644 index 0000000..10a7b96 --- /dev/null +++ b/idls/nft.BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY.metaplex_bubblegum.V0_12_0.from_solscan.json @@ -0,0 +1,1984 @@ +{ + "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/nft.TCMPhJdwDryooaGtiocG1u3xcYbRpiJzb283XfCZsDp.tensor_cnft.V2_0_1.from_solscan.json b/idls/nft.TCMPhJdwDryooaGtiocG1u3xcYbRpiJzb283XfCZsDp.tensor_cnft.V2_0_1.from_solscan.json new file mode 100644 index 0000000..1790a82 --- /dev/null +++ b/idls/nft.TCMPhJdwDryooaGtiocG1u3xcYbRpiJzb283XfCZsDp.tensor_cnft.V2_0_1.from_solscan.json @@ -0,0 +1,2941 @@ +{ + "version": "2.0.1", + "name": "tcomp", + "constants": [ + { + "name": "CURRENT_TCOMP_VERSION", + "type": "u8", + "value": "1" + }, + { + "name": "TCOMP_FEE_BPS", + "type": "u16", + "value": "150" + }, + { + "name": "MAX_EXPIRY_SEC", + "type": "i64", + "value": "31536000" + }, + { + "name": "MAKER_BROKER_PCT", + "type": "u16", + "value": "0" + }, + { + "name": "LIST_STATE_SIZE", + "type": { + "defined": "usize" + }, + "value": "8 + 1 + 1 + (32 * 2) + 8 + 33 + 8 + (33 * 2) + 128" + }, + { + "name": "BID_STATE_SIZE", + "type": { + "defined": "usize" + }, + "value": "8 + 1 + 1 + (32 * 2) + 1 + 32 + 2 + 33 + 4 * 2 + 8 + 33 + 8 + (33 * 3) + 128" + } + ], + "instructions": [ + { + "name": "tcompNoop", + "accounts": [ + { + "name": "tcompSigner", + "isMut": false, + "isSigner": true + } + ], + "args": [ + { + "name": "event", + "type": { + "defined": "TcompEvent" + } + } + ] + }, + { + "name": "withdrawFees", + "accounts": [ + { + "name": "tswap", + "isMut": true, + "isSigner": false + }, + { + "name": "tcomp", + "isMut": true, + "isSigner": false + }, + { + "name": "cosigner", + "isMut": false, + "isSigner": true, + "docs": [ + "We ask also for a signature just to make sure this wallet can actually sign things" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": true + }, + { + "name": "destination", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "amount", + "type": "u64" + } + ] + }, + { + "name": "buy", + "accounts": [ + { + "name": "tcomp", + "isMut": true, + "isSigner": false + }, + { + "name": "treeAuthority", + "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 + }, + { + "name": "bubblegumProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "listState", + "isMut": true, + "isSigner": false + }, + { + "name": "buyer", + "isMut": false, + "isSigner": false + }, + { + "name": "payer", + "isMut": true, + "isSigner": true + }, + { + "name": "owner", + "isMut": true, + "isSigner": false + }, + { + "name": "takerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "makerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "rentDest", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "nonce", + "type": "u64" + }, + { + "name": "index", + "type": "u32" + }, + { + "name": "root", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "metaHash", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "creatorShares", + "type": "bytes" + }, + { + "name": "creatorVerified", + "type": { + "vec": "bool" + } + }, + { + "name": "sellerFeeBasisPoints", + "type": "u16" + }, + { + "name": "maxAmount", + "type": "u64" + }, + { + "name": "optionalRoyaltyPct", + "type": { + "option": "u16" + } + } + ] + }, + { + "name": "buySpl", + "accounts": [ + { + "name": "tcomp", + "isMut": true, + "isSigner": false + }, + { + "name": "tcompAta", + "isMut": true, + "isSigner": false + }, + { + "name": "treeAuthority", + "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 + }, + { + "name": "bubblegumProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "associatedTokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "listState", + "isMut": true, + "isSigner": false + }, + { + "name": "buyer", + "isMut": false, + "isSigner": false + }, + { + "name": "payer", + "isMut": false, + "isSigner": true + }, + { + "name": "payerSource", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": false, + "isSigner": false + }, + { + "name": "ownerDest", + "isMut": true, + "isSigner": false + }, + { + "name": "currency", + "isMut": false, + "isSigner": false + }, + { + "name": "takerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "takerBrokerAta", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "makerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "makerBrokerAta", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "rentDest", + "isMut": true, + "isSigner": false + }, + { + "name": "rentPayer", + "isMut": true, + "isSigner": true + } + ], + "args": [ + { + "name": "nonce", + "type": "u64" + }, + { + "name": "index", + "type": "u32" + }, + { + "name": "root", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "metaHash", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "creatorShares", + "type": "bytes" + }, + { + "name": "creatorVerified", + "type": { + "vec": "bool" + } + }, + { + "name": "sellerFeeBasisPoints", + "type": "u16" + }, + { + "name": "maxAmount", + "type": "u64" + }, + { + "name": "optionalRoyaltyPct", + "type": { + "option": "u16" + } + } + ] + }, + { + "name": "buyCore", + "accounts": [ + { + "name": "tcomp", + "isMut": true, + "isSigner": false + }, + { + "name": "listState", + "isMut": true, + "isSigner": false + }, + { + "name": "asset", + "isMut": true, + "isSigner": false + }, + { + "name": "collection", + "isMut": false, + "isSigner": false, + "isOptional": true + }, + { + "name": "buyer", + "isMut": false, + "isSigner": false + }, + { + "name": "payer", + "isMut": true, + "isSigner": true + }, + { + "name": "owner", + "isMut": true, + "isSigner": false + }, + { + "name": "takerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "makerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "rentDest", + "isMut": true, + "isSigner": false + }, + { + "name": "mplCoreProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "maxAmount", + "type": "u64" + } + ] + }, + { + "name": "list", + "accounts": [ + { + "name": "treeAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "owner", + "isMut": false, + "isSigner": false + }, + { + "name": "delegate", + "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 + }, + { + "name": "bubblegumProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "listState", + "isMut": true, + "isSigner": false + }, + { + "name": "rentPayer", + "isMut": true, + "isSigner": true + } + ], + "args": [ + { + "name": "nonce", + "type": "u64" + }, + { + "name": "index", + "type": "u32" + }, + { + "name": "root", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "dataHash", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "creatorHash", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "expireInSec", + "type": { + "option": "u64" + } + }, + { + "name": "currency", + "type": { + "option": "publicKey" + } + }, + { + "name": "privateTaker", + "type": { + "option": "publicKey" + } + }, + { + "name": "makerBroker", + "type": { + "option": "publicKey" + } + } + ] + }, + { + "name": "delist", + "accounts": [ + { + "name": "treeAuthority", + "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 + }, + { + "name": "bubblegumProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "listState", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": false, + "isSigner": true + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "rentDest", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "nonce", + "type": "u64" + }, + { + "name": "index", + "type": "u32" + }, + { + "name": "root", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "dataHash", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "creatorHash", + "type": { + "array": [ + "u8", + 32 + ] + } + } + ] + }, + { + "name": "edit", + "accounts": [ + { + "name": "listState", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": false, + "isSigner": true + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "expireInSec", + "type": { + "option": "u64" + } + }, + { + "name": "currency", + "type": { + "option": "publicKey" + } + }, + { + "name": "privateTaker", + "type": { + "option": "publicKey" + } + }, + { + "name": "makerBroker", + "type": { + "option": "publicKey" + } + } + ] + }, + { + "name": "listCore", + "accounts": [ + { + "name": "asset", + "isMut": true, + "isSigner": false + }, + { + "name": "collection", + "isMut": false, + "isSigner": false, + "isOptional": true + }, + { + "name": "listState", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": false, + "isSigner": true + }, + { + "name": "mplCoreProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "payer", + "isMut": true, + "isSigner": true + } + ], + "args": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "expireInSec", + "type": { + "option": "u64" + } + }, + { + "name": "currency", + "type": { + "option": "publicKey" + } + }, + { + "name": "privateTaker", + "type": { + "option": "publicKey" + } + }, + { + "name": "makerBroker", + "type": { + "option": "publicKey" + } + } + ] + }, + { + "name": "delistCore", + "accounts": [ + { + "name": "asset", + "isMut": true, + "isSigner": false + }, + { + "name": "collection", + "isMut": false, + "isSigner": false, + "isOptional": true + }, + { + "name": "owner", + "isMut": true, + "isSigner": true + }, + { + "name": "listState", + "isMut": true, + "isSigner": false + }, + { + "name": "mplCoreProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "rentDest", + "isMut": true, + "isSigner": true + } + ], + "args": [] + }, + { + "name": "bid", + "accounts": [ + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "bidState", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": true, + "isSigner": true + }, + { + "name": "marginAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "cosigner", + "isMut": false, + "isSigner": true + }, + { + "name": "rentPayer", + "isMut": true, + "isSigner": true + } + ], + "args": [ + { + "name": "bidId", + "type": "publicKey" + }, + { + "name": "target", + "type": { + "defined": "Target" + } + }, + { + "name": "targetId", + "type": "publicKey" + }, + { + "name": "field", + "type": { + "option": { + "defined": "Field" + } + } + }, + { + "name": "fieldId", + "type": { + "option": "publicKey" + } + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "quantity", + "type": "u32" + }, + { + "name": "expireInSec", + "type": { + "option": "u64" + } + }, + { + "name": "currency", + "type": { + "option": "publicKey" + } + }, + { + "name": "privateTaker", + "type": { + "option": "publicKey" + } + }, + { + "name": "makerBroker", + "type": { + "option": "publicKey" + } + } + ] + }, + { + "name": "cancelBid", + "accounts": [ + { + "name": "bidState", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": true, + "isSigner": true + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "rentDest", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "closeExpiredBid", + "accounts": [ + { + "name": "bidState", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "rentDest", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "closeExpiredListing", + "accounts": [ + { + "name": "listState", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "treeAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "merkleTree", + "isMut": true, + "isSigner": false + }, + { + "name": "logWrapper", + "isMut": false, + "isSigner": false + }, + { + "name": "compressionProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "bubblegumProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "rentDest", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "nonce", + "type": "u64" + }, + { + "name": "index", + "type": "u32" + }, + { + "name": "root", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "dataHash", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "creatorHash", + "type": { + "array": [ + "u8", + 32 + ] + } + } + ] + }, + { + "name": "closeExpiredListingCore", + "accounts": [ + { + "name": "listState", + "isMut": true, + "isSigner": false + }, + { + "name": "asset", + "isMut": true, + "isSigner": false + }, + { + "name": "collection", + "isMut": false, + "isSigner": false, + "isOptional": true + }, + { + "name": "owner", + "isMut": false, + "isSigner": false + }, + { + "name": "mplCoreProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "rentDest", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "takeBidMetaHash", + "accounts": [ + { + "name": "tcomp", + "isMut": true, + "isSigner": false + }, + { + "name": "treeAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "seller", + "isMut": true, + "isSigner": false + }, + { + "name": "delegate", + "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 + }, + { + "name": "bubblegumProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tensorswapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "bidState", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": true, + "isSigner": false + }, + { + "name": "takerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "makerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "marginAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "whitelist", + "isMut": false, + "isSigner": false + }, + { + "name": "cosigner", + "isMut": false, + "isSigner": true + }, + { + "name": "rentDest", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "nonce", + "type": "u64" + }, + { + "name": "index", + "type": "u32" + }, + { + "name": "root", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "metaHash", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "creatorShares", + "type": "bytes" + }, + { + "name": "creatorVerified", + "type": { + "vec": "bool" + } + }, + { + "name": "sellerFeeBasisPoints", + "type": "u16" + }, + { + "name": "minAmount", + "type": "u64" + }, + { + "name": "optionalRoyaltyPct", + "type": { + "option": "u16" + } + } + ] + }, + { + "name": "takeBidFullMeta", + "accounts": [ + { + "name": "tcomp", + "isMut": true, + "isSigner": false + }, + { + "name": "treeAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "seller", + "isMut": true, + "isSigner": false + }, + { + "name": "delegate", + "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 + }, + { + "name": "bubblegumProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tensorswapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "bidState", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": true, + "isSigner": false + }, + { + "name": "takerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "makerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "marginAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "whitelist", + "isMut": false, + "isSigner": false + }, + { + "name": "cosigner", + "isMut": false, + "isSigner": true + }, + { + "name": "rentDest", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "nonce", + "type": "u64" + }, + { + "name": "index", + "type": "u32" + }, + { + "name": "root", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "metaArgs", + "type": { + "defined": "TMetadataArgs" + } + }, + { + "name": "minAmount", + "type": "u64" + }, + { + "name": "optionalRoyaltyPct", + "type": { + "option": "u16" + } + } + ] + }, + { + "name": "takeBidLegacy", + "accounts": [ + { + "name": "tcomp", + "isMut": true, + "isSigner": false + }, + { + "name": "seller", + "isMut": true, + "isSigner": true + }, + { + "name": "bidState", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": true, + "isSigner": false + }, + { + "name": "takerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "makerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "marginAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "whitelist", + "isMut": false, + "isSigner": false + }, + { + "name": "nftSellerAcc", + "isMut": true, + "isSigner": false + }, + { + "name": "nftMint", + "isMut": false, + "isSigner": false + }, + { + "name": "nftMetadata", + "isMut": true, + "isSigner": false + }, + { + "name": "ownerAtaAcc", + "isMut": true, + "isSigner": false + }, + { + "name": "nftEdition", + "isMut": false, + "isSigner": false + }, + { + "name": "ownerTokenRecord", + "isMut": true, + "isSigner": false + }, + { + "name": "destTokenRecord", + "isMut": true, + "isSigner": false + }, + { + "name": "pnftShared", + "accounts": [ + { + "name": "tokenMetadataProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "instructions", + "isMut": false, + "isSigner": false + }, + { + "name": "authorizationRulesProgram", + "isMut": false, + "isSigner": false + } + ] + }, + { + "name": "nftEscrow", + "isMut": true, + "isSigner": false, + "docs": [ + "Implicitly checked via transfer. Will fail if wrong account" + ] + }, + { + "name": "tempEscrowTokenRecord", + "isMut": true, + "isSigner": false + }, + { + "name": "authRules", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "associatedTokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tensorswapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "cosigner", + "isMut": false, + "isSigner": true + }, + { + "name": "mintProof", + "isMut": false, + "isSigner": false, + "docs": [ + "intentionally not deserializing, it would be dummy in the case of VOC/FVC based verification" + ] + }, + { + "name": "rentDest", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "minAmount", + "type": "u64" + }, + { + "name": "optionalRoyaltyPct", + "type": { + "option": "u16" + } + }, + { + "name": "rulesAccPresent", + "type": "bool" + }, + { + "name": "authorizationData", + "type": { + "option": { + "defined": "AuthorizationDataLocal" + } + } + } + ] + }, + { + "name": "takeBidT22", + "accounts": [ + { + "name": "tcomp", + "isMut": true, + "isSigner": false + }, + { + "name": "seller", + "isMut": true, + "isSigner": true + }, + { + "name": "bidState", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": true, + "isSigner": false + }, + { + "name": "takerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "makerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "marginAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "whitelist", + "isMut": false, + "isSigner": false + }, + { + "name": "nftSellerAcc", + "isMut": true, + "isSigner": false + }, + { + "name": "nftMint", + "isMut": false, + "isSigner": false + }, + { + "name": "ownerAtaAcc", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "associatedTokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tensorswapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "cosigner", + "isMut": false, + "isSigner": true + }, + { + "name": "mintProof", + "isMut": false, + "isSigner": false, + "docs": [ + "intentionally not deserializing, it would be dummy in the case of VOC/FVC based verification" + ] + }, + { + "name": "rentDest", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "minAmount", + "type": "u64" + } + ] + }, + { + "name": "takeBidWns", + "accounts": [ + { + "name": "tcomp", + "isMut": true, + "isSigner": false + }, + { + "name": "seller", + "isMut": true, + "isSigner": true + }, + { + "name": "bidState", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": true, + "isSigner": false + }, + { + "name": "takerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "makerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "marginAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "whitelist", + "isMut": false, + "isSigner": false + }, + { + "name": "nftSellerAcc", + "isMut": true, + "isSigner": false + }, + { + "name": "nftMint", + "isMut": false, + "isSigner": false + }, + { + "name": "ownerAtaAcc", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "associatedTokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tensorswapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "cosigner", + "isMut": false, + "isSigner": true + }, + { + "name": "mintProof", + "isMut": false, + "isSigner": false, + "docs": [ + "intentionally not deserializing, it would be dummy in the case of VOC/FVC based verification" + ] + }, + { + "name": "rentDest", + "isMut": true, + "isSigner": false + }, + { + "name": "approveAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "distribution", + "isMut": true, + "isSigner": false + }, + { + "name": "wnsProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "distributionProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "extraMetas", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "minAmount", + "type": "u64" + } + ] + }, + { + "name": "takeBidCore", + "accounts": [ + { + "name": "tcomp", + "isMut": true, + "isSigner": false + }, + { + "name": "seller", + "isMut": true, + "isSigner": true + }, + { + "name": "bidState", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": true, + "isSigner": false + }, + { + "name": "takerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "makerBroker", + "isMut": true, + "isSigner": false, + "isOptional": true + }, + { + "name": "marginAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "whitelist", + "isMut": false, + "isSigner": false + }, + { + "name": "asset", + "isMut": true, + "isSigner": false + }, + { + "name": "collection", + "isMut": false, + "isSigner": false, + "isOptional": true + }, + { + "name": "mplCoreProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tcompProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tensorswapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "cosigner", + "isMut": false, + "isSigner": true + }, + { + "name": "mintProof", + "isMut": false, + "isSigner": false, + "docs": [ + "intentionally not deserializing, it would be dummy in the case of VOC/FVC based verification" + ] + }, + { + "name": "rentDest", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "minAmount", + "type": "u64" + } + ] + } + ], + "accounts": [ + { + "name": "ListState", + "type": { + "kind": "struct", + "fields": [ + { + "name": "version", + "type": "u8" + }, + { + "name": "bump", + "type": { + "array": [ + "u8", + 1 + ] + } + }, + { + "name": "owner", + "type": "publicKey" + }, + { + "name": "assetId", + "type": "publicKey" + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "currency", + "type": { + "option": "publicKey" + } + }, + { + "name": "expiry", + "type": "i64" + }, + { + "name": "privateTaker", + "type": { + "option": "publicKey" + } + }, + { + "name": "makerBroker", + "type": { + "option": "publicKey" + } + }, + { + "name": "rentPayer", + "docs": [ + "owner is the rent payer when this is PublicKey::default" + ], + "type": "publicKey" + }, + { + "name": "reserved", + "type": { + "array": [ + "u8", + 32 + ] + } + }, + { + "name": "reserved1", + "type": { + "array": [ + "u8", + 64 + ] + } + } + ] + } + }, + { + "name": "BidState", + "type": { + "kind": "struct", + "fields": [ + { + "name": "version", + "type": "u8" + }, + { + "name": "bump", + "type": { + "array": [ + "u8", + 1 + ] + } + }, + { + "name": "owner", + "type": "publicKey" + }, + { + "name": "bidId", + "docs": [ + "Randomly picked pubkey used in bid seeds. To avoid dangling bids can use assetId here." + ], + "type": "publicKey" + }, + { + "name": "target", + "type": { + "defined": "Target" + } + }, + { + "name": "targetId", + "type": "publicKey" + }, + { + "name": "field", + "type": { + "option": { + "defined": "Field" + } + } + }, + { + "name": "fieldId", + "type": { + "option": "publicKey" + } + }, + { + "name": "quantity", + "type": "u32" + }, + { + "name": "filledQuantity", + "type": "u32" + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "currency", + "type": { + "option": "publicKey" + } + }, + { + "name": "expiry", + "type": "i64" + }, + { + "name": "privateTaker", + "type": { + "option": "publicKey" + } + }, + { + "name": "makerBroker", + "type": { + "option": "publicKey" + } + }, + { + "name": "margin", + "type": { + "option": "publicKey" + } + }, + { + "name": "updatedAt", + "type": "i64" + }, + { + "name": "cosigner", + "type": "publicKey" + }, + { + "name": "rentPayer", + "docs": [ + "owner is the rent payer when this is PublicKey::default" + ], + "type": "publicKey" + }, + { + "name": "reserved", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "reserved1", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "reserved2", + "type": { + "array": [ + "u8", + 32 + ] + } + } + ] + } + } + ], + "types": [ + { + "name": "TUses", + "type": { + "kind": "struct", + "fields": [ + { + "name": "useMethod", + "type": { + "defined": "TUseMethod" + } + }, + { + "name": "remaining", + "type": "u64" + }, + { + "name": "total", + "type": "u64" + } + ] + } + }, + { + "name": "TCollection", + "type": { + "kind": "struct", + "fields": [ + { + "name": "verified", + "type": "bool" + }, + { + "name": "key", + "type": "publicKey" + } + ] + } + }, + { + "name": "TMetadataArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "name", + "docs": [ + "The name of the asset" + ], + "type": "string" + }, + { + "name": "symbol", + "docs": [ + "The symbol for the asset" + ], + "type": "string" + }, + { + "name": "uri", + "docs": [ + "URI pointing to JSON representing the asset" + ], + "type": "string" + }, + { + "name": "sellerFeeBasisPoints", + "docs": [ + "Royalty basis points that goes to creators in secondary sales (0-10000)" + ], + "type": "u16" + }, + { + "name": "primarySaleHappened", + "type": "bool" + }, + { + "name": "isMutable", + "type": "bool" + }, + { + "name": "editionNonce", + "docs": [ + "nonce for easy calculation of editions, if present" + ], + "type": { + "option": "u8" + } + }, + { + "name": "tokenStandard", + "docs": [ + "Since we cannot easily change Metadata, we add the new DataV2 fields here at the end." + ], + "type": { + "option": { + "defined": "TTokenStandard" + } + } + }, + { + "name": "collection", + "docs": [ + "Collection" + ], + "type": { + "option": { + "defined": "TCollection" + } + } + }, + { + "name": "uses", + "docs": [ + "Uses" + ], + "type": { + "option": { + "defined": "TUses" + } + } + }, + { + "name": "tokenProgramVersion", + "type": { + "defined": "TTokenProgramVersion" + } + }, + { + "name": "creatorShares", + "type": "bytes" + }, + { + "name": "creatorVerified", + "type": { + "vec": "bool" + } + } + ] + } + }, + { + "name": "MakeEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "maker", + "type": "publicKey" + }, + { + "name": "bidId", + "type": { + "option": "publicKey" + } + }, + { + "name": "target", + "type": { + "defined": "Target" + } + }, + { + "name": "targetId", + "type": "publicKey" + }, + { + "name": "field", + "type": { + "option": { + "defined": "Field" + } + } + }, + { + "name": "fieldId", + "type": { + "option": "publicKey" + } + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "quantity", + "type": "u32" + }, + { + "name": "currency", + "type": { + "option": "publicKey" + } + }, + { + "name": "expiry", + "type": "i64" + }, + { + "name": "privateTaker", + "type": { + "option": "publicKey" + } + }, + { + "name": "assetId", + "type": { + "option": "publicKey" + } + } + ] + } + }, + { + "name": "TakeEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "taker", + "type": "publicKey" + }, + { + "name": "bidId", + "type": { + "option": "publicKey" + } + }, + { + "name": "target", + "type": { + "defined": "Target" + } + }, + { + "name": "targetId", + "type": "publicKey" + }, + { + "name": "field", + "type": { + "option": { + "defined": "Field" + } + } + }, + { + "name": "fieldId", + "type": { + "option": "publicKey" + } + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "quantity", + "type": "u32" + }, + { + "name": "tcompFee", + "type": "u64" + }, + { + "name": "takerBrokerFee", + "type": "u64" + }, + { + "name": "makerBrokerFee", + "type": "u64" + }, + { + "name": "creatorFee", + "type": "u64" + }, + { + "name": "currency", + "type": { + "option": "publicKey" + } + }, + { + "name": "assetId", + "type": { + "option": "publicKey" + } + } + ] + } + }, + { + "name": "AuthorizationDataLocal", + "type": { + "kind": "struct", + "fields": [ + { + "name": "payload", + "type": { + "vec": { + "defined": "TaggedPayload" + } + } + } + ] + } + }, + { + "name": "TaggedPayload", + "type": { + "kind": "struct", + "fields": [ + { + "name": "name", + "type": "string" + }, + { + "name": "payload", + "type": { + "defined": "PayloadTypeLocal" + } + } + ] + } + }, + { + "name": "SeedsVecLocal", + "type": { + "kind": "struct", + "fields": [ + { + "name": "seeds", + "docs": [ + "The vector of derivation seeds." + ], + "type": { + "vec": "bytes" + } + } + ] + } + }, + { + "name": "ProofInfoLocal", + "type": { + "kind": "struct", + "fields": [ + { + "name": "proof", + "docs": [ + "The merkle proof." + ], + "type": { + "vec": { + "array": [ + "u8", + 32 + ] + } + } + } + ] + } + }, + { + "name": "TTokenProgramVersion", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Original" + }, + { + "name": "Token2022" + } + ] + } + }, + { + "name": "TTokenStandard", + "type": { + "kind": "enum", + "variants": [ + { + "name": "NonFungible" + }, + { + "name": "FungibleAsset" + }, + { + "name": "Fungible" + }, + { + "name": "NonFungibleEdition" + } + ] + } + }, + { + "name": "TUseMethod", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Burn" + }, + { + "name": "Multiple" + }, + { + "name": "Single" + } + ] + } + }, + { + "name": "TcompEvent", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Maker", + "fields": [ + { + "defined": "MakeEvent" + } + ] + }, + { + "name": "Taker", + "fields": [ + { + "defined": "TakeEvent" + } + ] + } + ] + } + }, + { + "name": "PayloadTypeLocal", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Pubkey", + "fields": [ + "publicKey" + ] + }, + { + "name": "Seeds", + "fields": [ + { + "defined": "SeedsVecLocal" + } + ] + }, + { + "name": "MerkleProof", + "fields": [ + { + "defined": "ProofInfoLocal" + } + ] + }, + { + "name": "Number", + "fields": [ + "u64" + ] + } + ] + } + }, + { + "name": "Target", + "type": { + "kind": "enum", + "variants": [ + { + "name": "AssetId" + }, + { + "name": "Whitelist" + } + ] + } + }, + { + "name": "Field", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Name" + } + ] + } + } + ], + "errors": [ + { + "code": 6100, + "name": "ArithmeticError", + "msg": "arithmetic error" + }, + { + "code": 6101, + "name": "ExpiryTooLarge", + "msg": "expiry too large" + }, + { + "code": 6102, + "name": "BadOwner", + "msg": "bad owner" + }, + { + "code": 6103, + "name": "BadListState", + "msg": "bad list state" + }, + { + "code": 6104, + "name": "BadRoyaltiesPct", + "msg": "royalties pct must be between 0 and 100" + }, + { + "code": 6105, + "name": "PriceMismatch", + "msg": "price mismatch" + }, + { + "code": 6106, + "name": "CreatorMismatch", + "msg": "creator mismatch" + }, + { + "code": 6107, + "name": "InsufficientBalance", + "msg": "insufficient balance" + }, + { + "code": 6108, + "name": "BidExpired", + "msg": "bid has expired" + }, + { + "code": 6109, + "name": "TakerNotAllowed", + "msg": "taker not allowed" + }, + { + "code": 6110, + "name": "BadBidField", + "msg": "cannot pass bid field" + }, + { + "code": 6111, + "name": "BidNotYetExpired", + "msg": "bid not yet expired" + }, + { + "code": 6112, + "name": "BadMargin", + "msg": "bad margin" + }, + { + "code": 6113, + "name": "WrongIxForBidTarget", + "msg": "wrong ix for bid target called" + }, + { + "code": 6114, + "name": "WrongTargetId", + "msg": "wrong target id" + }, + { + "code": 6115, + "name": "MissingFvc", + "msg": "creator array missing first verified creator" + }, + { + "code": 6116, + "name": "MissingCollection", + "msg": "metadata missing collection" + }, + { + "code": 6117, + "name": "CannotModifyTarget", + "msg": "cannot modify bid target, create a new bid" + }, + { + "code": 6118, + "name": "TargetIdMustEqualBidId", + "msg": "target id and bid id must be the same for single bids" + }, + { + "code": 6119, + "name": "CurrencyNotYetEnabled", + "msg": "currency not yet enabled" + }, + { + "code": 6120, + "name": "MakerBrokerNotYetEnabled", + "msg": "maker broker not yet enabled" + }, + { + "code": 6121, + "name": "OptionalRoyaltiesNotYetEnabled", + "msg": "optional royalties not yet enabled" + }, + { + "code": 6122, + "name": "WrongStateVersion", + "msg": "wrong state version" + }, + { + "code": 6123, + "name": "WrongBidFieldId", + "msg": "wrong field id" + }, + { + "code": 6124, + "name": "BrokerMismatch", + "msg": "broker mismatch" + }, + { + "code": 6125, + "name": "AssetIdMismatch", + "msg": "asset id mismatch" + }, + { + "code": 6126, + "name": "ListingExpired", + "msg": "listing has expired" + }, + { + "code": 6127, + "name": "ListingNotYetExpired", + "msg": "listing not yet expired" + }, + { + "code": 6128, + "name": "BadQuantity", + "msg": "bad quantity passed in" + }, + { + "code": 6129, + "name": "BidFullyFilled", + "msg": "bid fully filled" + }, + { + "code": 6130, + "name": "BadWhitelist", + "msg": "bad whitelist" + }, + { + "code": 6131, + "name": "ForbiddenCollection", + "msg": "forbidden collection" + }, + { + "code": 6132, + "name": "BadCosigner", + "msg": "bad cosigner" + }, + { + "code": 6133, + "name": "BadMintProof", + "msg": "bad mint proof" + }, + { + "code": 6134, + "name": "CurrencyMismatch", + "msg": "Currency mismatch" + }, + { + "code": 6135, + "name": "BidBalanceNotEmptied", + "msg": "The bid balance was not emptied" + }, + { + "code": 6136, + "name": "BadRentDest", + "msg": "Bad rent dest." + }, + { + "code": 6137, + "name": "CurrencyNotYetWhitelisted", + "msg": "currency not yet whitelisted" + }, + { + "code": 6138, + "name": "MakerBrokerNotYetWhitelisted", + "msg": "maker broker not yet whitelisted" + }, + { + "code": 6139, + "name": "WrongTokenRecordDerivation", + "msg": "token record derivation is wrong" + } + ] +} \ No newline at end of file diff --git a/idls/opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb.openbook_v2.json b/idls/opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb.openbook_v2.json deleted file mode 100644 index 4869fc9..0000000 --- a/idls/opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb.openbook_v2.json +++ /dev/null @@ -1 +0,0 @@ -{"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/orderbook.j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X.jupiter_limit_order_v2.V0_1_0.from_solscan.json b/idls/orderbook.j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X.jupiter_limit_order_v2.V0_1_0.from_solscan.json new file mode 100644 index 0000000..8d6a52b --- /dev/null +++ b/idls/orderbook.j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X.jupiter_limit_order_v2.V0_1_0.from_solscan.json @@ -0,0 +1,1271 @@ +{ + "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/orderbook.jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu.jupiter_limit_order.V0_1_0.from_solscan.json b/idls/orderbook.jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu.jupiter_limit_order.V0_1_0.from_solscan.json new file mode 100644 index 0000000..89d7568 --- /dev/null +++ b/idls/orderbook.jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu.jupiter_limit_order.V0_1_0.from_solscan.json @@ -0,0 +1,768 @@ +{ + "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/orderbook.opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb.openbook_v2.V0_1_0.from_solscan.json b/idls/orderbook.opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb.openbook_v2.V0_1_0.from_solscan.json new file mode 100644 index 0000000..b7da9fe --- /dev/null +++ b/idls/orderbook.opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb.openbook_v2.V0_1_0.from_solscan.json @@ -0,0 +1,3837 @@ +{ + "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/pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.pump_swap.json b/idls/pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.pump_swap.json deleted file mode 100644 index daf2337..0000000 --- a/idls/pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.pump_swap.json +++ /dev/null @@ -1 +0,0 @@ -{"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/perpetuals.EtrnLzgbS7nMMy5fbD42kXiUzGg8XQzJ972Xtk1cjWih.phoenix_eternal.V0_2_0.from_solscan.json b/idls/perpetuals.EtrnLzgbS7nMMy5fbD42kXiUzGg8XQzJ972Xtk1cjWih.phoenix_eternal.V0_2_0.from_solscan.json new file mode 100644 index 0000000..d560609 --- /dev/null +++ b/idls/perpetuals.EtrnLzgbS7nMMy5fbD42kXiUzGg8XQzJ972Xtk1cjWih.phoenix_eternal.V0_2_0.from_solscan.json @@ -0,0 +1,23985 @@ +{ + "version": "0.2.0", + "address": "EtrnLzgbS7nMMy5fbD42kXiUzGg8XQzJ972Xtk1cjWih", + "metadata": { + "name": "Eternal", + "version": "0.2.0", + "spec": "0.1.0", + "description": "Phoenix Eternal: a perpetual futures exchange", + "address": "EtrnLzgbS7nMMy5fbD42kXiUzGg8XQzJ972Xtk1cjWih", + "origin": "anchor-compatible", + "codama": { + "nodesVersion": "1.6.0", + "nodesFromAnchorVersion": "1.4.1", + "renderersJsVersion": "2.2.0" + } + }, + "docs": [ + "Anchor-compatible IDL for the Phoenix Eternal program.", + "This IDL is maintained from the native Rust program surface and includes explicit instruction, account, and event discriminators for transaction and account decoding.", + "PDA metadata is included where the program defines a canonical derivation; accounts without PDA metadata are supplied as explicit accounts or are stored in GlobalConfiguration." + ], + "instructions": [ + { + "name": "PlaceMarketOrder", + "docs": [ + "Places an immediate-or-cancel order that consumes resting liquidity on the specified market." + ], + "discriminator": [ + 90, + 118, + 192, + 252, + 192, + 99, + 39, + 145 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA; enforces the market is registered and cross trading is enabled." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderWallet", + "signer": true, + "docs": [ + "Trader authority placing the market order." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA (\"trader\" account) holding balances and open positions." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map governing risk limits and funding parameters for the market." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account that stores resting liquidity." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection PDA that tracks market-making programs for this market." + ] + } + ], + "args": [ + { + "name": "orderPacket", + "type": { + "defined": { + "name": "OrderPacket" + } + } + } + ] + }, + { + "name": "PlaceLimitOrder", + "docs": [ + "Places a limit order that may rest on the orderbook or take liquidity depending on matching conditions." + ], + "discriminator": [ + 108, + 176, + 33, + 186, + 146, + 229, + 1, + 197 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA; enforces the market is registered and cross trading is enabled." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderWallet", + "signer": true, + "docs": [ + "Trader authority placing the limit order." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA (\"trader\" account) holding balances and open positions." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map governing risk limits and funding parameters for the market." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account that stores resting liquidity." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection PDA that tracks market-making programs for this market." + ] + } + ], + "args": [ + { + "name": "orderPacket", + "type": { + "defined": { + "name": "OrderPacket" + } + } + } + ] + }, + { + "name": "PlaceMultiLimitOrder", + "docs": [ + "Places multiple post-only limit orders in a single transaction, allowing batch order placement for market making." + ], + "discriminator": [ + 236, + 208, + 221, + 172, + 141, + 226, + 129, + 84 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA; enforces the market is registered and cross trading is enabled." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderWallet", + "signer": true, + "docs": [ + "Trader authority placing the batch of limit orders." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA holding balances and open positions." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map governing risk limits and funding parameters for the market." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account that stores resting liquidity." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection PDA that tracks market-making programs for this market." + ] + } + ], + "args": [ + { + "name": "orderPacket", + "type": { + "defined": { + "name": "MultipleOrderPacket" + } + } + } + ] + }, + { + "name": "CancelOrdersById", + "docs": [ + "Cancels a specific set of resting orders identified by their FIFO order ids." + ], + "discriminator": [ + 234, + 204, + 126, + 94, + 222, + 22, + 141, + 24 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA; enforces the market is registered and cross trading is enabled." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderWallet", + "signer": true, + "docs": [ + "Trader authority requesting the cancellation." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA (\"trader\" account) holding balances and open positions." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map governing risk limits and funding parameters for the market." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account containing the resting orders to cancel." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection PDA that tracks market-making programs for this market." + ] + } + ], + "args": [ + { + "name": "orderIds", + "type": { + "defined": { + "name": "OrderIds" + } + } + } + ] + }, + { + "name": "CancelUpTo", + "docs": [ + "Cancels resting orders on the specified side up to an optional order or price threshold." + ], + "discriminator": [ + 26, + 209, + 244, + 253, + 59, + 175, + 227, + 54 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA; enforces the market is registered and cross trading is enabled." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderWallet", + "signer": true, + "docs": [ + "Trader authority requesting the cancellation." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA (\"trader\" account) holding balances and open positions." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map governing risk limits and funding parameters for the market." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account containing the resting orders to cancel." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection PDA that tracks market-making programs for this market." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "CancelUpToInstruction" + } + } + } + ] + }, + { + "name": "CancelAll", + "docs": [ + "Cancels every resting order owned by the connected trader on the specified market." + ], + "discriminator": [ + 98, + 191, + 75, + 220, + 115, + 40, + 71, + 237 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA; enforces the market is registered and cross trading is enabled." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderWallet", + "signer": true, + "docs": [ + "Trader authority requesting the cancellation." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA (\"trader\" account) holding balances and open positions." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map governing risk limits and funding parameters for the market." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account containing the resting orders to cancel." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection PDA that tracks market-making programs for this market." + ] + } + ], + "args": [] + }, + { + "name": "UpdateOraclePricesWithOrdering", + "docs": [ + "Updates oracle-provided spot and perp prices for one or more perpetual markets with monotonic timestamp ordering." + ], + "discriminator": [ + 164, + 0, + 14, + 250, + 58, + 198, + 25, + 24 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA; provides oracle authority and quote decimals for conversions." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Wallet authorised to submit oracle price updates (root oracle or delegated user)." + ] + }, + { + "name": "permissionAccount", + "writable": true, + "docs": [ + "Permission account recording oracle capabilities and remaining allowances." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perpetual asset map storing mark price state and oracle metadata." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdateOraclePricesWithOrderingInstruction" + } + } + } + ] + }, + { + "name": "UpdateSplinePrice", + "docs": [ + "Updates the mid-price for a spline market-making program on the specified market." + ], + "discriminator": [ + 45, + 155, + 200, + 52, + 37, + 214, + 187, + 140 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "signerAccount", + "signer": true, + "docs": [ + "Authority of the spline trader account authorised to update the spline price." + ] + }, + { + "name": "traderAccount", + "docs": [ + "Spline trader account whose price is being updated." + ] + }, + { + "name": "splineAccount", + "writable": true, + "docs": [ + "Spline collection PDA containing the spline configuration and pricing data." + ] + }, + { + "name": "orderbook", + "optional": true, + "docs": [ + "Optional market orderbook account included by some clients as trailing metadata." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdateSplinePriceParamsWithOrdering" + } + } + } + ] + }, + { + "name": "DepositFunds", + "docs": [ + "Deposits collateral tokens from a trader's token account into the global vault, crediting the trader's account." + ], + "discriminator": [ + 202, + 39, + 52, + 211, + 53, + 20, + 250, + 88 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA that tracks vault and system parameters." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderWallet", + "signer": true, + "docs": [ + "Authority of the trader account making the deposit." + ] + }, + { + "name": "traderTokenAccount", + "writable": true, + "docs": [ + "Trader's token account from which funds are transferred." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA that receives the collateral credit." + ] + }, + { + "name": "globalVault", + "writable": true, + "docs": [ + "Global vault token account that receives the deposited tokens." + ] + }, + { + "name": "tokenProgram", + "docs": [ + "SPL Token program for executing the transfer." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "DepositFundsInstruction" + } + } + } + ] + }, + { + "name": "RegisterTrader", + "docs": [ + "Registers a new trader account with the specified configuration and position capacity." + ], + "discriminator": [ + 75, + 243, + 224, + 167, + 1, + 5, + 51, + 32 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA that validates the trader registration." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "payer", + "writable": true, + "signer": true, + "docs": [ + "Account paying for the trader account creation and rent exemption." + ] + }, + { + "name": "traderWallet", + "docs": [ + "Authority that will control the trader account; used to derive the trader PDA." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA to be created; derived from [\"trader\", trader_wallet, [trader_pda_index, trader_subaccount_index]]." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 116, + 114, + 97, + 100, + 101, + 114 + ] + }, + { + "kind": "account", + "path": "traderWallet" + }, + { + "kind": "arg", + "path": "params.traderPdaIndex" + }, + { + "kind": "arg", + "path": "params.traderSubaccountIndex" + } + ] + } + }, + { + "name": "systemProgram", + "docs": [ + "System program for creating the trader account." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "RegisterTraderParams" + } + } + } + ] + }, + { + "name": "LiquidateViaMarketOrder", + "docs": [ + "Liquidates a trader's position by executing an immediate-or-cancel market order to reduce their exposure." + ], + "discriminator": [ + 251, + 241, + 184, + 108, + 70, + 70, + 127, + 198 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA; enforces the market is registered and liquidation is enabled." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "liquidatorWallet", + "signer": true, + "docs": [ + "Liquidator authority executing the liquidation." + ] + }, + { + "name": "liquidatedTrader", + "writable": true, + "docs": [ + "Trader account being liquidated (must be in liquidatable state)." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA (\"trader\" account) holding balances and open positions." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map governing risk limits and funding parameters for the market." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account that stores resting liquidity." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection PDA that tracks market-making programs for this market." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "LiquidationParams" + } + } + } + ] + }, + { + "name": "LiquidationTransfer", + "docs": [ + "Transfers positions directly between a liquidator and liquidatee once the liquidatee is flagged as unhealthy." + ], + "discriminator": [ + 57, + 218, + 215, + 68, + 174, + 23, + 204, + 127 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA that owns the global trader index, active trader buffer, and collateral controls." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map governing risk limits, pricing, and funding parameters for every listed market." + ] + }, + { + "name": "liquidator", + "signer": true, + "docs": [ + "Authority of the liquidator who receives transferred positions." + ] + }, + { + "name": "liquidatorAccount", + "writable": true, + "docs": [ + "Liquidator trader account whose balances are credited as transfers are applied." + ] + }, + { + "name": "liquidateeAccount", + "writable": true, + "docs": [ + "Liquidatee trader account whose unhealthy positions are reduced." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "LiquidationTransferParams" + } + } + } + ] + }, + { + "name": "CloseMatchedPositions", + "docs": [ + "Closes offsetting positions between an at-loss trader and an in-profit trader during ADL." + ], + "discriminator": [ + 112, + 174, + 32, + 120, + 93, + 113, + 10, + 161 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA that authorizes ADL operations and tracks trader index PDAs." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account containing risk parameters used to validate the ADL transfer." + ] + }, + { + "name": "caller", + "signer": true, + "docs": [ + "ADL authority invoking the matched close instruction." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "atLossAccount", + "writable": true, + "docs": [ + "Trader account currently at a loss whose matched exposure will be closed." + ] + }, + { + "name": "inProfitAccount", + "writable": true, + "docs": [ + "Trader account with offsetting profitable exposure to receive the transfer." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "ClosePositionsParams" + } + } + } + ] + }, + { + "name": "Log", + "docs": [ + "Internal instruction used by the Phoenix log authority to emit events on-chain.", + "This instruction is called via CPI and should not be invoked directly." + ], + "discriminator": [ + 141, + 230, + 214, + 242, + 9, + 209, + 207, + 170 + ], + "accounts": [ + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA that must sign via CPI." + ], + "signer": true, + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + } + ], + "args": [ + { + "name": "eventBatch", + "docs": [ + "Borsh event batch containing the batch index and MarketEvent vector." + ], + "type": { + "defined": { + "name": "OffChainMarketEvent" + } + } + } + ] + }, + { + "name": "LogEventLengths", + "docs": [ + "Internal instruction used by the Phoenix log authority to emit per-event byte lengths on-chain.", + "This instruction is called via CPI and should not be invoked directly." + ], + "discriminator": [ + 247, + 7, + 134, + 203, + 181, + 71, + 153, + 71 + ], + "accounts": [ + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA that must sign via CPI." + ], + "signer": true, + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + } + ], + "args": [ + { + "name": "eventLengths", + "docs": [ + "Borsh event-length batch containing the batch index and serialized event lengths." + ], + "type": { + "defined": { + "name": "OffChainMarketEventLengths" + } + } + } + ] + }, + { + "name": "WithdrawFunds", + "docs": [ + "Withdraws collateral tokens from the global vault to a trader's token account, debiting the trader's account balance." + ], + "discriminator": [ + 241, + 36, + 29, + 111, + 208, + 31, + 104, + 217 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA that tracks vault and system parameters." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderWallet", + "signer": true, + "docs": [ + "Authority of the trader account initiating the withdrawal." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA from which collateral is debited." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map for margin and risk checks." + ] + }, + { + "name": "globalVault", + "writable": true, + "docs": [ + "Global vault token account from which tokens are withdrawn." + ] + }, + { + "name": "destinationTokenAccount", + "writable": true, + "docs": [ + "Trader's destination token account to receive the withdrawn tokens." + ] + }, + { + "name": "tokenProgram", + "docs": [ + "SPL Token program for executing the transfer." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "withdrawQueue", + "writable": true, + "docs": [ + "Withdraw queue PDA tracking pending withdrawal requests." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "WithdrawFundsInstruction" + } + } + } + ] + }, + { + "name": "UpdateSplineParameters", + "docs": [ + "Updates spline curve parameters for automated market making on bid and ask sides." + ], + "discriminator": [ + 241, + 91, + 139, + 170, + 18, + 41, + 203, + 22 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "signerAccount", + "signer": true, + "docs": [ + "Authority authorized to update spline parameters." + ] + }, + { + "name": "traderAccount", + "docs": [ + "Trader account associated with the spline." + ] + }, + { + "name": "splineAccount", + "writable": true, + "docs": [ + "Spline collection account holding bid and ask curve parameters." + ] + }, + { + "name": "orderbook", + "optional": true, + "docs": [ + "Optional market orderbook account included by some clients as trailing metadata." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdateSplineParametersParamsWithOrdering" + } + } + } + ] + }, + { + "name": "PlaceStopLoss", + "docs": [ + "Places a stop-loss order that triggers when the market price reaches the specified trigger price." + ], + "discriminator": [ + 236, + 46, + 164, + 66, + 235, + 92, + 162, + 137 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA that tracks vault and system parameters." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "payer", + "writable": true, + "signer": true, + "docs": [ + "Payer for creating the stop loss account." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader account PDA that holds position and order state." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map tracking positions and risk metrics." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account that stores resting liquidity." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection PDA that tracks market-making programs for this market." + ] + }, + { + "name": "traderWallet", + "signer": true, + "docs": [ + "Trader wallet authority." + ] + }, + { + "name": "stopLossAccount", + "writable": true, + "docs": [ + "Stop loss account PDA to be created or updated." + ] + }, + { + "name": "systemProgram", + "docs": [ + "System program for creating the stop loss account." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "PlaceStopLossInstruction" + } + } + } + ] + }, + { + "name": "ExecuteStopLoss", + "docs": [ + "Executes a stop-loss order when the trigger conditions are met." + ], + "discriminator": [ + 38, + 122, + 90, + 90, + 182, + 241, + 7, + 4 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "signer", + "signer": true, + "docs": [ + "Signer authorized to execute stop loss orders." + ] + }, + { + "name": "permissionAccount", + "writable": true, + "docs": [ + "Permission account verifying execution authority." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader account PDA that holds position and order state." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map tracking positions and risk metrics." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account that stores resting liquidity." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection PDA that tracks market-making programs for this market." + ] + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA that tracks vault and system parameters." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "funder", + "writable": true, + "docs": [ + "Account to receive rent from closed stop loss account." + ] + }, + { + "name": "stopLossAccount", + "writable": true, + "docs": [ + "Stop loss account to execute and close." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "ExecuteStopLossInstruction" + } + } + } + ] + }, + { + "name": "CancelStopLoss", + "docs": [ + "Cancels a pending stop-loss order and closes the stop loss account." + ], + "discriminator": [ + 120, + 201, + 10, + 102, + 12, + 9, + 111, + 126 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA that tracks vault and system parameters." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "funder", + "writable": true, + "docs": [ + "Account to receive rent from closed stop loss account." + ] + }, + { + "name": "traderAccount", + "docs": [ + "Trader account associated with the stop loss order." + ] + }, + { + "name": "traderWallet", + "signer": true, + "docs": [ + "Trader wallet authority." + ] + }, + { + "name": "stopLossAccount", + "writable": true, + "docs": [ + "Stop loss account to cancel and close." + ] + }, + { + "name": "systemProgram", + "docs": [ + "System program for closing the account." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "CancelStopLossInstruction" + } + } + } + ] + }, + { + "name": "ForceCancelAll", + "docs": [ + "Force cancels all open orders for a trader account. Requires authority authorization." + ], + "discriminator": [ + 201, + 0, + 188, + 127, + 41, + 55, + 80, + 48 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA that tracks vault and system parameters." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Authority authorized to force cancel orders." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader account PDA that holds position and order state." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map tracking positions and risk metrics." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account that stores resting liquidity." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection PDA that tracks market-making programs for this market." + ] + } + ], + "args": [] + }, + { + "name": "ForceCancelRiskIncreasing", + "docs": [ + "Force cancels risk-increasing orders for a trader to reduce margin exposure." + ], + "discriminator": [ + 41, + 55, + 217, + 35, + 92, + 72, + 42, + 238 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA that tracks vault and system parameters." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader account PDA that holds position and order state." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map tracking positions and risk metrics." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account that stores resting liquidity." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection PDA that tracks market-making programs for this market." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "ForceCancelRiskIncreasingParams" + } + } + } + ] + }, + { + "name": "UpdateTraderState", + "docs": [ + "Settles funding for a trader and evicts them from the active trader buffer when they no longer have resting orders." + ], + "discriminator": [ + 249, + 139, + 82, + 44, + 126, + 66, + 133, + 220 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Read-only global configuration PDA used to verify the perp asset map and buffer keys." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA whose funding snapshot and active status are updated." + ] + }, + { + "name": "perpAssetMap", + "docs": [ + "Perp asset map providing funding parameters for settlement." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + } + ], + "args": [] + }, + { + "name": "ConsumeWithdrawQueue", + "docs": [ + "Processes pending withdrawals from the withdraw queue." + ], + "discriminator": [ + 228, + 40, + 211, + 139, + 39, + 212, + 116, + 113 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account." + ] + }, + { + "name": "globalVault", + "writable": true, + "docs": [ + "Global vault token account." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "withdrawQueue", + "writable": true, + "docs": [ + "Withdraw queue account." + ] + }, + { + "name": "tokenProgram", + "docs": [ + "SPL Token program." + ] + }, + { + "name": "traderWallet", + "docs": [ + "Trader wallet receiving the withdrawal." + ] + }, + { + "name": "destinationTokenAccount", + "writable": true, + "docs": [ + "Destination token account for withdrawn funds." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA." + ] + } + ], + "args": [] + }, + { + "name": "CreatePermission", + "docs": [ + "Creates a new permission account PDA for delegating authority." + ], + "discriminator": [ + 190, + 182, + 26, + 164, + 156, + 221, + 8, + 0 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "payer", + "writable": true, + "signer": true, + "docs": [ + "Payer for account creation rent." + ] + }, + { + "name": "permission", + "writable": true, + "docs": [ + "Permission account PDA to create." + ] + }, + { + "name": "authority", + "docs": [ + "Authority granting the permission." + ] + }, + { + "name": "user", + "docs": [ + "User receiving the permission." + ] + }, + { + "name": "systemProgram", + "docs": [ + "System program." + ], + "address": "11111111111111111111111111111111" + } + ], + "args": [] + }, + { + "name": "DelegateTrader", + "docs": [ + "Delegates position authority of a trader account to another address." + ], + "discriminator": [ + 3, + 164, + 192, + 106, + 119, + 91, + 122, + 224 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderWallet", + "signer": true, + "docs": [ + "Current trader authority." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA to delegate." + ] + }, + { + "name": "newPositionAuthority", + "docs": [ + "New position authority address." + ] + } + ], + "args": [] + }, + { + "name": "RevokePermission", + "docs": [ + "Revokes permission flags from a permission account." + ], + "discriminator": [ + 116, + 82, + 33, + 181, + 121, + 144, + 249, + 227 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Root authority revoking the permission." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Optional permission account for delegation." + ] + }, + { + "name": "targetPermission", + "writable": true, + "docs": [ + "Permission account to revoke flags from." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "RevokePermissionParams" + } + } + } + ] + }, + { + "name": "SetPermission", + "docs": [ + "Sets permission flags on a permission account." + ], + "discriminator": [ + 70, + 126, + 41, + 194, + 245, + 189, + 128, + 8 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "permission", + "writable": true, + "docs": [ + "Permission account to modify." + ] + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Authority owning the permission." + ] + }, + { + "name": "user", + "docs": [ + "User the permission applies to." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "SetPermissionInstruction" + } + } + } + ] + }, + { + "name": "SetTraderCapabilitiesDelegated", + "docs": [ + "Sets trader capability flags via a delegated permission." + ], + "discriminator": [ + 207, + 170, + 17, + 21, + 53, + 35, + 88, + 151 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Authority with trader onboarding delegation." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account for delegation validation." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "TraderCapabilityUpdate" + } + } + } + ] + }, + { + "name": "SetTraderCapability", + "docs": [ + "Sets trader capability flags via risk authority." + ], + "discriminator": [ + 191, + 72, + 45, + 190, + 214, + 250, + 182, + 213 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Risk authority." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account for delegation validation." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "TraderCapabilityUpdate" + } + } + } + ] + }, + { + "name": "SyncParentToChild", + "docs": [ + "Syncs capabilities from a parent trader account to a child (isolated margin) account." + ], + "discriminator": [ + 175, + 137, + 217, + 11, + 235, + 39, + 150, + 19 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderWallet", + "docs": [ + "Trader wallet owning both accounts." + ] + }, + { + "name": "parentTraderAccount", + "docs": [ + "Parent (cross margin) trader account." + ] + }, + { + "name": "childTraderAccount", + "writable": true, + "docs": [ + "Child (isolated margin) trader account to sync." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + } + ], + "args": [] + }, + { + "name": "TransferCollateral", + "docs": [ + "Transfers collateral between two trader accounts owned by the same wallet." + ], + "discriminator": [ + 157, + 163, + 63, + 27, + 242, + 72, + 251, + 97 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderWallet", + "signer": true, + "docs": [ + "Trader wallet owning both accounts." + ] + }, + { + "name": "srcTraderAccount", + "writable": true, + "docs": [ + "Source trader account." + ] + }, + { + "name": "dstTraderAccount", + "writable": true, + "docs": [ + "Destination trader account." + ] + }, + { + "name": "perpAssetMap", + "docs": [ + "Perp asset map for margin calculations." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "TransferCollateralInstruction" + } + } + } + ] + }, + { + "name": "TransferCollateralChildToParent", + "docs": [ + "Transfers collateral from a child (isolated margin) account to its parent (cross margin) account." + ], + "discriminator": [ + 51, + 100, + 177, + 115, + 139, + 135, + 247, + 139 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderWallet", + "docs": [ + "Trader wallet owning both accounts." + ] + }, + { + "name": "childTraderAccount", + "writable": true, + "docs": [ + "Child (isolated margin) trader account." + ] + }, + { + "name": "parentTraderAccount", + "writable": true, + "docs": [ + "Parent (cross margin) trader account." + ] + }, + { + "name": "perpAssetMap", + "docs": [ + "Perp asset map for margin calculations." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + } + ], + "args": [] + }, + { + "name": "UncrossCrank", + "docs": [ + "Cranks the orderbook to uncross any crossed orders." + ], + "discriminator": [ + 196, + 121, + 94, + 253, + 139, + 42, + 252, + 147 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection account." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UncrossCrankParams" + } + } + } + ] + }, + { + "name": "ClearExpiredOrders", + "docs": [ + "Clears expired orders from the orderbook as a maintenance crank operation." + ], + "discriminator": [ + 128, + 95, + 102, + 169, + 146, + 205, + 248, + 94 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map tracking positions and risk metrics." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account that stores resting liquidity." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection PDA that tracks market-making programs for this market." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "ClearExpiredOrdersParams" + } + } + } + ] + }, + { + "name": "CreateConditionalOrdersAccount", + "docs": [ + "Allocates the trader's conditional-orders PDA so further conditional-order placements can store entries." + ], + "discriminator": [ + 201, + 6, + 112, + 61, + 231, + 15, + 57, + 248 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA holding exchange-wide parameters." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "payer", + "writable": true, + "signer": true, + "docs": [ + "Funds the rent for the new conditional-orders PDA." + ] + }, + { + "name": "traderWallet", + "docs": [ + "Trader authority wallet; not signed here so a sponsorship server may pay rent." + ] + }, + { + "name": "traderAccount", + "docs": [ + "Trader state PDA whose key seeds the conditional-orders PDA." + ] + }, + { + "name": "traderConditionalOrders", + "writable": true, + "docs": [ + "Empty account that will be initialised as the conditional-orders collection." + ] + }, + { + "name": "systemProgram", + "docs": [ + "System program for PDA creation." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "CreateConditionalOrdersAccountInstruction" + } + } + } + ] + }, + { + "name": "PlacePositionConditionalOrder", + "docs": [ + "Places a position-based conditional order that fires when mark price crosses the configured trigger." + ], + "discriminator": [ + 65, + 108, + 83, + 129, + 76, + 193, + 92, + 143 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA holding exchange-wide parameters." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "payer", + "writable": true, + "signer": true, + "docs": [ + "Pays for any account growth required by the conditional-orders PDA." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA; updated as part of risk validation." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection PDA for the market." + ] + }, + { + "name": "traderWallet", + "signer": true, + "docs": [ + "Trader authority wallet authorising the conditional order." + ] + }, + { + "name": "traderConditionalOrders", + "writable": true, + "docs": [ + "Trader's conditional-orders collection PDA." + ] + }, + { + "name": "systemProgram", + "docs": [ + "System program (used for any required reallocations)." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "PlacePositionConditionalOrderInstruction" + } + } + } + ] + }, + { + "name": "CancelConditionalOrder", + "docs": [ + "Cancels one or both trigger-order halves of a conditional-order entry." + ], + "discriminator": [ + 82, + 104, + 25, + 51, + 248, + 54, + 66, + 184 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA holding exchange-wide parameters." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA owning the conditional order." + ] + }, + { + "name": "traderWallet", + "signer": true, + "docs": [ + "Trader authority wallet." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account." + ] + }, + { + "name": "traderConditionalOrders", + "writable": true, + "docs": [ + "Trader's conditional-orders collection PDA." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "CancelConditionalOrderInstruction" + } + } + } + ] + }, + { + "name": "PlaceAttachedConditionalOrder", + "docs": [ + "Attaches a conditional order to an existing resting limit order so it fires when that order is filled." + ], + "discriminator": [ + 43, + 117, + 136, + 128, + 72, + 150, + 101, + 122 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA holding exchange-wide parameters." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA owning the parent resting order." + ] + }, + { + "name": "traderWallet", + "signer": true, + "docs": [ + "Trader authority wallet." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account containing the parent limit order." + ] + }, + { + "name": "traderConditionalOrders", + "writable": true, + "docs": [ + "Trader's conditional-orders collection PDA." + ] + }, + { + "name": "payer", + "writable": true, + "signer": true, + "docs": [ + "Pays for any conditional-orders PDA reallocation." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "systemProgram", + "docs": [ + "System program for PDA reallocation." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "PlaceAttachedConditionalOrderInstruction" + } + } + } + ] + }, + { + "name": "PlaceLimitOrderWithConditionals", + "docs": [ + "Places a limit order and atomically attaches greater/less-than trigger orders to the resulting resting order." + ], + "discriminator": [ + 95, + 45, + 68, + 168, + 232, + 218, + 210, + 92 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA holding exchange-wide parameters." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderWallet", + "signer": true, + "docs": [ + "Trader authority wallet." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection PDA." + ] + }, + { + "name": "payer", + "writable": true, + "signer": true, + "docs": [ + "Pays for any conditional-orders PDA reallocation." + ] + }, + { + "name": "traderConditionalOrders", + "writable": true, + "docs": [ + "Trader's conditional-orders collection PDA." + ] + }, + { + "name": "systemProgram", + "docs": [ + "System program for PDA reallocation." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "PlaceLimitOrderWithConditionalsInstruction" + } + } + } + ] + }, + { + "name": "ExecuteConditionalOrders", + "docs": [ + "Authority-driven execution of a triggered conditional order." + ], + "discriminator": [ + 101, + 214, + 110, + 0, + 190, + 226, + 177, + 236 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA holding exchange-wide parameters." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Market authority (or delegate) authorised to execute conditional orders." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Optional permission/delegation PDA validated against the authority." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection PDA." + ] + }, + { + "name": "traderConditionalOrders", + "writable": true, + "docs": [ + "Trader's conditional-orders collection PDA." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "ExecuteConditionalOrderInstruction" + } + } + } + ] + }, + { + "name": "PingConditionalOrders", + "docs": [ + "Authority-driven sweep that activates or invalidates a trader's conditional orders based on current state." + ], + "discriminator": [ + 135, + 170, + 166, + 34, + 208, + 230, + 91, + 64 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA holding exchange-wide parameters." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Market authority (or delegate) authorised to ping conditional orders." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Optional permission/delegation PDA." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "traderConditionalOrders", + "writable": true, + "docs": [ + "Trader's conditional-orders collection PDA." + ] + } + ], + "args": [] + }, + { + "name": "CancelAllPlusConditional", + "docs": [ + "Cancels every resting order for a trader on a market and clears the matching conditional orders." + ], + "discriminator": [ + 142, + 173, + 238, + 126, + 79, + 19, + 53, + 103 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA holding exchange-wide parameters." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderWallet", + "signer": true, + "docs": [ + "Trader authority wallet." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader state PDA." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer account." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection PDA." + ] + }, + { + "name": "traderConditionalOrders", + "writable": true, + "docs": [ + "Trader's conditional-orders collection PDA." + ] + } + ], + "args": [] + }, + { + "name": "MarketClosedForceCancelAll", + "docs": [ + "Force cancels all open orders and conditional orders for a trader after a market has closed." + ], + "discriminator": [ + 229, + 101, + 143, + 249, + 150, + 175, + 175, + 219 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Market authority or market-management delegate." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader account PDA that holds position and order state." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account used for risk and market metadata validation." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account that stores resting liquidity." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection account for this market." + ] + }, + { + "name": "traderConditionalOrders", + "writable": true, + "docs": [ + "Optional conditional orders account for the trader; clears stop loss and trigger state when present." + ] + } + ], + "args": [] + }, + { + "name": "ForceCancelAfterHours", + "docs": [ + "Force cancels orders that are invalid during commodity after-hours trading." + ], + "discriminator": [ + 147, + 13, + 224, + 61, + 248, + 234, + 64, + 164 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA that stores mutable exchange-wide configuration." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader account PDA that holds position and order state." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account used for risk and market metadata validation." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account that stores resting liquidity." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection account for this market." + ] + } + ], + "args": [] + }, + { + "name": "AuthorizedForceCancel", + "docs": [ + "Force cancels orders under the configured cancel authority until the requested side sizes remain." + ], + "discriminator": [ + 13, + 22, + 221, + 234, + 211, + 165, + 172, + 2 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA that stores mutable exchange-wide configuration." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "cancelAuthority", + "signer": true, + "docs": [ + "Configured cancel authority signer." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader account PDA that holds position and order state." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account used for risk and market metadata validation." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account that stores resting liquidity." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection account for this market." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "AuthorizedForceCancelParams" + } + } + } + ] + }, + { + "name": "AuthorizedForceCancelById", + "docs": [ + "Force cancels specific bid and ask orders under the configured cancel authority." + ], + "discriminator": [ + 122, + 159, + 12, + 159, + 144, + 108, + 225, + 241 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA that stores mutable exchange-wide configuration." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "cancelAuthority", + "signer": true, + "docs": [ + "Configured cancel authority signer." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader account PDA that holds position and order state." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account used for risk and market metadata validation." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Market orderbook account that stores resting liquidity." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection account for this market." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "AuthorizedForceCancelByIdParams" + } + } + } + ] + }, + { + "name": "ChangeMarketStatus", + "docs": [ + "Changes an orderbook market status through the market authority path." + ], + "discriminator": [ + 221, + 127, + 224, + 41, + 177, + 145, + 126, + 8 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Market authority or market-management delegate." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Orderbook account whose market status is updated." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map used to validate and update market metadata." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "ChangeMarketStatusParams" + } + } + } + ] + }, + { + "name": "CreateEscrowAccount", + "docs": [ + "Creates or initializes the escrow PDA for a trader wallet." + ], + "discriminator": [ + 146, + 147, + 225, + 47, + 51, + 64, + 112, + 1 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "payer", + "writable": true, + "signer": true, + "docs": [ + "Payer funding escrow account creation." + ] + }, + { + "name": "traderWallet", + "docs": [ + "Trader wallet that owns the escrow account." + ] + }, + { + "name": "traderEscrow", + "writable": true, + "docs": [ + "Escrow account PDA for the trader wallet." + ] + }, + { + "name": "systemProgram", + "docs": [ + "System program for creating the escrow account." + ], + "address": "11111111111111111111111111111111" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "CreateEscrowAccountParams" + } + } + } + ] + }, + { + "name": "CreateEscrowRequest", + "docs": [ + "Creates an escrow request between sender and receiver trader accounts." + ], + "discriminator": [ + 116, + 164, + 236, + 204, + 187, + 132, + 195, + 219 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "senderWallet", + "signer": true, + "docs": [ + "Sender wallet signing the escrow request." + ] + }, + { + "name": "senderTraderAccount", + "docs": [ + "Sender trader account whose authority is validated." + ] + }, + { + "name": "permissionAccount", + "writable": true, + "docs": [ + "Permission account authorizing delegated escrow request creation." + ] + }, + { + "name": "receiverWallet", + "docs": [ + "Receiver wallet that owns the escrow account." + ] + }, + { + "name": "receiverTraderAccount", + "docs": [ + "Receiver trader account whose authority is validated." + ] + }, + { + "name": "receiverEscrow", + "writable": true, + "docs": [ + "Receiver escrow account holding pending requests." + ] + }, + { + "name": "perpAssetMap", + "docs": [ + "Perp asset map used for margin validation." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer header account; trailing arena accounts may follow in the transaction." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "CreateEscrowRequestParams" + } + } + } + ] + }, + { + "name": "AcceptEscrowRequest", + "docs": [ + "Accepts a pending escrow request and applies its transfer actions." + ], + "discriminator": [ + 182, + 41, + 62, + 227, + 228, + 175, + 22, + 137 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "senderWallet", + "docs": [ + "Sender wallet for the pending escrow request." + ] + }, + { + "name": "senderTraderAccount", + "writable": true, + "docs": [ + "Sender trader account affected by accepted escrow actions." + ] + }, + { + "name": "receiverWallet", + "signer": true, + "docs": [ + "Receiver wallet accepting the escrow request." + ] + }, + { + "name": "receiverTraderAccount", + "writable": true, + "docs": [ + "Receiver trader account affected by accepted escrow actions." + ] + }, + { + "name": "receiverEscrow", + "writable": true, + "docs": [ + "Receiver escrow account containing the pending request." + ] + }, + { + "name": "perpAssetMap", + "docs": [ + "Perp asset map used for margin validation." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer header account; trailing arena accounts may follow in the transaction." + ] + } + ], + "args": [] + }, + { + "name": "CancelEscrowRequest", + "docs": [ + "Cancels a pending escrow request by sequence number." + ], + "discriminator": [ + 202, + 26, + 163, + 239, + 32, + 8, + 85, + 2 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "signerWallet", + "signer": true, + "docs": [ + "Sender or receiver wallet authorized to cancel the escrow request." + ] + }, + { + "name": "receiverWallet", + "docs": [ + "Receiver wallet that owns the escrow account." + ] + }, + { + "name": "receiverEscrow", + "writable": true, + "docs": [ + "Receiver escrow account containing the request." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "CancelEscrowRequestParams" + } + } + } + ] + }, + { + "name": "UpsertEscrowRequest", + "docs": [ + "Creates or increments a cash escrow request for a sender and receiver pair." + ], + "discriminator": [ + 213, + 56, + 86, + 93, + 34, + 103, + 160, + 99 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "senderWallet", + "signer": true, + "docs": [ + "Sender wallet signing the escrow upsert." + ] + }, + { + "name": "senderTraderAccount", + "docs": [ + "Sender trader account whose authority is validated." + ] + }, + { + "name": "permissionAccount", + "writable": true, + "docs": [ + "Permission account authorizing delegated escrow request creation." + ] + }, + { + "name": "receiverWallet", + "docs": [ + "Receiver wallet that owns the escrow account." + ] + }, + { + "name": "receiverTraderAccount", + "docs": [ + "Receiver trader account whose authority is validated." + ] + }, + { + "name": "receiverEscrow", + "writable": true, + "docs": [ + "Receiver escrow account holding pending requests." + ] + }, + { + "name": "perpAssetMap", + "docs": [ + "Perp asset map used for margin validation." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer header account; trailing arena accounts may follow in the transaction." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpsertEscrowRequestParams" + } + } + } + ] + }, + { + "name": "RegisterSpline", + "docs": [ + "Registers a trader as an active spline participant for a market." + ], + "discriminator": [ + 30, + 176, + 160, + 79, + 252, + 117, + 241, + 58 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Market authority or market-management delegate." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "payerAccount", + "writable": true, + "signer": true, + "docs": [ + "Payer funding any required spline account growth." + ] + }, + { + "name": "splineAccount", + "writable": true, + "docs": [ + "Spline collection account for the market." + ] + }, + { + "name": "marketAccount", + "docs": [ + "Market orderbook account for the spline." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader account being registered as a spline participant." + ] + }, + { + "name": "perpAssetMap", + "docs": [ + "Perp asset map used for isolated-only validation." + ] + }, + { + "name": "systemProgram", + "docs": [ + "System program for rent transfers or account growth." + ], + "address": "11111111111111111111111111111111" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "RegisterSplineParams" + } + } + } + ] + }, + { + "name": "UpdateCommodityMarketState", + "docs": [ + "Updates commodity market state and related mark price inputs." + ], + "discriminator": [ + 45, + 245, + 97, + 184, + 200, + 147, + 142, + 73 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Market authority or commodity-market-management delegate." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account updated with commodity market state." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Orderbook account for the commodity market." + ] + }, + { + "name": "splines", + "writable": true, + "docs": [ + "Spline collection account for the commodity market." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdateCommodityMarketStateInstruction" + } + } + } + ] + }, + { + "name": "UpdatePerpIsolatedOnly", + "docs": [ + "Updates the isolated-only flag for a perp asset." + ], + "discriminator": [ + 101, + 56, + 163, + 250, + 73, + 35, + 115, + 91 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Risk authority." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account whose metadata is updated by this instruction." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdatePerpIsolatedOnlyInstruction" + } + } + } + ] + }, + { + "name": "UpdatePerpLeverageTiers", + "docs": [ + "Updates leverage tiers for a perp asset." + ], + "discriminator": [ + 110, + 223, + 244, + 99, + 34, + 83, + 97, + 121 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Risk authority." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account whose metadata is updated by this instruction." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdatePerpLeverageTiersInstruction" + } + } + } + ] + }, + { + "name": "UpdatePerpOpenInterestCap", + "docs": [ + "Updates open interest cap for a perp asset." + ], + "discriminator": [ + 75, + 137, + 116, + 5, + 80, + 123, + 107, + 177 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Risk authority." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account whose metadata is updated by this instruction." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdatePerpOpenInterestCapInstruction" + } + } + } + ] + }, + { + "name": "UpdatePerpUPnlRiskFactor", + "docs": [ + "Updates uPnL risk factor for a perp asset." + ], + "discriminator": [ + 113, + 214, + 226, + 254, + 147, + 9, + 94, + 220 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Risk authority." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account whose metadata is updated by this instruction." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdatePerpUPnlRiskFactorInstruction" + } + } + } + ] + }, + { + "name": "UpdatePerpUPnlRiskFactorForWithdrawals", + "docs": [ + "Updates withdrawal uPnL risk factor for a perp asset." + ], + "discriminator": [ + 252, + 32, + 10, + 88, + 238, + 245, + 104, + 59 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Risk authority." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account whose metadata is updated by this instruction." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdatePerpUPnlRiskFactorForWithdrawalsInstruction" + } + } + } + ] + }, + { + "name": "UpdatePerpCancelRiskFactor", + "docs": [ + "Updates cancel-order risk factor for a perp asset." + ], + "discriminator": [ + 88, + 6, + 185, + 205, + 118, + 28, + 129, + 242 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Risk authority." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account whose metadata is updated by this instruction." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdatePerpCancelRiskFactorInstruction" + } + } + } + ] + }, + { + "name": "UpdatePerpMarkPriceParameters", + "docs": [ + "Updates mark price calculation parameters for a perp asset." + ], + "discriminator": [ + 254, + 86, + 13, + 94, + 43, + 224, + 160, + 226 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Risk authority." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account whose metadata is updated by this instruction." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdatePerpMarkPriceParametersInstruction" + } + } + } + ] + }, + { + "name": "UpdateTraderFees", + "docs": [ + "Updates fee override multipliers for a trader." + ], + "discriminator": [ + 182, + 233, + 57, + 205, + 174, + 168, + 73, + 237 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Market authority or fee-update delegate." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader account whose fee overrides are updated." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index account; trailing arena accounts may follow in the transaction." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdateTraderFeesParams" + } + } + } + ] + }, + { + "name": "UpdateMarketFees", + "docs": [ + "Updates default fee parameters for a market orderbook." + ], + "discriminator": [ + 187, + 36, + 121, + 171, + 131, + 19, + 243, + 117 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Market authority." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "orderbookAccount", + "writable": true, + "docs": [ + "Orderbook account whose default fee parameters are updated." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdateMarketFeesParams" + } + } + } + ] + }, + { + "name": "UpdateWithdrawRateLimits", + "docs": [ + "Updates withdrawal throttle budget and replenishment parameters." + ], + "discriminator": [ + 187, + 246, + 146, + 182, + 141, + 216, + 36, + 1 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Root authority or withdrawal-suspension delegate." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "withdrawQueueAccount", + "writable": true, + "docs": [ + "Withdraw queue account whose throttle settings are updated." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdateWithdrawRateLimitsParams" + } + } + } + ] + }, + { + "name": "UpdateWithdrawParameters", + "docs": [ + "Updates withdraw cooldown and fee parameters." + ], + "discriminator": [ + 87, + 209, + 225, + 132, + 91, + 151, + 249, + 132 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA that stores mutable exchange-wide configuration." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Risk authority." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "withdrawQueueAccount", + "writable": true, + "docs": [ + "Withdraw queue account whose fee parameters are updated." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdateWithdrawParametersParams" + } + } + } + ] + }, + { + "name": "UpdateAuthorities", + "docs": [ + "Updates subordinate authorities stored in global configuration." + ], + "discriminator": [ + 175, + 228, + 137, + 18, + 175, + 70, + 220, + 165 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "writable": true, + "docs": [ + "Global configuration PDA that stores mutable exchange-wide configuration." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Root authority or permitted delegate." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdateAuthoritiesParams" + } + } + } + ] + }, + { + "name": "InitializeArena", + "docs": [ + "Initializes a new global trader index or active trader buffer arena account." + ], + "discriminator": [ + 11, + 37, + 221, + 1, + 205, + 120, + 25, + 230 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Risk authority or arena-management delegate." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "headerAccount", + "writable": true, + "docs": [ + "Arena family header account." + ] + }, + { + "name": "newArenaAccount", + "writable": true, + "docs": [ + "New arena account to create and initialize." + ] + }, + { + "name": "systemProgram", + "docs": [ + "System program for creating the arena account." + ], + "address": "11111111111111111111111111111111" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "InitializeArenaParams" + } + } + } + ] + }, + { + "name": "RemoveEmptyArena", + "docs": [ + "Removes an empty active trader buffer arena account." + ], + "discriminator": [ + 155, + 65, + 162, + 79, + 211, + 221, + 197, + 168 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Risk authority or arena-management delegate." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "headerAccount", + "writable": true, + "docs": [ + "Active trader buffer header account." + ] + }, + { + "name": "removedAccount", + "writable": true, + "docs": [ + "Empty arena account to remove." + ] + }, + { + "name": "systemProgram", + "docs": [ + "System program." + ], + "address": "11111111111111111111111111111111" + } + ], + "args": [] + }, + { + "name": "RemoveOracle", + "docs": [ + "Removes one or more oracle public keys from the perp asset map." + ], + "discriminator": [ + 60, + 93, + 51, + 197, + 182, + 42, + 170, + 26 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Oracle authority or oracle-update delegate." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account whose metadata is updated by this instruction." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "RemoveOracleInstruction" + } + } + } + ] + }, + { + "name": "RemoveAllOracles", + "docs": [ + "Removes all oracle public keys for a perp asset." + ], + "discriminator": [ + 164, + 64, + 91, + 210, + 137, + 189, + 135, + 38 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Root authority." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account whose metadata is updated by this instruction." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "RemoveAllOraclesInstruction" + } + } + } + ] + }, + { + "name": "SetPermissionDelegated", + "docs": [ + "Sets a whitelisted permission on a target permission account through delegated authority." + ], + "discriminator": [ + 35, + 25, + 57, + 68, + 255, + 26, + 161, + 229 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Authority with permission to set delegated permissions." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "targetPermission", + "writable": true, + "docs": [ + "Permission account whose flags are updated." + ] + }, + { + "name": "from", + "docs": [ + "Authority seed of the target permission PDA." + ] + }, + { + "name": "to", + "docs": [ + "User seed of the target permission PDA." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "SetPermissionInstruction" + } + } + } + ] + }, + { + "name": "DeactivateSpline", + "docs": [ + "Deactivates a trader spline for a market." + ], + "discriminator": [ + 0, + 254, + 22, + 100, + 238, + 197, + 118, + 181 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Market authority or market-management delegate." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "splineAccount", + "writable": true, + "docs": [ + "Spline collection account for the market." + ] + }, + { + "name": "marketAccount", + "docs": [ + "Market orderbook account for the spline." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "traderAccount", + "writable": true, + "docs": [ + "Trader account being deactivated as a spline participant." + ] + }, + { + "name": "perpAssetMap", + "docs": [ + "Perp asset map used while updating trader activity." + ] + }, + { + "name": "systemProgram", + "docs": [ + "System program." + ], + "address": "11111111111111111111111111111111" + } + ], + "args": [] + }, + { + "name": "ForceCancelStopLoss", + "docs": [ + "Force cancels stop loss state for a trader after market closure." + ], + "discriminator": [ + 114, + 230, + 115, + 170, + 66, + 79, + 19, + 172 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Market authority or market-management delegate." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "orderbook", + "docs": [ + "Closed market orderbook associated with the stop loss." + ] + }, + { + "name": "funder", + "writable": true, + "docs": [ + "Funder account receiving reclaimed stop loss rent." + ] + }, + { + "name": "traderAccount", + "docs": [ + "Trader account that owns the stop loss." + ] + }, + { + "name": "stopLossAccount", + "writable": true, + "docs": [ + "Stop loss account to close." + ] + }, + { + "name": "systemProgram", + "docs": [ + "System program." + ], + "address": "11111111111111111111111111111111" + } + ], + "args": [] + }, + { + "name": "UpdateFundingParameters", + "docs": [ + "Updates funding parameters for a perp asset." + ], + "discriminator": [ + 101, + 195, + 104, + 104, + 116, + 20, + 223, + 188 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Market authority." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account whose metadata is updated by this instruction." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdateFundingParametersInstruction" + } + } + } + ] + }, + { + "name": "CloseMarket", + "docs": [ + "Closes a market and records its finalized mark price." + ], + "discriminator": [ + 88, + 154, + 248, + 186, + 48, + 14, + 123, + 244 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Market authority." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account updated with finalized mark price." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Orderbook account whose status is moved to Closed." + ] + } + ], + "args": [] + }, + { + "name": "TombstoneMarket", + "docs": [ + "Tombstones a closed market after open interest, orders, and splines are cleared." + ], + "discriminator": [ + 90, + 177, + 17, + 88, + 85, + 11, + 177, + 96 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Market authority." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Closed orderbook account to tombstone." + ] + }, + { + "name": "perpAssetMap", + "docs": [ + "Perp asset map account used to verify open interest is zero." + ] + }, + { + "name": "splineCollection", + "docs": [ + "Spline collection account used to verify no active splines remain." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer header account; trailing arena accounts may follow in the transaction." + ] + } + ], + "args": [] + }, + { + "name": "SettleClosedMarketPosition", + "docs": [ + "Settles matching long and short trader positions in a closed market." + ], + "discriminator": [ + 27, + 222, + 221, + 233, + 136, + 15, + 254, + 210 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Market authority or market-management delegate." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account containing finalized mark price." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Closed orderbook account for the market." + ] + }, + { + "name": "globalTraderIndex", + "writable": true, + "docs": [ + "Global trader index header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "activeTraderBuffer", + "writable": true, + "docs": [ + "Active trader buffer header account; trailing arena accounts may follow in the transaction." + ] + }, + { + "name": "longTrader", + "writable": true, + "docs": [ + "Trader account with a long position to settle." + ] + }, + { + "name": "shortTrader", + "writable": true, + "docs": [ + "Trader account with a short position to settle." + ] + } + ], + "args": [] + }, + { + "name": "DeleteTombstonedMarket", + "docs": [ + "Deletes a tombstoned market and reclaims orderbook and spline rent." + ], + "discriminator": [ + 146, + 17, + 252, + 116, + 222, + 113, + 52, + 102 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "globalConfiguration", + "docs": [ + "Global configuration PDA used to validate exchange-wide account relationships." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "authority", + "signer": true, + "docs": [ + "Market authority." + ] + }, + { + "name": "maybePermissionAccount", + "writable": true, + "docs": [ + "Permission account used for delegated authority validation." + ] + }, + { + "name": "lamportRecipient", + "writable": true, + "docs": [ + "Account receiving reclaimed lamports." + ] + }, + { + "name": "perpAssetMap", + "writable": true, + "docs": [ + "Perp asset map account from which the market metadata is removed." + ] + }, + { + "name": "orderbook", + "writable": true, + "docs": [ + "Tombstoned orderbook account to delete." + ] + }, + { + "name": "splineCollection", + "writable": true, + "docs": [ + "Spline collection account to delete." + ] + } + ], + "args": [] + }, + { + "name": "UpdateSplinePositionLimitsConfig", + "docs": [ + "Updates position-size limits and leverage decrease configuration for a spline trader." + ], + "discriminator": [ + 96, + 60, + 5, + 112, + 19, + 144, + 13, + 107 + ], + "accounts": [ + { + "name": "phoenixProgram", + "docs": [ + "Phoenix Eternal program id; logged to assert the correct executable is invoked." + ] + }, + { + "name": "phoenixLogAuthority", + "docs": [ + "Phoenix log authority PDA used for emitting on-chain market events." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 108, + 111, + 103 + ] + } + ], + "program": { + "kind": "const", + "value": [ + 206, + 112, + 214, + 251, + 86, + 142, + 67, + 235, + 252, + 150, + 74, + 144, + 21, + 108, + 59, + 233, + 86, + 59, + 8, + 23, + 6, + 124, + 171, + 105, + 78, + 188, + 131, + 239, + 221, + 179, + 126, + 134 + ] + } + } + }, + { + "name": "signerAccount", + "signer": true, + "docs": [ + "Trader or authority signer updating spline position limits." + ] + }, + { + "name": "traderAccount", + "docs": [ + "Trader account associated with the spline." + ] + }, + { + "name": "splineAccount", + "writable": true, + "docs": [ + "Spline collection account holding the trader spline." + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdateSplinePositionLimitsConfigParams" + } + } + } + ] + } + ], + "accounts": [ + { + "name": "GlobalConfiguration", + "discriminator": [ + 37, + 146, + 212, + 210, + 47, + 136, + 111, + 20 + ], + "docs": [ + "Global exchange configuration account derived from the \"global\" PDA seed.", + "Stores configured authorities, canonical collateral mint, global vault, PerpAssetMap, GlobalTraderIndex, ActiveTraderBuffer, and WithdrawQueue addresses." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108 + ] + } + ] + } + }, + { + "name": "OrderbookHeader", + "discriminator": [ + 65, + 1, + 40, + 241, + 166, + 14, + 86, + 188 + ], + "docs": [ + "Market orderbook account header for a perpetual market.", + "Market orderbooks are explicit market accounts created during AddMarket and recorded in PerpAssetMap metadata; they are not PDAs." + ] + }, + { + "name": "SplineCollectionHeader", + "discriminator": [ + 192, + 245, + 182, + 191, + 88, + 37, + 79, + 48 + ], + "docs": [ + "Spline collection account header derived from [\"spline\", orderbook].", + "Stores spline market-making state for one market." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 115, + 112, + 108, + 105, + 110, + 101 + ] + }, + { + "kind": "account", + "path": "marketAccount", + "account": "OrderbookHeader" + } + ] + } + }, + { + "name": "Trader", + "discriminator": [ + 41, + 97, + 73, + 105, + 110, + 214, + 112, + 9 + ], + "docs": [ + "Trader account derived from [\"trader\", authority, trader_pda_index, trader_subaccount_index].", + "Stores collateral, positions, open orders, and per-trader risk state." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 116, + 114, + 97, + 100, + 101, + 114 + ] + }, + { + "kind": "account", + "path": "authority" + }, + { + "kind": "arg", + "path": "traderPdaIndex" + }, + { + "kind": "arg", + "path": "traderSubaccountIndex" + } + ] + } + }, + { + "name": "ActiveTraderBufferHeader", + "discriminator": [ + 192, + 255, + 205, + 165, + 80, + 154, + 131, + 5 + ], + "docs": [ + "Header arena for the active trader buffer derived from [\"active_trader_buffer\", 0u16]." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 97, + 99, + 116, + 105, + 118, + 101, + 95, + 116, + 114, + 97, + 100, + 101, + 114, + 95, + 98, + 117, + 102, + 102, + 101, + 114 + ] + }, + { + "kind": "const", + "value": [ + 0, + 0 + ] + } + ] + } + }, + { + "name": "ActiveTraderBufferArenaHeader", + "discriminator": [ + 6, + 249, + 57, + 137, + 82, + 121, + 191, + 107 + ], + "docs": [ + "Additional active trader buffer arena derived from [\"active_trader_buffer\", arena_index]." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 97, + 99, + 116, + 105, + 118, + 101, + 95, + 116, + 114, + 97, + 100, + 101, + 114, + 95, + 98, + 117, + 102, + 102, + 101, + 114 + ] + }, + { + "kind": "arg", + "path": "arenaIndex" + } + ] + } + }, + { + "name": "GlobalTraderIndexHeader", + "discriminator": [ + 145, + 92, + 169, + 6, + 5, + 144, + 1, + 205 + ], + "docs": [ + "Header arena for the global trader index derived from [\"global_trader_index\", 0u16]." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108, + 95, + 116, + 114, + 97, + 100, + 101, + 114, + 95, + 105, + 110, + 100, + 101, + 120 + ] + }, + { + "kind": "const", + "value": [ + 0, + 0 + ] + } + ] + } + }, + { + "name": "GlobalTraderIndexArenaHeader", + "discriminator": [ + 98, + 110, + 179, + 71, + 203, + 120, + 200, + 235 + ], + "docs": [ + "Additional global trader index arena derived from [\"global_trader_index\", arena_index]." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 103, + 108, + 111, + 98, + 97, + 108, + 95, + 116, + 114, + 97, + 100, + 101, + 114, + 95, + 105, + 110, + 100, + 101, + 120 + ] + }, + { + "kind": "arg", + "path": "arenaIndex" + } + ] + } + }, + { + "name": "PerpAssetMap", + "discriminator": [ + 142, + 54, + 115, + 223, + 124, + 239, + 108, + 38 + ], + "docs": [ + "Perpetual asset map account storing market metadata, risk parameters, oracle metadata, and funding state.", + "The account pubkey is stored in GlobalConfiguration rather than derived from a fixed PDA seed; it is not a PDA." + ] + }, + { + "name": "WithdrawQueueHeader", + "discriminator": [ + 125, + 59, + 94, + 108, + 171, + 16, + 43, + 228 + ], + "docs": [ + "Withdraw queue account storing pending withdrawals and withdrawal throttle state.", + "The account pubkey is stored in GlobalConfiguration rather than derived from a fixed PDA seed; it is not a PDA." + ] + }, + { + "name": "PermissionAccount", + "discriminator": [ + 180, + 172, + 109, + 215, + 129, + 165, + 97, + 38 + ], + "docs": [ + "Permission delegation account derived from [\"permission\", authority, user].", + "Stores delegated capability bits and optional expiry/usage constraints." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 112, + 101, + 114, + 109, + 105, + 115, + 115, + 105, + 111, + 110 + ] + }, + { + "kind": "account", + "path": "authority" + }, + { + "kind": "account", + "path": "user" + } + ] + } + }, + { + "name": "StopLosses", + "discriminator": [ + 127, + 64, + 139, + 143, + 70, + 43, + 167, + 152 + ], + "docs": [ + "Stop-loss account derived from [\"stoploss\", trader_account, asset_id].", + "Stores trigger orders for one trader and market." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 115, + 116, + 111, + 112, + 108, + 111, + 115, + 115 + ] + }, + { + "kind": "account", + "path": "traderAccount", + "account": "Trader" + }, + { + "kind": "arg", + "path": "assetId" + } + ] + } + }, + { + "name": "EscrowHeader", + "discriminator": [ + 50, + 4, + 48, + 59, + 209, + 138, + 251, + 204 + ], + "docs": [ + "Escrow inbox account derived from [\"escrow\", authority].", + "Stores pending escrow requests for the authority." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 101, + 115, + 99, + 114, + 111, + 119 + ] + }, + { + "kind": "account", + "path": "authority" + } + ] + } + }, + { + "name": "ConditionalOrderHeader", + "discriminator": [ + 147, + 116, + 229, + 177, + 249, + 200, + 146, + 49 + ], + "docs": [ + "Conditional orders account derived from [\"conditional_orders\", trader_account].", + "Stores attached and position-scoped conditional orders for a trader account." + ], + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 99, + 111, + 110, + 100, + 105, + 116, + 105, + 111, + 110, + 97, + 108, + 95, + 111, + 114, + 100, + 101, + 114, + 115 + ] + }, + { + "kind": "account", + "path": "traderAccount", + "account": "Trader" + } + ] + } + } + ], + "types": [ + { + "name": "OrderPacket", + "docs": [ + "Serialized parameters for Phoenix order placement instructions." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "kind", + "type": { + "defined": { + "name": "OrderPacketKind" + } + } + } + ] + } + }, + { + "name": "OrderPacketKind", + "docs": [ + "Supported order variants accepted by the Phoenix matching engine." + ], + "type": { + "kind": "enum", + "variants": [ + { + "name": "PostOnly", + "fields": [ + { + "name": "side", + "type": { + "defined": { + "name": "Side" + } + } + }, + { + "name": "priceInTicks", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "numBaseLots", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "clientOrderId", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "slide", + "type": "bool" + }, + { + "name": "lastValidSlot", + "type": { + "option": "u64" + } + }, + { + "name": "orderFlags", + "type": { + "defined": { + "name": "OrderFlags" + } + } + }, + { + "name": "cancelExisting", + "type": "bool" + } + ] + }, + { + "name": "Limit", + "fields": [ + { + "name": "side", + "type": { + "defined": { + "name": "Side" + } + } + }, + { + "name": "priceInTicks", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "numBaseLots", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "selfTradeBehavior", + "type": { + "defined": { + "name": "SelfTradeBehavior" + } + } + }, + { + "name": "matchLimit", + "type": { + "option": "u64" + } + }, + { + "name": "clientOrderId", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "lastValidSlot", + "type": { + "option": "u64" + } + }, + { + "name": "orderFlags", + "type": { + "defined": { + "name": "OrderFlags" + } + } + }, + { + "name": "cancelExisting", + "type": "bool" + } + ] + }, + { + "name": "ImmediateOrCancel", + "fields": [ + { + "name": "side", + "type": { + "defined": { + "name": "Side" + } + } + }, + { + "name": "priceInTicks", + "type": { + "option": { + "defined": { + "name": "Ticks" + } + } + } + }, + { + "name": "numBaseLots", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "numQuoteLots", + "type": { + "option": { + "defined": { + "name": "QuoteLots" + } + } + } + }, + { + "name": "minBaseLotsToFill", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "minQuoteLotsToFill", + "type": { + "defined": { + "name": "QuoteLots" + } + } + }, + { + "name": "selfTradeBehavior", + "type": { + "defined": { + "name": "SelfTradeBehavior" + } + } + }, + { + "name": "matchLimit", + "type": { + "option": "u64" + } + }, + { + "name": "clientOrderId", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "lastValidSlot", + "type": { + "option": "u64" + } + }, + { + "name": "orderFlags", + "type": { + "defined": { + "name": "OrderFlags" + } + } + }, + { + "name": "cancelExisting", + "type": "bool" + } + ] + } + ] + } + }, + { + "name": "Side", + "docs": [ + "Trading direction for an order." + ], + "type": { + "kind": "enum", + "variants": [ + { + "name": "Bid" + }, + { + "name": "Ask" + } + ] + } + }, + { + "name": "SelfTradeBehavior", + "docs": [ + "Policy for handling matches against the submitting trader's resting orders." + ], + "type": { + "kind": "enum", + "variants": [ + { + "name": "Abort" + }, + { + "name": "CancelProvide" + }, + { + "name": "DecrementTake" + } + ] + } + }, + { + "name": "BaseLots", + "docs": [ + "Quantity wrapper representing discrete base lots." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": "u64" + } + ] + } + }, + { + "name": "QuoteLots", + "docs": [ + "Quantity wrapper representing discrete quote lots." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": "u64" + } + ] + } + }, + { + "name": "Ticks", + "docs": [ + "Discrete price unit measured in quote lots per base lot." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": "u64" + } + ] + } + }, + { + "name": "BaseLotsPerTick", + "docs": [ + "Density of liquidity per tick for spline market making." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": "u64" + } + ] + } + }, + { + "name": "OrderFlags", + "docs": [ + "Bitmask flags applied to an order (currently only the reduce-only bit is used)." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "flags", + "type": "u8" + } + ] + } + }, + { + "name": "OrderIds", + "docs": [ + "Collection of cancel identifiers used to target specific resting orders." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "orderIds", + "type": { + "vec": { + "defined": { + "name": "CancelId" + } + } + } + } + ] + } + }, + { + "name": "CancelUpToInstruction", + "docs": [ + "Parameters controlling cancel-up-to behaviour." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "side", + "type": { + "defined": { + "name": "Side" + } + } + }, + { + "name": "numOrdersToCancel", + "type": { + "option": "u64" + } + }, + { + "name": "tickLimit", + "type": { + "option": "u64" + } + } + ] + } + }, + { + "name": "CancelId", + "docs": [ + "Identifies a resting order along with an optional hint into the orderbook." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "nodePointer", + "type": { + "defined": { + "name": "NodePointer" + } + } + }, + { + "name": "orderId", + "type": { + "defined": { + "name": "FIFOOrderId" + } + } + } + ] + } + }, + { + "name": "FIFOOrderId", + "docs": [ + "Stable identifier for a resting order composed of price ticks and sequence number." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "priceInTicks", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "orderSequenceNumber", + "type": "u64" + } + ] + } + }, + { + "name": "NodePointer", + "docs": [ + "Pointer hint into the orderbook linked list; zero represents a null pointer." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "value", + "type": "u32" + } + ] + } + }, + { + "name": "Symbol", + "docs": [ + "Fixed-width (16 byte) asset symbol stored as UTF-8 with trailing zero padding." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "symbolBytes", + "type": { + "array": [ + "u8", + 16 + ] + } + } + ] + } + }, + { + "name": "Price", + "docs": [ + "Price representation composed of a mantissa (`value`) and decimal exponent (`expo`)." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "value", + "type": "u64" + }, + { + "name": "expo", + "type": "u8" + } + ] + } + }, + { + "name": "OraclePriceUpdate", + "docs": [ + "Single oracle price update targeting a specific perpetual asset." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "perpAssetId", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "newExchangePerpPrice", + "type": { + "option": { + "defined": { + "name": "Price" + } + } + } + }, + { + "name": "newExchangeSpotPrice", + "type": { + "defined": { + "name": "Price" + } + } + } + ] + } + }, + { + "name": "UpdateOraclePricesWithOrderingInstruction", + "docs": [ + "Oracle instruction payload containing ordered price updates and timestamp reset policy." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "updateTimestamp", + "type": "u64" + }, + { + "name": "updates", + "type": { + "vec": { + "defined": { + "name": "OraclePriceUpdate" + } + } + } + }, + { + "name": "shouldResetTimestamp", + "type": "bool" + } + ] + } + }, + { + "name": "UpdateSplinePriceParams", + "docs": [ + "Parameters for updating a spline's mid-price." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "newMidPrice", + "type": "u64" + }, + { + "name": "userUpdateSlot", + "type": { + "option": "u64" + } + }, + { + "name": "refreshRegions", + "type": "bool" + } + ] + } + }, + { + "name": "UpdateSplinePriceParamsWithOrdering", + "docs": [ + "Parameters for updating a spline's mid-price with anti-reordering protection." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "newMidPrice", + "type": "u64" + }, + { + "name": "userUpdateSlot", + "type": { + "option": "u64" + } + }, + { + "name": "refreshRegions", + "type": "bool" + }, + { + "name": "userSequenceNumber", + "type": "u64" + }, + { + "name": "clientOrderId", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "overrideSequenceNumber", + "type": "bool" + } + ] + } + }, + { + "name": "DepositFundsInstruction", + "docs": [ + "Parameters for depositing collateral into the global vault." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + } + ] + } + }, + { + "name": "RegisterTraderParams", + "docs": [ + "Parameters for registering a new trader account." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxPositions", + "type": "u64" + }, + { + "name": "traderPdaIndex", + "type": "u8" + }, + { + "name": "traderSubaccountIndex", + "type": "u8" + } + ] + } + }, + { + "name": "LiquidationParams", + "docs": [ + "Parameters for liquidating a trader's position via market order." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "assetMint", + "type": "pubkey" + }, + { + "name": "liquidationSize", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "liquidationPrice", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "fillOrKill", + "type": "bool" + } + ] + } + }, + { + "name": "TransferRequest", + "docs": [ + "Transfer payload describing how many base lots of an asset should move from the liquidatee to the liquidator." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "assetId", + "type": "u64" + }, + { + "name": "amount", + "type": { + "defined": { + "name": "BaseLots" + } + } + } + ] + } + }, + { + "name": "LiquidationTransferParams", + "docs": [ + "Parameters controlling liquidation transfers between traders." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "transferRequests", + "type": { + "vec": { + "defined": { + "name": "TransferRequest" + } + } + } + }, + { + "name": "executeAllTransfers", + "type": "bool" + } + ] + } + }, + { + "name": "ClosePositionsParams", + "docs": [ + "Parameters for closing matched positions between at-loss and in-profit traders." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "assetId", + "type": "u64" + }, + { + "name": "amount", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "atLossCloseValue", + "type": { + "option": { + "defined": { + "name": "QuoteLots" + } + } + } + }, + { + "name": "inProfitCloseValue", + "type": { + "option": { + "defined": { + "name": "QuoteLots" + } + } + } + } + ] + } + }, + { + "name": "MultipleOrderPacket", + "docs": [ + "Batch order packet for placing multiple post-only limit orders in a single transaction." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "bids", + "type": { + "vec": { + "defined": { + "name": "CondensedOrder" + } + } + } + }, + { + "name": "asks", + "type": { + "vec": { + "defined": { + "name": "CondensedOrder" + } + } + } + }, + { + "name": "clientOrderId", + "type": { + "option": { + "array": [ + "u8", + 16 + ] + } + } + }, + { + "name": "slide", + "type": "bool" + } + ] + } + }, + { + "name": "CondensedOrder", + "docs": [ + "Condensed order representation for batch order placement (price, size, and optional TiF)." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "priceInTicks", + "type": "u64" + }, + { + "name": "sizeInBaseLots", + "type": "u64" + }, + { + "name": "lastValidSlot", + "type": { + "option": "u64" + } + } + ] + } + }, + { + "name": "WithdrawFundsInstruction", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64", + "docs": [ + "Amount in quote lots to withdraw." + ] + } + ] + } + }, + { + "name": "UpdateSplineParametersParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bidRegions", + "type": { + "vec": { + "defined": { + "name": "TickRegionParams" + } + } + } + }, + { + "name": "askRegions", + "type": { + "vec": { + "defined": { + "name": "TickRegionParams" + } + } + } + }, + { + "name": "refreshRegions", + "type": "bool" + } + ] + } + }, + { + "name": "UpdateSplineParametersParamsWithOrdering", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bidRegions", + "type": { + "vec": { + "defined": { + "name": "TickRegionParams" + } + } + } + }, + { + "name": "askRegions", + "type": { + "vec": { + "defined": { + "name": "TickRegionParams" + } + } + } + }, + { + "name": "refreshRegions", + "type": "bool" + }, + { + "name": "userSequenceNumber", + "type": "u64" + }, + { + "name": "clientOrderId", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "overrideSequenceNumber", + "type": "bool" + } + ] + } + }, + { + "name": "TickRegionParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "startOffset", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "endOffset", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "density", + "type": { + "defined": { + "name": "BaseLotsPerTick" + } + } + }, + { + "name": "lifespan", + "type": "u64" + } + ] + } + }, + { + "name": "PlaceStopLossInstruction", + "type": { + "kind": "struct", + "fields": [ + { + "name": "triggerPrice", + "type": "u64" + }, + { + "name": "executionPrice", + "type": "u64" + }, + { + "name": "tradeSize", + "type": "u64" + }, + { + "name": "tradeSide", + "type": { + "defined": { + "name": "Side" + } + } + }, + { + "name": "executionDirection", + "type": { + "defined": { + "name": "Direction" + } + } + }, + { + "name": "orderKind", + "type": { + "defined": { + "name": "StopLossOrderKind" + } + } + } + ] + } + }, + { + "name": "ExecuteStopLossInstruction", + "type": { + "kind": "struct", + "fields": [ + { + "name": "executionDirection", + "type": { + "defined": { + "name": "Direction" + } + } + } + ] + } + }, + { + "name": "CancelStopLossInstruction", + "type": { + "kind": "struct", + "fields": [ + { + "name": "executionDirection", + "type": { + "defined": { + "name": "Direction" + } + } + } + ] + } + }, + { + "name": "ForceCancelRiskIncreasingParams", + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "Direction", + "type": { + "kind": "enum", + "variants": [ + { + "name": "GreaterThan" + }, + { + "name": "LessThan" + } + ] + } + }, + { + "name": "StopLossOrderKind", + "type": { + "kind": "enum", + "variants": [ + { + "name": "IOC" + }, + { + "name": "Limit" + } + ] + } + }, + { + "name": "LogHeader", + "type": { + "kind": "struct", + "fields": [ + { + "name": "logBatchIndex", + "docs": [ + "Index of this log batch for tracking event sequences." + ], + "type": "u32" + }, + { + "name": "totalEvents", + "docs": [ + "Number of events serialized in this log batch." + ], + "type": "u32" + } + ] + } + }, + { + "name": "OrderbookHeader", + "docs": [ + "Fixed metadata prefix for a Phoenix Eternal orderbook account.", + "The large recent-trade buffer and dynamic orderbook bytes follow this prefix and are left as trailing account data by generic decoders." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "discriminant", + "type": "u64" + }, + { + "name": "marketStatus", + "type": "u8" + }, + { + "name": "baseLotsDecimals", + "type": "i8" + }, + { + "name": "padding0", + "type": { + "array": [ + "u8", + 6 + ] + } + }, + { + "name": "sequenceNumber", + "type": { + "defined": { + "name": "SequenceNumber" + } + } + }, + { + "name": "assetId", + "type": "u32" + }, + { + "name": "assetIdPadding", + "type": { + "array": [ + "u8", + 4 + ] + } + }, + { + "name": "assetSymbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "tickSizeInQuoteLotsPerBaseLot", + "type": "u64" + }, + { + "name": "orderSequenceNumber", + "type": { + "defined": { + "name": "SequenceNumber" + } + } + }, + { + "name": "tradeSequenceNumber", + "type": { + "defined": { + "name": "SequenceNumber" + } + } + }, + { + "name": "defaultTakerFeeMicro", + "type": "u32" + }, + { + "name": "defaultMakerFeeMicro", + "type": "i32" + }, + { + "name": "totalMakerQuoteLotFees", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "totalTakerQuoteLotFees", + "type": { + "defined": { + "name": "QuoteLots" + } + } + } + ] + } + }, + { + "name": "SplineCollectionHeader", + "docs": [ + "Fixed SplineCollectionHeader prefix for a Phoenix Eternal spline collection account.", + "Dynamic spline map bytes follow this header and are left as trailing account data by generic decoders." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "discriminant", + "type": "u64" + }, + { + "name": "market", + "type": "pubkey" + }, + { + "name": "assetSymbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "sequenceNumber", + "type": { + "defined": { + "name": "SequenceNumber" + } + } + }, + { + "name": "numSplines", + "type": "u32" + }, + { + "name": "numActive", + "type": "u32" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 32 + ] + } + } + ] + } + }, + { + "name": "TraderState", + "docs": [ + "Fixed trader state embedded in the Phoenix Eternal DynamicTraderHeader." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "quoteLotCollateral", + "type": "i64" + }, + { + "name": "flags", + "type": "u32" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 1 + ] + } + }, + { + "name": "globalPositionSequenceNumber", + "type": "u8" + }, + { + "name": "makerFeeOverrideMultiplier", + "type": "i8" + }, + { + "name": "takerFeeOverrideMultiplier", + "type": "i8" + } + ] + } + }, + { + "name": "Trader", + "docs": [ + "Fixed DynamicTraderHeader prefix for a Phoenix Eternal trader account.", + "Dynamic position map bytes follow this header and are left as trailing account data by generic decoders." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "discriminant", + "type": "u64" + }, + { + "name": "sequenceNumber", + "type": { + "defined": { + "name": "SequenceNumber" + } + } + }, + { + "name": "key", + "type": "pubkey" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "traderState", + "type": { + "defined": { + "name": "TraderState" + } + } + }, + { + "name": "padding0", + "type": { + "array": [ + "u8", + 4 + ] + } + }, + { + "name": "withdrawQueueNode", + "type": "u32" + }, + { + "name": "maxPositions", + "type": "u64" + }, + { + "name": "positionAuthority", + "type": "pubkey" + }, + { + "name": "numMarketsWithSplines", + "type": "u16" + }, + { + "name": "traderPdaIndex", + "type": "u8" + }, + { + "name": "traderSubaccountIndex", + "type": "u8" + }, + { + "name": "fundingKey", + "type": "pubkey" + }, + { + "name": "padding1", + "type": { + "array": [ + "u8", + 4 + ] + } + }, + { + "name": "lastDepositSlot", + "type": "u64" + }, + { + "name": "conditionalOrderBits", + "type": { + "array": [ + "u8", + 24 + ] + } + } + ] + } + }, + { + "name": "ActiveTraderBufferHeader", + "docs": [ + "Discriminator-only account definition for viewer compatibility.", + "The full active trader buffer layout is not modeled in this IDL." + ], + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "ActiveTraderBufferArenaHeader", + "docs": [ + "Discriminator-only account definition for viewer compatibility.", + "The full active trader buffer arena layout is not modeled in this IDL." + ], + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "GlobalTraderIndexHeader", + "docs": [ + "Discriminator-only account definition for viewer compatibility.", + "The full global trader index layout is not modeled in this IDL." + ], + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "GlobalTraderIndexArenaHeader", + "docs": [ + "Discriminator-only account definition for viewer compatibility.", + "The full global trader index arena layout is not modeled in this IDL." + ], + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "GlobalConfiguration", + "type": { + "kind": "struct", + "fields": [ + { + "name": "discriminant", + "type": "u64" + }, + { + "name": "accountKey", + "type": "pubkey" + }, + { + "name": "rootAuthority", + "type": "pubkey" + }, + { + "name": "riskAuthority", + "type": "pubkey" + }, + { + "name": "marketAuthority", + "type": "pubkey" + }, + { + "name": "oracleAuthority", + "type": "pubkey" + }, + { + "name": "successorAuthority", + "type": "pubkey" + }, + { + "name": "adlAuthority", + "type": "pubkey" + }, + { + "name": "cancelAuthority", + "type": "pubkey" + }, + { + "name": "backstopAuthority", + "type": "pubkey" + }, + { + "name": "canonicalTokenMintKey", + "type": "pubkey" + }, + { + "name": "globalVaultKey", + "type": "pubkey" + }, + { + "name": "perpAssetMapKey", + "type": "pubkey" + }, + { + "name": "globalTraderIndexHeaderKey", + "type": "pubkey" + }, + { + "name": "activeTraderBufferHeaderKey", + "type": "pubkey" + }, + { + "name": "totalQuoteLotFees", + "type": { + "defined": { + "name": "QuoteLots" + } + } + }, + { + "name": "unclaimedQuoteLotFees", + "type": { + "defined": { + "name": "QuoteLots" + } + } + }, + { + "name": "withdrawQueueKey", + "type": "pubkey" + }, + { + "name": "exchangeStatus", + "type": "u8" + }, + { + "name": "quoteDecimals", + "type": "u8" + }, + { + "name": "withdrawalMarginFactorBps", + "type": "u16" + }, + { + "name": "padding0", + "type": { + "array": [ + "u8", + 4 + ] + } + }, + { + "name": "padding1", + "type": { + "array": [ + "u64", + 32 + ] + } + }, + { + "name": "padding2", + "type": { + "array": [ + "u64", + 32 + ] + } + }, + { + "name": "padding3", + "type": { + "array": [ + "u64", + 32 + ] + } + }, + { + "name": "padding4", + "type": { + "array": [ + "u64", + 32 + ] + } + }, + { + "name": "padding5", + "type": { + "array": [ + "u64", + 32 + ] + } + }, + { + "name": "padding6", + "type": { + "array": [ + "u64", + 32 + ] + } + }, + { + "name": "padding7", + "type": { + "array": [ + "u64", + 32 + ] + } + }, + { + "name": "padding8", + "type": { + "array": [ + "u64", + 32 + ] + } + } + ] + } + }, + { + "name": "SequenceNumber", + "docs": [ + "Pair of sequence number and last update slot." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "lastUpdateSlot", + "type": "u64" + } + ] + } + }, + { + "name": "PerpAssetMetadata", + "docs": [ + "Opaque fixed-size zero-copy PerpAssetMetadata payload stored inside PerpAssetMap." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "raw", + "type": { + "array": [ + "u8", + 1568 + ] + } + } + ] + } + }, + { + "name": "PerpAssetMapEntry", + "docs": [ + "One fixed slot in the PerpAssetMap ShortMapV2 backing array." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "key", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "value", + "type": { + "defined": { + "name": "PerpAssetMetadata" + } + } + } + ] + } + }, + { + "name": "PerpAssetMetadataShortMapV2", + "docs": [ + "Zero-copy ShortMapV2 layout." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "slotsUsed", + "type": "u32" + }, + { + "name": "tombstones", + "type": "u32" + }, + { + "name": "capacity", + "type": "u64" + }, + { + "name": "data", + "type": { + "array": [ + { + "defined": { + "name": "PerpAssetMapEntry" + } + }, + 1024 + ] + } + } + ] + } + }, + { + "name": "PerpAssetMap", + "docs": [ + "Canonical Eternal perpetual asset map account." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "discriminant", + "type": "u64" + }, + { + "name": "sequenceNumber", + "type": { + "defined": { + "name": "SequenceNumber" + } + } + }, + { + "name": "numAssets", + "type": "u16" + }, + { + "name": "padding0", + "type": { + "array": [ + "u8", + 6 + ] + } + }, + { + "name": "metadatas", + "type": { + "defined": { + "name": "PerpAssetMetadataShortMapV2" + } + } + } + ] + } + }, + { + "name": "WithdrawThrottle", + "docs": [ + "Fixed WithdrawThrottle payload embedded in WithdrawQueueHeader." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxBudget", + "type": { + "defined": { + "name": "QuoteLots" + } + } + }, + { + "name": "remainingBudget", + "type": { + "defined": { + "name": "QuoteLots" + } + } + }, + { + "name": "replenishAmountPerSlot", + "type": { + "defined": { + "name": "QuoteLots" + } + } + }, + { + "name": "lastUpdateSlot", + "type": "u64" + } + ] + } + }, + { + "name": "WithdrawQueueHeader", + "docs": [ + "Fixed WithdrawQueueHeader prefix for the Phoenix Eternal withdraw queue account.", + "The deque of pending withdrawal requests follows this header and is left as trailing account data by generic decoders." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "discriminant", + "type": "u64" + }, + { + "name": "sequenceNumber", + "type": { + "defined": { + "name": "SequenceNumber" + } + } + }, + { + "name": "withdrawThrottle", + "type": { + "defined": { + "name": "WithdrawThrottle" + } + } + }, + { + "name": "totalQueuedAmount", + "type": { + "defined": { + "name": "QuoteLots" + } + } + }, + { + "name": "withdrawalFee", + "type": { + "defined": { + "name": "QuoteLots" + } + } + }, + { + "name": "enqueueingFee", + "type": { + "defined": { + "name": "QuoteLots" + } + } + }, + { + "name": "reserved", + "type": { + "array": [ + "u64", + 5 + ] + } + } + ] + } + }, + { + "name": "PermissionAccount", + "docs": [ + "Fixed Phoenix Eternal permission delegation account layout." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "discriminant", + "type": "u64" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "user", + "type": "pubkey" + }, + { + "name": "bump", + "type": "u8" + }, + { + "name": "padding1", + "type": { + "array": [ + "u8", + 7 + ] + } + }, + { + "name": "permission", + "type": "u64" + }, + { + "name": "expiresAtTimestamp", + "type": "i64" + }, + { + "name": "numSignerActionsRemaining", + "type": "i64" + }, + { + "name": "padding2", + "type": { + "array": [ + "u8", + 64 + ] + } + } + ] + } + }, + { + "name": "StopLoss", + "docs": [ + "One fixed trigger order slot stored inside the StopLosses account." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "triggerPrice", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "executionPrice", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "tradeSize", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "slot", + "type": "u64" + }, + { + "name": "positionSequenceNumber", + "type": "u8" + }, + { + "name": "flags", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 6 + ] + } + }, + { + "name": "padding2", + "type": { + "array": [ + "u8", + 32 + ] + } + } + ] + } + }, + { + "name": "StopLosses", + "docs": [ + "Fixed Phoenix Eternal StopLosses account layout." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "discriminant", + "type": "u64" + }, + { + "name": "stopLosses", + "type": { + "array": [ + { + "defined": { + "name": "StopLoss" + } + }, + 2 + ] + } + }, + { + "name": "initialized", + "type": "u64" + }, + { + "name": "sequenceNumber", + "type": { + "defined": { + "name": "SequenceNumber" + } + } + }, + { + "name": "fundingKey", + "type": "pubkey" + }, + { + "name": "traderKey", + "type": "pubkey" + }, + { + "name": "assetId", + "type": "u32" + }, + { + "name": "assetIdPadding", + "type": { + "array": [ + "u8", + 4 + ] + } + }, + { + "name": "padding", + "type": { + "array": [ + "u64", + 8 + ] + } + } + ] + } + }, + { + "name": "EscrowHeader", + "docs": [ + "Fixed EscrowHeader prefix for a Phoenix Eternal escrow account.", + "The dynamic escrow request list follows this header and is left as trailing account data by generic decoders." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "discriminant", + "type": "u64" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "funderKey", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": { + "defined": { + "name": "SequenceNumber" + } + } + }, + { + "name": "len", + "type": "u64" + }, + { + "name": "capacity", + "type": "u64" + } + ] + } + }, + { + "name": "ConditionalOrderHeader", + "docs": [ + "Fixed ConditionalOrderHeader prefix for a Phoenix Eternal conditional orders account.", + "The dynamic conditional order array follows this header and is left as trailing account data by generic decoders." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "discriminant", + "type": "u64" + }, + { + "name": "traderKey", + "type": "pubkey" + }, + { + "name": "fundingKey", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": { + "defined": { + "name": "SequenceNumber" + } + } + }, + { + "name": "len", + "type": "u8" + }, + { + "name": "capacity", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 6 + ] + } + } + ] + } + }, + { + "name": "RevokePermissionParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "permissionFlagsToRevoke", + "type": "u64" + } + ] + } + }, + { + "name": "SetPermissionInstruction", + "type": { + "kind": "struct", + "fields": [ + { + "name": "permission", + "type": "u64" + }, + { + "name": "expiresAtTimestamp", + "type": { + "option": "i64" + } + }, + { + "name": "allowedSignerActions", + "type": { + "option": "i64" + } + } + ] + } + }, + { + "name": "TraderCapabilityToggleTarget", + "type": { + "kind": "enum", + "variants": [ + { + "name": "PlaceLimitOrder" + }, + { + "name": "PlaceMarketOrder" + }, + { + "name": "RiskIncreasingTrade" + }, + { + "name": "RiskReducingTrade" + }, + { + "name": "DepositCollateral" + }, + { + "name": "WithdrawCollateral" + } + ] + } + }, + { + "name": "TraderCapabilityToggle", + "type": { + "kind": "struct", + "fields": [ + { + "name": "target", + "type": { + "defined": { + "name": "TraderCapabilityToggleTarget" + } + } + }, + { + "name": "enable", + "type": "bool" + } + ] + } + }, + { + "name": "TraderCapabilityUpdate", + "type": { + "kind": "struct", + "fields": [ + { + "name": "toggles", + "type": { + "vec": { + "defined": { + "name": "TraderCapabilityToggle" + } + } + } + } + ] + } + }, + { + "name": "TransferCollateralInstruction", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + } + ] + } + }, + { + "name": "TransferCollateralChildToParentInstruction", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + } + ] + } + }, + { + "name": "UncrossCrankParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "matchLimit", + "type": "u64" + } + ] + } + }, + { + "name": "ClearExpiredOrdersParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxOrdersPerSide", + "type": { + "option": "u64" + } + } + ] + } + }, + { + "name": "TriggerOrderParams", + "docs": [ + "Trigger and execution parameters for one half of a conditional order." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "triggerDirection", + "type": { + "defined": { + "name": "Direction" + } + } + }, + { + "name": "tradeSide", + "type": { + "defined": { + "name": "Side" + } + } + }, + { + "name": "orderKind", + "type": { + "defined": { + "name": "StopLossOrderKind" + } + } + }, + { + "name": "triggerPrice", + "type": "u64" + }, + { + "name": "executionPrice", + "type": "u64" + } + ] + } + }, + { + "name": "CreateConditionalOrdersAccountInstruction", + "type": { + "kind": "struct", + "fields": [ + { + "name": "capacity", + "type": "u8" + } + ] + } + }, + { + "name": "PlacePositionConditionalOrderInstruction", + "type": { + "kind": "struct", + "fields": [ + { + "name": "assetId", + "type": "u32" + }, + { + "name": "greaterTriggerOrder", + "type": { + "option": { + "defined": { + "name": "TriggerOrderParams" + } + } + } + }, + { + "name": "lessTriggerOrder", + "type": { + "option": { + "defined": { + "name": "TriggerOrderParams" + } + } + } + }, + { + "name": "sizeBaseLots", + "type": { + "option": "u64" + } + }, + { + "name": "sizePercent", + "type": { + "option": "u8" + } + } + ] + } + }, + { + "name": "CancelConditionalOrderInstruction", + "type": { + "kind": "struct", + "fields": [ + { + "name": "index", + "type": "u8" + }, + { + "name": "disableFirst", + "type": "bool" + }, + { + "name": "disableSecond", + "type": "bool" + } + ] + } + }, + { + "name": "PlaceAttachedConditionalOrderInstruction", + "type": { + "kind": "struct", + "fields": [ + { + "name": "orderId", + "type": { + "defined": { + "name": "FIFOOrderId" + } + } + }, + { + "name": "assetId", + "type": "u32" + }, + { + "name": "greaterTriggerOrder", + "type": { + "option": { + "defined": { + "name": "TriggerOrderParams" + } + } + } + }, + { + "name": "lessTriggerOrder", + "type": { + "option": { + "defined": { + "name": "TriggerOrderParams" + } + } + } + } + ] + } + }, + { + "name": "PlaceLimitOrderWithConditionalsInstruction", + "type": { + "kind": "struct", + "fields": [ + { + "name": "orderPacket", + "type": { + "defined": { + "name": "OrderPacket" + } + } + }, + { + "name": "slot", + "type": "u64" + }, + { + "name": "greaterTriggerOrder", + "type": { + "option": { + "defined": { + "name": "TriggerOrderParams" + } + } + } + }, + { + "name": "lessTriggerOrder", + "type": { + "option": { + "defined": { + "name": "TriggerOrderParams" + } + } + } + } + ] + } + }, + { + "name": "ExecuteConditionalOrderInstruction", + "type": { + "kind": "struct", + "fields": [ + { + "name": "index", + "type": "u8" + }, + { + "name": "triggerDirection", + "type": { + "defined": { + "name": "Direction" + } + } + } + ] + } + }, + { + "name": "OffChainMarketEvent", + "docs": [ + "Borsh payload of the Log instruction after the 8-byte instruction discriminator." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "batchIndex", + "type": "u32" + }, + { + "name": "events", + "type": { + "vec": { + "defined": { + "name": "MarketEvent" + } + } + } + } + ] + } + }, + { + "name": "OffChainMarketEventLengths", + "docs": [ + "Borsh payload of the LogEventLengths instruction after the 8-byte instruction discriminator." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "batchIndex", + "type": "u32" + }, + { + "name": "lengths", + "type": { + "vec": "u16" + } + } + ] + } + }, + { + "name": "SignedBaseLots", + "docs": [ + "Signed quantity wrapper representing discrete base lots." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": "i64" + } + ] + } + }, + { + "name": "SignedQuoteLots", + "docs": [ + "Signed quantity wrapper representing discrete quote lots." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": "i64" + } + ] + } + }, + { + "name": "SignedFeeRateMicro", + "docs": [ + "Signed fee rate in millionths." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": "i32" + } + ] + } + }, + { + "name": "SignedQuoteLotsPerBaseLot", + "docs": [ + "Signed quote lots per base lot wrapper." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": "i64" + } + ] + } + }, + { + "name": "SignedQuoteLotsPerBaseLotUpcasted", + "docs": [ + "Upcasted signed quote lots per base lot wrapper." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": "i128" + } + ] + } + }, + { + "name": "SignedTicks", + "docs": [ + "Signed discrete tick offset." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": "i64" + } + ] + } + }, + { + "name": "FundingRateUnitInSeconds", + "docs": [ + "Funding time unit measured in seconds." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": "u64" + } + ] + } + }, + { + "name": "BaseLotsU32", + "docs": [ + "u32-backed base lot wrapper." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": "u32" + } + ] + } + }, + { + "name": "BaseLotsPerTickU32", + "docs": [ + "u32-backed spline liquidity density wrapper." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": "u32" + } + ] + } + }, + { + "name": "BasisPoints", + "docs": [ + "Basis points wrapper." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": "u64" + } + ] + } + }, + { + "name": "Constant", + "docs": [ + "Dimensionless constant wrapper." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": "u64" + } + ] + } + }, + { + "name": "OptionalNonZeroU64", + "docs": [ + "Zero represents None; non-zero represents Some(value)." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": "u64" + } + ] + } + }, + { + "name": "OptionalFIFOOrderId", + "type": { + "kind": "struct", + "fields": [ + { + "name": "priceInTicks", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "orderSequenceNumber", + "type": "u64" + } + ] + } + }, + { + "name": "TraderCapabilityFlags", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bits", + "type": "u32" + } + ] + } + }, + { + "name": "MarketStatus", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Uninitialized" + }, + { + "name": "Active" + }, + { + "name": "PostOnly" + }, + { + "name": "Paused" + }, + { + "name": "Closed" + }, + { + "name": "Tombstoned" + } + ] + } + }, + { + "name": "CommodityMarketState", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Active" + }, + { + "name": "AfterHours" + }, + { + "name": "Reopen" + } + ] + } + }, + { + "name": "AuthorityType", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Root" + }, + { + "name": "Risk" + }, + { + "name": "Market" + }, + { + "name": "Oracle" + }, + { + "name": "Cancel" + }, + { + "name": "Backstop" + }, + { + "name": "ADL" + } + ] + } + }, + { + "name": "ValidationRule", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Ignore" + }, + { + "name": "Require" + }, + { + "name": "Forbid" + } + ] + } + }, + { + "name": "LeverageTier", + "type": { + "kind": "struct", + "fields": [ + { + "name": "upperBoundSize", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "maxLeverage", + "type": { + "defined": { + "name": "Constant" + } + } + }, + { + "name": "limitOrderRiskFactor", + "type": { + "defined": { + "name": "BasisPoints" + } + } + } + ] + } + }, + { + "name": "LeverageTiers", + "type": { + "kind": "struct", + "fields": [ + { + "name": "tiers", + "type": { + "array": [ + { + "defined": { + "name": "LeverageTier" + } + }, + 4 + ] + } + } + ] + } + }, + { + "name": "PositionSizeLimits", + "type": { + "kind": "struct", + "fields": [ + { + "name": "long", + "type": "u32" + }, + { + "name": "short", + "type": "u32" + } + ] + } + }, + { + "name": "PositionSizeLimit", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Disabled" + }, + { + "name": "Limit", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "PositionSizeLimits" + } + } + } + ] + } + ] + } + }, + { + "name": "TickRegion", + "type": { + "kind": "struct", + "fields": [ + { + "name": "startOffset", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "endOffset", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "density", + "type": { + "defined": { + "name": "BaseLotsPerTickU32" + } + } + }, + { + "name": "topLevelHiddenTakeSize", + "type": { + "defined": { + "name": "BaseLotsPerTickU32" + } + } + }, + { + "name": "totalSize", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "filledSize", + "type": { + "defined": { + "name": "BaseLotsU32" + } + } + }, + { + "name": "hiddenFilledSize", + "type": { + "defined": { + "name": "BaseLotsU32" + } + } + }, + { + "name": "lifespan", + "type": "u64" + } + ] + } + }, + { + "name": "OrderRejectionReason", + "type": { + "kind": "enum", + "variants": [ + { + "name": "TooManyLimitOrders" + }, + { + "name": "PostOnlyCross" + }, + { + "name": "InvalidOrderPacket" + }, + { + "name": "TiFInvalid" + }, + { + "name": "OutsideExecutionPriceBand" + } + ] + } + }, + { + "name": "OrderResidualDiscardReason", + "type": { + "kind": "enum", + "variants": [ + { + "name": "OutsideExecutionPriceBand" + } + ] + } + }, + { + "name": "OrderModificationReason", + "type": { + "kind": "enum", + "variants": [ + { + "name": "UserRequested" + }, + { + "name": "AuthorityForced" + }, + { + "name": "SelfTradeCancelProvide" + }, + { + "name": "SelfTradeDecrementTake" + }, + { + "name": "Expired" + }, + { + "name": "ReduceOnlyInvalidated" + }, + { + "name": "RiskCapacityExceeded" + }, + { + "name": "BookCapacityEvicted" + }, + { + "name": "Tombstone" + }, + { + "name": "TopOfBookOutOfBounds" + }, + { + "name": "StopLossCascade" + } + ] + } + }, + { + "name": "ConditionalOrderPingStateSnapshot", + "type": { + "kind": "struct", + "fields": [ + { + "name": "value", + "type": "u8" + } + ] + } + }, + { + "name": "ConditionalOrderPingSnapshot", + "type": { + "kind": "struct", + "fields": [ + { + "name": "state", + "type": { + "defined": { + "name": "ConditionalOrderPingStateSnapshot" + } + } + }, + { + "name": "attachedOrderId", + "type": { + "defined": { + "name": "OptionalFIFOOrderId" + } + } + }, + { + "name": "maxSize", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "fillableSize", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "filledSize", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "coPositionSequenceNumber", + "type": { + "option": "u8" + } + } + ] + } + }, + { + "name": "MarkPriceConfig", + "type": { + "kind": "struct", + "fields": [ + { + "name": "emaPeriodSlots", + "type": "u64" + }, + { + "name": "emaDiffRadius", + "type": "u64" + }, + { + "name": "bookPriceRadius", + "type": "u64" + }, + { + "name": "commoditiesAfterHoursRadius", + "type": "u64" + }, + { + "name": "spotPriceWeight", + "type": "u64" + }, + { + "name": "bookPriceWeight", + "type": "u64" + }, + { + "name": "perpPriceWeight", + "type": "u64" + }, + { + "name": "spotPriceStaleThreshold", + "type": "u64" + }, + { + "name": "bookPriceStaleThreshold", + "type": "u64" + }, + { + "name": "perpPriceStaleThreshold", + "type": "u64" + }, + { + "name": "riskActionPriceValidityRules", + "type": { + "array": [ + { + "array": [ + { + "array": [ + { + "defined": { + "name": "ValidationRule" + } + }, + 8 + ] + }, + 4 + ] + }, + 8 + ] + } + }, + { + "name": "oracleDivergenceRadius", + "type": "u16" + }, + { + "name": "minOracleResponses", + "type": "u8" + }, + { + "name": "commoditiesAfterHoursRadiusBps", + "type": "u64" + } + ] + } + }, + { + "name": "WithdrawConfig", + "type": { + "kind": "struct", + "fields": [ + { + "name": "depositCooldownPeriodInSlots", + "type": "u64" + }, + { + "name": "withdrawalFee", + "type": "u64" + }, + { + "name": "enqueueingFee", + "type": "u64" + } + ] + } + }, + { + "name": "WithdrawRateLimitConfig", + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxBudget", + "type": "u64" + }, + { + "name": "replenishAmountPerSlot", + "type": "u64" + } + ] + } + }, + { + "name": "FundingConfig", + "type": { + "kind": "struct", + "fields": [ + { + "name": "fundingIntervalSeconds", + "type": "u64" + }, + { + "name": "fundingPeriodSeconds", + "type": "u64" + }, + { + "name": "maxFundingRate", + "type": "i64" + } + ] + } + }, + { + "name": "CommodityMarketStateConfig", + "type": { + "kind": "struct", + "fields": [ + { + "name": "marketState", + "type": { + "defined": { + "name": "CommodityMarketState" + } + } + }, + { + "name": "isCommodity", + "type": "bool" + }, + { + "name": "lastKnownIndexPrice", + "type": { + "option": { + "defined": { + "name": "Ticks" + } + } + } + }, + { + "name": "lastIndexExpiryTimestamp", + "type": "u64" + }, + { + "name": "commoditiesAfterHoursRadius", + "type": { + "defined": { + "name": "Ticks" + } + } + } + ] + } + }, + { + "name": "MarketFeeConfig", + "type": { + "kind": "struct", + "fields": [ + { + "name": "defaultTakerFeeMicro", + "type": "u32" + }, + { + "name": "defaultMakerFeeMicro", + "type": "i32" + } + ] + } + }, + { + "name": "AdminParameterUpdateKind", + "type": { + "kind": "enum", + "variants": [ + { + "name": "CancelRiskFactor", + "kind": "struct", + "fields": [ + { + "name": "previous", + "type": "u16" + }, + { + "name": "new", + "type": "u16" + } + ] + }, + { + "name": "IsolatedOnly", + "kind": "struct", + "fields": [ + { + "name": "previous", + "type": "bool" + }, + { + "name": "new", + "type": "bool" + } + ] + }, + { + "name": "LeverageTiers", + "kind": "struct", + "fields": [ + { + "name": "previous", + "type": { + "defined": { + "name": "LeverageTiers" + } + } + }, + { + "name": "new", + "type": { + "defined": { + "name": "LeverageTiers" + } + } + } + ] + }, + { + "name": "MarkPriceParameters", + "kind": "struct", + "fields": [ + { + "name": "previous", + "type": { + "defined": { + "name": "MarkPriceConfig" + } + } + }, + { + "name": "new", + "type": { + "defined": { + "name": "MarkPriceConfig" + } + } + } + ] + }, + { + "name": "OpenInterestCap", + "kind": "struct", + "fields": [ + { + "name": "previous", + "type": "u64" + }, + { + "name": "new", + "type": "u64" + } + ] + }, + { + "name": "UpnlRiskFactor", + "kind": "struct", + "fields": [ + { + "name": "previous", + "type": "u16" + }, + { + "name": "new", + "type": "u16" + } + ] + }, + { + "name": "UpnlRiskFactorForWithdrawals", + "kind": "struct", + "fields": [ + { + "name": "previous", + "type": "u16" + }, + { + "name": "new", + "type": "u16" + } + ] + }, + { + "name": "WithdrawParameters", + "kind": "struct", + "fields": [ + { + "name": "previous", + "type": { + "defined": { + "name": "WithdrawConfig" + } + } + }, + { + "name": "new", + "type": { + "defined": { + "name": "WithdrawConfig" + } + } + } + ] + }, + { + "name": "WithdrawRateLimits", + "kind": "struct", + "fields": [ + { + "name": "previous", + "type": { + "defined": { + "name": "WithdrawRateLimitConfig" + } + } + }, + { + "name": "new", + "type": { + "defined": { + "name": "WithdrawRateLimitConfig" + } + } + } + ] + }, + { + "name": "TraderCapability", + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "previousFlags", + "type": { + "defined": { + "name": "TraderCapabilityFlags" + } + } + }, + { + "name": "newFlags", + "type": { + "defined": { + "name": "TraderCapabilityFlags" + } + } + } + ] + }, + { + "name": "FundingParameters", + "kind": "struct", + "fields": [ + { + "name": "previous", + "type": { + "defined": { + "name": "FundingConfig" + } + } + }, + { + "name": "new", + "type": { + "defined": { + "name": "FundingConfig" + } + } + } + ] + }, + { + "name": "MarketFees", + "kind": "struct", + "fields": [ + { + "name": "previous", + "type": { + "defined": { + "name": "MarketFeeConfig" + } + } + }, + { + "name": "new", + "type": { + "defined": { + "name": "MarketFeeConfig" + } + } + } + ] + }, + { + "name": "OpenInterestAdjustment", + "kind": "struct", + "fields": [ + { + "name": "previousOpenInterest", + "type": "u64" + }, + { + "name": "newOpenInterest", + "type": "u64" + } + ] + }, + { + "name": "CommodityMarketState", + "kind": "struct", + "fields": [ + { + "name": "previous", + "type": { + "defined": { + "name": "CommodityMarketStateConfig" + } + } + }, + { + "name": "new", + "type": { + "defined": { + "name": "CommodityMarketStateConfig" + } + } + } + ] + } + ] + } + }, + { + "name": "EscrowAction", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Noop", + "kind": "struct", + "fields": [ + { + "name": "padding0", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "padding1", + "type": { + "array": [ + "u8", + 128 + ] + } + } + ] + }, + { + "name": "Cash", + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "padding0", + "type": { + "array": [ + "u8", + 128 + ] + } + } + ] + } + ] + } + }, + { + "name": "EscrowRequestCancelReason", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Expiration" + }, + { + "name": "CancelledBySender" + }, + { + "name": "CancelledByReceiver" + } + ] + } + }, + { + "name": "MarketEvent", + "docs": [ + "Borsh enum emitted by Eternal Log instructions. Variant discriminators are one-byte ordinals." + ], + "type": { + "kind": "enum", + "variants": [ + { + "name": "SlotContext", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "SlotContextEvent" + } + } + } + ] + }, + { + "name": "Header", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "MarketEventHeader" + } + } + } + ] + }, + { + "name": "OrderPlaced", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "OrderPlacedEvent" + } + } + } + ] + }, + { + "name": "OrderFilled", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "OrderFilledEvent" + } + } + } + ] + }, + { + "name": "OrderRejected", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "OrderRejectedEvent" + } + } + } + ] + }, + { + "name": "SplineFilled", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "SplineFilledEvent" + } + } + } + ] + }, + { + "name": "TradeSummary", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TradeSummaryEvent" + } + } + } + ] + }, + { + "name": "OrderModified", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "OrderModifiedEvent" + } + } + } + ] + }, + { + "name": "MarketSummary", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "MarketSummaryEvent" + } + } + } + ] + }, + { + "name": "TraderRegistered", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TraderRegisteredEvent" + } + } + } + ] + }, + { + "name": "TraderCollateralTransferred", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TraderCollateralTransferredEvent" + } + } + } + ] + }, + { + "name": "TraderActivated", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TraderActivatedEvent" + } + } + } + ] + }, + { + "name": "TraderDeactivated", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TraderDeactivatedEvent" + } + } + } + ] + }, + { + "name": "TraderFundsDeposited", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TraderFundsDepositedEvent" + } + } + } + ] + }, + { + "name": "TraderFundsWithdrawn", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TraderFundsWithdrawnEvent" + } + } + } + ] + }, + { + "name": "TraderFundsWithdrawnEnqueued", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TraderFundsWithdrawnEvent" + } + } + } + ] + }, + { + "name": "TraderFundsWithdrawnDropped", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TraderFundsWithdrawnEvent" + } + } + } + ] + }, + { + "name": "TraderWithdrawCancelled", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TraderWithdrawCancelledEvent" + } + } + } + ] + }, + { + "name": "TraderFundingSettled", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TraderFundingSettledEvent" + } + } + } + ] + }, + { + "name": "SplineRegistered", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "SplineRegisteredEvent" + } + } + } + ] + }, + { + "name": "SplineActivated", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "SplineActivatedEvent" + } + } + } + ] + }, + { + "name": "SplineDeactivated", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "SplineDeactivatedEvent" + } + } + } + ] + }, + { + "name": "SplinePriceUpdated", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "SplinePriceUpdatedEvent" + } + } + } + ] + }, + { + "name": "SplineParametersUpdated", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "SplineParametersUpdatedEvent" + } + } + } + ] + }, + { + "name": "MarketAdded", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "MarketAddedEvent" + } + } + } + ] + }, + { + "name": "MarketStatusChanged", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "MarketStatusChangedEvent" + } + } + } + ] + }, + { + "name": "MarketParametersUpdated", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "MarketParametersUpdatedEvent" + } + } + } + ] + }, + { + "name": "FundingParametersUpdated", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "FundingParametersUpdatedEvent" + } + } + } + ] + }, + { + "name": "FeesClaimed", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "FeesClaimedEvent" + } + } + } + ] + }, + { + "name": "PricesUpdated", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "PricesUpdatedEvent" + } + } + } + ] + }, + { + "name": "LiquidationTransferSummary", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "LiquidationTransferSummaryEvent" + } + } + } + ] + }, + { + "name": "LiquidationTransfer", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "LiquidationTransferEvent" + } + } + } + ] + }, + { + "name": "Liquidation", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "LiquidationEvent" + } + } + } + ] + }, + { + "name": "CloseMatchedPositions", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "CloseMatchedPositionsEvent" + } + } + } + ] + }, + { + "name": "NameSuccessor", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "NameSuccessorEvent" + } + } + } + ] + }, + { + "name": "ClaimAuthority", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "ClaimAuthorityEvent" + } + } + } + ] + }, + { + "name": "WithdrawStateTransition", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "WithdrawStateTransitionEvent" + } + } + } + ] + }, + { + "name": "PnL", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "PnLEvent" + } + } + } + ] + }, + { + "name": "StopLossPlaced", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "StopLossPlacedEvent" + } + } + } + ] + }, + { + "name": "StopLossCancelled", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "StopLossCancelledEvent" + } + } + } + ] + }, + { + "name": "StopLossExecuted", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "StopLossExecutedEvent" + } + } + } + ] + }, + { + "name": "ExchangeStatusChanged", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "ExchangeStatusChangedEvent" + } + } + } + ] + }, + { + "name": "TraderCapabilitiesEnabled", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TraderCapabilitiesEnabledEvent" + } + } + } + ] + }, + { + "name": "TraderFundsWithdrawnFeePayment", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TraderFundsWithdrawnFeePaymentEvent" + } + } + } + ] + }, + { + "name": "OrderPacket", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "OrderPacketEvent" + } + } + } + ] + }, + { + "name": "SetPermission", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "SetPermissionEvent" + } + } + } + ] + }, + { + "name": "AuthorityChanged", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "AuthorityChangedEvent" + } + } + } + ] + }, + { + "name": "TraderDelegated", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TraderDelegatedEvent" + } + } + } + ] + }, + { + "name": "AdminParameterUpdated", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "AdminParameterUpdatedEvent" + } + } + } + ] + }, + { + "name": "TraderFeesUpdated", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TraderFeesUpdatedEvent" + } + } + } + ] + }, + { + "name": "MarketClosed", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "MarketClosedEvent" + } + } + } + ] + }, + { + "name": "MarketDeleted", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "MarketDeletedEvent" + } + } + } + ] + }, + { + "name": "EscrowAccountCreated", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "EscrowAccountCreatedEvent" + } + } + } + ] + }, + { + "name": "EscrowRequestCreated", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "EscrowRequestCreatedEvent" + } + } + } + ] + }, + { + "name": "EscrowRequestAccepted", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "EscrowRequestAcceptedEvent" + } + } + } + ] + }, + { + "name": "EscrowRequestCancelled", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "EscrowRequestCancelledEvent" + } + } + } + ] + }, + { + "name": "SplinePriceUpdatedWithOrdering", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "SplinePriceUpdatedWithOrderingEvent" + } + } + } + ] + }, + { + "name": "SplineParametersUpdatedWithOrdering", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "SplineParametersUpdatedWithOrderingEvent" + } + } + } + ] + }, + { + "name": "TriggerOrderPlaced", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TriggerOrderPlacedEvent" + } + } + } + ] + }, + { + "name": "TriggerOrderCancelled", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TriggerOrderCancelledEvent" + } + } + } + ] + }, + { + "name": "TriggerOrderExecuted", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "TriggerOrderExecutedEvent" + } + } + } + ] + }, + { + "name": "PingInvalidated", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "PingInvalidatedEvent" + } + } + } + ] + }, + { + "name": "PingActivated", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "PingActivatedEvent" + } + } + } + ] + }, + { + "name": "SplinePositionLimitsConfigUpdated", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "SplinePositionLimitsConfigUpdatedEvent" + } + } + } + ] + }, + { + "name": "MarketTombstoned", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "MarketTombstonedEvent" + } + } + } + ] + }, + { + "name": "ShutdownClosePositions", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "ShutdownClosePositionsEvent" + } + } + } + ] + }, + { + "name": "OrderResidualDiscarded", + "fields": [ + { + "name": "value", + "type": { + "defined": { + "name": "OrderResidualDiscardedEvent" + } + } + } + ] + } + ] + } + }, + { + "name": "SlotContextEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "timestamp", + "type": "u64" + }, + { + "name": "slot", + "type": "u64" + } + ] + } + }, + { + "name": "MarketEventHeader", + "type": { + "kind": "struct", + "fields": [ + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "assetSymbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "assetId", + "type": "u32" + }, + { + "name": "tickSize", + "type": "u32" + }, + { + "name": "baseLotDecimals", + "type": "i8" + }, + { + "name": "quoteLotDecimals", + "type": "u8" + }, + { + "name": "signer", + "type": "pubkey" + }, + { + "name": "traderAccount", + "type": "pubkey" + } + ] + } + }, + { + "name": "OrderPlacedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "orderId", + "type": "u32" + }, + { + "name": "orderFlags", + "type": { + "defined": { + "name": "OrderFlags" + } + } + }, + { + "name": "orderSequenceNumber", + "type": "u64" + }, + { + "name": "prevOrderSequenceNumberSlot", + "type": "u64" + }, + { + "name": "clientOrderId", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "price", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "quantity", + "type": { + "defined": { + "name": "SignedBaseLots" + } + } + }, + { + "name": "lastValidSlot", + "type": { + "defined": { + "name": "OptionalNonZeroU64" + } + } + }, + { + "name": "initialSlot", + "type": "u64" + } + ] + } + }, + { + "name": "OrderPacketEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "orderPacket", + "type": { + "defined": { + "name": "OrderPacket" + } + } + }, + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "nextOrderSequenceNumber", + "type": "u64" + } + ] + } + }, + { + "name": "OrderRejectedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "orderIndex", + "type": "u32" + }, + { + "name": "clientOrderId", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "price", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "side", + "type": { + "defined": { + "name": "Side" + } + } + }, + { + "name": "numBaseLots", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "reason", + "type": { + "array": [ + "u8", + 32 + ] + } + } + ] + } + }, + { + "name": "OrderResidualDiscardedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "clientOrderId", + "type": { + "array": [ + "u8", + 16 + ] + } + }, + { + "name": "price", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "side", + "type": { + "defined": { + "name": "Side" + } + } + }, + { + "name": "baseLotsDiscarded", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "reason", + "type": { + "defined": { + "name": "OrderResidualDiscardReason" + } + } + } + ] + } + }, + { + "name": "OrderFilledEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "orderSequenceNumber", + "type": "u64" + }, + { + "name": "side", + "type": { + "defined": { + "name": "Side" + } + } + }, + { + "name": "price", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "baseLotsFilled", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "quoteLotsFilled", + "type": { + "defined": { + "name": "QuoteLots" + } + } + }, + { + "name": "quantityRemaining", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "maker", + "type": "pubkey" + }, + { + "name": "makerFeeRate", + "type": { + "defined": { + "name": "SignedFeeRateMicro" + } + } + }, + { + "name": "makerBaseLotPosition", + "type": { + "defined": { + "name": "SignedBaseLots" + } + } + }, + { + "name": "makerVirtualQuoteLotPosition", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "makerQuoteLotCollateral", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "makerCumulativeFundingSnapshot", + "type": { + "defined": { + "name": "SignedQuoteLotsPerBaseLot" + } + } + } + ] + } + }, + { + "name": "SplineFilledEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "splineSequenceNumber", + "type": "u64" + }, + { + "name": "side", + "type": { + "defined": { + "name": "Side" + } + } + }, + { + "name": "price", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "baseLotsFilled", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "quoteLotsFilled", + "type": { + "defined": { + "name": "QuoteLots" + } + } + }, + { + "name": "maker", + "type": "pubkey" + }, + { + "name": "makerFeeRate", + "type": { + "defined": { + "name": "SignedFeeRateMicro" + } + } + }, + { + "name": "makerBaseLotPosition", + "type": { + "defined": { + "name": "SignedBaseLots" + } + } + }, + { + "name": "makerVirtualQuoteLotPosition", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "makerQuoteLotCollateral", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "makerCumulativeFundingSnapshot", + "type": { + "defined": { + "name": "SignedQuoteLotsPerBaseLot" + } + } + } + ] + } + }, + { + "name": "OrderModifiedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "orderSequenceNumber", + "type": "u64" + }, + { + "name": "price", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "baseLotsReleased", + "type": { + "defined": { + "name": "SignedBaseLots" + } + } + }, + { + "name": "quoteLotsReleased", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "baseLotsRemaining", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "reason", + "type": { + "defined": { + "name": "OrderModificationReason" + } + } + } + ] + } + }, + { + "name": "TradeSummaryEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "tradeSequenceNumber", + "type": "u64" + }, + { + "name": "prevTradeSequenceNumberSlot", + "type": "u64" + }, + { + "name": "side", + "type": { + "defined": { + "name": "Side" + } + } + }, + { + "name": "baseLotsFilled", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "quoteLotsFilled", + "type": { + "defined": { + "name": "QuoteLots" + } + } + }, + { + "name": "feeInQuoteLots", + "type": { + "defined": { + "name": "QuoteLots" + } + } + }, + { + "name": "baseLotPosition", + "type": { + "defined": { + "name": "SignedBaseLots" + } + } + }, + { + "name": "virtualQuoteLotPosition", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "quoteLotCollateral", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "cumulativeFundingSnapshot", + "type": { + "defined": { + "name": "SignedQuoteLotsPerBaseLot" + } + } + } + ] + } + }, + { + "name": "MarketSummaryEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "assetSymbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "assetId", + "type": "u32" + }, + { + "name": "openInterest", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "totalMakerQuoteLotFees", + "type": { + "option": { + "defined": { + "name": "SignedQuoteLots" + } + } + } + }, + { + "name": "totalTakerQuoteLotFees", + "type": { + "option": { + "defined": { + "name": "QuoteLots" + } + } + } + }, + { + "name": "markPrice", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "spotPrice", + "type": { + "defined": { + "name": "Ticks" + } + } + } + ] + } + }, + { + "name": "TraderRegisteredEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "traderSequenceNumber", + "type": "u64" + }, + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "maxPositions", + "type": "u64" + }, + { + "name": "traderPdaIndex", + "type": "u8" + }, + { + "name": "traderSubaccountIndex", + "type": "u8" + } + ] + } + }, + { + "name": "TraderDelegatedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "oldPositionAuthority", + "type": "pubkey" + }, + { + "name": "newPositionAuthority", + "type": "pubkey" + } + ] + } + }, + { + "name": "TraderFeesUpdatedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "previousMakerFeeOverrideMultiplier", + "type": "i8" + }, + { + "name": "newMakerFeeOverrideMultiplier", + "type": "i8" + }, + { + "name": "previousTakerFeeOverrideMultiplier", + "type": "i8" + }, + { + "name": "newTakerFeeOverrideMultiplier", + "type": "i8" + }, + { + "name": "isHotTrader", + "type": "bool" + } + ] + } + }, + { + "name": "TraderCapabilitiesEnabledEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "previousFlags", + "type": { + "defined": { + "name": "TraderCapabilityFlags" + } + } + }, + { + "name": "newFlags", + "type": { + "defined": { + "name": "TraderCapabilityFlags" + } + } + }, + { + "name": "globalTraderIndex", + "type": "u32" + } + ] + } + }, + { + "name": "TraderActivatedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "globalTraderIndex", + "type": "u32" + }, + { + "name": "authority", + "type": "pubkey" + } + ] + } + }, + { + "name": "TraderDeactivatedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "prevGlobalTraderIndex", + "type": "u32" + }, + { + "name": "authority", + "type": "pubkey" + } + ] + } + }, + { + "name": "TraderFundsDepositedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "amount", + "type": { + "defined": { + "name": "QuoteLots" + } + } + }, + { + "name": "traderFlags", + "type": { + "defined": { + "name": "TraderCapabilityFlags" + } + } + }, + { + "name": "newCollateralBalance", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "traderSequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + } + ] + } + }, + { + "name": "TraderFundsWithdrawnEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "traderSequenceNumber", + "type": "u64" + }, + { + "name": "traderPrevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "postWithdrawalBudget", + "type": "u64" + }, + { + "name": "postQueueSize", + "type": "u64" + }, + { + "name": "totalQueuedAmount", + "type": "u64" + }, + { + "name": "withdrawQueueSequenceNumber", + "type": "u64" + }, + { + "name": "withdrawQueuePrevSequenceNumberSlot", + "type": "u64" + } + ] + } + }, + { + "name": "TraderFundsWithdrawnFeePaymentEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "fee", + "type": "u64" + }, + { + "name": "traderSequenceNumber", + "type": "u64" + }, + { + "name": "traderPrevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "withdrawQueueSequenceNumber", + "type": "u64" + }, + { + "name": "withdrawQueuePrevSequenceNumberSlot", + "type": "u64" + } + ] + } + }, + { + "name": "TraderWithdrawCancelledEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "traderSequenceNumber", + "type": "u64" + }, + { + "name": "traderPrevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "withdrawQueueSequenceNumber", + "type": "u64" + }, + { + "name": "withdrawQueuePrevSequenceNumberSlot", + "type": "u64" + } + ] + } + }, + { + "name": "TraderCollateralTransferredEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "amount", + "type": { + "defined": { + "name": "QuoteLots" + } + } + }, + { + "name": "srcTrader", + "type": "pubkey" + }, + { + "name": "srcTraderSequenceNumber", + "type": "u64" + }, + { + "name": "srcTraderPrevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "srcTraderNewCollateralBalance", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "dstTrader", + "type": "pubkey" + }, + { + "name": "dstTraderSequenceNumber", + "type": "u64" + }, + { + "name": "dstTraderPrevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "dstTraderNewCollateralBalance", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + } + ] + } + }, + { + "name": "TraderFundingSettledEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "assetSymbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "assetId", + "type": "u32" + }, + { + "name": "fundingPayment", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "cumulativeFundingSnapshot", + "type": { + "defined": { + "name": "SignedQuoteLotsPerBaseLot" + } + } + }, + { + "name": "newCollateralBalance", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + } + ] + } + }, + { + "name": "SplineRegisteredEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "market", + "type": "pubkey" + }, + { + "name": "symbol", + "type": { + "defined": { + "name": "Symbol" + } + } + } + ] + } + }, + { + "name": "SplineActivatedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "market", + "type": "pubkey" + }, + { + "name": "symbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "midPrice", + "type": "u64" + } + ] + } + }, + { + "name": "SplineDeactivatedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "market", + "type": "pubkey" + }, + { + "name": "symbol", + "type": { + "defined": { + "name": "Symbol" + } + } + } + ] + } + }, + { + "name": "SplinePositionLimitsConfigUpdatedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "market", + "type": "pubkey" + }, + { + "name": "symbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "maxPositionSize", + "type": { + "option": { + "defined": { + "name": "PositionSizeLimit" + } + } + } + }, + { + "name": "prevMaxPositionSize", + "type": { + "defined": { + "name": "PositionSizeLimit" + } + } + }, + { + "name": "leverageDecreaseInBps", + "type": { + "option": "u32" + } + }, + { + "name": "prevLeverageDecreaseInBps", + "type": "u32" + } + ] + } + }, + { + "name": "SplinePriceUpdatedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "market", + "type": "pubkey" + }, + { + "name": "symbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "priceInTicks", + "type": "u64" + }, + { + "name": "userUpdateSlot", + "type": "u64" + }, + { + "name": "refreshRegions", + "type": "bool" + } + ] + } + }, + { + "name": "SplineParametersUpdatedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "market", + "type": "pubkey" + }, + { + "name": "symbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "midPrice", + "type": "u64" + }, + { + "name": "bidRegions", + "type": { + "array": [ + { + "defined": { + "name": "TickRegion" + } + }, + 10 + ] + } + }, + { + "name": "askRegions", + "type": { + "array": [ + { + "defined": { + "name": "TickRegion" + } + }, + 10 + ] + } + } + ] + } + }, + { + "name": "SplinePriceUpdatedWithOrderingEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "market", + "type": "pubkey" + }, + { + "name": "symbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "priceInTicks", + "type": "u64" + }, + { + "name": "userUpdateSlot", + "type": "u64" + }, + { + "name": "refreshRegions", + "type": "bool" + }, + { + "name": "userSequenceNumber", + "type": "u64" + }, + { + "name": "clientOrderId", + "type": { + "array": [ + "u8", + 16 + ] + } + } + ] + } + }, + { + "name": "SplineParametersUpdatedWithOrderingEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "market", + "type": "pubkey" + }, + { + "name": "symbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "midPrice", + "type": "u64" + }, + { + "name": "bidRegions", + "type": { + "array": [ + { + "defined": { + "name": "TickRegion" + } + }, + 10 + ] + } + }, + { + "name": "askRegions", + "type": { + "array": [ + { + "defined": { + "name": "TickRegion" + } + }, + 10 + ] + } + }, + { + "name": "userSequenceNumber", + "type": "u64" + }, + { + "name": "clientOrderId", + "type": { + "array": [ + "u8", + 16 + ] + } + } + ] + } + }, + { + "name": "StopLossPlacedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "assetId", + "type": "u64" + }, + { + "name": "triggerPrice", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "executionPrice", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "tradeSize", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "tradeSide", + "type": { + "defined": { + "name": "Side" + } + } + }, + { + "name": "executionDirection", + "type": { + "defined": { + "name": "Direction" + } + } + }, + { + "name": "positionSequenceNumber", + "type": "u8" + }, + { + "name": "placeSlot", + "type": "u64" + }, + { + "name": "fundingKey", + "type": "pubkey" + }, + { + "name": "orderKind", + "type": { + "defined": { + "name": "StopLossOrderKind" + } + } + } + ] + } + }, + { + "name": "StopLossCancelledEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "assetId", + "type": "u64" + }, + { + "name": "executionDirection", + "type": { + "defined": { + "name": "Direction" + } + } + } + ] + } + }, + { + "name": "StopLossExecutedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "assetId", + "type": "u64" + }, + { + "name": "executionDirection", + "type": { + "defined": { + "name": "Direction" + } + } + }, + { + "name": "orderSequenceNumber", + "type": "u64" + } + ] + } + }, + { + "name": "TriggerOrderPlacedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "assetId", + "type": "u64" + }, + { + "name": "conditionalOrderIndex", + "type": "u8" + }, + { + "name": "triggerPrice", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "executionPrice", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "tradeSide", + "type": { + "defined": { + "name": "Side" + } + } + }, + { + "name": "triggerDirection", + "type": { + "defined": { + "name": "Direction" + } + } + }, + { + "name": "orderKind", + "type": { + "defined": { + "name": "StopLossOrderKind" + } + } + }, + { + "name": "maxSize", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "fillableSize", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "filledSize", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "usePercent", + "type": "bool" + }, + { + "name": "percent", + "type": "u8" + }, + { + "name": "positionSequenceNumber", + "type": "u8" + }, + { + "name": "attachedOrderId", + "type": { + "defined": { + "name": "OptionalFIFOOrderId" + } + } + } + ] + } + }, + { + "name": "TriggerOrderCancelledEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "assetId", + "type": "u64" + }, + { + "name": "conditionalOrderIndex", + "type": "u8" + }, + { + "name": "triggerDirection", + "type": { + "defined": { + "name": "Direction" + } + } + } + ] + } + }, + { + "name": "TriggerOrderExecutedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "assetId", + "type": "u64" + }, + { + "name": "conditionalOrderIndex", + "type": "u8" + }, + { + "name": "triggerDirection", + "type": { + "defined": { + "name": "Direction" + } + } + }, + { + "name": "orderSequenceNumber", + "type": "u64" + } + ] + } + }, + { + "name": "PingInvalidatedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "assetId", + "type": "u64" + }, + { + "name": "conditionalOrderIndex", + "type": "u8" + }, + { + "name": "pre", + "type": { + "defined": { + "name": "ConditionalOrderPingSnapshot" + } + } + }, + { + "name": "post", + "type": { + "defined": { + "name": "ConditionalOrderPingSnapshot" + } + } + }, + { + "name": "currentPositionSequenceNumber", + "type": "u8" + } + ] + } + }, + { + "name": "PingActivatedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "prevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "assetId", + "type": "u64" + }, + { + "name": "conditionalOrderIndex", + "type": "u8" + }, + { + "name": "pre", + "type": { + "defined": { + "name": "ConditionalOrderPingSnapshot" + } + } + }, + { + "name": "post", + "type": { + "defined": { + "name": "ConditionalOrderPingSnapshot" + } + } + }, + { + "name": "bookOrderRemainingBaseLots", + "type": { + "option": { + "defined": { + "name": "BaseLots" + } + } + } + } + ] + } + }, + { + "name": "MarketAddedEvent", + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "MarketStatusChangedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "previousMarketStatus", + "type": { + "defined": { + "name": "MarketStatus" + } + } + }, + { + "name": "newMarketStatus", + "type": { + "defined": { + "name": "MarketStatus" + } + } + } + ] + } + }, + { + "name": "MarketClosedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "previousMarketStatus", + "type": { + "defined": { + "name": "MarketStatus" + } + } + }, + { + "name": "finalizedMarkPrice", + "type": { + "defined": { + "name": "Ticks" + } + } + } + ] + } + }, + { + "name": "MarketTombstonedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "previousMarketStatus", + "type": { + "defined": { + "name": "MarketStatus" + } + } + }, + { + "name": "finalSequenceNumber", + "type": "u64" + }, + { + "name": "finalTradeSequenceNumber", + "type": "u64" + }, + { + "name": "finalOrderSequenceNumber", + "type": "u64" + } + ] + } + }, + { + "name": "ShutdownClosePositionsEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "longTrader", + "type": "pubkey" + }, + { + "name": "shortTrader", + "type": "pubkey" + }, + { + "name": "assetId", + "type": "u32" + }, + { + "name": "baseLotsClosed", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "settlementPrice", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "tradeSequenceNumber", + "type": "u64" + }, + { + "name": "sequenceNumber", + "type": "u64" + } + ] + } + }, + { + "name": "MarketDeletedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "assetId", + "type": "u32" + }, + { + "name": "lamportsReclaimed", + "type": "u64" + } + ] + } + }, + { + "name": "ExchangeStatusChangedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "previousBits", + "type": "u8" + }, + { + "name": "newBits", + "type": "u8" + }, + { + "name": "authority", + "type": "pubkey" + } + ] + } + }, + { + "name": "MarketParametersUpdatedEvent", + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "FundingParametersUpdatedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "symbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "newFundingIntervalSeconds", + "type": { + "option": { + "defined": { + "name": "FundingRateUnitInSeconds" + } + } + } + }, + { + "name": "newFundingPeriodSeconds", + "type": { + "option": { + "defined": { + "name": "FundingRateUnitInSeconds" + } + } + } + }, + { + "name": "newMaxFundingRate", + "type": { + "option": { + "defined": { + "name": "SignedQuoteLotsPerBaseLot" + } + } + } + } + ] + } + }, + { + "name": "FeesClaimedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + } + ] + } + }, + { + "name": "SetPermissionEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "user", + "type": "pubkey" + }, + { + "name": "previousPermission", + "type": "u64" + }, + { + "name": "newPermission", + "type": "u64" + }, + { + "name": "previousExpiresAtTimestamp", + "type": "i64" + }, + { + "name": "newExpiresAtTimestamp", + "type": "i64" + }, + { + "name": "previousNumSignerActionsRemaining", + "type": "i64" + }, + { + "name": "newNumSignerActionsRemaining", + "type": "i64" + }, + { + "name": "created", + "type": "bool" + } + ] + } + }, + { + "name": "PricesUpdatedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "oracleSigner", + "type": { + "option": "pubkey" + } + }, + { + "name": "assetSymbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "assetId", + "type": "u32" + }, + { + "name": "newBestBid", + "type": { + "option": { + "defined": { + "name": "Ticks" + } + } + } + }, + { + "name": "newBestAsk", + "type": { + "option": { + "defined": { + "name": "Ticks" + } + } + } + }, + { + "name": "newLastTrade", + "type": { + "option": { + "defined": { + "name": "Ticks" + } + } + } + }, + { + "name": "newExchangeSpotPrice", + "type": { + "option": { + "defined": { + "name": "Ticks" + } + } + } + }, + { + "name": "newExchangePerpPrice", + "type": { + "option": { + "defined": { + "name": "Ticks" + } + } + } + }, + { + "name": "newMidSpotDiffEmaTicks", + "type": { + "option": { + "defined": { + "name": "SignedTicks" + } + } + } + }, + { + "name": "newMarkPrice", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "cumulativeFundingRate", + "type": { + "option": { + "defined": { + "name": "SignedQuoteLotsPerBaseLot" + } + } + } + }, + { + "name": "settledContribution", + "type": { + "option": { + "defined": { + "name": "SignedQuoteLotsPerBaseLot" + } + } + } + }, + { + "name": "intervalAccumulator", + "type": { + "option": { + "defined": { + "name": "SignedQuoteLotsPerBaseLotUpcasted" + } + } + } + }, + { + "name": "assetSequenceNumber", + "type": "u64" + }, + { + "name": "prevAssetSequenceNumberSlot", + "type": "u64" + } + ] + } + }, + { + "name": "LiquidationEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "liquidator", + "type": "pubkey" + }, + { + "name": "liquidatedTrader", + "type": "pubkey" + }, + { + "name": "assetId", + "type": "u32" + }, + { + "name": "liquidationSize", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "markPrice", + "type": { + "defined": { + "name": "Ticks" + } + } + }, + { + "name": "baseLotsFilled", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "quoteLotsFilled", + "type": { + "defined": { + "name": "QuoteLots" + } + } + }, + { + "name": "positionClosed", + "type": "bool" + } + ] + } + }, + { + "name": "LiquidationTransferSummaryEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "liquidatee", + "type": "pubkey" + }, + { + "name": "liquidator", + "type": "pubkey" + }, + { + "name": "totalTransfers", + "type": "u32" + }, + { + "name": "liquidateeCollateralChange", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "liquidatorCollateralChange", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "haircutCollected", + "type": { + "defined": { + "name": "QuoteLots" + } + } + } + ] + } + }, + { + "name": "LiquidationTransferEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "liquidatee", + "type": "pubkey" + }, + { + "name": "liquidator", + "type": "pubkey" + }, + { + "name": "assetId", + "type": "u64" + }, + { + "name": "baseLotsTransferred", + "type": { + "defined": { + "name": "SignedBaseLots" + } + } + }, + { + "name": "virtualQuoteLotsTransferred", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "haircutRate", + "type": "u16" + }, + { + "name": "liquidateeCollateralChange", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "liquidatorCollateralChange", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + } + ] + } + }, + { + "name": "CloseMatchedPositionsEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "caller", + "type": "pubkey" + }, + { + "name": "closedShort", + "type": "pubkey" + }, + { + "name": "closedLong", + "type": "pubkey" + }, + { + "name": "inProfitAccount", + "type": "pubkey" + }, + { + "name": "assetId", + "type": "u64" + }, + { + "name": "baseLotsClosed", + "type": { + "defined": { + "name": "SignedBaseLots" + } + } + }, + { + "name": "atLossCloseValue", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "inProfitCloseValue", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "atLossCollateralChange", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "inProfitCollateralChange", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + } + ] + } + }, + { + "name": "NameSuccessorEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "newAuthority", + "type": "pubkey" + } + ] + } + }, + { + "name": "ClaimAuthorityEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "previousAuthority", + "type": "pubkey" + }, + { + "name": "newAuthority", + "type": "pubkey" + } + ] + } + }, + { + "name": "AuthorityChangedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "previousAuthority", + "type": "pubkey" + }, + { + "name": "newAuthority", + "type": "pubkey" + }, + { + "name": "authorityType", + "type": { + "defined": { + "name": "AuthorityType" + } + } + } + ] + } + }, + { + "name": "WithdrawStateTransitionEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "amount", + "type": { + "defined": { + "name": "QuoteLots" + } + } + }, + { + "name": "fromState", + "type": "u8" + }, + { + "name": "toState", + "type": "u8" + }, + { + "name": "reason", + "type": "u8" + }, + { + "name": "transitionCount", + "type": "u16" + }, + { + "name": "nodeIndex", + "type": { + "defined": { + "name": "NodePointer" + } + } + } + ] + } + }, + { + "name": "PnLEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "assetId", + "type": "u32" + }, + { + "name": "assetSymbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "realizedPnl", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "fundingPayment", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "baseLotsBefore", + "type": { + "defined": { + "name": "SignedBaseLots" + } + } + }, + { + "name": "baseLotsAfter", + "type": { + "defined": { + "name": "SignedBaseLots" + } + } + }, + { + "name": "virtualQuoteLotsBefore", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + }, + { + "name": "virtualQuoteLotsAfter", + "type": { + "defined": { + "name": "SignedQuoteLots" + } + } + } + ] + } + }, + { + "name": "AdminParameterUpdatedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "assetSymbol", + "type": { + "option": { + "defined": { + "name": "Symbol" + } + } + } + }, + { + "name": "assetId", + "type": { + "option": "u32" + } + }, + { + "name": "updateKind", + "type": { + "defined": { + "name": "AdminParameterUpdateKind" + } + } + } + ] + } + }, + { + "name": "EscrowAccountCreatedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "capacity", + "type": "u64" + } + ] + } + }, + { + "name": "EscrowRequestCreatedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "receiverAuthority", + "type": "pubkey" + }, + { + "name": "senderAuthority", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "senderPdaIndex", + "type": "u8" + }, + { + "name": "senderSubaccountIndex", + "type": "u8" + }, + { + "name": "receiverPdaIndex", + "type": "u8" + }, + { + "name": "receiverSubaccountIndex", + "type": "u8" + }, + { + "name": "expirationOffset", + "type": "u32" + }, + { + "name": "initialSlot", + "type": "u64" + }, + { + "name": "actions", + "type": { + "array": [ + { + "defined": { + "name": "EscrowAction" + } + }, + 4 + ] + } + } + ] + } + }, + { + "name": "EscrowRequestAcceptedEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "receiverAuthority", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + } + ] + } + }, + { + "name": "EscrowRequestCancelledEvent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "receiverAuthority", + "type": "pubkey" + }, + { + "name": "sequenceNumber", + "type": "u64" + }, + { + "name": "reason", + "type": { + "defined": { + "name": "EscrowRequestCancelReason" + } + } + } + ] + } + }, + { + "name": "ChangeMarketStatusParams", + "docs": [ + "Borsh payload for changing an orderbook market status." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "nextMarketStatus", + "type": { + "defined": { + "name": "MarketStatus" + } + } + } + ] + } + }, + { + "name": "AuthorizedForceCancelParams", + "docs": [ + "Borsh payload for authority-driven force cancellation by remaining side size." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "remainingBidBaseLots", + "type": { + "defined": { + "name": "BaseLots" + } + } + }, + { + "name": "remainingAskBaseLots", + "type": { + "defined": { + "name": "BaseLots" + } + } + } + ] + } + }, + { + "name": "AuthorizedForceCancelByIdParams", + "docs": [ + "Borsh payload for authority-driven force cancellation by order id." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "bidOrderIds", + "type": { + "vec": { + "defined": { + "name": "CancelId" + } + } + } + }, + { + "name": "askOrderIds", + "type": { + "vec": { + "defined": { + "name": "CancelId" + } + } + } + } + ] + } + }, + { + "name": "CreateEscrowAccountParams", + "docs": [ + "Borsh payload for creating an escrow account." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "capacity", + "type": "u64" + } + ] + } + }, + { + "name": "EscrowParticipantMetadata", + "docs": [ + "Trader PDA/subaccount metadata stored with escrow requests." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "senderPdaIndex", + "type": "u8" + }, + { + "name": "senderSubaccountIndex", + "type": "u8" + }, + { + "name": "receiverPdaIndex", + "type": "u8" + }, + { + "name": "receiverSubaccountIndex", + "type": "u8" + } + ] + } + }, + { + "name": "CreateEscrowRequestParams", + "docs": [ + "Borsh payload for creating an escrow request." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "participantMetadata", + "type": { + "defined": { + "name": "EscrowParticipantMetadata" + } + } + }, + { + "name": "lastValidSlot", + "type": { + "option": "u64" + } + }, + { + "name": "actions", + "type": { + "vec": { + "defined": { + "name": "EscrowAction" + } + } + } + } + ] + } + }, + { + "name": "CancelEscrowRequestParams", + "docs": [ + "Borsh payload for cancelling an escrow request by sequence number." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "sequenceNumber", + "type": "u64" + } + ] + } + }, + { + "name": "UpsertEscrowRequestParams", + "docs": [ + "Borsh payload for upserting an escrow request." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "participantMetadata", + "type": { + "defined": { + "name": "EscrowParticipantMetadata" + } + } + }, + { + "name": "action", + "type": { + "defined": { + "name": "EscrowAction" + } + } + } + ] + } + }, + { + "name": "RegisterSplineParams", + "docs": [ + "Empty Borsh payload for registering a spline trader." + ], + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "UpdateCommodityMarketStateInstruction", + "docs": [ + "Borsh payload for updating commodity market state and mark price inputs." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "marketState", + "type": { + "defined": { + "name": "CommodityMarketState" + } + } + }, + { + "name": "lastKnownIndexPrice", + "type": { + "option": { + "defined": { + "name": "Ticks" + } + } + } + }, + { + "name": "lastIndexExpiryTimestamp", + "type": "u64" + }, + { + "name": "emaPeriodSlots", + "type": { + "option": "u64" + } + } + ] + } + }, + { + "name": "UpdatePerpIsolatedOnlyInstruction", + "docs": [ + "Borsh payload for updating isolated-only metadata for a perp asset." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "perpAssetSymbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "isolatedOnly", + "type": "u8" + } + ] + } + }, + { + "name": "UpdatePerpLeverageTiersInstruction", + "docs": [ + "Borsh payload for updating leverage tiers for a perp asset." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "perpAssetSymbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "leverageTiers", + "type": { + "defined": { + "name": "LeverageTiers" + } + } + } + ] + } + }, + { + "name": "UpdatePerpOpenInterestCapInstruction", + "docs": [ + "Borsh payload for updating open interest cap for a perp asset." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "perpAssetSymbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "openInterestCap", + "type": { + "defined": { + "name": "BaseLots" + } + } + } + ] + } + }, + { + "name": "UPnlRiskFactor", + "docs": [ + "uPnL risk factor encoded as basis points." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "inner", + "type": "u64" + } + ] + } + }, + { + "name": "UpdatePerpUPnlRiskFactorInstruction", + "docs": [ + "Borsh payload for updating uPnL risk factor for a perp asset." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "perpAssetSymbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "upnlRiskFactor", + "type": { + "defined": { + "name": "UPnlRiskFactor" + } + } + } + ] + } + }, + { + "name": "UpdatePerpUPnlRiskFactorForWithdrawalsInstruction", + "docs": [ + "Borsh payload for updating withdrawal uPnL risk factor for a perp asset." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "perpAssetSymbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "upnlRiskFactorForWithdrawals", + "type": { + "defined": { + "name": "UPnlRiskFactor" + } + } + } + ] + } + }, + { + "name": "UpdatePerpCancelRiskFactorInstruction", + "docs": [ + "Borsh payload for updating cancel-order risk factor for a perp asset." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "perpAssetSymbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "cancelOrderRiskFactor", + "type": "u16" + } + ] + } + }, + { + "name": "UpdatePerpMarkPriceParametersInstruction", + "docs": [ + "Borsh payload for updating mark price calculation parameters for a perp asset." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "perpAssetSymbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "emaPeriodSlots", + "type": { + "option": "u64" + } + }, + { + "name": "emaDiffRadius", + "type": { + "option": "u64" + } + }, + { + "name": "bookPriceRadius", + "type": { + "option": "u64" + } + }, + { + "name": "commoditiesAfterHoursRadiusBps", + "type": { + "option": "u64" + } + }, + { + "name": "adjustedExchangeSpotPriceWeight", + "type": { + "option": "u64" + } + }, + { + "name": "bookPriceWeight", + "type": { + "option": "u64" + } + }, + { + "name": "exchangePerpPriceWeight", + "type": { + "option": "u64" + } + }, + { + "name": "spotPriceStaleThreshold", + "type": { + "option": "u64" + } + }, + { + "name": "bookPriceStaleThreshold", + "type": { + "option": "u64" + } + }, + { + "name": "perpPriceStaleThreshold", + "type": { + "option": "u64" + } + }, + { + "name": "riskActionPriceValidityRules", + "type": { + "option": { + "array": [ + { + "array": [ + { + "array": [ + { + "defined": { + "name": "ValidationRule" + } + }, + 8 + ] + }, + 4 + ] + }, + 8 + ] + } + } + }, + { + "name": "oracleDivergenceRadius", + "type": { + "option": "u16" + } + }, + { + "name": "minOracleResponses", + "type": { + "option": "u8" + } + } + ] + } + }, + { + "name": "UpdateTraderFeesParams", + "docs": [ + "Borsh payload for updating trader fee override multipliers." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "makerFeeOverrideMultiplier", + "type": "i8" + }, + { + "name": "takerFeeOverrideMultiplier", + "type": "i8" + } + ] + } + }, + { + "name": "UpdateMarketFeesParams", + "docs": [ + "Borsh payload for updating market default fees." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "defaultTakerFeeMicro", + "type": { + "option": "u32" + } + }, + { + "name": "defaultMakerFeeMicro", + "type": { + "option": "i32" + } + } + ] + } + }, + { + "name": "UpdateWithdrawRateLimitsParams", + "docs": [ + "Borsh payload for updating withdraw throttle rate limits." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxBudget", + "type": { + "option": "u64" + } + }, + { + "name": "replenishAmountPerSlot", + "type": { + "option": "u64" + } + } + ] + } + }, + { + "name": "UpdateWithdrawParametersParams", + "docs": [ + "Borsh payload for updating withdraw cooldown and fee parameters." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "depositCooldownPeriodInSlots", + "type": { + "option": "u64" + } + }, + { + "name": "withdrawalFee", + "type": { + "option": "u64" + } + }, + { + "name": "enqueueingFee", + "type": { + "option": "u64" + } + } + ] + } + }, + { + "name": "UpdateAuthoritiesParams", + "docs": [ + "Borsh payload for root authority updates to subordinate authorities." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "newRiskAuthority", + "type": { + "option": "pubkey" + } + }, + { + "name": "newMarketAuthority", + "type": { + "option": "pubkey" + } + }, + { + "name": "newOracleAuthority", + "type": { + "option": "pubkey" + } + }, + { + "name": "newCancelAuthority", + "type": { + "option": "pubkey" + } + }, + { + "name": "newBackstopAuthority", + "type": { + "option": "pubkey" + } + }, + { + "name": "newAdlAuthority", + "type": { + "option": "pubkey" + } + } + ] + } + }, + { + "name": "ArenaType", + "docs": [ + "Arena account family to initialize." + ], + "type": { + "kind": "enum", + "variants": [ + { + "name": "GlobalTraderIndex" + }, + { + "name": "ActiveTraderBuffer" + } + ] + } + }, + { + "name": "InitializeArenaParams", + "docs": [ + "Borsh payload for initializing a new arena account." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "arenaType", + "type": { + "defined": { + "name": "ArenaType" + } + } + } + ] + } + }, + { + "name": "RemoveOracleInstruction", + "docs": [ + "Borsh payload for removing oracle public keys from the perp asset map." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "oracleKeys", + "type": { + "vec": "pubkey" + } + } + ] + } + }, + { + "name": "RemoveAllOraclesInstruction", + "docs": [ + "Borsh payload for removing all oracle keys for a perp asset." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "perpAssetSymbol", + "type": { + "defined": { + "name": "Symbol" + } + } + } + ] + } + }, + { + "name": "UpdateFundingParametersInstruction", + "docs": [ + "Borsh payload for updating funding parameters for a perp asset." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "perpAssetSymbol", + "type": { + "defined": { + "name": "Symbol" + } + } + }, + { + "name": "fundingIntervalSeconds", + "type": { + "option": { + "defined": { + "name": "FundingRateUnitInSeconds" + } + } + } + }, + { + "name": "fundingPeriodSeconds", + "type": { + "option": { + "defined": { + "name": "FundingRateUnitInSeconds" + } + } + } + }, + { + "name": "maxFundingRate", + "type": { + "option": { + "defined": { + "name": "SignedQuoteLotsPerBaseLot" + } + } + } + } + ] + } + }, + { + "name": "UpdateSplinePositionLimitsConfigParams", + "docs": [ + "Borsh payload for updating spline position-size limits and leverage decrease configuration." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxPositionSize", + "type": { + "option": { + "defined": { + "name": "PositionSizeLimit" + } + } + } + }, + { + "name": "leverageDecreaseInBps", + "type": { + "option": "u32" + } + } + ] + } + }, + { + "name": "TraderFundsWithdrawnEnqueuedEvent", + "docs": [ + "Viewer-safe alias for MarketEvent::TraderFundsWithdrawnEnqueued.", + "Uses the same payload layout as TraderFundsWithdrawnEvent." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "traderSequenceNumber", + "type": "u64" + }, + { + "name": "traderPrevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "postWithdrawalBudget", + "type": "u64" + }, + { + "name": "postQueueSize", + "type": "u64" + }, + { + "name": "totalQueuedAmount", + "type": "u64" + }, + { + "name": "withdrawQueueSequenceNumber", + "type": "u64" + }, + { + "name": "withdrawQueuePrevSequenceNumberSlot", + "type": "u64" + } + ] + } + }, + { + "name": "TraderFundsWithdrawnDroppedEvent", + "docs": [ + "Viewer-safe alias for MarketEvent::TraderFundsWithdrawnDropped.", + "Uses the same payload layout as TraderFundsWithdrawnEvent." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "trader", + "type": "pubkey" + }, + { + "name": "authority", + "type": "pubkey" + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "traderSequenceNumber", + "type": "u64" + }, + { + "name": "traderPrevSequenceNumberSlot", + "type": "u64" + }, + { + "name": "postWithdrawalBudget", + "type": "u64" + }, + { + "name": "postQueueSize", + "type": "u64" + }, + { + "name": "totalQueuedAmount", + "type": "u64" + }, + { + "name": "withdrawQueueSequenceNumber", + "type": "u64" + }, + { + "name": "withdrawQueuePrevSequenceNumberSlot", + "type": "u64" + } + ] + } + } + ], + "events": [ + { + "name": "SlotContextEvent", + "docs": [ + "MarketEvent::SlotContext Borsh variant 0.", + "Payload type: SlotContextEvent." + ], + "discriminator": [ + 0 + ] + }, + { + "name": "MarketEventHeader", + "docs": [ + "MarketEvent::Header Borsh variant 1.", + "Payload type: MarketEventHeader." + ], + "discriminator": [ + 1 + ] + }, + { + "name": "OrderPlacedEvent", + "docs": [ + "MarketEvent::OrderPlaced Borsh variant 2.", + "Payload type: OrderPlacedEvent." + ], + "discriminator": [ + 2 + ] + }, + { + "name": "OrderFilledEvent", + "docs": [ + "MarketEvent::OrderFilled Borsh variant 3.", + "Payload type: OrderFilledEvent." + ], + "discriminator": [ + 3 + ] + }, + { + "name": "OrderRejectedEvent", + "docs": [ + "MarketEvent::OrderRejected Borsh variant 4.", + "Payload type: OrderRejectedEvent." + ], + "discriminator": [ + 4 + ] + }, + { + "name": "SplineFilledEvent", + "docs": [ + "MarketEvent::SplineFilled Borsh variant 5.", + "Payload type: SplineFilledEvent." + ], + "discriminator": [ + 5 + ] + }, + { + "name": "TradeSummaryEvent", + "docs": [ + "MarketEvent::TradeSummary Borsh variant 6.", + "Payload type: TradeSummaryEvent." + ], + "discriminator": [ + 6 + ] + }, + { + "name": "OrderModifiedEvent", + "docs": [ + "MarketEvent::OrderModified Borsh variant 7.", + "Payload type: OrderModifiedEvent." + ], + "discriminator": [ + 7 + ] + }, + { + "name": "MarketSummaryEvent", + "docs": [ + "MarketEvent::MarketSummary Borsh variant 8.", + "Payload type: MarketSummaryEvent." + ], + "discriminator": [ + 8 + ] + }, + { + "name": "TraderRegisteredEvent", + "docs": [ + "MarketEvent::TraderRegistered Borsh variant 9.", + "Payload type: TraderRegisteredEvent." + ], + "discriminator": [ + 9 + ] + }, + { + "name": "TraderCollateralTransferredEvent", + "docs": [ + "MarketEvent::TraderCollateralTransferred Borsh variant 10.", + "Payload type: TraderCollateralTransferredEvent." + ], + "discriminator": [ + 10 + ] + }, + { + "name": "TraderActivatedEvent", + "docs": [ + "MarketEvent::TraderActivated Borsh variant 11.", + "Payload type: TraderActivatedEvent." + ], + "discriminator": [ + 11 + ] + }, + { + "name": "TraderDeactivatedEvent", + "docs": [ + "MarketEvent::TraderDeactivated Borsh variant 12.", + "Payload type: TraderDeactivatedEvent." + ], + "discriminator": [ + 12 + ] + }, + { + "name": "TraderFundsDepositedEvent", + "docs": [ + "MarketEvent::TraderFundsDeposited Borsh variant 13.", + "Payload type: TraderFundsDepositedEvent." + ], + "discriminator": [ + 13 + ] + }, + { + "name": "TraderFundsWithdrawnEvent", + "docs": [ + "MarketEvent::TraderFundsWithdrawn Borsh variant 14.", + "Payload type: TraderFundsWithdrawnEvent." + ], + "discriminator": [ + 14 + ] + }, + { + "name": "TraderFundsWithdrawnEnqueuedEvent", + "docs": [ + "MarketEvent::TraderFundsWithdrawnEnqueued Borsh variant 15.", + "Payload type: TraderFundsWithdrawnEvent." + ], + "discriminator": [ + 15 + ] + }, + { + "name": "TraderFundsWithdrawnDroppedEvent", + "docs": [ + "MarketEvent::TraderFundsWithdrawnDropped Borsh variant 16.", + "Payload type: TraderFundsWithdrawnEvent." + ], + "discriminator": [ + 16 + ] + }, + { + "name": "TraderWithdrawCancelledEvent", + "docs": [ + "MarketEvent::TraderWithdrawCancelled Borsh variant 17.", + "Payload type: TraderWithdrawCancelledEvent." + ], + "discriminator": [ + 17 + ] + }, + { + "name": "TraderFundingSettledEvent", + "docs": [ + "MarketEvent::TraderFundingSettled Borsh variant 18.", + "Payload type: TraderFundingSettledEvent." + ], + "discriminator": [ + 18 + ] + }, + { + "name": "SplineRegisteredEvent", + "docs": [ + "MarketEvent::SplineRegistered Borsh variant 19.", + "Payload type: SplineRegisteredEvent." + ], + "discriminator": [ + 19 + ] + }, + { + "name": "SplineActivatedEvent", + "docs": [ + "MarketEvent::SplineActivated Borsh variant 20.", + "Payload type: SplineActivatedEvent." + ], + "discriminator": [ + 20 + ] + }, + { + "name": "SplineDeactivatedEvent", + "docs": [ + "MarketEvent::SplineDeactivated Borsh variant 21.", + "Payload type: SplineDeactivatedEvent." + ], + "discriminator": [ + 21 + ] + }, + { + "name": "SplinePriceUpdatedEvent", + "docs": [ + "MarketEvent::SplinePriceUpdated Borsh variant 22.", + "Payload type: SplinePriceUpdatedEvent." + ], + "discriminator": [ + 22 + ] + }, + { + "name": "SplineParametersUpdatedEvent", + "docs": [ + "MarketEvent::SplineParametersUpdated Borsh variant 23.", + "Payload type: SplineParametersUpdatedEvent." + ], + "discriminator": [ + 23 + ] + }, + { + "name": "MarketAddedEvent", + "docs": [ + "MarketEvent::MarketAdded Borsh variant 24.", + "Payload type: MarketAddedEvent." + ], + "discriminator": [ + 24 + ] + }, + { + "name": "MarketStatusChangedEvent", + "docs": [ + "MarketEvent::MarketStatusChanged Borsh variant 25.", + "Payload type: MarketStatusChangedEvent." + ], + "discriminator": [ + 25 + ] + }, + { + "name": "MarketParametersUpdatedEvent", + "docs": [ + "MarketEvent::MarketParametersUpdated Borsh variant 26.", + "Payload type: MarketParametersUpdatedEvent." + ], + "discriminator": [ + 26 + ] + }, + { + "name": "FundingParametersUpdatedEvent", + "docs": [ + "MarketEvent::FundingParametersUpdated Borsh variant 27.", + "Payload type: FundingParametersUpdatedEvent." + ], + "discriminator": [ + 27 + ] + }, + { + "name": "FeesClaimedEvent", + "docs": [ + "MarketEvent::FeesClaimed Borsh variant 28.", + "Payload type: FeesClaimedEvent." + ], + "discriminator": [ + 28 + ] + }, + { + "name": "PricesUpdatedEvent", + "docs": [ + "MarketEvent::PricesUpdated Borsh variant 29.", + "Payload type: PricesUpdatedEvent." + ], + "discriminator": [ + 29 + ] + }, + { + "name": "LiquidationTransferSummaryEvent", + "docs": [ + "MarketEvent::LiquidationTransferSummary Borsh variant 30.", + "Payload type: LiquidationTransferSummaryEvent." + ], + "discriminator": [ + 30 + ] + }, + { + "name": "LiquidationTransferEvent", + "docs": [ + "MarketEvent::LiquidationTransfer Borsh variant 31.", + "Payload type: LiquidationTransferEvent." + ], + "discriminator": [ + 31 + ] + }, + { + "name": "LiquidationEvent", + "docs": [ + "MarketEvent::Liquidation Borsh variant 32.", + "Payload type: LiquidationEvent." + ], + "discriminator": [ + 32 + ] + }, + { + "name": "CloseMatchedPositionsEvent", + "docs": [ + "MarketEvent::CloseMatchedPositions Borsh variant 33.", + "Payload type: CloseMatchedPositionsEvent." + ], + "discriminator": [ + 33 + ] + }, + { + "name": "NameSuccessorEvent", + "docs": [ + "MarketEvent::NameSuccessor Borsh variant 34.", + "Payload type: NameSuccessorEvent." + ], + "discriminator": [ + 34 + ] + }, + { + "name": "ClaimAuthorityEvent", + "docs": [ + "MarketEvent::ClaimAuthority Borsh variant 35.", + "Payload type: ClaimAuthorityEvent." + ], + "discriminator": [ + 35 + ] + }, + { + "name": "WithdrawStateTransitionEvent", + "docs": [ + "MarketEvent::WithdrawStateTransition Borsh variant 36.", + "Payload type: WithdrawStateTransitionEvent." + ], + "discriminator": [ + 36 + ] + }, + { + "name": "PnLEvent", + "docs": [ + "MarketEvent::PnL Borsh variant 37.", + "Payload type: PnLEvent." + ], + "discriminator": [ + 37 + ] + }, + { + "name": "StopLossPlacedEvent", + "docs": [ + "MarketEvent::StopLossPlaced Borsh variant 38.", + "Payload type: StopLossPlacedEvent." + ], + "discriminator": [ + 38 + ] + }, + { + "name": "StopLossCancelledEvent", + "docs": [ + "MarketEvent::StopLossCancelled Borsh variant 39.", + "Payload type: StopLossCancelledEvent." + ], + "discriminator": [ + 39 + ] + }, + { + "name": "StopLossExecutedEvent", + "docs": [ + "MarketEvent::StopLossExecuted Borsh variant 40.", + "Payload type: StopLossExecutedEvent." + ], + "discriminator": [ + 40 + ] + }, + { + "name": "ExchangeStatusChangedEvent", + "docs": [ + "MarketEvent::ExchangeStatusChanged Borsh variant 41.", + "Payload type: ExchangeStatusChangedEvent." + ], + "discriminator": [ + 41 + ] + }, + { + "name": "TraderCapabilitiesEnabledEvent", + "docs": [ + "MarketEvent::TraderCapabilitiesEnabled Borsh variant 42.", + "Payload type: TraderCapabilitiesEnabledEvent." + ], + "discriminator": [ + 42 + ] + }, + { + "name": "TraderFundsWithdrawnFeePaymentEvent", + "docs": [ + "MarketEvent::TraderFundsWithdrawnFeePayment Borsh variant 43.", + "Payload type: TraderFundsWithdrawnFeePaymentEvent." + ], + "discriminator": [ + 43 + ] + }, + { + "name": "OrderPacketEvent", + "docs": [ + "MarketEvent::OrderPacket Borsh variant 44.", + "Payload type: OrderPacketEvent." + ], + "discriminator": [ + 44 + ] + }, + { + "name": "SetPermissionEvent", + "docs": [ + "MarketEvent::SetPermission Borsh variant 45.", + "Payload type: SetPermissionEvent." + ], + "discriminator": [ + 45 + ] + }, + { + "name": "AuthorityChangedEvent", + "docs": [ + "MarketEvent::AuthorityChanged Borsh variant 46.", + "Payload type: AuthorityChangedEvent." + ], + "discriminator": [ + 46 + ] + }, + { + "name": "TraderDelegatedEvent", + "docs": [ + "MarketEvent::TraderDelegated Borsh variant 47.", + "Payload type: TraderDelegatedEvent." + ], + "discriminator": [ + 47 + ] + }, + { + "name": "AdminParameterUpdatedEvent", + "docs": [ + "MarketEvent::AdminParameterUpdated Borsh variant 48.", + "Payload type: AdminParameterUpdatedEvent." + ], + "discriminator": [ + 48 + ] + }, + { + "name": "TraderFeesUpdatedEvent", + "docs": [ + "MarketEvent::TraderFeesUpdated Borsh variant 49.", + "Payload type: TraderFeesUpdatedEvent." + ], + "discriminator": [ + 49 + ] + }, + { + "name": "MarketClosedEvent", + "docs": [ + "MarketEvent::MarketClosed Borsh variant 50.", + "Payload type: MarketClosedEvent." + ], + "discriminator": [ + 50 + ] + }, + { + "name": "MarketDeletedEvent", + "docs": [ + "MarketEvent::MarketDeleted Borsh variant 51.", + "Payload type: MarketDeletedEvent." + ], + "discriminator": [ + 51 + ] + }, + { + "name": "EscrowAccountCreatedEvent", + "docs": [ + "MarketEvent::EscrowAccountCreated Borsh variant 52.", + "Payload type: EscrowAccountCreatedEvent." + ], + "discriminator": [ + 52 + ] + }, + { + "name": "EscrowRequestCreatedEvent", + "docs": [ + "MarketEvent::EscrowRequestCreated Borsh variant 53.", + "Payload type: EscrowRequestCreatedEvent." + ], + "discriminator": [ + 53 + ] + }, + { + "name": "EscrowRequestAcceptedEvent", + "docs": [ + "MarketEvent::EscrowRequestAccepted Borsh variant 54.", + "Payload type: EscrowRequestAcceptedEvent." + ], + "discriminator": [ + 54 + ] + }, + { + "name": "EscrowRequestCancelledEvent", + "docs": [ + "MarketEvent::EscrowRequestCancelled Borsh variant 55.", + "Payload type: EscrowRequestCancelledEvent." + ], + "discriminator": [ + 55 + ] + }, + { + "name": "SplinePriceUpdatedWithOrderingEvent", + "docs": [ + "MarketEvent::SplinePriceUpdatedWithOrdering Borsh variant 56.", + "Payload type: SplinePriceUpdatedWithOrderingEvent." + ], + "discriminator": [ + 56 + ] + }, + { + "name": "SplineParametersUpdatedWithOrderingEvent", + "docs": [ + "MarketEvent::SplineParametersUpdatedWithOrdering Borsh variant 57.", + "Payload type: SplineParametersUpdatedWithOrderingEvent." + ], + "discriminator": [ + 57 + ] + }, + { + "name": "TriggerOrderPlacedEvent", + "docs": [ + "MarketEvent::TriggerOrderPlaced Borsh variant 58.", + "Payload type: TriggerOrderPlacedEvent." + ], + "discriminator": [ + 58 + ] + }, + { + "name": "TriggerOrderCancelledEvent", + "docs": [ + "MarketEvent::TriggerOrderCancelled Borsh variant 59.", + "Payload type: TriggerOrderCancelledEvent." + ], + "discriminator": [ + 59 + ] + }, + { + "name": "TriggerOrderExecutedEvent", + "docs": [ + "MarketEvent::TriggerOrderExecuted Borsh variant 60.", + "Payload type: TriggerOrderExecutedEvent." + ], + "discriminator": [ + 60 + ] + }, + { + "name": "PingInvalidatedEvent", + "docs": [ + "MarketEvent::PingInvalidated Borsh variant 61.", + "Payload type: PingInvalidatedEvent." + ], + "discriminator": [ + 61 + ] + }, + { + "name": "PingActivatedEvent", + "docs": [ + "MarketEvent::PingActivated Borsh variant 62.", + "Payload type: PingActivatedEvent." + ], + "discriminator": [ + 62 + ] + }, + { + "name": "SplinePositionLimitsConfigUpdatedEvent", + "docs": [ + "MarketEvent::SplinePositionLimitsConfigUpdated Borsh variant 63.", + "Payload type: SplinePositionLimitsConfigUpdatedEvent." + ], + "discriminator": [ + 63 + ] + }, + { + "name": "MarketTombstonedEvent", + "docs": [ + "MarketEvent::MarketTombstoned Borsh variant 64.", + "Payload type: MarketTombstonedEvent." + ], + "discriminator": [ + 64 + ] + }, + { + "name": "ShutdownClosePositionsEvent", + "docs": [ + "MarketEvent::ShutdownClosePositions Borsh variant 65.", + "Payload type: ShutdownClosePositionsEvent." + ], + "discriminator": [ + 65 + ] + }, + { + "name": "OrderResidualDiscardedEvent", + "docs": [ + "MarketEvent::OrderResidualDiscarded Borsh variant 66.", + "Payload type: OrderResidualDiscardedEvent." + ], + "discriminator": [ + 66 + ] + } + ], + "errors": [] +} \ No newline at end of file diff --git a/idls/perpetuals.PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu.jupiter.V0_1_0.from_solscan.json b/idls/perpetuals.PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu.jupiter.V0_1_0.from_solscan.json new file mode 100644 index 0000000..5b94bec --- /dev/null +++ b/idls/perpetuals.PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu.jupiter.V0_1_0.from_solscan.json @@ -0,0 +1,8384 @@ +{ + "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/perpetuals.ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD.zeta.V0_1_0.from_solscan.json b/idls/perpetuals.ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD.zeta.V0_1_0.from_solscan.json new file mode 100644 index 0000000..89caae8 --- /dev/null +++ b/idls/perpetuals.ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD.zeta.V0_1_0.from_solscan.json @@ -0,0 +1,9374 @@ +{ + "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/idls/perpetuals.dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.drift_v2.V2_150_0.from_solscan.json b/idls/perpetuals.dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.drift_v2.V2_150_0.from_solscan.json new file mode 100644 index 0000000..5623437 --- /dev/null +++ b/idls/perpetuals.dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.drift_v2.V2_150_0.from_solscan.json @@ -0,0 +1,19596 @@ +{ + "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/pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.pump_fees.json b/idls/pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.pump_fees.json deleted file mode 100644 index d2804b5..0000000 --- a/idls/pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.pump_fees.json +++ /dev/null @@ -1 +0,0 @@ -{"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/proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u.okx_dex_router.json b/idls/proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u.okx_dex_router.json deleted file mode 100644 index 0366a0a..0000000 --- a/idls/proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u.okx_dex_router.json +++ /dev/null @@ -1 +0,0 @@ -{"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/router.6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma.okx_labs_v1.V0_1_0.from_solscan.json b/idls/router.6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma.okx_labs_v1.V0_1_0.from_solscan.json new file mode 100644 index 0000000..574bbda --- /dev/null +++ b/idls/router.6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma.okx_labs_v1.V0_1_0.from_solscan.json @@ -0,0 +1,2321 @@ +{ + "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/router.DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH.dflow_aggregator_v4.V0_1_0.from_solscan.json b/idls/router.DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH.dflow_aggregator_v4.V0_1_0.from_solscan.json new file mode 100644 index 0000000..8506d90 --- /dev/null +++ b/idls/router.DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH.dflow_aggregator_v4.V0_1_0.from_solscan.json @@ -0,0 +1,4257 @@ +{ + "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/router.JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB.jupiter_aggregator_v4.V0_1_0.from_solscan.json b/idls/router.JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB.jupiter_aggregator_v4.V0_1_0.from_solscan.json new file mode 100644 index 0000000..c551599 --- /dev/null +++ b/idls/router.JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB.jupiter_aggregator_v4.V0_1_0.from_solscan.json @@ -0,0 +1,2803 @@ +{ + "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/router.JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4.jupiter_aggregator_v6.V0_1_0.from_solscan.json b/idls/router.JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4.jupiter_aggregator_v6.V0_1_0.from_solscan.json new file mode 100644 index 0000000..4b672e3 --- /dev/null +++ b/idls/router.JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4.jupiter_aggregator_v6.V0_1_0.from_solscan.json @@ -0,0 +1,3052 @@ +{ + "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/router.proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u.okx_labs_v2.V0_1_0.from_solscan.json b/idls/router.proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u.okx_labs_v2.V0_1_0.from_solscan.json new file mode 100644 index 0000000..6884357 --- /dev/null +++ b/idls/router.proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u.okx_labs_v2.V0_1_0.from_solscan.json @@ -0,0 +1,3639 @@ +{ + "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/rwa.XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm.ondo_global_markets.V0_1_0.from_solscan.json b/idls/rwa.XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm.ondo_global_markets.V0_1_0.from_solscan.json new file mode 100644 index 0000000..7e9dcdc --- /dev/null +++ b/idls/rwa.XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm.ondo_global_markets.V0_1_0.from_solscan.json @@ -0,0 +1,10749 @@ +{ + "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/solana.11111111111111111111111111111111.core.system.V0_0_1.from_github_solana_program.json b/idls/solana.11111111111111111111111111111111.core.system.V0_0_1.from_github_solana_program.json new file mode 100644 index 0000000..8f0f642 --- /dev/null +++ b/idls/solana.11111111111111111111111111111111.core.system.V0_0_1.from_github_solana_program.json @@ -0,0 +1,1263 @@ +{ + "kind": "rootNode", + "program": { + "kind": "programNode", + "pdas": [], + "accounts": [ + { + "kind": "accountNode", + "data": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "version", + "type": { + "kind": "definedTypeLinkNode", + "name": "nonceVersion" + }, + "docs": [] + }, + { + "kind": "structFieldTypeNode", + "name": "state", + "type": { + "kind": "definedTypeLinkNode", + "name": "nonceState" + }, + "docs": [] + }, + { + "kind": "structFieldTypeNode", + "name": "authority", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [] + }, + { + "kind": "structFieldTypeNode", + "name": "blockhash", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [] + }, + { + "kind": "structFieldTypeNode", + "name": "lamportsPerSignature", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [] + } + ] + }, + "name": "nonce", + "idlName": "Nonce", + "docs": [], + "size": 80 + } + ], + "instructions": [ + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "payer", + "isWritable": true, + "isSigner": true, + "isOptional": false, + "docs": [], + "defaultValue": { + "kind": "payerValueNode" + } + }, + { + "kind": "instructionAccountNode", + "name": "newAccount", + "isWritable": true, + "isSigner": true, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "lamports", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [] + }, + { + "kind": "instructionArgumentNode", + "name": "space", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [] + }, + { + "kind": "instructionArgumentNode", + "name": "programAddress", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [] + } + ], + "byteDeltas": [ + { + "kind": "instructionByteDeltaNode", + "value": { + "kind": "argumentValueNode", + "name": "space" + }, + "withHeader": true + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "createAccount", + "idlName": "CreateAccount", + "docs": [], + "optionalAccountStrategy": "omitted" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": true, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "programAddress", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "assign", + "idlName": "Assign", + "docs": [], + "optionalAccountStrategy": "omitted" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "source", + "isWritable": true, + "isSigner": true, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 2 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "transferSol", + "idlName": "TransferSol", + "docs": [], + "optionalAccountStrategy": "omitted" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "payer", + "isWritable": true, + "isSigner": true, + "isOptional": false, + "docs": [], + "defaultValue": { + "kind": "payerValueNode" + } + }, + { + "kind": "instructionAccountNode", + "name": "newAccount", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "baseAccount", + "isWritable": false, + "isSigner": true, + "isOptional": true, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 3 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "base", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [] + }, + { + "kind": "instructionArgumentNode", + "name": "seed", + "type": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + "docs": [] + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [] + }, + { + "kind": "instructionArgumentNode", + "name": "space", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [] + }, + { + "kind": "instructionArgumentNode", + "name": "programAddress", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "createAccountWithSeed", + "idlName": "CreateAccountWithSeed", + "docs": [], + "optionalAccountStrategy": "omitted" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "nonceAccount", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "recentBlockhashesSysvar", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRecentB1ockHashes11111111111111111111" + } + }, + { + "kind": "instructionAccountNode", + "name": "nonceAuthority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 4 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "advanceNonceAccount", + "idlName": "AdvanceNonceAccount", + "docs": [], + "optionalAccountStrategy": "omitted" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "nonceAccount", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "recipientAccount", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "recentBlockhashesSysvar", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRecentB1ockHashes11111111111111111111" + } + }, + { + "kind": "instructionAccountNode", + "name": "rentSysvar", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRent111111111111111111111111111111111" + } + }, + { + "kind": "instructionAccountNode", + "name": "nonceAuthority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 5 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "withdrawAmount", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "withdrawNonceAccount", + "idlName": "WithdrawNonceAccount", + "docs": [], + "optionalAccountStrategy": "omitted" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "nonceAccount", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "recentBlockhashesSysvar", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRecentB1ockHashes11111111111111111111" + } + }, + { + "kind": "instructionAccountNode", + "name": "rentSysvar", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRent111111111111111111111111111111111" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 6 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "nonceAuthority", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "initializeNonceAccount", + "idlName": "InitializeNonceAccount", + "docs": [], + "optionalAccountStrategy": "omitted" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "nonceAccount", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "nonceAuthority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 7 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "newNonceAuthority", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "authorizeNonceAccount", + "idlName": "AuthorizeNonceAccount", + "docs": [], + "optionalAccountStrategy": "omitted" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "newAccount", + "isWritable": true, + "isSigner": true, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 8 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "space", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "allocate", + "idlName": "Allocate", + "docs": [], + "optionalAccountStrategy": "omitted" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "newAccount", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "baseAccount", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 9 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "base", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [] + }, + { + "kind": "instructionArgumentNode", + "name": "seed", + "type": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + "docs": [] + }, + { + "kind": "instructionArgumentNode", + "name": "space", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [] + }, + { + "kind": "instructionArgumentNode", + "name": "programAddress", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "allocateWithSeed", + "idlName": "AllocateWithSeed", + "docs": [], + "optionalAccountStrategy": "omitted" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "baseAccount", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 10 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "base", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [] + }, + { + "kind": "instructionArgumentNode", + "name": "seed", + "type": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + "docs": [] + }, + { + "kind": "instructionArgumentNode", + "name": "programAddress", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "assignWithSeed", + "idlName": "AssignWithSeed", + "docs": [], + "optionalAccountStrategy": "omitted" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "source", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "baseAccount", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 11 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [] + }, + { + "kind": "instructionArgumentNode", + "name": "fromSeed", + "type": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + "docs": [] + }, + { + "kind": "instructionArgumentNode", + "name": "fromOwner", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "transferSolWithSeed", + "idlName": "TransferSolWithSeed", + "docs": [], + "optionalAccountStrategy": "omitted" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "nonceAccount", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 12 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "upgradeNonceAccount", + "idlName": "UpgradeNonceAccount", + "docs": [], + "optionalAccountStrategy": "omitted" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "newAccount", + "isWritable": true, + "isSigner": true, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "payer", + "isWritable": true, + "isSigner": true, + "isOptional": true, + "docs": [], + "defaultValue": { + "kind": "payerValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 13 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "lamports", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + }, + "defaultValueStrategy": "optional" + }, + { + "kind": "instructionArgumentNode", + "name": "space", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [] + }, + { + "kind": "instructionArgumentNode", + "name": "programAddress", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [] + } + ], + "byteDeltas": [ + { + "kind": "instructionByteDeltaNode", + "value": { + "kind": "argumentValueNode", + "name": "space" + }, + "withHeader": true + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "createAccountAllowPrefund", + "idlName": "CreateAccountAllowPrefund", + "docs": [], + "optionalAccountStrategy": "omitted" + } + ], + "definedTypes": [ + { + "kind": "definedTypeNode", + "name": "nonceVersion", + "type": { + "kind": "enumTypeNode", + "variants": [ + { + "kind": "enumEmptyVariantTypeNode", + "name": "legacy" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "current" + } + ], + "size": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + }, + "idlName": "NonceVersion", + "docs": [] + }, + { + "kind": "definedTypeNode", + "name": "nonceState", + "type": { + "kind": "enumTypeNode", + "variants": [ + { + "kind": "enumEmptyVariantTypeNode", + "name": "uninitialized" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "initialized" + } + ], + "size": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + }, + "idlName": "NonceState", + "docs": [] + } + ], + "errors": [ + { + "kind": "errorNode", + "name": "accountAlreadyInUse", + "idlName": "AccountAlreadyInUse", + "code": 0, + "message": "an account with the same address already exists", + "docs": [ + "AccountAlreadyInUse: an account with the same address already exists" + ] + }, + { + "kind": "errorNode", + "name": "resultWithNegativeLamports", + "idlName": "ResultWithNegativeLamports", + "code": 1, + "message": "account does not have enough SOL to perform the operation", + "docs": [ + "ResultWithNegativeLamports: account does not have enough SOL to perform the operation" + ] + }, + { + "kind": "errorNode", + "name": "invalidProgramId", + "idlName": "InvalidProgramId", + "code": 2, + "message": "cannot assign account to this program id", + "docs": [ + "InvalidProgramId: cannot assign account to this program id" + ] + }, + { + "kind": "errorNode", + "name": "invalidAccountDataLength", + "idlName": "InvalidAccountDataLength", + "code": 3, + "message": "cannot allocate account data of this length", + "docs": [ + "InvalidAccountDataLength: cannot allocate account data of this length" + ] + }, + { + "kind": "errorNode", + "name": "maxSeedLengthExceeded", + "idlName": "MaxSeedLengthExceeded", + "code": 4, + "message": "length of requested seed is too long", + "docs": [ + "MaxSeedLengthExceeded: length of requested seed is too long" + ] + }, + { + "kind": "errorNode", + "name": "addressWithSeedMismatch", + "idlName": "AddressWithSeedMismatch", + "code": 5, + "message": "provided address does not match addressed derived from seed", + "docs": [ + "AddressWithSeedMismatch: provided address does not match addressed derived from seed" + ] + }, + { + "kind": "errorNode", + "name": "nonceNoRecentBlockhashes", + "idlName": "NonceNoRecentBlockhashes", + "code": 6, + "message": "advancing stored nonce requires a populated RecentBlockhashes sysvar", + "docs": [ + "NonceNoRecentBlockhashes: advancing stored nonce requires a populated RecentBlockhashes sysvar" + ] + }, + { + "kind": "errorNode", + "name": "nonceBlockhashNotExpired", + "idlName": "NonceBlockhashNotExpired", + "code": 7, + "message": "stored nonce is still in recent_blockhashes", + "docs": [ + "NonceBlockhashNotExpired: stored nonce is still in recent_blockhashes" + ] + }, + { + "kind": "errorNode", + "name": "nonceUnexpectedBlockhashValue", + "idlName": "NonceUnexpectedBlockhashValue", + "code": 8, + "message": "specified nonce does not match stored nonce", + "docs": [ + "NonceUnexpectedBlockhashValue: specified nonce does not match stored nonce" + ] + } + ], + "name": "system", + "prefix": "", + "publicKey": "11111111111111111111111111111111", + "version": "0.0.1", + "origin": "shank" + }, + "additionalPrograms": [], + "standard": "codama", + "version": "1.0.0" +} \ No newline at end of file diff --git a/idls/solana.AddressLookupTab1e1111111111111111111111111.core.address_lookup_table.V0_0_1.from_github_solana_program.json b/idls/solana.AddressLookupTab1e1111111111111111111111111.core.address_lookup_table.V0_0_1.from_github_solana_program.json new file mode 100644 index 0000000..e2db89c --- /dev/null +++ b/idls/solana.AddressLookupTab1e1111111111111111111111111.core.address_lookup_table.V0_0_1.from_github_solana_program.json @@ -0,0 +1,575 @@ +{ + "kind": "rootNode", + "program": { + "kind": "programNode", + "pdas": [ + { + "kind": "pdaNode", + "name": "addressLookupTable", + "seeds": [ + { + "kind": "variablePdaSeedNode", + "name": "authority", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [ + "The address of the LUT's authority" + ] + }, + { + "kind": "variablePdaSeedNode", + "name": "recentSlot", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [ + "The recent slot associated with the LUT" + ] + } + ] + } + ], + "accounts": [ + { + "kind": "accountNode", + "data": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "structFieldTypeNode", + "name": "deactivationSlot", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [] + }, + { + "kind": "structFieldTypeNode", + "name": "lastExtendedSlot", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [] + }, + { + "kind": "structFieldTypeNode", + "name": "lastExtendedSlotStartIndex", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [] + }, + { + "kind": "structFieldTypeNode", + "name": "authority", + "type": { + "kind": "optionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "fixed": true, + "idlOption": "option" + }, + "docs": [] + }, + { + "kind": "structFieldTypeNode", + "name": "padding", + "type": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "structFieldTypeNode", + "name": "addresses", + "type": { + "kind": "arrayTypeNode", + "item": { + "kind": "publicKeyTypeNode" + }, + "count": { + "kind": "remainderCountNode" + } + }, + "docs": [] + } + ] + }, + "pda": { + "kind": "pdaLinkNode", + "name": "addressLookupTable" + }, + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "addressLookupTable", + "idlName": "AddressLookupTable", + "docs": [] + } + ], + "instructions": [ + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "address", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [], + "defaultValue": { + "kind": "pdaValueNode", + "pda": { + "kind": "pdaLinkNode", + "name": "addressLookupTable" + }, + "seeds": [ + { + "kind": "pdaSeedValueNode", + "name": "authority", + "value": { + "kind": "accountValueNode", + "name": "authority" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "recentSlot", + "value": { + "kind": "argumentValueNode", + "name": "recentSlot" + } + } + ] + } + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [], + "defaultValue": { + "kind": "identityValueNode" + } + }, + { + "kind": "instructionAccountNode", + "name": "payer", + "isWritable": true, + "isSigner": true, + "isOptional": false, + "docs": [], + "defaultValue": { + "kind": "accountValueNode", + "name": "authority" + } + }, + { + "kind": "instructionAccountNode", + "name": "systemProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "11111111111111111111111111111111", + "identifier": "splSystem" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "recentSlot", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [] + }, + { + "kind": "instructionArgumentNode", + "name": "bump", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "accountBumpValueNode", + "name": "address" + } + } + ], + "byteDeltas": [ + { + "kind": "instructionByteDeltaNode", + "value": { + "kind": "numberValueNode", + "number": 56 + }, + "withHeader": true + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "createLookupTable", + "idlName": "CreateLookupTable", + "docs": [], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "address", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "freezeLookupTable", + "idlName": "FreezeLookupTable", + "docs": [], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "address", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [], + "defaultValue": { + "kind": "identityValueNode" + } + }, + { + "kind": "instructionAccountNode", + "name": "payer", + "isWritable": true, + "isSigner": true, + "isOptional": false, + "docs": [], + "defaultValue": { + "kind": "payerValueNode" + } + }, + { + "kind": "instructionAccountNode", + "name": "systemProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "11111111111111111111111111111111", + "identifier": "splSystem" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 2 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "addresses", + "type": { + "kind": "arrayTypeNode", + "item": { + "kind": "publicKeyTypeNode" + }, + "count": { + "kind": "prefixedCountNode", + "prefix": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + }, + "docs": [] + } + ], + "byteDeltas": [ + { + "kind": "instructionByteDeltaNode", + "value": { + "kind": "resolverValueNode", + "name": "resolveExtendLookupTableBytes", + "dependsOn": [ + { + "kind": "argumentValueNode", + "name": "addresses" + } + ] + }, + "withHeader": false + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "extendLookupTable", + "idlName": "ExtendLookupTable", + "docs": [], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "address", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 3 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "deactivateLookupTable", + "idlName": "DeactivateLookupTable", + "docs": [], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "address", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [], + "defaultValue": { + "kind": "identityValueNode" + } + }, + { + "kind": "instructionAccountNode", + "name": "recipient", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 4 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "closeLookupTable", + "idlName": "CloseLookupTable", + "docs": [], + "optionalAccountStrategy": "programId" + } + ], + "definedTypes": [], + "errors": [], + "name": "addressLookupTable", + "prefix": "", + "publicKey": "AddressLookupTab1e1111111111111111111111111", + "version": "0.0.1", + "origin": "shank" + }, + "additionalPrograms": [], + "standard": "codama", + "version": "1.0.0" +} \ No newline at end of file diff --git a/idls/solana.BPFLoaderUpgradeab1e11111111111111111111111.core.loader_v3.V0_0_0.from_github_solana_program.json b/idls/solana.BPFLoaderUpgradeab1e11111111111111111111111.core.loader_v3.V0_0_0.from_github_solana_program.json new file mode 100644 index 0000000..6bcdd64 --- /dev/null +++ b/idls/solana.BPFLoaderUpgradeab1e11111111111111111111111.core.loader_v3.V0_0_0.from_github_solana_program.json @@ -0,0 +1,380 @@ +{ + "version": "0.0.0", + "name": "solana_loader_v3_program", + "instructions": [ + { + "name": "InitializeBuffer", + "accounts": [ + { + "name": "sourceAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Source account to initialize." + ] + }, + { + "name": "bufferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "Buffer authority." + ] + } + ], + "args": [], + "discriminant": { + "type": "u32", + "value": 0 + } + }, + { + "name": "Write", + "accounts": [ + { + "name": "bufferAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Buffer account." + ] + }, + { + "name": "bufferAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Buffer authority." + ] + } + ], + "args": [ + { + "name": "offset", + "type": "u32" + }, + { + "name": "bytes", + "type": "bytes" + } + ], + "discriminant": { + "type": "u32", + "value": 1 + } + }, + { + "name": "DeployWithMaxDataLen", + "accounts": [ + { + "name": "payerAccount", + "isMut": true, + "isSigner": true, + "docs": [ + "Payer account that will pay to create the ProgramData account." + ] + }, + { + "name": "programDataAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "ProgramData account (uninitialized)." + ] + }, + { + "name": "programAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Program account (uninitialized)." + ] + }, + { + "name": "bufferAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Buffer account where the program data has been written." + ] + }, + { + "name": "rentSysvar", + "isMut": false, + "isSigner": false, + "docs": [ + "Rent sysvar." + ] + }, + { + "name": "clockSysvar", + "isMut": false, + "isSigner": false, + "docs": [ + "Clock sysvar." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "System program." + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Authority." + ] + } + ], + "args": [ + { + "name": "maxDataLen", + "type": "u64" + } + ], + "discriminant": { + "type": "u32", + "value": 2 + } + }, + { + "name": "Upgrade", + "accounts": [ + { + "name": "programDataAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "ProgramData account." + ] + }, + { + "name": "programAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Program account." + ] + }, + { + "name": "bufferAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Buffer account where the new program data has been written." + ] + }, + { + "name": "spillAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Spill account." + ] + }, + { + "name": "rentSysvar", + "isMut": false, + "isSigner": false, + "docs": [ + "Rent sysvar." + ] + }, + { + "name": "clockSysvar", + "isMut": false, + "isSigner": false, + "docs": [ + "Clock sysvar." + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Authority." + ] + } + ], + "args": [], + "discriminant": { + "type": "u32", + "value": 3 + } + }, + { + "name": "SetAuthority", + "accounts": [ + { + "name": "bufferOrProgramDataAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Buffer or ProgramData account." + ] + }, + { + "name": "currentAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Current authority." + ] + }, + { + "name": "newAuthority", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "New authority (optional)." + ] + } + ], + "args": [], + "discriminant": { + "type": "u32", + "value": 4 + } + }, + { + "name": "Close", + "accounts": [ + { + "name": "bufferOrProgramDataAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Buffer or ProgramData account to close." + ] + }, + { + "name": "destinationAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Destination account for reclaimed lamports." + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "isOptional": true, + "docs": [ + "Authority (optional)." + ] + }, + { + "name": "programAccount", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Program account (optional)." + ] + } + ], + "args": [], + "discriminant": { + "type": "u32", + "value": 5 + } + }, + { + "name": "ExtendProgram", + "accounts": [ + { + "name": "programDataAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "ProgramData account." + ] + }, + { + "name": "programAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Program account." + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "System program (optional)." + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "isOptional": true, + "docs": [ + "Payer." + ] + } + ], + "args": [ + { + "name": "additionalBytes", + "type": "u32" + } + ], + "discriminant": { + "type": "u32", + "value": 6 + } + }, + { + "name": "SetAuthorityChecked", + "accounts": [ + { + "name": "bufferOrProgramDataAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "Buffer or ProgramData account to change the authority of." + ] + }, + { + "name": "currentAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Current authority." + ] + }, + { + "name": "newAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "New authority." + ] + } + ], + "args": [], + "discriminant": { + "type": "u32", + "value": 7 + } + } + ], + "metadata": { + "origin": "shank", + "address": "CoreBPFLoaderUpgradeab1e1111111111111111111", + "binaryVersion": "0.4.6", + "libVersion": "^0.4.2" + } +} \ No newline at end of file diff --git a/idls/solana.ComputeBudget111111111111111111111111111111.core.compute_budget.V0_0_1.from_github_solana_program.json b/idls/solana.ComputeBudget111111111111111111111111111111.core.compute_budget.V0_0_1.from_github_solana_program.json new file mode 100644 index 0000000..84f95db --- /dev/null +++ b/idls/solana.ComputeBudget111111111111111111111111111111.core.compute_budget.V0_0_1.from_github_solana_program.json @@ -0,0 +1,251 @@ +{ + "kind": "rootNode", + "program": { + "kind": "programNode", + "pdas": [], + "accounts": [], + "instructions": [ + { + "kind": "instructionNode", + "accounts": [], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "units", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [ + "Units to request for transaction-wide compute." + ] + }, + { + "kind": "instructionArgumentNode", + "name": "additionalFee", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [ + "Prioritization fee lamports." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "requestUnits", + "idlName": "requestUnits", + "docs": [], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "bytes", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [ + "Requested transaction-wide program heap size in bytes.", + "Must be multiple of 1024. Applies to each program, including CPIs." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "requestHeapFrame", + "idlName": "requestHeapFrame", + "docs": [], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 2 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "units", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [ + "Transaction-wide compute unit limit." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "setComputeUnitLimit", + "idlName": "setComputeUnitLimit", + "docs": [], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 3 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "microLamports", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [ + "Transaction compute unit price used for prioritization fees." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "setComputeUnitPrice", + "idlName": "setComputeUnitPrice", + "docs": [], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 4 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "accountDataSizeLimit", + "type": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "docs": [] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "setLoadedAccountsDataSizeLimit", + "idlName": "setLoadedAccountsDataSizeLimit", + "docs": [], + "optionalAccountStrategy": "programId" + } + ], + "definedTypes": [], + "errors": [], + "name": "computeBudget", + "prefix": "", + "publicKey": "ComputeBudget111111111111111111111111111111", + "version": "0.0.1", + "origin": "shank" + }, + "additionalPrograms": [], + "standard": "codama", + "version": "1.0.0" +} \ No newline at end of file diff --git a/idls/solana.Config1111111111111111111111111111111111111.core.config.V0_0_1.from_github_solana_program.json b/idls/solana.Config1111111111111111111111111111111111111.core.config.V0_0_1.from_github_solana_program.json new file mode 100644 index 0000000..dad1da6 --- /dev/null +++ b/idls/solana.Config1111111111111111111111111111111111111.core.config.V0_0_1.from_github_solana_program.json @@ -0,0 +1,150 @@ +{ + "kind": "rootNode", + "program": { + "kind": "programNode", + "pdas": [], + "accounts": [ + { + "kind": "accountNode", + "data": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "keys", + "type": { + "kind": "definedTypeLinkNode", + "name": "configKeys" + }, + "docs": [ + "List of pubkeys stored in the config account,", + "and whether each pubkey needs to sign subsequent calls to `store`." + ] + }, + { + "kind": "structFieldTypeNode", + "name": "data", + "type": { + "kind": "bytesTypeNode" + }, + "docs": [ + "Arbitrary data to store in the config account." + ] + } + ] + }, + "name": "config", + "docs": [] + } + ], + "instructions": [ + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "configAccount", + "isWritable": true, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The config account to be modified.", + "Must sign during the first call to `store` to initialize the account,", + "or if no signers are configured in the config data." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "keys", + "type": { + "kind": "definedTypeLinkNode", + "name": "configKeys" + }, + "docs": [ + "List of pubkeys to store in the config account,", + "and whether each pubkey needs to sign subsequent calls to `store`.", + "Non-signer pubkeys do not need to be passed to the program as accounts." + ] + }, + { + "kind": "instructionArgumentNode", + "name": "data", + "type": { + "kind": "bytesTypeNode" + }, + "docs": [ + "Arbitrary data to store in the config account." + ] + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "signers" + }, + "isOptional": true, + "isSigner": true + } + ], + "name": "store", + "docs": [ + "Stores keys and data in a config account.", + "Keys can be marked as signer or non-signer.", + "Only non-signer keys and data can be updated. Signer keys are immutable." + ], + "optionalAccountStrategy": "omitted" + } + ], + "definedTypes": [ + { + "kind": "definedTypeNode", + "name": "configKeys", + "type": { + "kind": "arrayTypeNode", + "item": { + "kind": "tupleTypeNode", + "items": [ + { + "kind": "publicKeyTypeNode" + }, + { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + ] + }, + "count": { + "kind": "prefixedCountNode", + "prefix": { + "kind": "numberTypeNode", + "format": "shortU16", + "endian": "le" + } + } + }, + "docs": [ + "A collection of keys to be stored in Config account data.", + "Each key tuple comprises a unique `Pubkey` identifier,", + "and `bool` whether that key is a signer of the data." + ] + } + ], + "errors": [], + "name": "config", + "prefix": "", + "publicKey": "Config1111111111111111111111111111111111111", + "version": "0.0.1", + "origin": "shank" + }, + "additionalPrograms": [], + "standard": "codama", + "version": "1.0.0" +} \ No newline at end of file diff --git a/idls/solana.Feature111111111111111111111111111111111111.core.feature.V0_0_1.from_github_solana_program.json b/idls/solana.Feature111111111111111111111111111111111111.core.feature.V0_0_1.from_github_solana_program.json new file mode 100644 index 0000000..dbab700 --- /dev/null +++ b/idls/solana.Feature111111111111111111111111111111111111.core.feature.V0_0_1.from_github_solana_program.json @@ -0,0 +1,53 @@ +{ + "version": "0.0.1", + "name": "solana_feature_gate_program", + "instructions": [ + { + "name": "RevokePendingActivation", + "accounts": [ + { + "name": "feature", + "isMut": true, + "isSigner": true, + "docs": [ + "The feature account to revoke" + ] + }, + { + "name": "incinerator", + "isMut": true, + "isSigner": false, + "docs": [ + "The incinerator account" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "The system program" + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 0 + } + } + ], + "errors": [ + { + "code": 0, + "name": "FeatureAlreadyActivated", + "msg": "Feature already activated" + } + ], + "metadata": { + "origin": "shank", + "address": "Feature111111111111111111111111111111111111", + "binaryVersion": "0.4.2", + "libVersion": "0.4.2" + } +} \ No newline at end of file diff --git a/idls/solana.LoaderV411111111111111111111111111111111111.core.loader_v4.V0_0_0.from_github_solana_program.json b/idls/solana.LoaderV411111111111111111111111111111111111.core.loader_v4.V0_0_0.from_github_solana_program.json new file mode 100644 index 0000000..4eaeb5d --- /dev/null +++ b/idls/solana.LoaderV411111111111111111111111111111111111.core.loader_v4.V0_0_0.from_github_solana_program.json @@ -0,0 +1,216 @@ +{ + "version": "0.0.0", + "name": "solana_loader_v4_program", + "instructions": [ + { + "name": "Write", + "accounts": [ + { + "name": "program", + "isMut": true, + "isSigner": false, + "docs": [ + "Program account to write to." + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Program authority." + ] + } + ], + "args": [ + { + "name": "offset", + "type": "u32" + }, + { + "name": "bytes", + "type": "bytes" + } + ], + "discriminant": { + "type": "u8", + "value": 0 + } + }, + { + "name": "Truncate", + "accounts": [ + { + "name": "program", + "isMut": true, + "isSigner": true, + "docs": [ + "Program account to change the size of." + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Program authority." + ] + }, + { + "name": "destination", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Destination account for reclaimed lamports (optional)." + ] + } + ], + "args": [ + { + "name": "newSize", + "type": "u32" + } + ], + "discriminant": { + "type": "u8", + "value": 1 + } + }, + { + "name": "Deploy", + "accounts": [ + { + "name": "program", + "isMut": true, + "isSigner": false, + "docs": [ + "Program account to deploy." + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Program authority." + ] + }, + { + "name": "source", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "Undeployed source program account to take data and lamports from (optional)." + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 2 + } + }, + { + "name": "Retract", + "accounts": [ + { + "name": "program", + "isMut": true, + "isSigner": false, + "docs": [ + "Program account to retract." + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Program authority." + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 3 + } + }, + { + "name": "TransferAuthority", + "accounts": [ + { + "name": "program", + "isMut": true, + "isSigner": false, + "docs": [ + "Program account to change the authority of." + ] + }, + { + "name": "currentAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "Current program authority." + ] + }, + { + "name": "newAuthority", + "isMut": false, + "isSigner": true, + "docs": [ + "New program authority." + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 4 + } + }, + { + "name": "Finalize", + "accounts": [ + { + "name": "program", + "isMut": true, + "isSigner": false, + "docs": [ + "Program account to finalize." + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true, + "docs": [ + "Program authority." + ] + }, + { + "name": "nextVersion", + "isMut": false, + "isSigner": false, + "docs": [ + "The next version of the program (can be itself)." + ] + } + ], + "args": [], + "discriminant": { + "type": "u8", + "value": 5 + } + } + ], + "metadata": { + "origin": "shank", + "address": "CoreBPFLoaderV41111111111111111111111111111", + "binaryVersion": "0.4.8", + "libVersion": "^0.4.2" + } +} \ No newline at end of file diff --git a/idls/solana.Stake11111111111111111111111111111111111111.core.stake.V4_3_1.from_github_solana_program.json b/idls/solana.Stake11111111111111111111111111111111111111.core.stake.V4_3_1.from_github_solana_program.json new file mode 100644 index 0000000..67991ed --- /dev/null +++ b/idls/solana.Stake11111111111111111111111111111111111111.core.stake.V4_3_1.from_github_solana_program.json @@ -0,0 +1,1861 @@ +{ + "additionalPrograms": [], + "kind": "rootNode", + "program": { + "accounts": [], + "definedTypes": [ + { + "kind": "definedTypeNode", + "name": "lockupParams", + "type": { + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "unixTimestamp", + "type": { + "item": { + "kind": "definedTypeLinkNode", + "name": "unixTimestamp" + }, + "kind": "optionTypeNode", + "prefix": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "epoch", + "type": { + "item": { + "kind": "definedTypeLinkNode", + "name": "epoch" + }, + "kind": "optionTypeNode", + "prefix": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "custodian", + "type": { + "item": { + "kind": "publicKeyTypeNode" + }, + "kind": "optionTypeNode", + "prefix": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + } + } + ], + "kind": "structTypeNode" + } + }, + { + "kind": "definedTypeNode", + "name": "lockupCheckedParams", + "type": { + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "unixTimestamp", + "type": { + "item": { + "kind": "definedTypeLinkNode", + "name": "unixTimestamp" + }, + "kind": "optionTypeNode", + "prefix": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "epoch", + "type": { + "item": { + "kind": "definedTypeLinkNode", + "name": "epoch" + }, + "kind": "optionTypeNode", + "prefix": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + } + } + ], + "kind": "structTypeNode" + } + }, + { + "kind": "definedTypeNode", + "name": "authorizeWithSeedParams", + "type": { + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "newAuthorizedPubkey", + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "stakeAuthorize", + "type": { + "kind": "definedTypeLinkNode", + "name": "stakeAuthorize" + } + }, + { + "kind": "structFieldTypeNode", + "name": "authoritySeed", + "type": { + "kind": "sizePrefixTypeNode", + "prefix": { + "endian": "le", + "format": "u64", + "kind": "numberTypeNode" + }, + "type": { + "encoding": "utf8", + "kind": "stringTypeNode" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "authorityOwner", + "type": { + "kind": "publicKeyTypeNode" + } + } + ], + "kind": "structTypeNode" + } + }, + { + "kind": "definedTypeNode", + "name": "authorizeCheckedWithSeedParams", + "type": { + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "stakeAuthorize", + "type": { + "kind": "definedTypeLinkNode", + "name": "stakeAuthorize" + } + }, + { + "kind": "structFieldTypeNode", + "name": "authoritySeed", + "type": { + "kind": "sizePrefixTypeNode", + "prefix": { + "endian": "le", + "format": "u64", + "kind": "numberTypeNode" + }, + "type": { + "encoding": "utf8", + "kind": "stringTypeNode" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "authorityOwner", + "type": { + "kind": "publicKeyTypeNode" + } + } + ], + "kind": "structTypeNode" + } + }, + { + "kind": "definedTypeNode", + "name": "stakeFlags", + "type": { + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "bits", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + } + ], + "kind": "structTypeNode" + } + }, + { + "kind": "definedTypeNode", + "name": "stakeState", + "type": { + "kind": "enumTypeNode", + "size": { + "endian": "le", + "format": "u32", + "kind": "numberTypeNode" + }, + "variants": [ + { + "kind": "enumEmptyVariantTypeNode", + "name": "uninitialized" + }, + { + "kind": "enumTupleVariantTypeNode", + "name": "initialized", + "tuple": { + "items": [ + { + "kind": "definedTypeLinkNode", + "name": "meta" + } + ], + "kind": "tupleTypeNode" + } + }, + { + "kind": "enumTupleVariantTypeNode", + "name": "stake", + "tuple": { + "items": [ + { + "kind": "definedTypeLinkNode", + "name": "meta" + }, + { + "kind": "definedTypeLinkNode", + "name": "stake" + } + ], + "kind": "tupleTypeNode" + } + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "rewardsPool" + } + ] + } + }, + { + "kind": "definedTypeNode", + "name": "stakeStateV2", + "type": { + "kind": "enumTypeNode", + "size": { + "endian": "le", + "format": "u32", + "kind": "numberTypeNode" + }, + "variants": [ + { + "kind": "enumEmptyVariantTypeNode", + "name": "uninitialized" + }, + { + "kind": "enumTupleVariantTypeNode", + "name": "initialized", + "tuple": { + "items": [ + { + "kind": "definedTypeLinkNode", + "name": "meta" + } + ], + "kind": "tupleTypeNode" + } + }, + { + "kind": "enumTupleVariantTypeNode", + "name": "stake", + "tuple": { + "items": [ + { + "kind": "definedTypeLinkNode", + "name": "meta" + }, + { + "kind": "definedTypeLinkNode", + "name": "stake" + }, + { + "kind": "definedTypeLinkNode", + "name": "stakeFlags" + } + ], + "kind": "tupleTypeNode" + } + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "rewardsPool" + } + ] + } + }, + { + "kind": "definedTypeNode", + "name": "stakeAuthorize", + "type": { + "kind": "enumTypeNode", + "size": { + "endian": "le", + "format": "u32", + "kind": "numberTypeNode" + }, + "variants": [ + { + "kind": "enumEmptyVariantTypeNode", + "name": "staker" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "withdrawer" + } + ] + } + }, + { + "kind": "definedTypeNode", + "name": "lockup", + "type": { + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "unixTimestamp", + "type": { + "kind": "definedTypeLinkNode", + "name": "unixTimestamp" + } + }, + { + "kind": "structFieldTypeNode", + "name": "epoch", + "type": { + "kind": "definedTypeLinkNode", + "name": "epoch" + } + }, + { + "kind": "structFieldTypeNode", + "name": "custodian", + "type": { + "kind": "publicKeyTypeNode" + } + } + ], + "kind": "structTypeNode" + } + }, + { + "kind": "definedTypeNode", + "name": "authorized", + "type": { + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "staker", + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "withdrawer", + "type": { + "kind": "publicKeyTypeNode" + } + } + ], + "kind": "structTypeNode" + } + }, + { + "kind": "definedTypeNode", + "name": "meta", + "type": { + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "rentExemptReserve", + "type": { + "endian": "le", + "format": "u64", + "kind": "numberTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "authorized", + "type": { + "kind": "definedTypeLinkNode", + "name": "authorized" + } + }, + { + "kind": "structFieldTypeNode", + "name": "lockup", + "type": { + "kind": "definedTypeLinkNode", + "name": "lockup" + } + } + ], + "kind": "structTypeNode" + } + }, + { + "kind": "definedTypeNode", + "name": "delegation", + "type": { + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "voterPubkey", + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "stake", + "type": { + "endian": "le", + "format": "u64", + "kind": "numberTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "activationEpoch", + "type": { + "kind": "definedTypeLinkNode", + "name": "epoch" + } + }, + { + "kind": "structFieldTypeNode", + "name": "deactivationEpoch", + "type": { + "kind": "definedTypeLinkNode", + "name": "epoch" + } + }, + { + "kind": "structFieldTypeNode", + "name": "reserved", + "type": { + "count": { + "kind": "fixedCountNode", + "value": 8 + }, + "item": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + }, + "kind": "arrayTypeNode" + } + } + ], + "kind": "structTypeNode" + } + }, + { + "kind": "definedTypeNode", + "name": "stake", + "type": { + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "delegation", + "type": { + "kind": "definedTypeLinkNode", + "name": "delegation" + } + }, + { + "kind": "structFieldTypeNode", + "name": "creditsObserved", + "type": { + "endian": "le", + "format": "u64", + "kind": "numberTypeNode" + } + } + ], + "kind": "structTypeNode" + } + } + ], + "errors": [ + { + "code": 0, + "kind": "errorNode", + "message": "Not enough credits to redeem", + "name": "noCreditsToRedeem" + }, + { + "code": 1, + "kind": "errorNode", + "message": "Lockup has not yet expired", + "name": "lockupInForce" + }, + { + "code": 2, + "kind": "errorNode", + "message": "Stake already deactivated", + "name": "alreadyDeactivated" + }, + { + "code": 3, + "kind": "errorNode", + "message": "One re-delegation permitted per epoch", + "name": "tooSoonToRedelegate" + }, + { + "code": 4, + "kind": "errorNode", + "message": "Split amount is more than is staked", + "name": "insufficientStake" + }, + { + "code": 5, + "kind": "errorNode", + "message": "Stake account with transient stake cannot be merged", + "name": "mergeTransientStake" + }, + { + "code": 6, + "kind": "errorNode", + "message": "Stake account merge failed due to different authority, lockups or state", + "name": "mergeMismatch" + }, + { + "code": 7, + "kind": "errorNode", + "message": "Custodian address not present", + "name": "custodianMissing" + }, + { + "code": 8, + "kind": "errorNode", + "message": "Custodian signature not present", + "name": "custodianSignatureMissing" + }, + { + "code": 9, + "kind": "errorNode", + "message": "Insufficient voting activity in the reference vote account", + "name": "insufficientReferenceVotes" + }, + { + "code": 10, + "kind": "errorNode", + "message": "Stake account is not delegated to the provided vote account", + "name": "voteAddressMismatch" + }, + { + "code": 11, + "kind": "errorNode", + "message": "Stake account has not been delinquent for the minimum epochs required for deactivation", + "name": "minimumDelinquentEpochsForDeactivationNotMet" + }, + { + "code": 12, + "kind": "errorNode", + "message": "Delegation amount is less than the minimum", + "name": "insufficientDelegation" + }, + { + "code": 13, + "kind": "errorNode", + "message": "Stake account with transient or inactive stake cannot be redelegated", + "name": "redelegateTransientOrInactiveStake" + }, + { + "code": 14, + "kind": "errorNode", + "message": "Stake redelegation to the same vote account is not permitted", + "name": "redelegateToSameVoteAccount" + }, + { + "code": 15, + "kind": "errorNode", + "message": "Redelegated stake must be fully activated before deactivation", + "name": "redelegatedStakeMustFullyActivateBeforeDeactivationIsPermitted" + }, + { + "code": 16, + "kind": "errorNode", + "message": "Stake action is not permitted while the epoch rewards period is active", + "name": "epochRewardsActive" + } + ], + "events": [], + "instructions": [ + { + "accounts": [ + { + "docs": [ + "Uninitialized stake account" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "stake" + }, + { + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRent111111111111111111111111111111111" + }, + "docs": [ + "Rent sysvar" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "rentSysvar" + } + ], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + }, + { + "kind": "instructionArgumentNode", + "name": "arg0", + "type": { + "kind": "definedTypeLinkNode", + "name": "authorized" + } + }, + { + "kind": "instructionArgumentNode", + "name": "arg1", + "type": { + "kind": "definedTypeLinkNode", + "name": "lockup" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "initialize" + }, + { + "accounts": [ + { + "docs": [ + "Stake account to be updated" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "stake" + }, + { + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarC1ock11111111111111111111111111111111" + }, + "docs": [ + "Clock sysvar" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "clockSysvar" + }, + { + "docs": [ + "The stake or withdraw authority" + ], + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "authority" + }, + { + "docs": [ + "Lockup authority, if updating `StakeAuthorize::Withdrawer` before lockup expiration" + ], + "isOptional": true, + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "lockupAuthority" + } + ], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + }, + { + "kind": "instructionArgumentNode", + "name": "arg0", + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "instructionArgumentNode", + "name": "arg1", + "type": { + "kind": "definedTypeLinkNode", + "name": "stakeAuthorize" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "authorize" + }, + { + "accounts": [ + { + "docs": [ + "Initialized stake account to be delegated" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "stake" + }, + { + "docs": [ + "Vote account to which this stake will be delegated" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "vote" + }, + { + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarC1ock11111111111111111111111111111111" + }, + "docs": [ + "Clock sysvar" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "clockSysvar" + }, + { + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarStakeHistory1111111111111111111111111" + }, + "docs": [ + "Stake history sysvar that carries stake warmup/cooldown history" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "stakeHistory" + }, + { + "docs": [ + "Unused account, formerly the stake config" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "unused" + }, + { + "docs": [ + "Stake authority" + ], + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "stakeAuthority" + } + ], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 2 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "delegateStake" + }, + { + "accounts": [ + { + "docs": [ + "Stake account to be split; must be in the Initialized or Stake state" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "stake" + }, + { + "docs": [ + "Uninitialized stake account that will take the split-off amount" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "splitStake" + }, + { + "docs": [ + "Stake authority" + ], + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "stakeAuthority" + } + ], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 3 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + }, + { + "kind": "instructionArgumentNode", + "name": "args", + "type": { + "endian": "le", + "format": "u64", + "kind": "numberTypeNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "split" + }, + { + "accounts": [ + { + "docs": [ + "Stake account from which to withdraw" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "stake" + }, + { + "docs": [ + "Recipient account" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "recipient" + }, + { + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarC1ock11111111111111111111111111111111" + }, + "docs": [ + "Clock sysvar" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "clockSysvar" + }, + { + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarStakeHistory1111111111111111111111111" + }, + "docs": [ + "Stake history sysvar that carries stake warmup/cooldown history" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "stakeHistory" + }, + { + "docs": [ + "Withdraw authority" + ], + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "withdrawAuthority" + }, + { + "docs": [ + "Lockup authority, if before lockup expiration" + ], + "isOptional": true, + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "lockupAuthority" + } + ], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 4 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + }, + { + "kind": "instructionArgumentNode", + "name": "args", + "type": { + "endian": "le", + "format": "u64", + "kind": "numberTypeNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "withdraw" + }, + { + "accounts": [ + { + "docs": [ + "Delegated stake account to be deactivated" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "stake" + }, + { + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarC1ock11111111111111111111111111111111" + }, + "docs": [ + "Clock sysvar" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "clockSysvar" + }, + { + "docs": [ + "Stake authority" + ], + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "stakeAuthority" + } + ], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 5 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "deactivate" + }, + { + "accounts": [ + { + "docs": [ + "Initialized stake account" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "stake" + }, + { + "docs": [ + "Lockup authority or withdraw authority" + ], + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "authority" + } + ], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 6 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + }, + { + "kind": "instructionArgumentNode", + "name": "arg0", + "type": { + "kind": "definedTypeLinkNode", + "name": "lockupArgs" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "setLockup" + }, + { + "accounts": [ + { + "docs": [ + "Destination stake account for the merge" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "destinationStake" + }, + { + "docs": [ + "Source stake account for to merge. This account will be drained" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "sourceStake" + }, + { + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarC1ock11111111111111111111111111111111" + }, + "docs": [ + "Clock sysvar" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "clockSysvar" + }, + { + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarStakeHistory1111111111111111111111111" + }, + "docs": [ + "Stake history sysvar that carries stake warmup/cooldown history" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "stakeHistory" + }, + { + "docs": [ + "Stake authority" + ], + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "stakeAuthority" + } + ], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 7 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "merge" + }, + { + "accounts": [ + { + "docs": [ + "Stake account to be updated" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "stake" + }, + { + "docs": [ + "Base key of stake or withdraw authority" + ], + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "base" + }, + { + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarC1ock11111111111111111111111111111111" + }, + "docs": [ + "Clock sysvar" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "clockSysvar" + }, + { + "docs": [ + "Lockup authority, if updating `StakeAuthorize::Withdrawer` before lockup expiration" + ], + "isOptional": true, + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "lockupAuthority" + } + ], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 8 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + }, + { + "kind": "instructionArgumentNode", + "name": "arg0", + "type": { + "kind": "definedTypeLinkNode", + "name": "authorizeWithSeedArgs" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "authorizeWithSeed" + }, + { + "accounts": [ + { + "docs": [ + "Uninitialized stake account" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "stake" + }, + { + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRent111111111111111111111111111111111" + }, + "docs": [ + "Rent sysvar" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "rentSysvar" + }, + { + "docs": [ + "The stake authority" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "stakeAuthority" + }, + { + "docs": [ + "The withdraw authority" + ], + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "withdrawAuthority" + } + ], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 9 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "initializeChecked" + }, + { + "accounts": [ + { + "docs": [ + "Stake account to be updated" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "stake" + }, + { + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarC1ock11111111111111111111111111111111" + }, + "docs": [ + "Clock sysvar" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "clockSysvar" + }, + { + "docs": [ + "The stake or withdraw authority" + ], + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "authority" + }, + { + "docs": [ + "The new stake or withdraw authority" + ], + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "newAuthority" + }, + { + "docs": [ + "Lockup authority, if updating `StakeAuthorize::Withdrawer` before lockup expiration" + ], + "isOptional": true, + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "lockupAuthority" + } + ], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 10 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + }, + { + "kind": "instructionArgumentNode", + "name": "stakeAuthorize", + "type": { + "kind": "definedTypeLinkNode", + "name": "stakeAuthorize" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "authorizeChecked" + }, + { + "accounts": [ + { + "docs": [ + "Stake account to be updated" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "stake" + }, + { + "docs": [ + "Base key of stake or withdraw authority" + ], + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "base" + }, + { + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarC1ock11111111111111111111111111111111" + }, + "docs": [ + "Clock sysvar" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "clockSysvar" + }, + { + "docs": [ + "The new stake or withdraw authority" + ], + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "newAuthority" + }, + { + "docs": [ + "Lockup authority, if updating `StakeAuthorize::Withdrawer` before lockup expiration" + ], + "isOptional": true, + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "lockupAuthority" + } + ], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 11 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + }, + { + "kind": "instructionArgumentNode", + "name": "arg0", + "type": { + "kind": "definedTypeLinkNode", + "name": "authorizeCheckedWithSeedArgs" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "authorizeCheckedWithSeed" + }, + { + "accounts": [ + { + "docs": [ + "Initialized stake account" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "stake" + }, + { + "docs": [ + "Lockup authority or withdraw authority" + ], + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "authority" + }, + { + "docs": [ + "New lockup authority" + ], + "isOptional": true, + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "newAuthority" + } + ], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 12 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + }, + { + "kind": "instructionArgumentNode", + "name": "arg0", + "type": { + "kind": "definedTypeLinkNode", + "name": "lockupCheckedArgs" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "setLockupChecked" + }, + { + "accounts": [], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 13 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "getMinimumDelegation" + }, + { + "accounts": [ + { + "docs": [ + "Delegated stake account" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "stake" + }, + { + "docs": [ + "Delinquent vote account for the delegated stake account" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "delinquentVote" + }, + { + "docs": [ + "Reference vote account that has voted at least once in the last `MINIMUM_DELINQUENT_EPOCHS_FOR_DEACTIVATION` epochs" + ], + "isSigner": false, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "referenceVote" + } + ], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 14 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "deactivateDelinquent" + }, + { + "accounts": [], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 15 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "redelegate" + }, + { + "accounts": [ + { + "docs": [ + "Active source stake account" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "sourceStake" + }, + { + "docs": [ + "Active or inactive destination stake account" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "destinationStake" + }, + { + "docs": [ + "Stake authority" + ], + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "stakeAuthority" + } + ], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 16 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + }, + { + "kind": "instructionArgumentNode", + "name": "args", + "type": { + "endian": "le", + "format": "u64", + "kind": "numberTypeNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "moveStake" + }, + { + "accounts": [ + { + "docs": [ + "Active or inactive source stake account" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "sourceStake" + }, + { + "docs": [ + "Mergeable destination stake account" + ], + "isSigner": false, + "isWritable": true, + "kind": "instructionAccountNode", + "name": "destinationStake" + }, + { + "docs": [ + "Stake authority" + ], + "isSigner": true, + "isWritable": false, + "kind": "instructionAccountNode", + "name": "stakeAuthority" + } + ], + "arguments": [ + { + "defaultValue": { + "kind": "numberValueNode", + "number": 17 + }, + "defaultValueStrategy": "omitted", + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "endian": "le", + "format": "u8", + "kind": "numberTypeNode" + } + }, + { + "kind": "instructionArgumentNode", + "name": "args", + "type": { + "endian": "le", + "format": "u64", + "kind": "numberTypeNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "kind": "instructionNode", + "name": "moveLamports" + } + ], + "kind": "programNode", + "name": "solanaStakeInterface", + "pdas": [], + "publicKey": "Stake11111111111111111111111111111111111111", + "version": "4.3.1" + }, + "standard": "codama", + "version": "1.0.0" +} \ No newline at end of file diff --git a/idls/spl.MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr.memo.v3.V3_0_1.from_github_solana_program.json b/idls/spl.MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr.memo.v3.V3_0_1.from_github_solana_program.json new file mode 100644 index 0000000..1e1eda5 --- /dev/null +++ b/idls/spl.MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr.memo.v3.V3_0_1.from_github_solana_program.json @@ -0,0 +1,50 @@ +{ + "kind": "rootNode", + "program": { + "kind": "programNode", + "pdas": [], + "accounts": [], + "instructions": [ + { + "kind": "instructionNode", + "accounts": [], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "memo", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "docs": [] + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "signers" + }, + "isOptional": true, + "isSigner": true + } + ], + "name": "addMemo", + "idlName": "addMemo", + "docs": [], + "optionalAccountStrategy": "programId" + } + ], + "definedTypes": [], + "errors": [], + "name": "memo", + "prefix": "", + "publicKey": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr", + "version": "3.0.1", + "origin": "shank" + }, + "additionalPrograms": [], + "standard": "codama", + "version": "1.0.0" +} \ No newline at end of file diff --git a/idls/spl.TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA.token.V3_3_0.from_github_solana_program.json b/idls/spl.TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA.token.V3_3_0.from_github_solana_program.json new file mode 100644 index 0000000..e321310 --- /dev/null +++ b/idls/spl.TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA.token.V3_3_0.from_github_solana_program.json @@ -0,0 +1,3426 @@ +{ + "kind": "rootNode", + "program": { + "kind": "programNode", + "pdas": [], + "accounts": [ + { + "kind": "accountNode", + "data": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "mintAuthority", + "type": { + "kind": "optionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "fixed": true + }, + "docs": [ + "Optional authority used to mint new tokens. The mint authority may only", + "be provided during mint creation. If no mint authority is present", + "then the mint has a fixed supply and no further tokens may be minted." + ] + }, + { + "kind": "structFieldTypeNode", + "name": "supply", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [ + "Total supply of tokens." + ] + }, + { + "kind": "structFieldTypeNode", + "name": "decimals", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [ + "Number of base 10 digits to the right of the decimal place." + ] + }, + { + "kind": "structFieldTypeNode", + "name": "isInitialized", + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + "docs": [ + "Is `true` if this structure has been initialized." + ] + }, + { + "kind": "structFieldTypeNode", + "name": "freezeAuthority", + "type": { + "kind": "optionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "fixed": true + }, + "docs": [ + "Optional authority to freeze token accounts." + ] + } + ] + }, + "discriminators": [ + { + "kind": "sizeDiscriminatorNode", + "size": 82 + } + ], + "name": "mint", + "docs": [], + "size": 82 + }, + { + "kind": "accountNode", + "data": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "mint", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [ + "The mint associated with this account." + ] + }, + { + "kind": "structFieldTypeNode", + "name": "owner", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [ + "The owner of this account." + ] + }, + { + "kind": "structFieldTypeNode", + "name": "amount", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [ + "The amount of tokens this account holds." + ] + }, + { + "kind": "structFieldTypeNode", + "name": "delegate", + "type": { + "kind": "optionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "fixed": true + }, + "docs": [ + "If `delegate` is `Some` then `delegated_amount` represents", + "the amount authorized by the delegate." + ] + }, + { + "kind": "structFieldTypeNode", + "name": "state", + "type": { + "kind": "definedTypeLinkNode", + "name": "accountState" + }, + "docs": [ + "The account's state." + ] + }, + { + "kind": "structFieldTypeNode", + "name": "isNative", + "type": { + "kind": "optionTypeNode", + "item": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "fixed": true + }, + "docs": [ + "If is_native.is_some, this is a native token, and the value logs the", + "rent-exempt reserve. An Account is required to be rent-exempt, so", + "the value is used by the Processor to ensure that wrapped SOL", + "accounts do not drop below this threshold." + ] + }, + { + "kind": "structFieldTypeNode", + "name": "delegatedAmount", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [ + "The amount delegated." + ] + }, + { + "kind": "structFieldTypeNode", + "name": "closeAuthority", + "type": { + "kind": "optionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + }, + "fixed": true + }, + "docs": [ + "Optional authority to close the account." + ] + } + ] + }, + "discriminators": [ + { + "kind": "sizeDiscriminatorNode", + "size": 165 + } + ], + "name": "token", + "docs": [], + "size": 165 + }, + { + "kind": "accountNode", + "data": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "m", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [ + "Number of signers required." + ] + }, + { + "kind": "structFieldTypeNode", + "name": "n", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [ + "Number of valid signers." + ] + }, + { + "kind": "structFieldTypeNode", + "name": "isInitialized", + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + "docs": [ + "Is `true` if this structure has been initialized." + ] + }, + { + "kind": "structFieldTypeNode", + "name": "signers", + "type": { + "kind": "arrayTypeNode", + "item": { + "kind": "publicKeyTypeNode" + }, + "count": { + "kind": "fixedCountNode", + "value": 11 + } + }, + "docs": [ + "Signer public keys." + ] + } + ] + }, + "discriminators": [ + { + "kind": "sizeDiscriminatorNode", + "size": 355 + } + ], + "name": "multisig", + "docs": [], + "size": 355 + } + ], + "instructions": [ + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "Token mint account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "rent", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Rent sysvar." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRent111111111111111111111111111111111" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "decimals", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [ + "Number of decimals in token account amounts." + ] + }, + { + "kind": "instructionArgumentNode", + "name": "mintAuthority", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [ + "Minting authority." + ] + }, + { + "kind": "instructionArgumentNode", + "name": "freezeAuthority", + "type": { + "kind": "optionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "fixed": false + }, + "defaultValue": { + "kind": "noneValueNode" + }, + "docs": [ + "Optional authority that can freeze token accounts." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "initializeMint", + "docs": [ + "Initializes a new mint and optionally deposits all the newly minted", + "tokens in an account.", + "", + "The `InitializeMint` instruction requires no signers and MUST be", + "included within the same Transaction as the system program's", + "`CreateAccount` instruction that creates the account being initialized.", + "Otherwise another party can acquire ownership of the uninitialized account." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to initialize." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint this account will be associated with." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The new account's owner/multisignature." + ] + }, + { + "kind": "instructionAccountNode", + "name": "rent", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Rent sysvar." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRent111111111111111111111111111111111" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "initializeAccount", + "docs": [ + "Initializes a new account to hold tokens. If this account is associated", + "with the native mint then the token balance of the initialized account", + "will be equal to the amount of SOL in the account. If this account is", + "associated with another mint, that mint must be initialized before this", + "command can succeed.", + "", + "The `InitializeAccount` instruction requires no signers and MUST be", + "included within the same Transaction as the system program's", + "`CreateAccount` instruction that creates the account being initialized.", + "Otherwise another party can acquire ownership of the uninitialized account." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "multisig", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The multisignature account to initialize." + ] + }, + { + "kind": "instructionAccountNode", + "name": "rent", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Rent sysvar." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRent111111111111111111111111111111111" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 2 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "m", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [ + "The number of signers (M) required to validate this multisignature account." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "signers" + } + } + ], + "name": "initializeMultisig", + "docs": [ + "Initializes a multisignature account with N provided signers.", + "", + "Multisignature accounts can used in place of any single owner/delegate", + "accounts in any token instruction that require an owner/delegate to be", + "present. The variant field represents the number of signers (M)", + "required to validate this multisignature account.", + "", + "The `InitializeMultisig` instruction requires no signers and MUST be", + "included within the same Transaction as the system program's", + "`CreateAccount` instruction that creates the account being initialized.", + "Otherwise another party can acquire ownership of the uninitialized account." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "source", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The destination account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account's owner/delegate or its multisignature account." + ], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 3 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [ + "The amount of tokens to transfer." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + }, + "isOptional": true, + "isSigner": true + } + ], + "name": "transfer", + "docs": [ + "Transfers tokens from one account to another either directly or via a delegate.", + "If this account is associated with the native mint then equal amounts", + "of SOL and Tokens will be transferred to the destination account." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "source", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "delegate", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The delegate." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account owner or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 4 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [ + "The amount of tokens the delegate is approved for." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + }, + "isOptional": true, + "isSigner": true + } + ], + "name": "approve", + "docs": [ + "Approves a delegate. A delegate is given the authority over tokens on", + "behalf of the source account's owner." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "source", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account owner or its multisignature." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 5 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + }, + "isOptional": true, + "isSigner": true + } + ], + "name": "revoke", + "docs": [ + "Revokes the delegate's authority." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "owned", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint or account to change the authority of." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The current authority or the multisignature account of the mint or account to update." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 6 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "authorityType", + "type": { + "kind": "definedTypeLinkNode", + "name": "authorityType" + }, + "docs": [ + "The type of authority to update." + ] + }, + { + "kind": "instructionArgumentNode", + "name": "newAuthority", + "type": { + "kind": "optionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "fixed": false + }, + "docs": [ + "The new authority" + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + }, + "isOptional": true, + "isSigner": true + } + ], + "name": "setAuthority", + "docs": [ + "Sets a new authority of a mint or account." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to mint tokens to." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mintAuthority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The mint's minting authority or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 7 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [ + "The amount of new tokens to mint." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + }, + "isOptional": true, + "isSigner": true + } + ], + "name": "mintTo", + "docs": [ + "Mints new tokens to an account. The native mint does not support minting." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to burn from." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The account's owner/delegate or its multisignature account." + ], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [ + "The amount of tokens to burn." + ], + "defaultValue": { + "kind": "numberValueNode", + "number": 8 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + }, + "isOptional": true, + "isSigner": true + } + ], + "name": "burn", + "docs": [ + "Burns tokens by removing them from an account. `Burn` does not support", + "accounts associated with the native mint, use `CloseAccount` instead." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to close." + ] + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The destination account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The account's owner or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 9 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + }, + "isOptional": true, + "isSigner": true + } + ], + "name": "closeAccount", + "docs": [ + "Close an account by transferring all its SOL to the destination account.", + "Non-native accounts may only be closed if its token amount is zero." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to freeze." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The mint freeze authority or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 10 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + }, + "isOptional": true, + "isSigner": true + } + ], + "name": "freezeAccount", + "docs": [ + "Freeze an Initialized account using the Mint's freeze_authority (if set)." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to thaw." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The mint freeze authority or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 11 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + }, + "isOptional": true, + "isSigner": true + } + ], + "name": "thawAccount", + "docs": [ + "Thaw a Frozen account using the Mint's freeze_authority (if set)." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "source", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The destination account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account's owner/delegate or its multisignature account." + ], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 12 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [ + "The amount of tokens to transfer." + ] + }, + { + "kind": "instructionArgumentNode", + "name": "decimals", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [ + "Expected number of base 10 digits to the right of the decimal place." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + }, + "isOptional": true, + "isSigner": true + } + ], + "name": "transferChecked", + "docs": [ + "Transfers tokens from one account to another either directly or via a", + "delegate. If this account is associated with the native mint then equal", + "amounts of SOL and Tokens will be transferred to the destination account.", + "", + "This instruction differs from Transfer in that the token mint and", + "decimals value is checked by the caller. This may be useful when", + "creating transactions offline or within a hardware wallet." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "source", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "delegate", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The delegate." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account owner or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 13 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [ + "The amount of tokens the delegate is approved for." + ] + }, + { + "kind": "instructionArgumentNode", + "name": "decimals", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [ + "Expected number of base 10 digits to the right of the decimal place." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + }, + "isOptional": true, + "isSigner": true + } + ], + "name": "approveChecked", + "docs": [ + "Approves a delegate. A delegate is given the authority over tokens on", + "behalf of the source account's owner.", + "", + "This instruction differs from Approve in that the token mint and", + "decimals value is checked by the caller. This may be useful when", + "creating transactions offline or within a hardware wallet." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to mint tokens to." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mintAuthority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The mint's minting authority or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 14 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [ + "The amount of new tokens to mint." + ] + }, + { + "kind": "instructionArgumentNode", + "name": "decimals", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [ + "Expected number of base 10 digits to the right of the decimal place." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + }, + "isOptional": true, + "isSigner": true + } + ], + "name": "mintToChecked", + "docs": [ + "Mints new tokens to an account. The native mint does not support minting.", + "", + "This instruction differs from MintTo in that the decimals value is", + "checked by the caller. This may be useful when creating transactions", + "offline or within a hardware wallet." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to burn from." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The account's owner/delegate or its multisignature account." + ], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 15 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [ + "The amount of tokens to burn." + ] + }, + { + "kind": "instructionArgumentNode", + "name": "decimals", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [ + "Expected number of base 10 digits to the right of the decimal place." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + }, + "isOptional": true, + "isSigner": true + } + ], + "name": "burnChecked", + "docs": [ + "Burns tokens by removing them from an account. `BurnChecked` does not", + "support accounts associated with the native mint, use `CloseAccount` instead.", + "", + "This instruction differs from Burn in that the decimals value is checked", + "by the caller. This may be useful when creating transactions offline or", + "within a hardware wallet." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to initialize." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint this account will be associated with." + ] + }, + { + "kind": "instructionAccountNode", + "name": "rent", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Rent sysvar." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRent111111111111111111111111111111111" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 16 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "owner", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [ + "The new account's owner/multisignature." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "initializeAccount2", + "docs": [ + "Like InitializeAccount, but the owner pubkey is passed via instruction", + "data rather than the accounts list. This variant may be preferable", + "when using Cross Program Invocation from an instruction that does", + "not need the owner's `AccountInfo` otherwise." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The native token account to sync with its underlying lamports." + ] + }, + { + "kind": "instructionAccountNode", + "name": "rent", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Rent sysvar." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRent111111111111111111111111111111111" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 17 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "syncNative", + "docs": [ + "Given a wrapped / native token account (a token account containing SOL)", + "updates its amount field based on the account's underlying `lamports`.", + "This is useful if a non-wrapped SOL account uses", + "`system_instruction::transfer` to move lamports to a wrapped token", + "account, and needs to have its token `amount` field updated." + ], + "optionalAccountStrategy": "omitted" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to initialize." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint this account will be associated with." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 18 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "owner", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [ + "The new account's owner/multisignature." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "initializeAccount3", + "docs": [ + "Like InitializeAccount2, but does not require the Rent sysvar to be provided." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "multisig", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The multisignature account to initialize." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 19 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "m", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [ + "The number of signers (M) required to validate this multisignature account." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "signers" + } + } + ], + "name": "initializeMultisig2", + "docs": [ + "Like InitializeMultisig, but does not require the Rent sysvar to be provided." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to initialize." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 20 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "decimals", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [ + "Number of base 10 digits to the right of the decimal place." + ] + }, + { + "kind": "instructionArgumentNode", + "name": "mintAuthority", + "type": { + "kind": "publicKeyTypeNode" + }, + "docs": [ + "The authority/multisignature to mint tokens." + ] + }, + { + "kind": "instructionArgumentNode", + "name": "freezeAuthority", + "type": { + "kind": "optionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "fixed": false + }, + "defaultValue": { + "kind": "noneValueNode" + }, + "docs": [ + "The optional freeze authority/multisignature of the mint." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "initializeMint2", + "docs": [ + "Like [`InitializeMint`], but does not require the Rent sysvar to be provided." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to calculate for." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 21 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "getAccountDataSize", + "docs": [ + "Gets the required size of an account for the given mint as a", + "little-endian `u64`.", + "", + "Return data can be fetched using `sol_get_return_data` and deserializing", + "the return data as a little-endian `u64`." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to initialize." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 22 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "initializeImmutableOwner", + "docs": [ + "Initialize the Immutable Owner extension for the given token account", + "", + "Fails if the account has already been initialized, so must be called", + "before `InitializeAccount`.", + "", + "No-ops in this version of the program, but is included for compatibility", + "with the Associated Token Account program." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to calculate for." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 23 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "docs": [ + "The amount of tokens to reformat." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "amountToUiAmount", + "docs": [ + "Convert an Amount of tokens to a UiAmount `string`, using the given", + "mint. In this version of the program, the mint can only specify the", + "number of decimals.", + "", + "Fails on an invalid mint.", + "", + "Return data can be fetched using `sol_get_return_data` and deserialized", + "with `String::from_utf8`." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to calculate for." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 24 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "uiAmount", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "docs": [ + "The ui_amount of tokens to reformat." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "uiAmountToAmount", + "docs": [ + "Convert a UiAmount of tokens to a little-endian `u64` raw Amount, using", + "the given mint. In this version of the program, the mint can only", + "specify the number of decimals.", + "", + "Return data can be fetched using `sol_get_return_data` and deserializing", + "the return data as a little-endian `u64`." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "source", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The destination account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account owner or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 38 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + }, + "isOptional": true, + "isSigner": true + } + ], + "name": "withdrawExcessLamports", + "docs": [ + "Rescue SOL sent to any TokenProgram-owned account", + "by sending them to any other account, leaving behind only", + "lamports for rent exemption." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "source", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The destination account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account owner or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 45 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "type": { + "kind": "optionTypeNode", + "item": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "fixed": false + }, + "defaultValue": { + "kind": "noneValueNode" + }, + "docs": [ + "Optional amount of lamports to transfer.", + "If not provided, the instruction will unwrap all lamports in excess of rent exemption." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + }, + "isOptional": true, + "isSigner": true + } + ], + "name": "unwrapLamports", + "docs": [ + "Transfer lamports from a native SOL account to a destination account." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 255 + }, + "defaultValueStrategy": "omitted" + }, + { + "kind": "instructionArgumentNode", + "name": "data", + "type": { + "kind": "arrayTypeNode", + "item": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "numberOfAccounts", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "instructionData", + "type": { + "kind": "sizePrefixTypeNode", + "prefix": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "type": { + "kind": "bytesTypeNode" + } + } + } + ] + }, + "count": { + "kind": "remainderCountNode" + } + }, + "docs": [ + "Instruction data for batch instructions." + ] + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "batch", + "docs": [ + "Executes a batch of instructions. The instructions to be executed are", + "specified in sequence on the instruction data." + ], + "optionalAccountStrategy": "programId" + } + ], + "definedTypes": [ + { + "kind": "definedTypeNode", + "name": "accountState", + "type": { + "kind": "enumTypeNode", + "variants": [ + { + "kind": "enumEmptyVariantTypeNode", + "name": "uninitialized" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "initialized" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "frozen" + } + ], + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + "docs": [] + }, + { + "kind": "definedTypeNode", + "name": "authorityType", + "type": { + "kind": "enumTypeNode", + "variants": [ + { + "kind": "enumEmptyVariantTypeNode", + "name": "mintTokens" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "freezeAccount" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "accountOwner" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "closeAccount" + } + ], + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + "docs": [] + } + ], + "errors": [ + { + "kind": "errorNode", + "name": "notRentExempt", + "code": 0, + "message": "Lamport balance below rent-exempt threshold", + "docs": [ + "NotRentExempt: Lamport balance below rent-exempt threshold" + ] + }, + { + "kind": "errorNode", + "name": "insufficientFunds", + "code": 1, + "message": "Insufficient funds", + "docs": [ + "InsufficientFunds: Insufficient funds" + ] + }, + { + "kind": "errorNode", + "name": "invalidMint", + "code": 2, + "message": "Invalid Mint", + "docs": [ + "InvalidMint: Invalid Mint" + ] + }, + { + "kind": "errorNode", + "name": "mintMismatch", + "code": 3, + "message": "Account not associated with this Mint", + "docs": [ + "MintMismatch: Account not associated with this Mint" + ] + }, + { + "kind": "errorNode", + "name": "ownerMismatch", + "code": 4, + "message": "Owner does not match", + "docs": [ + "OwnerMismatch: Owner does not match" + ] + }, + { + "kind": "errorNode", + "name": "fixedSupply", + "code": 5, + "message": "Fixed supply", + "docs": [ + "FixedSupply: Fixed supply" + ] + }, + { + "kind": "errorNode", + "name": "alreadyInUse", + "code": 6, + "message": "Already in use", + "docs": [ + "AlreadyInUse: Already in use" + ] + }, + { + "kind": "errorNode", + "name": "invalidNumberOfProvidedSigners", + "code": 7, + "message": "Invalid number of provided signers", + "docs": [ + "InvalidNumberOfProvidedSigners: Invalid number of provided signers" + ] + }, + { + "kind": "errorNode", + "name": "invalidNumberOfRequiredSigners", + "code": 8, + "message": "Invalid number of required signers", + "docs": [ + "InvalidNumberOfRequiredSigners: Invalid number of required signers" + ] + }, + { + "kind": "errorNode", + "name": "uninitializedState", + "code": 9, + "message": "State is unititialized", + "docs": [ + "UninitializedState: State is unititialized" + ] + }, + { + "kind": "errorNode", + "name": "nativeNotSupported", + "code": 10, + "message": "Instruction does not support native tokens", + "docs": [ + "NativeNotSupported: Instruction does not support native tokens" + ] + }, + { + "kind": "errorNode", + "name": "nonNativeHasBalance", + "code": 11, + "message": "Non-native account can only be closed if its balance is zero", + "docs": [ + "NonNativeHasBalance: Non-native account can only be closed if its balance is zero" + ] + }, + { + "kind": "errorNode", + "name": "invalidInstruction", + "code": 12, + "message": "Invalid instruction", + "docs": [ + "InvalidInstruction: Invalid instruction" + ] + }, + { + "kind": "errorNode", + "name": "invalidState", + "code": 13, + "message": "State is invalid for requested operation", + "docs": [ + "InvalidState: State is invalid for requested operation" + ] + }, + { + "kind": "errorNode", + "name": "overflow", + "code": 14, + "message": "Operation overflowed", + "docs": [ + "Overflow: Operation overflowed" + ] + }, + { + "kind": "errorNode", + "name": "authorityTypeNotSupported", + "code": 15, + "message": "Account does not support specified authority type", + "docs": [ + "AuthorityTypeNotSupported: Account does not support specified authority type" + ] + }, + { + "kind": "errorNode", + "name": "mintCannotFreeze", + "code": 16, + "message": "This token mint cannot freeze accounts", + "docs": [ + "MintCannotFreeze: This token mint cannot freeze accounts" + ] + }, + { + "kind": "errorNode", + "name": "accountFrozen", + "code": 17, + "message": "Account is frozen", + "docs": [ + "AccountFrozen: Account is frozen" + ] + }, + { + "kind": "errorNode", + "name": "mintDecimalsMismatch", + "code": 18, + "message": "The provided decimals value different from the Mint decimals", + "docs": [ + "MintDecimalsMismatch: The provided decimals value different from the Mint decimals" + ] + }, + { + "kind": "errorNode", + "name": "nonNativeNotSupported", + "code": 19, + "message": "Instruction does not support non-native tokens", + "docs": [ + "NonNativeNotSupported: Instruction does not support non-native tokens" + ] + } + ], + "name": "token", + "prefix": "", + "publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "version": "3.3.0", + "origin": "shank" + }, + "additionalPrograms": [ + { + "kind": "programNode", + "pdas": [ + { + "kind": "pdaNode", + "name": "associatedToken", + "seeds": [ + { + "kind": "variablePdaSeedNode", + "name": "owner", + "docs": [ + "The wallet address of the associated token account." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "variablePdaSeedNode", + "name": "tokenProgram", + "docs": [ + "The address of the token program to use." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "variablePdaSeedNode", + "name": "mint", + "docs": [ + "The mint address of the associated token account." + ], + "type": { + "kind": "publicKeyTypeNode" + } + } + ] + } + ], + "accounts": [], + "instructions": [ + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "payer", + "isWritable": true, + "isSigner": true, + "isOptional": false, + "docs": [ + "Funding account (must be a system account)." + ], + "defaultValue": { + "kind": "payerValueNode" + } + }, + { + "kind": "instructionAccountNode", + "name": "ata", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "Associated token account address to be created." + ], + "defaultValue": { + "kind": "pdaValueNode", + "pda": { + "kind": "pdaLinkNode", + "name": "associatedToken" + }, + "seeds": [ + { + "kind": "pdaSeedValueNode", + "name": "owner", + "value": { + "kind": "accountValueNode", + "name": "owner" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "tokenProgram", + "value": { + "kind": "accountValueNode", + "name": "tokenProgram" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "mint", + "value": { + "kind": "accountValueNode", + "name": "mint" + } + } + ] + } + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Wallet address for the new associated token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint for the new associated token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "systemProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "System program." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "11111111111111111111111111111111" + } + }, + { + "kind": "instructionAccountNode", + "name": "tokenProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "SPL Token program." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "createAssociatedToken", + "docs": [ + "Creates an associated token account for the given wallet address and", + "token mint Returns an error if the account exists." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "payer", + "isWritable": true, + "isSigner": true, + "isOptional": false, + "docs": [ + "Funding account (must be a system account)." + ], + "defaultValue": { + "kind": "payerValueNode" + } + }, + { + "kind": "instructionAccountNode", + "name": "ata", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "Associated token account address to be created." + ], + "defaultValue": { + "kind": "pdaValueNode", + "pda": { + "kind": "pdaLinkNode", + "name": "associatedToken" + }, + "seeds": [ + { + "kind": "pdaSeedValueNode", + "name": "owner", + "value": { + "kind": "accountValueNode", + "name": "owner" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "tokenProgram", + "value": { + "kind": "accountValueNode", + "name": "tokenProgram" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "mint", + "value": { + "kind": "accountValueNode", + "name": "mint" + } + } + ] + } + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Wallet address for the new associated token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint for the new associated token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "systemProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "System program." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "11111111111111111111111111111111" + } + }, + { + "kind": "instructionAccountNode", + "name": "tokenProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "SPL Token program." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "createAssociatedTokenIdempotent", + "docs": [ + "Creates an associated token account for the given wallet address and", + "token mint, if it doesn't already exist. Returns an error if the", + "account exists, but with a different owner." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "nestedAssociatedAccountAddress", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "Nested associated token account, must be owned by `ownerAssociatedAccountAddress`." + ], + "defaultValue": { + "kind": "pdaValueNode", + "pda": { + "kind": "pdaLinkNode", + "name": "associatedToken" + }, + "seeds": [ + { + "kind": "pdaSeedValueNode", + "name": "owner", + "value": { + "kind": "accountValueNode", + "name": "ownerAssociatedAccountAddress" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "tokenProgram", + "value": { + "kind": "accountValueNode", + "name": "tokenProgram" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "mint", + "value": { + "kind": "accountValueNode", + "name": "nestedTokenMintAddress" + } + } + ] + } + }, + { + "kind": "instructionAccountNode", + "name": "nestedTokenMintAddress", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Token mint for the nested associated token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "destinationAssociatedAccountAddress", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "Wallet's associated token account." + ], + "defaultValue": { + "kind": "pdaValueNode", + "pda": { + "kind": "pdaLinkNode", + "name": "associatedToken" + }, + "seeds": [ + { + "kind": "pdaSeedValueNode", + "name": "owner", + "value": { + "kind": "accountValueNode", + "name": "walletAddress" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "tokenProgram", + "value": { + "kind": "accountValueNode", + "name": "tokenProgram" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "mint", + "value": { + "kind": "accountValueNode", + "name": "nestedTokenMintAddress" + } + } + ] + } + }, + { + "kind": "instructionAccountNode", + "name": "ownerAssociatedAccountAddress", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Owner associated token account address, must be owned by `walletAddress`." + ], + "defaultValue": { + "kind": "pdaValueNode", + "pda": { + "kind": "pdaLinkNode", + "name": "associatedToken" + }, + "seeds": [ + { + "kind": "pdaSeedValueNode", + "name": "owner", + "value": { + "kind": "accountValueNode", + "name": "walletAddress" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "tokenProgram", + "value": { + "kind": "accountValueNode", + "name": "tokenProgram" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "mint", + "value": { + "kind": "accountValueNode", + "name": "ownerTokenMintAddress" + } + } + ] + } + }, + { + "kind": "instructionAccountNode", + "name": "ownerTokenMintAddress", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Token mint for the owner associated token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "walletAddress", + "isWritable": true, + "isSigner": true, + "isOptional": false, + "docs": [ + "Wallet address for the owner associated token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "tokenProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "SPL Token program." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 2 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "recoverNestedAssociatedToken", + "docs": [ + "Transfers from and closes a nested associated token account: an", + "associated token account owned by an associated token account.", + "", + "The tokens are moved from the nested associated token account to the", + "wallet's associated token account, and the nested account lamports are", + "moved to the wallet.", + "", + "Note: Nested token accounts are an anti-pattern, and almost always", + "created unintentionally, so this instruction should only be used to", + "recover from errors." + ], + "optionalAccountStrategy": "programId" + } + ], + "definedTypes": [], + "errors": [ + { + "kind": "errorNode", + "name": "invalidOwner", + "code": 0, + "message": "Associated token account owner does not match address derivation", + "docs": [ + "InvalidOwner: Associated token account owner does not match address derivation" + ] + } + ], + "name": "associatedToken", + "prefix": "", + "publicKey": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", + "version": "1.1.1", + "origin": "shank" + } + ], + "standard": "codama", + "version": "1.0.0" +} \ No newline at end of file diff --git a/idls/spl.TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb.token_2022.V3_0_1.from_github_solana_program.json b/idls/spl.TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb.token_2022.V3_0_1.from_github_solana_program.json new file mode 100644 index 0000000..900a10f --- /dev/null +++ b/idls/spl.TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb.token_2022.V3_0_1.from_github_solana_program.json @@ -0,0 +1,13259 @@ +{ + "kind": "rootNode", + "standard": "codama", + "version": "1.0.0", + "program": { + "kind": "programNode", + "name": "token-2022", + "publicKey": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "version": "3.0.1", + "docs": [], + "accounts": [ + { + "kind": "accountNode", + "name": "mint", + "docs": [], + "data": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "mintAuthority", + "docs": [ + "Optional authority used to mint new tokens. The mint authority may only", + "be provided during mint creation. If no mint authority is present", + "then the mint has a fixed supply and no further tokens may be minted." + ], + "type": { + "kind": "optionTypeNode", + "fixed": true, + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "supply", + "docs": [ + "Total supply of tokens." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "decimals", + "docs": [ + "Number of base 10 digits to the right of the decimal place." + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "isInitialized", + "docs": [ + "Is `true` if this structure has been initialized." + ], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "freezeAuthority", + "docs": [ + "Optional authority to freeze token accounts." + ], + "type": { + "kind": "optionTypeNode", + "fixed": true, + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "extensions", + "docs": [ + "The extensions activated on the mint account." + ], + "type": { + "kind": "remainderOptionTypeNode", + "item": { + "kind": "hiddenPrefixTypeNode", + "type": { + "kind": "arrayTypeNode", + "item": { + "kind": "definedTypeLinkNode", + "name": "extension" + }, + "count": { + "kind": "remainderCountNode" + } + }, + "prefix": [ + { + "kind": "constantValueNode", + "type": { + "kind": "preOffsetTypeNode", + "offset": 83, + "strategy": "padded", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + "value": { + "kind": "numberValueNode", + "number": 1 + } + } + ] + } + } + } + ] + }, + "discriminators": [ + { + "kind": "sizeDiscriminatorNode", + "size": 82 + } + ] + }, + { + "kind": "accountNode", + "name": "token", + "docs": [], + "data": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "mint", + "docs": [ + "The mint associated with this account." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "owner", + "docs": [ + "The owner of this account." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "amount", + "docs": [ + "The amount of tokens this account holds." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "delegate", + "docs": [ + "If `delegate` is `Some` then `delegated_amount` represents", + "the amount authorized by the delegate." + ], + "type": { + "kind": "optionTypeNode", + "fixed": true, + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "state", + "docs": [ + "The account's state." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "accountState" + } + }, + { + "kind": "structFieldTypeNode", + "name": "isNative", + "docs": [ + "If is_native.is_some, this is a native token, and the value logs the", + "rent-exempt reserve. An Account is required to be rent-exempt, so", + "the value is used by the Processor to ensure that wrapped SOL", + "accounts do not drop below this threshold." + ], + "type": { + "kind": "optionTypeNode", + "fixed": true, + "item": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "delegatedAmount", + "docs": [ + "The amount delegated." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "closeAuthority", + "docs": [ + "Optional authority to close the account." + ], + "type": { + "kind": "optionTypeNode", + "fixed": true, + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "extensions", + "docs": [ + "The extensions activated on the token account." + ], + "type": { + "kind": "remainderOptionTypeNode", + "item": { + "kind": "hiddenPrefixTypeNode", + "type": { + "kind": "arrayTypeNode", + "item": { + "kind": "definedTypeLinkNode", + "name": "extension" + }, + "count": { + "kind": "remainderCountNode" + } + }, + "prefix": [ + { + "kind": "constantValueNode", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "value": { + "kind": "numberValueNode", + "number": 2 + } + } + ] + } + } + } + ] + }, + "discriminators": [ + { + "kind": "sizeDiscriminatorNode", + "size": 165 + } + ] + }, + { + "kind": "accountNode", + "name": "multisig", + "size": 355, + "docs": [], + "data": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "m", + "docs": [ + "Number of signers required." + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "n", + "docs": [ + "Number of valid signers." + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "isInitialized", + "docs": [ + "Is `true` if this structure has been initialized." + ], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "signers", + "docs": [ + "Signer public keys." + ], + "type": { + "kind": "arrayTypeNode", + "item": { + "kind": "publicKeyTypeNode" + }, + "count": { + "kind": "fixedCountNode", + "value": 11 + } + } + } + ] + }, + "discriminators": [ + { + "kind": "sizeDiscriminatorNode", + "size": 355 + } + ] + } + ], + "instructions": [ + { + "kind": "instructionNode", + "name": "initializeMint", + "docs": [ + "Initializes a new mint and optionally deposits all the newly minted", + "tokens in an account.", + "", + "The `InitializeMint` instruction requires no signers and MUST be", + "included within the same Transaction as the system program's", + "`CreateAccount` instruction that creates the account being initialized.", + "Otherwise another party can acquire ownership of the uninitialized account." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "Token mint account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "rent", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Rent sysvar." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRent111111111111111111111111111111111" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + }, + { + "kind": "instructionArgumentNode", + "name": "decimals", + "docs": [ + "Number of decimals in token account amounts." + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "mintAuthority", + "docs": [ + "Minting authority." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "instructionArgumentNode", + "name": "freezeAuthority", + "docs": [ + "Optional authority that can freeze token accounts." + ], + "type": { + "kind": "optionTypeNode", + "fixed": false, + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + "defaultValue": { + "kind": "noneValueNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeAccount", + "docs": [ + "Initializes a new account to hold tokens. If this account is associated", + "with the native mint then the token balance of the initialized account", + "will be equal to the amount of SOL in the account. If this account is", + "associated with another mint, that mint must be initialized before this", + "command can succeed.", + "", + "The `InitializeAccount` instruction requires no signers and MUST be", + "included within the same Transaction as the system program's", + "`CreateAccount` instruction that creates the account being initialized.", + "Otherwise another party can acquire ownership of the uninitialized account." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to initialize." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint this account will be associated with." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The new account's owner/multisignature." + ] + }, + { + "kind": "instructionAccountNode", + "name": "rent", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Rent sysvar." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRent111111111111111111111111111111111" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeMultisig", + "docs": [ + "Initializes a multisignature account with N provided signers.", + "", + "Multisignature accounts can used in place of any single owner/delegate", + "accounts in any token instruction that require an owner/delegate to be", + "present. The variant field represents the number of signers (M)", + "required to validate this multisignature account.", + "", + "The `InitializeMultisig` instruction requires no signers and MUST be", + "included within the same Transaction as the system program's", + "`CreateAccount` instruction that creates the account being initialized.", + "Otherwise another party can acquire ownership of the uninitialized account." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "multisig", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The multisignature account to initialize." + ] + }, + { + "kind": "instructionAccountNode", + "name": "rent", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Rent sysvar." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRent111111111111111111111111111111111" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 2 + } + }, + { + "kind": "instructionArgumentNode", + "name": "m", + "docs": [ + "The number of signers (M) required to validate this multisignature account." + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "signers" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "transfer", + "docs": [ + "Transfers tokens from one account to another either directly or via a delegate.", + "If this account is associated with the native mint then equal amounts", + "of SOL and Tokens will be transferred to the destination account." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "source", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The destination account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account's owner/delegate or its multisignature account." + ], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 3 + } + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "docs": [ + "The amount of tokens to transfer." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "approve", + "docs": [ + "Approves a delegate. A delegate is given the authority over tokens on", + "behalf of the source account's owner." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "source", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "delegate", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The delegate." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account owner or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 4 + } + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "docs": [ + "The amount of tokens the delegate is approved for." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "revoke", + "docs": [ + "Revokes the delegate's authority." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "source", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account owner or its multisignature." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 5 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "setAuthority", + "docs": [ + "Sets a new authority of a mint or account." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "owned", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint or account to change the authority of." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The current authority or the multisignature account of the mint or account to update." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 6 + } + }, + { + "kind": "instructionArgumentNode", + "name": "authorityType", + "docs": [ + "The type of authority to update." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "authorityType" + } + }, + { + "kind": "instructionArgumentNode", + "name": "newAuthority", + "docs": [ + "The new authority" + ], + "type": { + "kind": "optionTypeNode", + "fixed": false, + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "mintTo", + "docs": [ + "Mints new tokens to an account. The native mint does not support minting." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to mint tokens to." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mintAuthority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The mint's minting authority or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 7 + } + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "docs": [ + "The amount of new tokens to mint." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "burn", + "docs": [ + "Burns tokens by removing them from an account. `Burn` does not support", + "accounts associated with the native mint, use `CloseAccount` instead." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to burn from." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The account's owner/delegate or its multisignature account." + ], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [ + "The amount of tokens to burn." + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 8 + } + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "closeAccount", + "docs": [ + "Close an account by transferring all its SOL to the destination account.", + "Non-native accounts may only be closed if its token amount is zero." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to close." + ] + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The destination account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The account's owner or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 9 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "freezeAccount", + "docs": [ + "Freeze an Initialized account using the Mint's freeze_authority (if set)." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to freeze." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The mint freeze authority or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 10 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "thawAccount", + "docs": [ + "Thaw a Frozen account using the Mint's freeze_authority (if set)." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to thaw." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The mint freeze authority or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 11 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "transferChecked", + "docs": [ + "Transfers tokens from one account to another either directly or via a", + "delegate. If this account is associated with the native mint then equal", + "amounts of SOL and Tokens will be transferred to the destination account.", + "", + "This instruction differs from Transfer in that the token mint and", + "decimals value is checked by the caller. This may be useful when", + "creating transactions offline or within a hardware wallet." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "source", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The destination account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account's owner/delegate or its multisignature account." + ], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 12 + } + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "docs": [ + "The amount of tokens to transfer." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "decimals", + "docs": [ + "Expected number of base 10 digits to the right of the decimal place." + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "approveChecked", + "docs": [ + "Approves a delegate. A delegate is given the authority over tokens on", + "behalf of the source account's owner.", + "", + "This instruction differs from Approve in that the token mint and", + "decimals value is checked by the caller. This may be useful when", + "creating transactions offline or within a hardware wallet." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "source", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "delegate", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The delegate." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account owner or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 13 + } + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "docs": [ + "The amount of tokens the delegate is approved for." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "decimals", + "docs": [ + "Expected number of base 10 digits to the right of the decimal place." + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "mintToChecked", + "docs": [ + "Mints new tokens to an account. The native mint does not support minting.", + "", + "This instruction differs from MintTo in that the decimals value is", + "checked by the caller. This may be useful when creating transactions", + "offline or within a hardware wallet." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to mint tokens to." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mintAuthority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The mint's minting authority or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 14 + } + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "docs": [ + "The amount of new tokens to mint." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "decimals", + "docs": [ + "Expected number of base 10 digits to the right of the decimal place." + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "burnChecked", + "docs": [ + "Burns tokens by removing them from an account. `BurnChecked` does not", + "support accounts associated with the native mint, use `CloseAccount` instead.", + "", + "This instruction differs from Burn in that the decimals value is checked", + "by the caller. This may be useful when creating transactions offline or", + "within a hardware wallet." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to burn from." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The account's owner/delegate or its multisignature account." + ], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 15 + } + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "docs": [ + "The amount of tokens to burn." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "decimals", + "docs": [ + "Expected number of base 10 digits to the right of the decimal place." + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeAccount2", + "docs": [ + "Like InitializeAccount, but the owner pubkey is passed via instruction", + "data rather than the accounts list. This variant may be preferable", + "when using Cross Program Invocation from an instruction that does", + "not need the owner's `AccountInfo` otherwise." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to initialize." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint this account will be associated with." + ] + }, + { + "kind": "instructionAccountNode", + "name": "rent", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Rent sysvar." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRent111111111111111111111111111111111" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 16 + } + }, + { + "kind": "instructionArgumentNode", + "name": "owner", + "docs": [ + "The new account's owner/multisignature." + ], + "type": { + "kind": "publicKeyTypeNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "syncNative", + "docs": [ + "Given a wrapped / native token account (a token account containing SOL)", + "updates its amount field based on the account's underlying `lamports`.", + "This is useful if a non-wrapped SOL account uses", + "`system_instruction::transfer` to move lamports to a wrapped token", + "account, and needs to have its token `amount` field updated." + ], + "optionalAccountStrategy": "omitted", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The native token account to sync with its underlying lamports." + ] + }, + { + "kind": "instructionAccountNode", + "name": "rent", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Rent sysvar." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "SysvarRent111111111111111111111111111111111" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 17 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeAccount3", + "docs": [ + "Like InitializeAccount2, but does not require the Rent sysvar to be provided." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to initialize." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint this account will be associated with." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 18 + } + }, + { + "kind": "instructionArgumentNode", + "name": "owner", + "docs": [ + "The new account's owner/multisignature." + ], + "type": { + "kind": "publicKeyTypeNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeMultisig2", + "docs": [ + "Like InitializeMultisig, but does not require the Rent sysvar to be provided." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "multisig", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The multisignature account to initialize." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 19 + } + }, + { + "kind": "instructionArgumentNode", + "name": "m", + "docs": [ + "The number of signers (M) required to validate this multisignature account." + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "signers" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeMint2", + "docs": [ + "Like [`InitializeMint`], but does not require the Rent sysvar to be provided." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to initialize." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 20 + } + }, + { + "kind": "instructionArgumentNode", + "name": "decimals", + "docs": [ + "Number of base 10 digits to the right of the decimal place." + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "mintAuthority", + "docs": [ + "The authority/multisignature to mint tokens." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "instructionArgumentNode", + "name": "freezeAuthority", + "docs": [ + "The optional freeze authority/multisignature of the mint." + ], + "type": { + "kind": "optionTypeNode", + "fixed": false, + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + "defaultValue": { + "kind": "noneValueNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "getAccountDataSize", + "docs": [ + "Gets the required size of an account for the given mint as a", + "little-endian `u64`.", + "", + "Return data can be fetched using `sol_get_return_data` and deserializing", + "the return data as a little-endian `u64`." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to calculate for." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 21 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeImmutableOwner", + "docs": [ + "Initialize the Immutable Owner extension for the given token account", + "", + "Fails if the account has already been initialized, so must be called", + "before `InitializeAccount`.", + "", + "No-ops in this version of the program, but is included for compatibility", + "with the Associated Token Account program." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The account to initialize." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 22 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "amountToUiAmount", + "docs": [ + "Convert an Amount of tokens to a UiAmount `string`, using the given", + "mint. In this version of the program, the mint can only specify the", + "number of decimals.", + "", + "Fails on an invalid mint.", + "", + "Return data can be fetched using `sol_get_return_data` and deserialized", + "with `String::from_utf8`." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to calculate for." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 23 + } + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "docs": [ + "The amount of tokens to reformat." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "uiAmountToAmount", + "docs": [ + "Convert a UiAmount of tokens to a little-endian `u64` raw Amount, using", + "the given mint. In this version of the program, the mint can only", + "specify the number of decimals.", + "", + "Return data can be fetched using `sol_get_return_data` and deserializing", + "the return data as a little-endian `u64`." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to calculate for." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 24 + } + }, + { + "kind": "instructionArgumentNode", + "name": "uiAmount", + "docs": [ + "The ui_amount of tokens to reformat." + ], + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeMintCloseAuthority", + "docs": [ + "Initialize the close account authority on a new mint.", + "", + "Fails if the mint has already been initialized, so must be called before `InitializeMint`.", + "", + "The mint must have exactly enough space allocated for the base mint (82", + "bytes), plus 83 bytes of padding, 1 byte reserved for the account type,", + "then space required for this extension, plus any others." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to initialize." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 25 + } + }, + { + "kind": "instructionArgumentNode", + "name": "closeAuthority", + "docs": [ + "Authority that must sign the `CloseAccount` instruction on a mint." + ], + "type": { + "kind": "optionTypeNode", + "fixed": false, + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeTransferFeeConfig", + "docs": [ + "Initialize the transfer fee on a new mint.", + "", + "Fails if the mint has already been initialized, so must be called before `InitializeMint`.", + "", + "The mint must have exactly enough space allocated for the base mint (82", + "bytes), plus 83 bytes of padding, 1 byte reserved for the account type,", + "then space required for this extension, plus any others." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to initialize." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 26 + } + }, + { + "kind": "instructionArgumentNode", + "name": "transferFeeDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + }, + { + "kind": "instructionArgumentNode", + "name": "transferFeeConfigAuthority", + "docs": [ + "Pubkey that may update the fees." + ], + "type": { + "kind": "optionTypeNode", + "fixed": false, + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "instructionArgumentNode", + "name": "withdrawWithheldAuthority", + "docs": [ + "Withdraw instructions must be signed by this key." + ], + "type": { + "kind": "optionTypeNode", + "fixed": false, + "item": { + "kind": "publicKeyTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "instructionArgumentNode", + "name": "transferFeeBasisPoints", + "docs": [ + "Amount of transfer collected as fees, expressed as basis points of the transfer amount." + ], + "type": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "maximumFee", + "docs": [ + "Maximum fee assessed on transfers." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "transferFeeDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "transferCheckedWithFee", + "docs": [ + "Transfer, providing expected mint information and fees.", + "", + "This instruction succeeds if the mint has no configured transfer fee", + "and the provided fee is 0. This allows applications to use", + "`TransferCheckedWithFee` with any mint." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "source", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source account. May include the `TransferFeeAmount` extension." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint. May include the `TransferFeeConfig` extension." + ] + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The destination account. May include the `TransferFeeAmount` extension." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account's owner/delegate or its multisignature account." + ], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 26 + } + }, + { + "kind": "instructionArgumentNode", + "name": "transferFeeDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "docs": [ + "The amount of tokens to transfer." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "decimals", + "docs": [ + "Expected number of base 10 digits to the right of the decimal place." + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "fee", + "docs": [ + "Expected fee assessed on this transfer, calculated off-chain based", + "on the transfer_fee_basis_points and maximum_fee of the mint. May", + "be 0 for a mint without a configured transfer fee." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "transferFeeDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "withdrawWithheldTokensFromMint", + "docs": [ + "Transfer all withheld tokens in the mint to an account. Signed by the", + "mint's withdraw withheld tokens authority." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint. Must include the `TransferFeeConfig` extension." + ] + }, + { + "kind": "instructionAccountNode", + "name": "feeReceiver", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The fee receiver account. Must include the `TransferFeeAmount`", + "extension associated with the provided mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "withdrawWithheldAuthority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The mint's `withdraw_withheld_authority` or its multisignature account." + ], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 26 + } + }, + { + "kind": "instructionArgumentNode", + "name": "transferFeeDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 2 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "transferFeeDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "withdrawWithheldTokensFromAccounts", + "docs": [ + "Transfer all withheld tokens to an account. Signed by the mint's", + "withdraw withheld tokens authority." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint. Must include the `TransferFeeConfig` extension." + ] + }, + { + "kind": "instructionAccountNode", + "name": "feeReceiver", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The fee receiver account. Must include the `TransferFeeAmount`", + "extension associated with the provided mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "withdrawWithheldAuthority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The mint's `withdraw_withheld_authority` or its multisignature account." + ], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 26 + } + }, + { + "kind": "instructionArgumentNode", + "name": "transferFeeDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 3 + } + }, + { + "kind": "instructionArgumentNode", + "name": "numTokenAccounts", + "docs": [ + "Number of token accounts harvested." + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + }, + { + "kind": "instructionRemainingAccountsNode", + "isOptional": false, + "isWritable": true, + "isSigner": false, + "docs": [ + "The source accounts to withdraw from." + ], + "value": { + "kind": "argumentValueNode", + "name": "sources" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "transferFeeDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "harvestWithheldTokensToMint", + "docs": [ + "Permissionless instruction to transfer all withheld tokens to the mint.", + "", + "Succeeds for frozen accounts.", + "", + "Accounts provided should include the `TransferFeeAmount` extension.", + "If not, the account is skipped." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 26 + } + }, + { + "kind": "instructionArgumentNode", + "name": "transferFeeDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 4 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": false, + "isWritable": true, + "isSigner": false, + "docs": [ + "The source accounts to harvest from." + ], + "value": { + "kind": "argumentValueNode", + "name": "sources" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "transferFeeDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "setTransferFee", + "docs": [ + "Set transfer fee. Only supported for mints that include the", + "`TransferFeeConfig` extension." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "transferFeeConfigAuthority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The mint's fee account owner or its multisignature account." + ], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 26 + } + }, + { + "kind": "instructionArgumentNode", + "name": "transferFeeDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 5 + } + }, + { + "kind": "instructionArgumentNode", + "name": "transferFeeBasisPoints", + "docs": [ + "Amount of transfer collected as fees, expressed as basis points of the transfer amount." + ], + "type": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "maximumFee", + "docs": [ + "Maximum fee assessed on transfers." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "transferFeeDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeConfidentialTransferMint", + "docs": [ + "Initializes confidential transfers for a mint.", + "", + "The `ConfidentialTransferInstruction::InitializeMint` instruction", + "requires no signers and MUST be included within the same Transaction", + "as `TokenInstruction::InitializeMint`. Otherwise another party can", + "initialize the configuration.", + "", + "The instruction fails if the `TokenInstruction::InitializeMint`", + "instruction has already executed for the mint." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token mint." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 27 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + }, + { + "kind": "instructionArgumentNode", + "name": "authority", + "docs": [ + "Authority to modify the `ConfidentialTransferMint` configuration and to", + "approve new accounts." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "instructionArgumentNode", + "name": "autoApproveNewAccounts", + "docs": [ + "Determines if newly configured accounts must be approved by the", + "`authority` before they may be used by the user." + ], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "instructionArgumentNode", + "name": "auditorElgamalPubkey", + "docs": [ + "New authority to decode any transfer amount in a confidential transfer." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "updateConfidentialTransferMint", + "docs": [ + "Updates the confidential transfer mint configuration for a mint.", + "", + "Use `TokenInstruction::SetAuthority` to update the confidential transfer", + "mint authority." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [ + "Confidential transfer mint authority." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 27 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + }, + { + "kind": "instructionArgumentNode", + "name": "autoApproveNewAccounts", + "docs": [ + "Determines if newly configured accounts must be approved by the", + "`authority` before they may be used by the user." + ], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "instructionArgumentNode", + "name": "auditorElgamalPubkey", + "docs": [ + "New authority to decode any transfer amount in a confidential transfer." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "configureConfidentialTransferAccount", + "docs": [ + "Configures confidential transfers for a token account.", + "", + "The instruction fails if the confidential transfers are already", + "configured, or if the mint was not initialized with confidential", + "transfer support.", + "", + "The instruction fails if the `TokenInstruction::InitializeAccount`", + "instruction has not yet successfully executed for the token account.", + "", + "Upon success, confidential and non-confidential deposits and transfers", + "are enabled. Use the `DisableConfidentialCredits` and", + "`DisableNonConfidentialCredits` instructions to disable.", + "", + "In order for this instruction to be successfully processed, it must be", + "accompanied by the `VerifyPubkeyValidity` instruction of the", + "`zk_elgamal_proof` program in the same transaction or the address of a", + "context state account for the proof must be provided." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The corresponding SPL Token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "instructionsSysvarOrContextState", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Instructions sysvar if `VerifyPubkeyValidity` is included in", + "the same transaction or context state account if", + "`VerifyPubkeyValidity` is pre-verified into a context state", + "account." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "Sysvar1nstructions1111111111111111111111111" + } + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account's owner/delegate or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 27 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 2 + } + }, + { + "kind": "instructionArgumentNode", + "name": "decryptableZeroBalance", + "docs": [ + "The decryptable balance (always 0) once the configure account succeeds." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "decryptableBalance" + } + }, + { + "kind": "instructionArgumentNode", + "name": "maximumPendingBalanceCreditCounter", + "docs": [ + "The maximum number of despots and transfers that an account can receiver", + "before the `ApplyPendingBalance` is executed" + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "proofInstructionOffset", + "docs": [ + "Relative location of the `ProofInstruction::ZeroCiphertextProof`", + "instruction to the `ConfigureAccount` instruction in the", + "transaction. If the offset is `0`, then use a context state account", + "for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "approveConfidentialTransferAccount", + "docs": [ + "Approves a token account for confidential transfers.", + "", + "Approval is only required when the", + "`ConfidentialTransferMint::approve_new_accounts` field is set in the", + "SPL Token mint. This instruction must be executed after the account", + "owner configures their account for confidential transfers with", + "`ConfidentialTransferInstruction::ConfigureAccount`." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token account to approve." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The corresponding SPL Token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [ + "Confidential transfer mint authority." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 27 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 3 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "emptyConfidentialTransferAccount", + "docs": [ + "Empty the available balance in a confidential token account.", + "", + "A token account that is extended for confidential transfers can only be", + "closed if the pending and available balance ciphertexts are emptied.", + "The pending balance can be emptied", + "via the `ConfidentialTransferInstruction::ApplyPendingBalance`", + "instruction. Use the `ConfidentialTransferInstruction::EmptyAccount`", + "instruction to empty the available balance ciphertext.", + "", + "Note that a newly configured account is always empty, so this", + "instruction is not required prior to account closing if no", + "instructions beyond", + "`ConfidentialTransferInstruction::ConfigureAccount` have affected the", + "token account.", + "", + "In order for this instruction to be successfully processed, it must be", + "accompanied by the `VerifyZeroCiphertext` instruction of the", + "`zk_elgamal_proof` program in the same transaction or the address of a", + "context state account for the proof must be provided." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "instructionsSysvarOrContextState", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Instructions sysvar if `VerifyZeroCiphertext` is included in", + "the same transaction or context state account if", + "`VerifyZeroCiphertext` is pre-verified into a context state", + "account." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "Sysvar1nstructions1111111111111111111111111" + } + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account's owner/delegate or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 27 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 4 + } + }, + { + "kind": "instructionArgumentNode", + "name": "proofInstructionOffset", + "docs": [ + "Relative location of the `ProofInstruction::VerifyCloseAccount`", + "instruction to the `EmptyAccount` instruction in the transaction. If", + "the offset is `0`, then use a context state account for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "confidentialDeposit", + "docs": [ + "Deposit SPL Tokens into the pending balance of a confidential token", + "account.", + "", + "The account owner can then invoke the `ApplyPendingBalance` instruction", + "to roll the deposit into their available balance at a time of their", + "choosing.", + "", + "Fails if the source or destination accounts are frozen.", + "Fails if the associated mint is extended as `NonTransferable`." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The corresponding SPL Token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account's owner/delegate or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 27 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 5 + } + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "docs": [ + "The amount of tokens to deposit." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "decimals", + "docs": [ + "Expected number of base 10 digits to the right of the decimal place." + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "confidentialWithdraw", + "docs": [ + "Withdraw SPL Tokens from the available balance of a confidential token", + "account.", + "", + "In order for this instruction to be successfully processed, it must be", + "accompanied by the following list of `zk_elgamal_proof` program", + "instructions:", + "- `VerifyCiphertextCommitmentEquality`", + "- `VerifyBatchedRangeProofU64`", + "These instructions can be accompanied in the same transaction or can be", + "pre-verified into a context state account, in which case, only their", + "context state account address need to be provided.", + "", + "Fails if the source or destination accounts are frozen.", + "Fails if the associated mint is extended as `NonTransferable`." + ], + "optionalAccountStrategy": "omitted", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The corresponding SPL Token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "instructionsSysvar", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "Instructions sysvar if at least one of the", + "`zk_elgamal_proof` instructions are included in the same", + "transaction." + ] + }, + { + "kind": "instructionAccountNode", + "name": "equalityRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) Equality proof record account or context state account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "rangeRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) Range proof record account or context state account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account's owner/delegate or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 27 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 6 + } + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "docs": [ + "The amount of tokens to withdraw." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "decimals", + "docs": [ + "Expected number of base 10 digits to the right of the decimal place." + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "newDecryptableAvailableBalance", + "docs": [ + "The new decryptable balance if the withdrawal succeeds." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "decryptableBalance" + } + }, + { + "kind": "instructionArgumentNode", + "name": "equalityProofInstructionOffset", + "docs": [ + "Relative location of the", + "`ProofInstruction::VerifyCiphertextCommitmentEquality` instruction", + "to the `Withdraw` instruction in the transaction. If the offset is", + "`0`, then use a context state account for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "rangeProofInstructionOffset", + "docs": [ + "Relative location of the `ProofInstruction::BatchedRangeProofU64`", + "instruction to the `Withdraw` instruction in the transaction. If the", + "offset is `0`, then use a context state account for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "confidentialTransfer", + "docs": [ + "Transfer tokens confidentially.", + "", + "In order for this instruction to be successfully processed, it must be", + "accompanied by the following list of `zk_elgamal_proof` program", + "instructions:", + "- `VerifyCiphertextCommitmentEquality`", + "- `VerifyBatchedGroupedCiphertext3HandlesValidity`", + "- `VerifyBatchedRangeProofU128`", + "These instructions can be accompanied in the same transaction or can be", + "pre-verified into a context state account, in which case, only their", + "context state account addresses need to be provided.", + "", + "Fails if the associated mint is extended as `NonTransferable`." + ], + "optionalAccountStrategy": "omitted", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "sourceToken", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source SPL Token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The corresponding SPL Token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "destinationToken", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The destination SPL Token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "instructionsSysvar", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) Instructions sysvar if at least one of the", + "`zk_elgamal_proof` instructions are included in the same", + "transaction." + ] + }, + { + "kind": "instructionAccountNode", + "name": "equalityRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) Equality proof record account or context state account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "ciphertextValidityRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) Ciphertext validity proof record account or context state account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "rangeRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) Range proof record account or context state account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account's owner/delegate or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 27 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 7 + } + }, + { + "kind": "instructionArgumentNode", + "name": "newSourceDecryptableAvailableBalance", + "docs": [ + "The new source decryptable balance if the transfer succeeds." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "decryptableBalance" + } + }, + { + "kind": "instructionArgumentNode", + "name": "transferAmountAuditorCiphertextLo", + "docs": [ + "The transfer amount encrypted under the auditor ElGamal public key." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "encryptedBalance" + } + }, + { + "kind": "instructionArgumentNode", + "name": "transferAmountAuditorCiphertextHi", + "docs": [ + "The transfer amount encrypted under the auditor ElGamal public key." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "encryptedBalance" + } + }, + { + "kind": "instructionArgumentNode", + "name": "equalityProofInstructionOffset", + "docs": [ + "Relative location of the", + "`ProofInstruction::VerifyCiphertextCommitmentEquality` instruction", + "to the `Transfer` instruction in the transaction. If the offset is", + "`0`, then use a context state account for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "ciphertextValidityProofInstructionOffset", + "docs": [ + "Relative location of the", + "`ProofInstruction::VerifyBatchedGroupedCiphertext3HandlesValidity`", + "instruction to the `Transfer` instruction in the transaction. If the", + "offset is `0`, then use a context state account for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "rangeProofInstructionOffset", + "docs": [ + "Relative location of the `ProofInstruction::BatchedRangeProofU128Data`", + "instruction to the `Transfer` instruction in the transaction. If the", + "offset is `0`, then use a context state account for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "applyConfidentialPendingBalance", + "docs": [ + "Applies the pending balance to the available balance, based on the", + "history of `Deposit` and/or `Transfer` instructions.", + "", + "After submitting `ApplyPendingBalance`, the client should compare", + "`ConfidentialTransferAccount::expected_pending_balance_credit_counter`", + "with", + "`ConfidentialTransferAccount::actual_applied_pending_balance_instructions`. If they are", + "equal then the", + "`ConfidentialTransferAccount::decryptable_available_balance` is", + "consistent with `ConfidentialTransferAccount::available_balance`. If", + "they differ then there is more pending balance to be applied." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account's owner/delegate or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 27 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 8 + } + }, + { + "kind": "instructionArgumentNode", + "name": "expectedPendingBalanceCreditCounter", + "docs": [ + "The expected number of pending balance credits since the last successful", + "`ApplyPendingBalance` instruction" + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "newDecryptableAvailableBalance", + "docs": [ + "The new decryptable balance if the pending balance is applied", + "successfully" + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "decryptableBalance" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "enableConfidentialCredits", + "docs": [ + "Configure a confidential extension account to accept incoming", + "confidential transfers." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account's owner/delegate or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 27 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 9 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "disableConfidentialCredits", + "docs": [ + "Configure a confidential extension account to reject any incoming", + "confidential transfers.", + "", + "If the `allow_non_confidential_credits` field is `true`, then the base", + "account can still receive non-confidential transfers.", + "", + "This instruction can be used to disable confidential payments after a", + "token account has already been extended for confidential transfers." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account's owner/delegate or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 27 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 10 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "enableNonConfidentialCredits", + "docs": [ + "Configure an account with the confidential extension to accept incoming", + "non-confidential transfers." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account's owner/delegate or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 27 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 11 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "disableNonConfidentialCredits", + "docs": [ + "Configure an account with the confidential extension to reject any", + "incoming non-confidential transfers.", + "", + "This instruction can be used to configure a confidential extension", + "account to exclusively receive confidential payments." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account's owner/delegate or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 27 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 12 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "confidentialTransferWithFee", + "docs": [ + "Transfer tokens confidentially with fee.", + "", + "In order for this instruction to be successfully processed, it must be", + "accompanied by the following list of `zk_elgamal_proof` program", + "instructions:", + "- `VerifyCiphertextCommitmentEquality`", + "- `VerifyBatchedGroupedCiphertext3HandlesValidity` (transfer amount", + " ciphertext)", + "- `VerifyPercentageWithFee`", + "- `VerifyBatchedGroupedCiphertext2HandlesValidity` (fee ciphertext)", + "- `VerifyBatchedRangeProofU256`", + "These instructions can be accompanied in the same transaction or can be", + "pre-verified into a context state account, in which case, only their", + "context state account addresses need to be provided.", + "", + "The same restrictions for the `Transfer` applies to", + "`TransferWithFee`. Namely, the instruction fails if the", + "associated mint is extended as `NonTransferable`." + ], + "optionalAccountStrategy": "omitted", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "sourceToken", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source SPL Token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The corresponding SPL Token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "destinationToken", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The destination SPL Token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "instructionsSysvar", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) Instructions sysvar if at least one of the", + "`zk_elgamal_proof` instructions are included in the same", + "transaction." + ] + }, + { + "kind": "instructionAccountNode", + "name": "equalityRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) Equality proof record account or context state account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "transferAmountCiphertextValidityRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) Transfer amount ciphertext validity proof record", + "account or context state account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "feeSigmaRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) Fee sigma proof record account or context state account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "feeCiphertextValidityRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) Fee ciphertext validity proof record account or context state account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "rangeRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) Range proof record account or context state account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account's owner/delegate or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 27 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 13 + } + }, + { + "kind": "instructionArgumentNode", + "name": "newSourceDecryptableAvailableBalance", + "docs": [ + "The new source decryptable balance if the transfer succeeds." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "decryptableBalance" + } + }, + { + "kind": "instructionArgumentNode", + "name": "transferAmountAuditorCiphertextLo", + "docs": [ + "The transfer amount encrypted under the auditor ElGamal public key." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "encryptedBalance" + } + }, + { + "kind": "instructionArgumentNode", + "name": "transferAmountAuditorCiphertextHi", + "docs": [ + "The transfer amount encrypted under the auditor ElGamal public key." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "encryptedBalance" + } + }, + { + "kind": "instructionArgumentNode", + "name": "equalityProofInstructionOffset", + "docs": [ + "Relative location of the", + "`ProofInstruction::VerifyCiphertextCommitmentEquality` instruction", + "to the `TransferWithFee` instruction in the transaction. If the offset", + "is `0`, then use a context state account for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "transferAmountCiphertextValidityProofInstructionOffset", + "docs": [ + "Relative location of the", + "`ProofInstruction::VerifyBatchedGroupedCiphertext3HandlesValidity`", + "instruction to the `TransferWithFee` instruction in the transaction.", + "If the offset is `0`, then use a context state account for the", + "proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "feeSigmaProofInstructionOffset", + "docs": [ + "Relative location of the `ProofInstruction::VerifyPercentageWithFee`", + "instruction to the `TransferWithFee` instruction in the transaction.", + "If the offset is `0`, then use a context state account for the", + "proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "feeCiphertextValidityProofInstructionOffset", + "docs": [ + "Relative location of the", + "`ProofInstruction::VerifyBatchedGroupedCiphertext2HandlesValidity`", + "instruction to the `TransferWithFee` instruction in the transaction.", + "If the offset is `0`, then use a context state account for the", + "proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "rangeProofInstructionOffset", + "docs": [ + "Relative location of the `ProofInstruction::BatchedRangeProofU256Data`", + "instruction to the `TransferWithFee` instruction in the transaction.", + "If the offset is `0`, then use a context state account for the", + "proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "configureConfidentialTransferAccountWithRegistry", + "docs": [ + "Configures confidential transfers for a token account.", + "", + "This instruction is identical to the `ConfigureAccount` instruction", + "except that an `ElGamalRegistry` account is expected in place of the", + "`VerifyPubkeyValidity` proof.", + "", + "An `ElGamalRegistry` account is valid if it shares the same owner with", + "the token account. If a valid `ElGamalRegistry` account is provided,", + "then the program skips the verification of the ElGamal pubkey validity", + "proof as well as the token owner signature.", + "", + "If the token account is not large enough to include the new", + "confidential transfer extension, then optionally reallocate the account", + "to increase the data size. To reallocate, a payer account to fund the", + "reallocation and the system account should be included in the", + "instruction." + ], + "optionalAccountStrategy": "omitted", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The corresponding SPL Token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "elgamalRegistry", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The ElGamal registry account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "payer", + "isWritable": true, + "isSigner": true, + "isOptional": true, + "docs": [ + "(Optional) The payer account to fund reallocation." + ] + }, + { + "kind": "instructionAccountNode", + "name": "systemProgram", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) System program for reallocation funding." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 27 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 14 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeDefaultAccountState", + "docs": [ + "Initialize a new mint with the default state for new Accounts.", + "", + "Fails if the mint has already been initialized, so must be called before", + "`InitializeMint`.", + "", + "The mint must have exactly enough space allocated for the base mint (82", + "bytes), plus 83 bytes of padding, 1 byte reserved for the account type,", + "then space required for this extension, plus any others." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 28 + } + }, + { + "kind": "instructionArgumentNode", + "name": "defaultAccountStateDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + }, + { + "kind": "instructionArgumentNode", + "name": "state", + "docs": [ + "The state each new token account should start with." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "accountState" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "defaultAccountStateDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "updateDefaultAccountState", + "docs": [ + "Update the default state for new Accounts. Only supported for mints that", + "include the `DefaultAccountState` extension." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "freezeAuthority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The mint freeze authority or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 28 + } + }, + { + "kind": "instructionArgumentNode", + "name": "defaultAccountStateDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + }, + { + "kind": "instructionArgumentNode", + "name": "state", + "docs": [ + "The state each new token account should start with." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "accountState" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "defaultAccountStateDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "reallocate", + "docs": [ + "Check to see if a token account is large enough for a list of", + "ExtensionTypes, and if not, use reallocation to increase the data", + "size." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token account to reallocate." + ] + }, + { + "kind": "instructionAccountNode", + "name": "payer", + "isWritable": true, + "isSigner": true, + "isOptional": false, + "docs": [ + "The payer account to fund reallocation." + ] + }, + { + "kind": "instructionAccountNode", + "name": "systemProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "System program for reallocation funding." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "11111111111111111111111111111111" + } + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The account's owner or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 29 + } + }, + { + "kind": "instructionArgumentNode", + "name": "newExtensionTypes", + "docs": [ + "New extension types to include in the reallocated account." + ], + "type": { + "kind": "arrayTypeNode", + "item": { + "kind": "definedTypeLinkNode", + "name": "extensionType" + }, + "count": { + "kind": "remainderCountNode" + } + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "enableMemoTransfers", + "docs": [ + "Require memos for transfers into this Account. Adds the MemoTransfer", + "extension to the Account, if it doesn't already exist." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token account to update." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The account's owner or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 30 + } + }, + { + "kind": "instructionArgumentNode", + "name": "memoTransfersDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "memoTransfersDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "disableMemoTransfers", + "docs": [ + "Stop requiring memos for transfers into this Account.", + "", + "Implicitly initializes the extension in the case where it is not", + "present." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token account to update." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The account's owner or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 30 + } + }, + { + "kind": "instructionArgumentNode", + "name": "memoTransfersDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "memoTransfersDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "createNativeMint", + "docs": [ + "Creates the native mint.", + "", + "This instruction only needs to be invoked once after deployment and is", + "permissionless. Wrapped SOL (`native_mint::id()`) will not be", + "available until this instruction is successfully executed." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "payer", + "isWritable": true, + "isSigner": true, + "isOptional": false, + "docs": [ + "Funding account (must be a system account)" + ] + }, + { + "kind": "instructionAccountNode", + "name": "nativeMint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The native mint address" + ] + }, + { + "kind": "instructionAccountNode", + "name": "systemProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "System program for mint account funding" + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "11111111111111111111111111111111" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 31 + } + } + ], + "remainingAccounts": [], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeNonTransferableMint", + "docs": [ + "Initialize the non transferable extension for the given mint account", + "", + "Fails if the account has already been initialized, so must be called before `InitializeMint`." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint account to initialize." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 32 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeInterestBearingMint", + "docs": [ + "Initialize a new mint with the `InterestBearing` extension.", + "", + "Fails if the mint has already been initialized, so must be called before", + "`InitializeMint`.", + "", + "The mint must have exactly enough space allocated for the base mint (82", + "bytes), plus 83 bytes of padding, 1 byte reserved for the account type,", + "then space required for this extension, plus any others." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to initialize." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 33 + } + }, + { + "kind": "instructionArgumentNode", + "name": "interestBearingMintDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + }, + { + "kind": "instructionArgumentNode", + "name": "rateAuthority", + "docs": [ + "The public key for the account that can update the rate" + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "instructionArgumentNode", + "name": "rate", + "docs": [ + "The initial interest rate" + ], + "type": { + "kind": "numberTypeNode", + "format": "i16", + "endian": "le" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "interestBearingMintDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "updateRateInterestBearingMint", + "docs": [ + "Update the interest rate. Only supported for mints that include the", + "`InterestBearingConfig` extension." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "rateAuthority", + "isWritable": true, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The mint rate authority." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 33 + } + }, + { + "kind": "instructionArgumentNode", + "name": "interestBearingMintDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + }, + { + "kind": "instructionArgumentNode", + "name": "rate", + "docs": [ + "The interest rate to update." + ], + "type": { + "kind": "numberTypeNode", + "format": "i16", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "interestBearingMintDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "enableCpiGuard", + "docs": [ + "Lock certain token operations from taking place within CPI for this Account, namely:", + "* Transfer and Burn must go through a delegate.", + "* CloseAccount can only return lamports to owner.", + "* SetAuthority can only be used to remove an existing close authority.", + "* Approve is disallowed entirely.", + "", + "In addition, CPI Guard cannot be enabled or disabled via CPI." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token account to update." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The account's owner/delegate or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 34 + } + }, + { + "kind": "instructionArgumentNode", + "name": "cpiGuardDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "cpiGuardDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "disableCpiGuard", + "docs": [ + "Allow all token operations to happen via CPI as normal.", + "", + "Implicitly initializes the extension in the case where it is not present." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token account to update." + ] + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The account's owner/delegate or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 34 + } + }, + { + "kind": "instructionArgumentNode", + "name": "cpiGuardDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "cpiGuardDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializePermanentDelegate", + "docs": [ + "Initialize the permanent delegate on a new mint.", + "", + "Fails if the mint has already been initialized, so must be called before `InitializeMint`.", + "", + "The mint must have exactly enough space allocated for the base mint (82 bytes),", + "plus 83 bytes of padding, 1 byte reserved for the account type,", + "then space required for this extension, plus any others." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to initialize." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 35 + } + }, + { + "kind": "instructionArgumentNode", + "name": "delegate", + "docs": [ + "Authority that may sign for `Transfer`s and `Burn`s on any account" + ], + "type": { + "kind": "publicKeyTypeNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeTransferHook", + "docs": [ + "Initialize a new mint with a transfer hook program.", + "", + "Fails if the mint has already been initialized, so must be called before `InitializeMint`.", + "", + "The mint must have exactly enough space allocated for the base mint (82 bytes),", + "plus 83 bytes of padding, 1 byte reserved for the account type,", + "then space required for this extension, plus any others." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to initialize." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 36 + } + }, + { + "kind": "instructionArgumentNode", + "name": "transferHookDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + }, + { + "kind": "instructionArgumentNode", + "name": "authority", + "docs": [ + "The public key for the account that can update the program id" + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "instructionArgumentNode", + "name": "programId", + "docs": [ + "The program id that performs logic during transfers" + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "transferHookDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "updateTransferHook", + "docs": [ + "Update the transfer hook program id. Only supported for mints that", + "include the `TransferHook` extension.", + "", + "Accounts expected by this instruction:", + "", + " 0. `[writable]` The mint.", + " 1. `[signer]` The transfer hook authority." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The transfer hook authority." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 36 + } + }, + { + "kind": "instructionArgumentNode", + "name": "transferHookDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + }, + { + "kind": "instructionArgumentNode", + "name": "programId", + "docs": [ + "The program id that performs logic during transfers" + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "transferHookDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeConfidentialTransferFee", + "docs": [ + "Initializes confidential transfer fees for a mint.", + "", + "The instruction must be included within the same Transaction as TokenInstruction::InitializeMint.", + "Otherwise another party can initialize the configuration.", + "", + "The instruction fails if TokenInstruction::InitializeMint has already executed for the mint." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token mint." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 37 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferFeeDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + }, + { + "kind": "instructionArgumentNode", + "name": "authority", + "docs": [ + "Optional authority to set the withdraw withheld authority ElGamal key" + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "instructionArgumentNode", + "name": "withdrawWithheldAuthorityElGamalPubkey", + "docs": [ + "Withheld fees from accounts must be encrypted with this ElGamal key" + ], + "type": { + "kind": "publicKeyTypeNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferFeeDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "withdrawWithheldTokensFromMintForConfidentialTransferFee", + "docs": [ + "Transfer all withheld confidential tokens in the mint to an account.", + "Signed by the mint's withdraw withheld tokens authority.", + "", + "The withheld confidential tokens are aggregated directly into the destination available balance.", + "", + "Must be accompanied by the VerifyCiphertextCiphertextEquality instruction", + "of the zk_elgamal_proof program in the same transaction or the address of", + "a context state account for the proof must be provided." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The fee receiver account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "instructionsSysvarOrContextState", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Instructions sysvar if `VerifyCiphertextCiphertextEquality` is", + "included in the same transaction or context state account if", + "`VerifyCiphertextCiphertextEquality` is pre-verified into a context", + "state account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The mint's withdraw_withheld_authority" + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 37 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferFeeDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + }, + { + "kind": "instructionArgumentNode", + "name": "proofInstructionOffset", + "docs": [ + "Proof instruction offset" + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "newDecryptableAvailableBalance", + "docs": [ + "The new decryptable balance in the destination token account" + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "decryptableBalance" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferFeeDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "withdrawWithheldTokensFromAccountsForConfidentialTransferFee", + "docs": [ + "Transfer all withheld tokens to an account. Signed by the mint's withdraw withheld", + "tokens authority. This instruction is susceptible to front-running.", + "Use `HarvestWithheldTokensToMint` and `WithdrawWithheldTokensFromMint` as alternative.", + "", + "Must be accompanied by the VerifyWithdrawWithheldTokens instruction." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The fee receiver account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "instructionsSysvarOrContextState", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Instructions sysvar if `VerifyCiphertextCiphertextEquality` is", + "included in the same transaction or context state account if", + "`VerifyCiphertextCiphertextEquality` is pre-verified into a context", + "state account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The mint's withdraw_withheld_authority" + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 37 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferFeeDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 2 + } + }, + { + "kind": "instructionArgumentNode", + "name": "numTokenAccounts", + "docs": [ + "Number of token accounts harvested" + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "proofInstructionOffset", + "docs": [ + "Proof instruction offset" + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "newDecryptableAvailableBalance", + "docs": [ + "The new decryptable balance in the destination token account" + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "decryptableBalance" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferFeeDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "harvestWithheldTokensToMintForConfidentialTransferFee", + "docs": [ + "Permissionless instruction to transfer all withheld confidential tokens to the mint.", + "", + "Succeeds for frozen accounts.", + "", + "Accounts provided should include both the `TransferFeeAmount` and", + "`ConfidentialTransferAccount` extension. If not, the account is skipped." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 37 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferFeeDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 3 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": false, + "isWritable": true, + "docs": [ + "The source accounts to harvest from" + ], + "value": { + "kind": "argumentValueNode", + "name": "sources" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferFeeDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "enableHarvestToMint", + "docs": [ + "Configure a confidential transfer fee mint to accept harvested confidential fees." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The confidential transfer fee authority" + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 37 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferFeeDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 4 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferFeeDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "disableHarvestToMint", + "docs": [ + "Configure a confidential transfer fee mint to reject any harvested confidential fees." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The confidential transfer fee authority" + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 37 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialTransferFeeDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 5 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialTransferFeeDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "withdrawExcessLamports", + "docs": [ + "This instruction is to be used to rescue SOLs sent to any TokenProgram", + "owned account by sending them to any other account, leaving behind only", + "lamports for rent exemption." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "source", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The destination account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account owner or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 38 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeMetadataPointer", + "docs": [ + "Initialize a new mint with a metadata pointer", + "", + "Fails if the mint has already been initialized, so must be called before", + "`InitializeMint`.", + "", + "The mint must have exactly enough space allocated for the base mint (82", + "bytes), plus 83 bytes of padding, 1 byte reserved for the account type,", + "then space required for this extension, plus any others." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to initialize." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 39 + } + }, + { + "kind": "instructionArgumentNode", + "name": "metadataPointerDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + }, + { + "kind": "instructionArgumentNode", + "name": "authority", + "docs": [ + "The public key for the account that can update the metadata address." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "instructionArgumentNode", + "name": "metadataAddress", + "docs": [ + "The account address that holds the metadata." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "metadataPointerDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "updateMetadataPointer", + "docs": [ + "Update the metadata pointer address. Only supported for mints that", + "include the `MetadataPointer` extension." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to initialize." + ] + }, + { + "kind": "instructionAccountNode", + "name": "metadataPointerAuthority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The metadata pointer authority or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 39 + } + }, + { + "kind": "instructionArgumentNode", + "name": "metadataPointerDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + }, + { + "kind": "instructionArgumentNode", + "name": "metadataAddress", + "docs": [ + "The new account address that holds the metadata." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "metadataPointerDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeGroupPointer", + "docs": [ + "Initialize a new mint with a group pointer", + "", + "Fails if the mint has already been initialized, so must be called before", + "`InitializeMint`.", + "", + "The mint must have exactly enough space allocated for the base mint (82", + "bytes), plus 83 bytes of padding, 1 byte reserved for the account type,", + "then space required for this extension, plus any others." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to initialize." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 40 + } + }, + { + "kind": "instructionArgumentNode", + "name": "groupPointerDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + }, + { + "kind": "instructionArgumentNode", + "name": "authority", + "docs": [ + "The public key for the account that can update the group address." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "instructionArgumentNode", + "name": "groupAddress", + "docs": [ + "The account address that holds the group." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "groupPointerDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "updateGroupPointer", + "docs": [ + "Update the group pointer address. Only supported for mints that", + "include the `GroupPointer` extension." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to initialize." + ] + }, + { + "kind": "instructionAccountNode", + "name": "groupPointerAuthority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The group pointer authority or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 40 + } + }, + { + "kind": "instructionArgumentNode", + "name": "groupPointerDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + }, + { + "kind": "instructionArgumentNode", + "name": "groupAddress", + "docs": [ + "The new account address that holds the group configurations." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "groupPointerDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeGroupMemberPointer", + "docs": [ + "Initialize a new mint with a group member pointer", + "", + "Fails if the mint has already been initialized, so must be called before", + "`InitializeMint`.", + "", + "The mint must have exactly enough space allocated for the base mint (82", + "bytes), plus 83 bytes of padding, 1 byte reserved for the account type,", + "then space required for this extension, plus any others." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to initialize." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 41 + } + }, + { + "kind": "instructionArgumentNode", + "name": "groupMemberPointerDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + }, + { + "kind": "instructionArgumentNode", + "name": "authority", + "docs": [ + "The public key for the account that can update the group member address." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "instructionArgumentNode", + "name": "memberAddress", + "docs": [ + "The account address that holds the member." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "groupMemberPointerDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "updateGroupMemberPointer", + "docs": [ + "Update the group member pointer address. Only supported for mints that", + "include the `GroupMemberPointer` extension." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to initialize." + ] + }, + { + "kind": "instructionAccountNode", + "name": "groupMemberPointerAuthority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The group member pointer authority or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 41 + } + }, + { + "kind": "instructionArgumentNode", + "name": "groupMemberPointerDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + }, + { + "kind": "instructionArgumentNode", + "name": "memberAddress", + "docs": [ + "The new account address that holds the member." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "groupMemberPointerDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeConfidentialMintBurn", + "docs": [ + "Initializes confidential mints and burns for a mint.", + "", + "The `ConfidentialMintBurnInstruction::InitializeMint` instruction", + "requires no signers and MUST be included within the same Transaction as", + "`TokenInstruction::InitializeMint`. Otherwise another party can", + "initialize the configuration.", + "", + "The instruction fails if the `TokenInstruction::InitializeMint`", + "instruction has already executed for the mint." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token mint." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 42 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialMintBurnDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + }, + { + "kind": "instructionArgumentNode", + "name": "supplyElgamalPubkey", + "docs": [ + "The ElGamal pubkey used to encrypt the confidential supply." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "instructionArgumentNode", + "name": "decryptableSupply", + "docs": [ + "The initial 0 supply encrypted with the supply aes key." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "decryptableBalance" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialMintBurnDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "rotateSupplyElgamalPubkey", + "docs": [ + "Rotates the ElGamal pubkey used to encrypt confidential supply.", + "", + "The pending burn amount must be zero in order for this instruction to be", + "processed successfully." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "instructionsSysvarOrContextState", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Instructions sysvar if `CiphertextCiphertextEquality` is included in", + "the same transaction or context state account if", + "`CiphertextCiphertextEquality` is pre-verified into a context state", + "account." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "Sysvar1nstructions1111111111111111111111111" + } + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The confidential mint authority or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 42 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialMintBurnDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + }, + { + "kind": "instructionArgumentNode", + "name": "newSupplyElgamalPubkey", + "docs": [ + "The new ElGamal pubkey for supply encryption." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "instructionArgumentNode", + "name": "proofInstructionOffset", + "docs": [ + "The location of the", + "`ProofInstruction::VerifyCiphertextCiphertextEquality` instruction", + "relative to the `RotateSupplyElGamalPubkey` instruction in the", + "transaction. If the offset is `0`, then use a context state account", + "for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialMintBurnDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "updateConfidentialMintBurnDecryptableSupply", + "docs": [ + "Updates the decryptable supply of the mint." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The confidential mint authority or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 42 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialMintBurnDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 2 + } + }, + { + "kind": "instructionArgumentNode", + "name": "newDecryptableSupply", + "docs": [ + "The new decryptable supply." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "decryptableBalance" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialMintBurnDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "confidentialMint", + "docs": [ + "Mints tokens to a confidential balance.", + "", + "Fails if the destination account is frozen.", + "", + "In order for this instruction to be successfully processed, it must be", + "accompanied by the following list of `zk_elgamal_proof` program", + "instructions:", + "- `VerifyCiphertextCommitmentEquality`", + "- `VerifyBatchedGroupedCiphertext3HandlesValidity`", + "- `VerifyBatchedRangeProofU128`", + "These instructions can be accompanied in the same transaction or can be", + "pre-verified into a context state account, in which case, only their", + "context state account addresses need to be provided." + ], + "optionalAccountStrategy": "omitted", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "instructionsSysvar", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) Instructions sysvar if at least one of the", + "`zk_elgamal_proof` instructions are included in the same", + "transaction." + ] + }, + { + "kind": "instructionAccountNode", + "name": "equalityRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) The context state account containing the pre-verified", + "`VerifyCiphertextCommitmentEquality` proof." + ] + }, + { + "kind": "instructionAccountNode", + "name": "ciphertextValidityRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) The context state account containing the pre-verified", + "`VerifyBatchedGroupedCiphertext3HandlesValidity` proof." + ] + }, + { + "kind": "instructionAccountNode", + "name": "rangeRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) The context state account containing the pre-verified", + "`VerifyBatchedRangeProofU128` proof." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The account owner or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 42 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialMintBurnDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 3 + } + }, + { + "kind": "instructionArgumentNode", + "name": "newDecryptableSupply", + "docs": [ + "The new decryptable supply if the mint succeeds." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "decryptableBalance" + } + }, + { + "kind": "instructionArgumentNode", + "name": "mintAmountAuditorCiphertextLo", + "docs": [ + "The mint amount encrypted under the auditor ElGamal public key." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "encryptedBalance" + } + }, + { + "kind": "instructionArgumentNode", + "name": "mintAmountAuditorCiphertextHi", + "docs": [ + "The mint amount encrypted under the auditor ElGamal public key." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "encryptedBalance" + } + }, + { + "kind": "instructionArgumentNode", + "name": "equalityProofInstructionOffset", + "docs": [ + "Relative location of the", + "`ProofInstruction::VerifyCiphertextCommitmentEquality` instruction", + "to the `ConfidentialMint` instruction in the transaction. If the", + "offset is `0`, then use a context state account for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "ciphertextValidityProofInstructionOffset", + "docs": [ + "Relative location of the", + "`ProofInstruction::VerifyBatchedGroupedCiphertext3HandlesValidity`", + "instruction to the `ConfidentialMint` instruction in the transaction.", + "If the offset is `0`, then use a context state account for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "rangeProofInstructionOffset", + "docs": [ + "Relative location of the", + "`ProofInstruction::VerifyBatchedRangeProofU128` instruction to the", + "`ConfidentialMint` instruction in the transaction. If the offset is", + "`0`, then use a context state account for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialMintBurnDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "confidentialBurn", + "docs": [ + "Burns tokens from a confidential balance.", + "", + "Fails if the source account is frozen.", + "", + "In order for this instruction to be successfully processed, it must be", + "accompanied by the following list of `zk_elgamal_proof` program", + "instructions:", + "- `VerifyCiphertextCommitmentEquality`", + "- `VerifyBatchedGroupedCiphertext3HandlesValidity`", + "- `VerifyBatchedRangeProofU128`", + "These instructions can be accompanied in the same transaction or can be", + "pre-verified into a context state account, in which case, only their", + "context state account addresses need to be provided." + ], + "optionalAccountStrategy": "omitted", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "instructionsSysvar", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) Instructions sysvar if at least one of the", + "`zk_elgamal_proof` instructions are included in the same", + "transaction." + ] + }, + { + "kind": "instructionAccountNode", + "name": "equalityRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) The context state account containing the pre-verified", + "`VerifyCiphertextCommitmentEquality` proof." + ] + }, + { + "kind": "instructionAccountNode", + "name": "ciphertextValidityRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) The context state account containing the pre-verified", + "`VerifyBatchedGroupedCiphertext3HandlesValidity` proof." + ] + }, + { + "kind": "instructionAccountNode", + "name": "rangeRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) The context state account containing the pre-verified", + "`VerifyBatchedRangeProofU128` proof." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The account owner or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 42 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialMintBurnDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 4 + } + }, + { + "kind": "instructionArgumentNode", + "name": "newDecryptableAvailableBalance", + "docs": [ + "The new decryptable balance of the burner if the burn succeeds." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "decryptableBalance" + } + }, + { + "kind": "instructionArgumentNode", + "name": "burnAmountAuditorCiphertextLo", + "docs": [ + "The burn amount encrypted under the auditor ElGamal public key." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "encryptedBalance" + } + }, + { + "kind": "instructionArgumentNode", + "name": "burnAmountAuditorCiphertextHi", + "docs": [ + "The burn amount encrypted under the auditor ElGamal public key." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "encryptedBalance" + } + }, + { + "kind": "instructionArgumentNode", + "name": "equalityProofInstructionOffset", + "docs": [ + "Relative location of the", + "`ProofInstruction::VerifyCiphertextCommitmentEquality` instruction", + "to the `ConfidentialBurn` instruction in the transaction. If the", + "offset is `0`, then use a context state account for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "ciphertextValidityProofInstructionOffset", + "docs": [ + "Relative location of the", + "`ProofInstruction::VerifyBatchedGroupedCiphertext3HandlesValidity`", + "instruction to the `ConfidentialBurn` instruction in the transaction.", + "If the offset is `0`, then use a context state account for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "rangeProofInstructionOffset", + "docs": [ + "Relative location of the", + "`ProofInstruction::VerifyBatchedRangeProofU128` instruction to the", + "`ConfidentialBurn` instruction in the transaction. If the offset is", + "`0`, then use a context state account for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialMintBurnDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "applyConfidentialPendingBurn", + "docs": [ + "Applies the pending burn amount to the confidential supply." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The mint authority or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 42 + } + }, + { + "kind": "instructionArgumentNode", + "name": "confidentialMintBurnDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 5 + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "confidentialMintBurnDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeScaledUiAmountMint", + "docs": [ + "Initialize a new mint with the `ScaledUiAmount` extension.", + "", + "Fails if the mint has already been initialized, so must be called before `InitializeMint`.", + "", + "The mint must have exactly enough space allocated for the base mint (82 bytes),", + "plus 83 bytes of padding, 1 byte reserved for the account type,", + "then space required for this extension, plus any others." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint to initialize." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 43 + } + }, + { + "kind": "instructionArgumentNode", + "name": "scaledUiAmountMintDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + }, + { + "kind": "instructionArgumentNode", + "name": "authority", + "docs": [ + "The authority that can update the multiplier" + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "instructionArgumentNode", + "name": "multiplier", + "docs": [ + "The initial multiplier for the scaled UI extension" + ], + "type": { + "kind": "numberTypeNode", + "format": "f64", + "endian": "le" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "scaledUiAmountMintDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "updateMultiplierScaledUiMint", + "docs": [ + "Update the multiplier. Only supported for mints that include the", + "`ScaledUiAmountConfig` extension.", + "You can set a specific timestamp for the multiplier to take effect." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": true, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The multiplier authority." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 43 + } + }, + { + "kind": "instructionArgumentNode", + "name": "scaledUiAmountMintDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + }, + { + "kind": "instructionArgumentNode", + "name": "multiplier", + "docs": [ + "The new multiplier for the scaled UI extension" + ], + "type": { + "kind": "numberTypeNode", + "format": "f64", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "effectiveTimestamp", + "docs": [ + "The timestamp at which the new multiplier will take effect" + ], + "type": { + "kind": "numberTypeNode", + "format": "i64", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "scaledUiAmountMintDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializePausableConfig", + "docs": [ + "Initialize a new mint with the `Pausable` extension.", + "", + "Fails if the mint has already been initialized, so must be called before `InitializeMint`." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 44 + } + }, + { + "kind": "instructionArgumentNode", + "name": "pausableDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + }, + { + "kind": "instructionArgumentNode", + "name": "authority", + "docs": [ + "The authority that can pause and resume the mint." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "pausableDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "pause", + "docs": [ + "Pause the mint.", + "", + "Fails if the mint is not pausable." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The pausable authority that can pause the mint." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 44 + } + }, + { + "kind": "instructionArgumentNode", + "name": "pausableDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "pausableDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "resume", + "docs": [ + "Resume the mint.", + "", + "Fails if the mint is not pausable." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The pausable authority that can resume the mint." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 44 + } + }, + { + "kind": "instructionArgumentNode", + "name": "pausableDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 2 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "pausableDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeTokenMetadata", + "docs": [ + "Initializes a TLV entry with the basic token-metadata fields.", + "", + "Assumes that the provided mint is an SPL token mint, that the metadata", + "account is allocated and assigned to the program, and that the metadata", + "account has enough lamports to cover the rent-exempt reserve." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "metadata", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "updateAuthority", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "mintAuthority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "bytesTypeNode" + }, + "defaultValue": { + "kind": "bytesValueNode", + "data": "d2e11ea258b84d8d", + "encoding": "base16" + } + }, + { + "kind": "instructionArgumentNode", + "name": "name", + "docs": [ + "Longer name of the token." + ], + "type": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + }, + { + "kind": "instructionArgumentNode", + "name": "symbol", + "docs": [ + "Shortened symbol of the token." + ], + "type": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + }, + { + "kind": "instructionArgumentNode", + "name": "uri", + "docs": [ + "URI pointing to more metadata (image, video, etc.)." + ], + "type": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "updateTokenMetadataField", + "docs": [ + "Updates a field in a token-metadata account.", + "", + "The field can be one of the required fields (name, symbol, URI), or a", + "totally new field denoted by a \"key\" string.", + "", + "By the end of the instruction, the metadata account must be properly", + "resized based on the new size of the TLV entry.", + " * If the new size is larger, the program must first reallocate to", + " avoid", + " overwriting other TLV entries.", + " * If the new size is smaller, the program must reallocate at the end", + " so that it's possible to iterate over TLV entries" + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "metadata", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "updateAuthority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "bytesTypeNode" + }, + "defaultValue": { + "kind": "bytesValueNode", + "data": "dde9312db5cadcc8", + "encoding": "base16" + } + }, + { + "kind": "instructionArgumentNode", + "name": "field", + "docs": [ + "Field to update in the metadata." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "tokenMetadataField" + } + }, + { + "kind": "instructionArgumentNode", + "name": "value", + "docs": [ + "Value to write for the field." + ], + "type": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "removeTokenMetadataKey", + "docs": [ + "Removes a key-value pair in a token-metadata account.", + "", + "This only applies to additional fields, and not the base name / symbol /", + "URI fields.", + "", + "By the end of the instruction, the metadata account must be properly", + "resized at the end based on the new size of the TLV entry." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "metadata", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "updateAuthority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "bytesTypeNode" + }, + "defaultValue": { + "kind": "bytesValueNode", + "data": "ea122038598d25b5", + "encoding": "base16" + } + }, + { + "kind": "instructionArgumentNode", + "name": "idempotent", + "docs": [ + "If the idempotent flag is set to true, then the instruction will not", + "error if the key does not exist" + ], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + "defaultValue": { + "kind": "booleanValueNode", + "boolean": false + } + }, + { + "kind": "instructionArgumentNode", + "name": "key", + "docs": [ + "Key to remove in the additional metadata portion." + ], + "type": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "updateTokenMetadataUpdateAuthority", + "docs": [ + "Updates the token-metadata authority." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "metadata", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "updateAuthority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "bytesTypeNode" + }, + "defaultValue": { + "kind": "bytesValueNode", + "data": "d7e4a6e45464567b", + "encoding": "base16" + } + }, + { + "kind": "instructionArgumentNode", + "name": "newUpdateAuthority", + "docs": [ + "New authority for the token metadata, or unset if `None`" + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "emitTokenMetadata", + "docs": [ + "Emits the token-metadata as return data", + "", + "The format of the data emitted follows exactly the `TokenMetadata`", + "struct, but it's possible that the account data is stored in another", + "format by the program.", + "", + "With this instruction, a program that implements the token-metadata", + "interface can return `TokenMetadata` without adhering to the specific", + "byte layout of the `TokenMetadata` struct in any accounts." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "metadata", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "bytesTypeNode" + }, + "defaultValue": { + "kind": "bytesValueNode", + "data": "faa6b4fa0d0cb846", + "encoding": "base16" + } + }, + { + "kind": "instructionArgumentNode", + "name": "start", + "docs": [ + "Start of range of data to emit" + ], + "type": { + "kind": "optionTypeNode", + "item": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + "defaultValue": { + "kind": "noneValueNode" + } + }, + { + "kind": "instructionArgumentNode", + "name": "end", + "docs": [ + "End of range of data to emit" + ], + "type": { + "kind": "optionTypeNode", + "item": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + "defaultValue": { + "kind": "noneValueNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeTokenGroup", + "docs": [ + "Initialize a new `Group`", + "", + "Assumes one has already initialized a mint for the group." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "group", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "mintAuthority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "bytesTypeNode" + }, + "defaultValue": { + "kind": "bytesValueNode", + "data": "79716c2736330004", + "encoding": "base16" + } + }, + { + "kind": "instructionArgumentNode", + "name": "updateAuthority", + "docs": [ + "Update authority for the group" + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "instructionArgumentNode", + "name": "maxSize", + "docs": [ + "The maximum number of group members" + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "updateTokenGroupMaxSize", + "docs": [ + "Update the max size of a `Group`." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "group", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "updateAuthority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "bytesTypeNode" + }, + "defaultValue": { + "kind": "bytesValueNode", + "data": "6c25ab8ff81e126e", + "encoding": "base16" + } + }, + { + "kind": "instructionArgumentNode", + "name": "maxSize", + "docs": [ + "New max size for the group" + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "updateTokenGroupUpdateAuthority", + "docs": [ + "Update the authority of a `Group`." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "group", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "updateAuthority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [ + "Current update authority" + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "bytesTypeNode" + }, + "defaultValue": { + "kind": "bytesValueNode", + "data": "a1695801edddd8cb", + "encoding": "base16" + } + }, + { + "kind": "instructionArgumentNode", + "name": "newUpdateAuthority", + "docs": [ + "New authority for the group, or unset if `None`" + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializeTokenGroupMember", + "docs": [ + "Initialize a new `Member` of a `Group`", + "", + "Assumes the `Group` has already been initialized,", + "as well as the mint for the member." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "member", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "memberMint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "memberMintAuthority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "group", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [] + }, + { + "kind": "instructionAccountNode", + "name": "groupUpdateAuthority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "bytesTypeNode" + }, + "defaultValue": { + "kind": "bytesValueNode", + "data": "9820deb0dfed7486", + "encoding": "base16" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "unwrapLamports", + "docs": [ + "Transfer lamports from a native SOL account to a destination account." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "source", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "destination", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The destination account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The source account's owner or its multisignature account." + ], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 45 + } + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "docs": [ + "The amount of lamports to transfer." + ], + "type": { + "kind": "optionTypeNode", + "fixed": false, + "item": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "initializePermissionedBurn", + "docs": [ + "Require permissioned burn for the given mint account.", + "", + "Fails if the mint has already been initialized, so must be called before `InitializeMint`." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The mint account to initialize." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 46 + } + }, + { + "kind": "instructionArgumentNode", + "name": "permissionedBurnDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + }, + { + "kind": "instructionArgumentNode", + "name": "authority", + "docs": [ + "The public key for the account that is required for token burning." + ], + "type": { + "kind": "publicKeyTypeNode" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "permissionedBurnDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "permissionedBurn", + "docs": [ + "Burn tokens when the mint has the permissioned burn extension enabled." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source account to burn from." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "permissionedBurnAuthority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [ + "Authority configured on the mint that must sign any permissioned burn instruction." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The account's owner/delegate or its multisignature account." + ], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 46 + } + }, + { + "kind": "instructionArgumentNode", + "name": "permissionedBurnDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "docs": [ + "The amount of tokens to burn." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "permissionedBurnDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "permissionedBurnChecked", + "docs": [ + "Burn tokens with expected decimals when the mint has the permissioned burn extension enabled." + ], + "optionalAccountStrategy": "programId", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "account", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The source account to burn from." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "permissionedBurnAuthority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [ + "Authority configured on the mint that must sign any permissioned burn instruction." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The account's owner/delegate or its multisignature account." + ], + "defaultValue": { + "kind": "identityValueNode" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 46 + } + }, + { + "kind": "instructionArgumentNode", + "name": "permissionedBurnDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 2 + } + }, + { + "kind": "instructionArgumentNode", + "name": "amount", + "docs": [ + "The amount of tokens to burn." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "decimals", + "docs": [ + "Expected number of base 10 digits to the right of the decimal place." + ], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "permissionedBurnDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "permissionedConfidentialBurn", + "docs": [ + "Burn tokens from a confidential balance when the mint has the", + "permissioned burn extension enabled.", + "", + "Fails if the source account is frozen.", + "", + "In order for this instruction to be successfully processed, it must be", + "accompanied by the following list of `zk_elgamal_proof` program", + "instructions:", + "- `VerifyCiphertextCommitmentEquality`", + "- `VerifyBatchedGroupedCiphertext3HandlesValidity`", + "- `VerifyBatchedRangeProofU128`", + "These instructions can be accompanied in the same transaction or can be", + "pre-verified into a context state account, in which case, only their", + "context state account addresses need to be provided." + ], + "optionalAccountStrategy": "omitted", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "token", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "The SPL Token mint." + ] + }, + { + "kind": "instructionAccountNode", + "name": "instructionsSysvar", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) Instructions sysvar if at least one of the", + "`zk_elgamal_proof` instructions are included in the same", + "transaction." + ] + }, + { + "kind": "instructionAccountNode", + "name": "equalityRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) The context state account containing the pre-verified", + "`VerifyCiphertextCommitmentEquality` proof." + ] + }, + { + "kind": "instructionAccountNode", + "name": "ciphertextValidityRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) The context state account containing the pre-verified", + "`VerifyBatchedGroupedCiphertext3HandlesValidity` proof." + ] + }, + { + "kind": "instructionAccountNode", + "name": "rangeRecord", + "isWritable": false, + "isSigner": false, + "isOptional": true, + "docs": [ + "(Optional) The context state account containing the pre-verified", + "`VerifyBatchedRangeProofU128` proof." + ] + }, + { + "kind": "instructionAccountNode", + "name": "permissionedBurnAuthority", + "isWritable": false, + "isSigner": true, + "isOptional": false, + "docs": [ + "Authority configured on the mint that must sign any permissioned burn instruction." + ] + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": "either", + "isOptional": false, + "docs": [ + "The account's owner/delegate or its multisignature account." + ] + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 46 + } + }, + { + "kind": "instructionArgumentNode", + "name": "permissionedBurnDiscriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 3 + } + }, + { + "kind": "instructionArgumentNode", + "name": "newDecryptableAvailableBalance", + "docs": [ + "The new decryptable balance of the burner if the burn succeeds." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "decryptableBalance" + } + }, + { + "kind": "instructionArgumentNode", + "name": "burnAmountAuditorCiphertextLo", + "docs": [ + "The burn amount encrypted under the auditor ElGamal public key." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "encryptedBalance" + } + }, + { + "kind": "instructionArgumentNode", + "name": "burnAmountAuditorCiphertextHi", + "docs": [ + "The burn amount encrypted under the auditor ElGamal public key." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "encryptedBalance" + } + }, + { + "kind": "instructionArgumentNode", + "name": "equalityProofInstructionOffset", + "docs": [ + "Relative location of the", + "`ProofInstruction::VerifyCiphertextCommitmentEquality` instruction", + "to the burn instruction in the transaction. If the offset is `0`,", + "then use a context state account for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "ciphertextValidityProofInstructionOffset", + "docs": [ + "Relative location of the", + "`ProofInstruction::VerifyBatchedGroupedCiphertext3HandlesValidity`", + "instruction to the burn instruction in the transaction. If the offset", + "is `0`, then use a context state account for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "rangeProofInstructionOffset", + "docs": [ + "Relative location of the", + "`ProofInstruction::VerifyBatchedRangeProofU128` instruction to the", + "burn instruction in the transaction. If the offset is `0`, then use a", + "context state account for the proof." + ], + "type": { + "kind": "numberTypeNode", + "format": "i8", + "endian": "le" + } + } + ], + "remainingAccounts": [ + { + "kind": "instructionRemainingAccountsNode", + "isOptional": true, + "isSigner": true, + "docs": [], + "value": { + "kind": "argumentValueNode", + "name": "multiSigners" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + }, + { + "kind": "fieldDiscriminatorNode", + "name": "permissionedBurnDiscriminator", + "offset": 1 + } + ] + }, + { + "kind": "instructionNode", + "name": "batch", + "docs": [ + "Executes a batch of instructions. The instructions to be executed are", + "specified in sequence on the instruction data. Each instruction", + "provides:", + "- `u8`: number of accounts", + "- `u8`: instruction data length (includes the discriminator)", + "- `u8`: instruction discriminator", + "- `[u8]`: instruction data", + "", + "Accounts follow a similar pattern, where accounts for each instruction", + "are specified in sequence. Therefore, the number of accounts expected by", + "this instruction is variable, i.e., it depends on the instructions", + "provided.", + "", + "Both the number of accounts and instruction data length are used to", + "identify the slice of accounts and instruction data for each", + "instruction.", + "", + "Note that it is not sound to have a `batch` instruction that contains", + "other `batch` instructions; an error will be raised when this is", + "detected." + ], + "optionalAccountStrategy": "programId", + "accounts": [], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 255 + } + }, + { + "kind": "instructionArgumentNode", + "name": "data", + "docs": [ + "Instruction data for batch instructions." + ], + "type": { + "kind": "arrayTypeNode", + "item": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "numberOfAccounts", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "instructionData", + "docs": [], + "type": { + "kind": "sizePrefixTypeNode", + "prefix": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "type": { + "kind": "bytesTypeNode" + } + } + } + ] + }, + "count": { + "kind": "remainderCountNode" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + } + ], + "definedTypes": [ + { + "kind": "definedTypeNode", + "name": "accountState", + "docs": [], + "type": { + "kind": "enumTypeNode", + "variants": [ + { + "kind": "enumEmptyVariantTypeNode", + "name": "uninitialized" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "initialized" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "frozen" + } + ], + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "definedTypeNode", + "name": "authorityType", + "docs": [], + "type": { + "kind": "enumTypeNode", + "variants": [ + { + "kind": "enumEmptyVariantTypeNode", + "name": "mintTokens" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "freezeAccount" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "accountOwner" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "closeAccount" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "transferFeeConfig" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "withheldWithdraw" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "closeMint" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "interestRate" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "permanentDelegate" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "confidentialTransferMint" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "transferHookProgramId" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "confidentialTransferFeeConfig" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "metadataPointer" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "groupPointer" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "groupMemberPointer" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "scaledUiAmount" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "pause" + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "permissionedBurn" + } + ], + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "definedTypeNode", + "name": "transferFee", + "docs": [], + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "epoch", + "docs": [ + "First epoch where the transfer fee takes effect." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "maximumFee", + "docs": [ + "Maximum fee assessed on transfers, expressed as an amount of tokens." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "transferFeeBasisPoints", + "docs": [ + "Amount of transfer collected as fees, expressed as basis points of the", + "transfer amount, ie. increments of 0.01%." + ], + "type": { + "kind": "amountTypeNode", + "decimals": 2, + "unit": "%", + "number": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + } + ] + } + }, + { + "kind": "definedTypeNode", + "name": "encryptedBalance", + "docs": [ + "ElGamal ciphertext containing an account balance." + ], + "type": { + "kind": "fixedSizeTypeNode", + "size": 64, + "type": { + "kind": "bytesTypeNode" + } + } + }, + { + "kind": "definedTypeNode", + "name": "decryptableBalance", + "docs": [ + "Authenticated encryption containing an account balance." + ], + "type": { + "kind": "fixedSizeTypeNode", + "size": 36, + "type": { + "kind": "bytesTypeNode" + } + } + }, + { + "kind": "definedTypeNode", + "name": "extension", + "docs": [], + "type": { + "kind": "enumTypeNode", + "variants": [ + { + "kind": "enumEmptyVariantTypeNode", + "name": "uninitialized" + }, + { + "kind": "enumStructVariantTypeNode", + "name": "transferFeeConfig", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "transferFeeConfigAuthority", + "docs": [ + "Optional authority to set the fee." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "withdrawWithheldAuthority", + "docs": [ + "Withdraw from mint instructions must be signed by this key." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "withheldAmount", + "docs": [ + "Withheld transfer fee tokens that have been moved to the mint for withdrawal." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "olderTransferFee", + "docs": [ + "Older transfer fee, used if the current epoch < newerTransferFee.epoch." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "transferFee" + } + }, + { + "kind": "structFieldTypeNode", + "name": "newerTransferFee", + "docs": [ + "Newer transfer fee, used if the current epoch >= newerTransferFee.epoch." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "transferFee" + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "transferFeeAmount", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "withheldAmount", + "docs": [ + "Withheld transfer fee tokens that can be claimed by the fee authority." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "mintCloseAuthority", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "closeAuthority", + "docs": [], + "type": { + "kind": "publicKeyTypeNode" + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "confidentialTransferMint", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "authority", + "docs": [ + "Authority to modify the `ConfidentialTransferMint` configuration and to", + "approve new accounts (if `auto_approve_new_accounts` is true).", + "", + "The legacy Token Multisig account is not supported as the authority." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "autoApproveNewAccounts", + "docs": [ + "Indicate if newly configured accounts must be approved by the", + "`authority` before they may be used by the user.", + "", + "* If `true`, no approval is required and new accounts may be used immediately.", + "* If `false`, the authority must approve newly configured accounts (see", + " `ConfidentialTransferInstruction::ConfigureAccount`)." + ], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "auditorElgamalPubkey", + "docs": [ + "Authority to decode any transfer amount in a confidential transfer." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "confidentialTransferAccount", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "approved", + "docs": [ + "`true` if this account has been approved for use. All confidential", + "transfer operations for the account will fail until approval is granted." + ], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "elgamalPubkey", + "docs": [ + "The public key associated with ElGamal encryption." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "pendingBalanceLow", + "docs": [ + "The low 16 bits of the pending balance (encrypted by `elgamal_pubkey`)." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "encryptedBalance" + } + }, + { + "kind": "structFieldTypeNode", + "name": "pendingBalanceHigh", + "docs": [ + "The high 32 bits of the pending balance (encrypted by `elgamal_pubkey`)." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "encryptedBalance" + } + }, + { + "kind": "structFieldTypeNode", + "name": "availableBalance", + "docs": [ + "The available balance (encrypted by `encrypiton_pubkey`)." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "encryptedBalance" + } + }, + { + "kind": "structFieldTypeNode", + "name": "decryptableAvailableBalance", + "docs": [ + "The decryptable available balance." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "decryptableBalance" + } + }, + { + "kind": "structFieldTypeNode", + "name": "allowConfidentialCredits", + "docs": [ + "If `false`, the extended account rejects any incoming confidential transfers." + ], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "allowNonConfidentialCredits", + "docs": [ + "If `false`, the base account rejects any incoming transfers." + ], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "pendingBalanceCreditCounter", + "docs": [ + "The total number of `Deposit` and `Transfer` instructions that have credited `pending_balance`." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "maximumPendingBalanceCreditCounter", + "docs": [ + "The maximum number of `Deposit` and `Transfer` instructions that can", + "credit `pending_balance` before the `ApplyPendingBalance`", + "instruction is executed." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "expectedPendingBalanceCreditCounter", + "docs": [ + "The `expected_pending_balance_credit_counter` value that was included in", + "the last `ApplyPendingBalance` instruction." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "actualPendingBalanceCreditCounter", + "docs": [ + "The actual `pending_balance_credit_counter` when the last", + "`ApplyPendingBalance` instruction was executed." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "defaultAccountState", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "state", + "docs": [], + "type": { + "kind": "definedTypeLinkNode", + "name": "accountState" + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "immutableOwner", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "memoTransfer", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "requireIncomingTransferMemos", + "docs": [ + "Require transfers into this account to be accompanied by a memo." + ], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "nonTransferable", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "interestBearingConfig", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "rateAuthority", + "docs": [], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "initializationTimestamp", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "preUpdateAverageRate", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "i16", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "lastUpdateTimestamp", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "currentRate", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "i16", + "endian": "le" + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "cpiGuard", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "lockCpi", + "docs": [ + "Lock certain token operations from taking place within CPI for this account." + ], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "permanentDelegate", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "delegate", + "docs": [], + "type": { + "kind": "publicKeyTypeNode" + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "nonTransferableAccount", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "transferHook", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "authority", + "docs": [ + "The transfer hook update authority." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "programId", + "docs": [ + "The transfer hook program account." + ], + "type": { + "kind": "publicKeyTypeNode" + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "transferHookAccount", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "transferring", + "docs": [ + "Whether or not this account is currently transferring tokens", + "True during the transfer hook cpi, otherwise false." + ], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "confidentialTransferFee", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "authority", + "docs": [ + "Optional authority to set the withdraw withheld authority ElGamal key." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "elgamalPubkey", + "docs": [ + "Withheld fees from accounts must be encrypted with this ElGamal key.", + "", + "Note that whoever holds the ElGamal private key for this ElGamal public", + "key has the ability to decode any withheld fee amount that are", + "associated with accounts. When combined with the fee parameters, the", + "withheld fee amounts can reveal information about transfer amounts." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "harvestToMintEnabled", + "docs": [ + "If `false`, the harvest of withheld tokens to mint is rejected." + ], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "withheldAmount", + "docs": [ + "Withheld confidential transfer fee tokens that have been moved to the", + "mint for withdrawal." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "encryptedBalance" + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "confidentialTransferFeeAmount", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "withheldAmount", + "docs": [ + "Amount withheld during confidential transfers, to be harvest to the mint." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "encryptedBalance" + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "metadataPointer", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "authority", + "docs": [ + "Optional authority that can set the metadata address." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "metadataAddress", + "docs": [ + "Optional Account Address that holds the metadata." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "tokenMetadata", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "updateAuthority", + "docs": [ + "The authority that can sign to update the metadata." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "mint", + "docs": [ + "The associated mint, used to counter spoofing to be sure that metadata belongs to a particular mint." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "name", + "docs": [ + "The longer name of the token." + ], + "type": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "symbol", + "docs": [ + "The shortened symbol for the token." + ], + "type": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "uri", + "docs": [ + "The URI pointing to richer metadata." + ], + "type": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "additionalMetadata", + "docs": [ + "Any additional metadata about the token as key-value pairs." + ], + "type": { + "kind": "mapTypeNode", + "key": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + }, + "value": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + }, + "count": { + "kind": "prefixedCountNode", + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "groupPointer", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "authority", + "docs": [ + "Optional authority that can set the group address." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "groupAddress", + "docs": [ + "Optional account address that holds the group." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "tokenGroup", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "updateAuthority", + "docs": [ + "The authority that can sign to update the group." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "mint", + "docs": [ + "The associated mint, used to counter spoofing to be sure that group belongs to a particular mint." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "size", + "docs": [ + "The current number of group members." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "maxSize", + "docs": [ + "The maximum number of group members." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "groupMemberPointer", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "authority", + "docs": [ + "Optional authority that can set the member address." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "memberAddress", + "docs": [ + "Optional account address that holds the member." + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "tokenGroupMember", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "mint", + "docs": [ + "The associated mint, used to counter spoofing to be sure that member belongs to a particular mint." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "group", + "docs": [ + "The pubkey of the `TokenGroup`." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "memberNumber", + "docs": [ + "The member number." + ], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "confidentialMintBurn", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "confidentialSupply", + "docs": [ + "The confidential supply of the mint (encrypted by `supply_elgamal_pubkey`)." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "encryptedBalance" + } + }, + { + "kind": "structFieldTypeNode", + "name": "decryptableSupply", + "docs": [ + "The decryptable confidential supply of the mint." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "decryptableBalance" + } + }, + { + "kind": "structFieldTypeNode", + "name": "supplyElgamalPubkey", + "docs": [ + "The ElGamal pubkey used to encrypt the confidential supply." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "pendingBurn", + "docs": [ + "The amount of burnt tokens that have not yet been applied to the confidential supply (encrypted by `supply_elgamal_pubkey`)." + ], + "type": { + "kind": "definedTypeLinkNode", + "name": "encryptedBalance" + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "scaledUiAmountConfig", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "authority", + "docs": [], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "multiplier", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "f64", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "newMultiplierEffectiveTimestamp", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "structFieldTypeNode", + "name": "newMultiplier", + "docs": [], + "type": { + "kind": "numberTypeNode", + "format": "f64", + "endian": "le" + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "pausableConfig", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "authority", + "docs": [], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + }, + { + "kind": "structFieldTypeNode", + "name": "paused", + "docs": [], + "type": { + "kind": "booleanTypeNode", + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "pausableAccount", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "enumStructVariantTypeNode", + "name": "permissionedBurn", + "struct": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "authority", + "docs": [ + "Authority that is required for burning" + ], + "type": { + "kind": "zeroableOptionTypeNode", + "item": { + "kind": "publicKeyTypeNode" + } + } + } + ] + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + } + ], + "size": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "definedTypeNode", + "name": "extensionType", + "docs": [ + "Extensions that can be applied to mints or accounts. Mint extensions must", + "only be applied to mint accounts, and account extensions must only be", + "applied to token holding accounts." + ], + "type": { + "kind": "enumTypeNode", + "variants": [ + { + "kind": "enumEmptyVariantTypeNode", + "name": "uninitialized", + "docs": [ + "Used as padding if the account size would otherwise be 355, same as a multisig" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "transferFeeConfig", + "docs": [ + "Includes transfer fee rate info and accompanying authorities to withdraw", + "and set the fee" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "transferFeeAmount", + "docs": [ + "Includes withheld transfer fees" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "mintCloseAuthority", + "docs": [ + "Includes an optional mint close authority" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "confidentialTransferMint", + "docs": [ + "Auditor configuration for confidential transfers" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "confidentialTransferAccount", + "docs": [ + "State for confidential transfers" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "defaultAccountState", + "docs": [ + "Specifies the default Account::state for new Accounts" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "immutableOwner", + "docs": [ + "Indicates that the Account owner authority cannot be changed" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "memoTransfer", + "docs": [ + "Require inbound transfers to have memo" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "nonTransferable", + "docs": [ + "Indicates that the tokens from this mint can't be transferred" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "interestBearingConfig", + "docs": [ + "Tokens accrue interest over time," + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "cpiGuard", + "docs": [ + "Locks privileged token operations from happening via CPI" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "permanentDelegate", + "docs": [ + "Includes an optional permanent delegate" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "nonTransferableAccount", + "docs": [ + "Indicates that the tokens in this account belong to a non-transferable", + "mint" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "transferHook", + "docs": [ + "Mint requires a CPI to a program implementing the \"transfer hook\"", + "interface" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "transferHookAccount", + "docs": [ + "Indicates that the tokens in this account belong to a mint with a", + "transfer hook" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "confidentialTransferFee", + "docs": [ + "Includes encrypted withheld fees and the encryption public that they are", + "encrypted under" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "confidentialTransferFeeAmount", + "docs": [ + "Includes confidential withheld transfer fees" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "metadataPointer", + "docs": [ + "Mint contains a pointer to another account (or the same account) that", + "holds metadata" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "tokenMetadata", + "docs": [ + "Mint contains token-metadata" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "groupPointer", + "docs": [ + "Mint contains a pointer to another account (or the same account) that", + "holds group configurations" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "tokenGroup", + "docs": [ + "Mint contains token group configurations" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "groupMemberPointer", + "docs": [ + "Mint contains a pointer to another account (or the same account) that", + "holds group member configurations" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "tokenGroupMember", + "docs": [ + "Mint contains token group member configurations" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "confidentialMintBurn", + "docs": [ + "Mint allowing the minting and burning of confidential tokens" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "scaledUiAmountConfig", + "docs": [ + "Tokens whose UI amount is scaled by a given amount" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "pausableConfig", + "docs": [ + "Mint contains pausable configuration" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "pausableAccount", + "docs": [ + "Account contains pausable configuration" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "permissionedBurn", + "docs": [ + "Mint requires a permissioned burn authority to sign for any burn" + ] + } + ], + "size": { + "kind": "numberTypeNode", + "format": "u16", + "endian": "le" + } + } + }, + { + "kind": "definedTypeNode", + "name": "tokenMetadataField", + "docs": [ + "Fields in the metadata account, used for updating." + ], + "type": { + "kind": "enumTypeNode", + "variants": [ + { + "kind": "enumEmptyVariantTypeNode", + "name": "name", + "docs": [ + "The name field, corresponding to `TokenMetadata.name`" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "symbol", + "docs": [ + "The symbol field, corresponding to `TokenMetadata.symbol`" + ] + }, + { + "kind": "enumEmptyVariantTypeNode", + "name": "uri", + "docs": [ + "The uri field, corresponding to `TokenMetadata.uri`" + ] + }, + { + "kind": "enumTupleVariantTypeNode", + "name": "key", + "docs": [ + "A user field, whose key is given by the associated string" + ], + "tuple": { + "kind": "tupleTypeNode", + "items": [ + { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "stringTypeNode", + "encoding": "utf8" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + ] + } + } + ], + "size": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + } + } + } + ], + "pdas": [], + "errors": [ + { + "kind": "errorNode", + "name": "notRentExempt", + "code": 0, + "message": "Lamport balance below rent-exempt threshold", + "docs": [ + "NotRentExempt: Lamport balance below rent-exempt threshold" + ] + }, + { + "kind": "errorNode", + "name": "insufficientFunds", + "code": 1, + "message": "Insufficient funds", + "docs": [ + "InsufficientFunds: Insufficient funds" + ] + }, + { + "kind": "errorNode", + "name": "invalidMint", + "code": 2, + "message": "Invalid Mint", + "docs": [ + "InvalidMint: Invalid Mint" + ] + }, + { + "kind": "errorNode", + "name": "mintMismatch", + "code": 3, + "message": "Account not associated with this Mint", + "docs": [ + "MintMismatch: Account not associated with this Mint" + ] + }, + { + "kind": "errorNode", + "name": "ownerMismatch", + "code": 4, + "message": "Owner does not match", + "docs": [ + "OwnerMismatch: Owner does not match" + ] + }, + { + "kind": "errorNode", + "name": "fixedSupply", + "code": 5, + "message": "Fixed supply", + "docs": [ + "FixedSupply: Fixed supply" + ] + }, + { + "kind": "errorNode", + "name": "alreadyInUse", + "code": 6, + "message": "Already in use", + "docs": [ + "AlreadyInUse: Already in use" + ] + }, + { + "kind": "errorNode", + "name": "invalidNumberOfProvidedSigners", + "code": 7, + "message": "Invalid number of provided signers", + "docs": [ + "InvalidNumberOfProvidedSigners: Invalid number of provided signers" + ] + }, + { + "kind": "errorNode", + "name": "invalidNumberOfRequiredSigners", + "code": 8, + "message": "Invalid number of required signers", + "docs": [ + "InvalidNumberOfRequiredSigners: Invalid number of required signers" + ] + }, + { + "kind": "errorNode", + "name": "uninitializedState", + "code": 9, + "message": "State is unititialized", + "docs": [ + "UninitializedState: State is unititialized" + ] + }, + { + "kind": "errorNode", + "name": "nativeNotSupported", + "code": 10, + "message": "Instruction does not support native tokens", + "docs": [ + "NativeNotSupported: Instruction does not support native tokens" + ] + }, + { + "kind": "errorNode", + "name": "nonNativeHasBalance", + "code": 11, + "message": "Non-native account can only be closed if its balance is zero", + "docs": [ + "NonNativeHasBalance: Non-native account can only be closed if its balance is zero" + ] + }, + { + "kind": "errorNode", + "name": "invalidInstruction", + "code": 12, + "message": "Invalid instruction", + "docs": [ + "InvalidInstruction: Invalid instruction" + ] + }, + { + "kind": "errorNode", + "name": "invalidState", + "code": 13, + "message": "State is invalid for requested operation", + "docs": [ + "InvalidState: State is invalid for requested operation" + ] + }, + { + "kind": "errorNode", + "name": "overflow", + "code": 14, + "message": "Operation overflowed", + "docs": [ + "Overflow: Operation overflowed" + ] + }, + { + "kind": "errorNode", + "name": "authorityTypeNotSupported", + "code": 15, + "message": "Account does not support specified authority type", + "docs": [ + "AuthorityTypeNotSupported: Account does not support specified authority type" + ] + }, + { + "kind": "errorNode", + "name": "mintCannotFreeze", + "code": 16, + "message": "This token mint cannot freeze accounts", + "docs": [ + "MintCannotFreeze: This token mint cannot freeze accounts" + ] + }, + { + "kind": "errorNode", + "name": "accountFrozen", + "code": 17, + "message": "Account is frozen", + "docs": [ + "AccountFrozen: Account is frozen" + ] + }, + { + "kind": "errorNode", + "name": "mintDecimalsMismatch", + "code": 18, + "message": "The provided decimals value different from the Mint decimals", + "docs": [ + "MintDecimalsMismatch: The provided decimals value different from the Mint decimals" + ] + }, + { + "kind": "errorNode", + "name": "nonNativeNotSupported", + "code": 19, + "message": "Instruction does not support non-native tokens", + "docs": [ + "NonNativeNotSupported: Instruction does not support non-native tokens" + ] + } + ] + }, + "additionalPrograms": [ + { + "kind": "programNode", + "name": "associatedToken", + "publicKey": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", + "version": "1.1.1", + "origin": "shank", + "docs": [], + "accounts": [], + "instructions": [ + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "payer", + "isWritable": true, + "isSigner": true, + "isOptional": false, + "docs": [ + "Funding account (must be a system account)." + ], + "defaultValue": { + "kind": "payerValueNode" + } + }, + { + "kind": "instructionAccountNode", + "name": "ata", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "Associated token account address to be created." + ], + "defaultValue": { + "kind": "pdaValueNode", + "pda": { + "kind": "pdaLinkNode", + "name": "associatedToken" + }, + "seeds": [ + { + "kind": "pdaSeedValueNode", + "name": "owner", + "value": { + "kind": "accountValueNode", + "name": "owner" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "tokenProgram", + "value": { + "kind": "accountValueNode", + "name": "tokenProgram" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "mint", + "value": { + "kind": "accountValueNode", + "name": "mint" + } + } + ] + } + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Wallet address for the new associated token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint for the new associated token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "systemProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "System program." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "11111111111111111111111111111111" + } + }, + { + "kind": "instructionAccountNode", + "name": "tokenProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "SPL Token program." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "createAssociatedToken", + "docs": [ + "Creates an associated token account for the given wallet address and", + "token mint Returns an error if the account exists." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "payer", + "isWritable": true, + "isSigner": true, + "isOptional": false, + "docs": [ + "Funding account (must be a system account)." + ], + "defaultValue": { + "kind": "payerValueNode" + } + }, + { + "kind": "instructionAccountNode", + "name": "ata", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "Associated token account address to be created." + ], + "defaultValue": { + "kind": "pdaValueNode", + "pda": { + "kind": "pdaLinkNode", + "name": "associatedToken" + }, + "seeds": [ + { + "kind": "pdaSeedValueNode", + "name": "owner", + "value": { + "kind": "accountValueNode", + "name": "owner" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "tokenProgram", + "value": { + "kind": "accountValueNode", + "name": "tokenProgram" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "mint", + "value": { + "kind": "accountValueNode", + "name": "mint" + } + } + ] + } + }, + { + "kind": "instructionAccountNode", + "name": "owner", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Wallet address for the new associated token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "mint", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "The token mint for the new associated token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "systemProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "System program." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "11111111111111111111111111111111" + } + }, + { + "kind": "instructionAccountNode", + "name": "tokenProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "SPL Token program." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "createAssociatedTokenIdempotent", + "docs": [ + "Creates an associated token account for the given wallet address and", + "token mint, if it doesn't already exist. Returns an error if the", + "account exists, but with a different owner." + ], + "optionalAccountStrategy": "programId" + }, + { + "kind": "instructionNode", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "nestedAssociatedAccountAddress", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "Nested associated token account, must be owned by `ownerAssociatedAccountAddress`." + ], + "defaultValue": { + "kind": "pdaValueNode", + "pda": { + "kind": "pdaLinkNode", + "name": "associatedToken" + }, + "seeds": [ + { + "kind": "pdaSeedValueNode", + "name": "owner", + "value": { + "kind": "accountValueNode", + "name": "ownerAssociatedAccountAddress" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "tokenProgram", + "value": { + "kind": "accountValueNode", + "name": "tokenProgram" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "mint", + "value": { + "kind": "accountValueNode", + "name": "nestedTokenMintAddress" + } + } + ] + } + }, + { + "kind": "instructionAccountNode", + "name": "nestedTokenMintAddress", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Token mint for the nested associated token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "destinationAssociatedAccountAddress", + "isWritable": true, + "isSigner": false, + "isOptional": false, + "docs": [ + "Wallet's associated token account." + ], + "defaultValue": { + "kind": "pdaValueNode", + "pda": { + "kind": "pdaLinkNode", + "name": "associatedToken" + }, + "seeds": [ + { + "kind": "pdaSeedValueNode", + "name": "owner", + "value": { + "kind": "accountValueNode", + "name": "walletAddress" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "tokenProgram", + "value": { + "kind": "accountValueNode", + "name": "tokenProgram" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "mint", + "value": { + "kind": "accountValueNode", + "name": "nestedTokenMintAddress" + } + } + ] + } + }, + { + "kind": "instructionAccountNode", + "name": "ownerAssociatedAccountAddress", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Owner associated token account address, must be owned by `walletAddress`." + ], + "defaultValue": { + "kind": "pdaValueNode", + "pda": { + "kind": "pdaLinkNode", + "name": "associatedToken" + }, + "seeds": [ + { + "kind": "pdaSeedValueNode", + "name": "owner", + "value": { + "kind": "accountValueNode", + "name": "walletAddress" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "tokenProgram", + "value": { + "kind": "accountValueNode", + "name": "tokenProgram" + } + }, + { + "kind": "pdaSeedValueNode", + "name": "mint", + "value": { + "kind": "accountValueNode", + "name": "ownerTokenMintAddress" + } + } + ] + } + }, + { + "kind": "instructionAccountNode", + "name": "ownerTokenMintAddress", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "Token mint for the owner associated token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "walletAddress", + "isWritable": true, + "isSigner": true, + "isOptional": false, + "docs": [ + "Wallet address for the owner associated token account." + ] + }, + { + "kind": "instructionAccountNode", + "name": "tokenProgram", + "isWritable": false, + "isSigner": false, + "isOptional": false, + "docs": [ + "SPL Token program." + ], + "defaultValue": { + "kind": "publicKeyValueNode", + "publicKey": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" + } + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "docs": [], + "defaultValue": { + "kind": "numberValueNode", + "number": 2 + }, + "defaultValueStrategy": "omitted" + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ], + "name": "recoverNestedAssociatedToken", + "docs": [ + "Transfers from and closes a nested associated token account: an", + "associated token account owned by an associated token account.", + "", + "The tokens are moved from the nested associated token account to the", + "wallet's associated token account, and the nested account lamports are", + "moved to the wallet.", + "", + "Note: Nested token accounts are an anti-pattern, and almost always", + "created unintentionally, so this instruction should only be used to", + "recover from errors." + ], + "optionalAccountStrategy": "programId" + } + ], + "definedTypes": [], + "pdas": [ + { + "kind": "pdaNode", + "name": "associatedToken", + "docs": [], + "seeds": [ + { + "kind": "variablePdaSeedNode", + "name": "owner", + "docs": [ + "The wallet address of the associated token account." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "variablePdaSeedNode", + "name": "tokenProgram", + "docs": [ + "The address of the token program to use." + ], + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "variablePdaSeedNode", + "name": "mint", + "docs": [ + "The mint address of the associated token account." + ], + "type": { + "kind": "publicKeyTypeNode" + } + } + ] + } + ], + "errors": [ + { + "kind": "errorNode", + "name": "invalidOwner", + "code": 0, + "message": "Associated token account owner does not match address derivation", + "docs": [ + "InvalidOwner: Associated token account owner does not match address derivation" + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/idls/stable.HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn.swap_hylo_exchange.V0_1_4.from_solscan.json b/idls/stable.HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn.swap_hylo_exchange.V0_1_4.from_solscan.json new file mode 100644 index 0000000..c0b9b12 --- /dev/null +++ b/idls/stable.HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn.swap_hylo_exchange.V0_1_4.from_solscan.json @@ -0,0 +1,8096 @@ +{ + "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/stable.JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr.swap_jupiter_stable.V0_1_0.from_solscan.json b/idls/stable.JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr.swap_jupiter_stable.V0_1_0.from_solscan.json new file mode 100644 index 0000000..c8051f2 --- /dev/null +++ b/idls/stable.JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr.swap_jupiter_stable.V0_1_0.from_solscan.json @@ -0,0 +1,2585 @@ +{ + "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/stable.NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P.swap_numeraire.V0_1_0.from_solscan.json b/idls/stable.NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P.swap_numeraire.V0_1_0.from_solscan.json new file mode 100644 index 0000000..3e6b63f --- /dev/null +++ b/idls/stable.NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P.swap_numeraire.V0_1_0.from_solscan.json @@ -0,0 +1,3375 @@ +{ + "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/stable.swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ.swap_stabble.V1_5_0.from_solscan.json b/idls/stable.swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ.swap_stabble.V1_5_0.from_solscan.json new file mode 100644 index 0000000..10218d7 --- /dev/null +++ b/idls/stable.swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ.swap_stabble.V1_5_0.from_solscan.json @@ -0,0 +1,1131 @@ +{ + "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/staking.4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7.jito_tip_distribution.V0_1_5.from_solscan.json b/idls/staking.4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7.jito_tip_distribution.V0_1_5.from_solscan.json new file mode 100644 index 0000000..28fc5e5 --- /dev/null +++ b/idls/staking.4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7.jito_tip_distribution.V0_1_5.from_solscan.json @@ -0,0 +1,1143 @@ +{ + "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/staking.FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr.kamino_farm.V1_6_5.from_solscan.json b/idls/staking.FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr.kamino_farm.V1_6_5.from_solscan.json new file mode 100644 index 0000000..457a478 --- /dev/null +++ b/idls/staking.FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr.kamino_farm.V1_6_5.from_solscan.json @@ -0,0 +1,2163 @@ +{ + "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/staking.MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD.marinade_finance.V0_1_0.from_solscan.json b/idls/staking.MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD.marinade_finance.V0_1_0.from_solscan.json new file mode 100644 index 0000000..92d65e7 --- /dev/null +++ b/idls/staking.MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD.marinade_finance.V0_1_0.from_solscan.json @@ -0,0 +1,4303 @@ +{ + "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/storage.recr1L3PCGKLbckBqMNcJhuuyU1zgo8nBhfLVsJNwr5.solana_record.V0_4_0.from_github_solana_program.json b/idls/storage.recr1L3PCGKLbckBqMNcJhuuyU1zgo8nBhfLVsJNwr5.solana_record.V0_4_0.from_github_solana_program.json new file mode 100644 index 0000000..1959a22 --- /dev/null +++ b/idls/storage.recr1L3PCGKLbckBqMNcJhuuyU1zgo8nBhfLVsJNwr5.solana_record.V0_4_0.from_github_solana_program.json @@ -0,0 +1,325 @@ +{ + "kind": "rootNode", + "standard": "codama", + "version": "1.0.0", + "program": { + "kind": "programNode", + "name": "record", + "publicKey": "recr1L3PCGKLbckBqMNcJhuuyU1zgo8nBhfLVsJNwr5", + "version": "0.4.0", + "accounts": [ + { + "kind": "accountNode", + "name": "recordData", + "data": { + "kind": "structTypeNode", + "fields": [ + { + "kind": "structFieldTypeNode", + "name": "version", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + }, + { + "kind": "structFieldTypeNode", + "name": "authority", + "type": { + "kind": "publicKeyTypeNode" + } + }, + { + "kind": "structFieldTypeNode", + "name": "payload", + "type": { + "kind": "bytesTypeNode" + } + } + ] + }, + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "version", + "offset": 0 + } + ] + } + ], + "instructions": [ + { + "kind": "instructionNode", + "name": "initialize", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "recordAccount", + "isWritable": true, + "isSigner": false + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": false + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 0 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "write", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "recordAccount", + "isWritable": true, + "isSigner": false + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": true + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 1 + } + }, + { + "kind": "instructionArgumentNode", + "name": "offset", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + }, + { + "kind": "instructionArgumentNode", + "name": "data", + "type": { + "kind": "sizePrefixTypeNode", + "type": { + "kind": "bytesTypeNode" + }, + "prefix": { + "kind": "numberTypeNode", + "format": "u32", + "endian": "le" + } + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "setAuthority", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "recordAccount", + "isWritable": true, + "isSigner": false + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": true + }, + { + "kind": "instructionAccountNode", + "name": "newAuthority", + "isWritable": false, + "isSigner": false + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 2 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "closeAccount", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "recordAccount", + "isWritable": true, + "isSigner": false + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": true + }, + { + "kind": "instructionAccountNode", + "name": "receiver", + "isWritable": true, + "isSigner": false + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 3 + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + }, + { + "kind": "instructionNode", + "name": "reallocate", + "accounts": [ + { + "kind": "instructionAccountNode", + "name": "recordAccount", + "isWritable": true, + "isSigner": false + }, + { + "kind": "instructionAccountNode", + "name": "authority", + "isWritable": false, + "isSigner": true + } + ], + "arguments": [ + { + "kind": "instructionArgumentNode", + "name": "discriminator", + "defaultValueStrategy": "omitted", + "type": { + "kind": "numberTypeNode", + "format": "u8", + "endian": "le" + }, + "defaultValue": { + "kind": "numberValueNode", + "number": 4 + } + }, + { + "kind": "instructionArgumentNode", + "name": "dataLength", + "type": { + "kind": "numberTypeNode", + "format": "u64", + "endian": "le" + } + } + ], + "discriminators": [ + { + "kind": "fieldDiscriminatorNode", + "name": "discriminator", + "offset": 0 + } + ] + } + ], + "definedTypes": [], + "pdas": [], + "errors": [ + { + "kind": "errorNode", + "name": "incorrectAuthority", + "code": 0, + "message": "Incorrect authority provided on update or delete" + }, + { + "kind": "errorNode", + "name": "overflow", + "code": 1, + "message": "Calculation overflow" + } + ] + }, + "additionalPrograms": [] +} \ No newline at end of file diff --git a/idls/strategy.DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M.jupiter_dca.V0_1_0.from_solscan.json b/idls/strategy.DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M.jupiter_dca.V0_1_0.from_solscan.json new file mode 100644 index 0000000..9335ed5 --- /dev/null +++ b/idls/strategy.DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M.jupiter_dca.V0_1_0.from_solscan.json @@ -0,0 +1,1530 @@ +{ + "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/strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m.streamflow.json b/idls/strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m.streamflow.json deleted file mode 100644 index 3068154..0000000 --- a/idls/strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m.streamflow.json +++ /dev/null @@ -1 +0,0 @@ -{"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/swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW.stabble_weighted_swap.json b/idls/swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW.stabble_weighted_swap.json deleted file mode 100644 index d735135..0000000 --- a/idls/swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW.stabble_weighted_swap.json +++ /dev/null @@ -1 +0,0 @@ -{"address":"swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW","metadata":{"name":"weighted_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":"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":"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":"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":"swap_fee","type":"u64"},{"name":"weights","type":{"vec":"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":"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":"invariant","type":"u64"},{"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":"weight","type":"u64"}]}},{"name":"PoolUpdatedData","type":{"kind":"struct","fields":[{"name":"is_active","type":"bool"},{"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":"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"}}]}}]} diff --git a/idls/swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ.stabble_stable_swap.json b/idls/swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ.stabble_stable_swap.json deleted file mode 100644 index 77d460f..0000000 --- a/idls/swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ.stabble_stable_swap.json +++ /dev/null @@ -1 +0,0 @@ -{"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/treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5.helium_treasury_management.json b/idls/treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5.helium_treasury_management.json deleted file mode 100644 index ce12606..0000000 --- a/idls/treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5.helium_treasury_management.json +++ /dev/null @@ -1 +0,0 @@ -{"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/treasury.treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5.helium_treasury_management.V0_2_3.from_solscan.json b/idls/treasury.treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5.helium_treasury_management.V0_2_3.from_solscan.json new file mode 100644 index 0000000..ceb2c44 --- /dev/null +++ b/idls/treasury.treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5.helium_treasury_management.V0_2_3.from_solscan.json @@ -0,0 +1,693 @@ +{ + "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/vault.24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi.meteora.V0_7_2.from_solscan.json b/idls/vault.24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi.meteora.V0_7_2.from_solscan.json new file mode 100644 index 0000000..4b09119 --- /dev/null +++ b/idls/vault.24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi.meteora.V0_7_2.from_solscan.json @@ -0,0 +1,1555 @@ +{ + "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/vault.6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc.kamino_yvaults.V0_1_0.from_solscan.json b/idls/vault.6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc.kamino_yvaults.V0_1_0.from_solscan.json new file mode 100644 index 0000000..142800a --- /dev/null +++ b/idls/vault.6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc.kamino_yvaults.V0_1_0.from_solscan.json @@ -0,0 +1,7282 @@ +{ + "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/vault.CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s.carrot_defi.V0_1_0.from_solscan.json b/idls/vault.CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s.carrot_defi.V0_1_0.from_solscan.json new file mode 100644 index 0000000..1149b7e --- /dev/null +++ b/idls/vault.CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s.carrot_defi.V0_1_0.from_solscan.json @@ -0,0 +1,4336 @@ +{ + "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/vault.HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ.hylo_stability_pool.V0_1_4.from_solscan.json b/idls/vault.HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ.hylo_stability_pool.V0_1_4.from_solscan.json new file mode 100644 index 0000000..fa05e69 --- /dev/null +++ b/idls/vault.HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ.hylo_stability_pool.V0_1_4.from_solscan.json @@ -0,0 +1,4721 @@ +{ + "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/vault.KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd.kamino_v2.V2_1_1.from_solscan.json b/idls/vault.KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd.kamino_v2.V2_1_1.from_solscan.json new file mode 100644 index 0000000..0302da3 --- /dev/null +++ b/idls/vault.KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd.kamino_v2.V2_1_1.from_solscan.json @@ -0,0 +1,3181 @@ +{ + "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/vault.kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr.kamino.V0_1_0.from_solscan.json b/idls/vault.kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr.kamino.V0_1_0.from_solscan.json new file mode 100644 index 0000000..aca6086 --- /dev/null +++ b/idls/vault.kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr.kamino.V0_1_0.from_solscan.json @@ -0,0 +1,2192 @@ +{ + "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/vesting.LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn.jupiter_lock.V0_4_0.from_solscan.json b/idls/vesting.LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn.jupiter_lock.V0_4_0.from_solscan.json new file mode 100644 index 0000000..319f2e5 --- /dev/null +++ b/idls/vesting.LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn.jupiter_lock.V0_4_0.from_solscan.json @@ -0,0 +1,3143 @@ +{ + "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/vesting.strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m.streamflow.V0_1_0.from_solscan.json b/idls/vesting.strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m.streamflow.V0_1_0.from_solscan.json new file mode 100644 index 0000000..fdefda6 --- /dev/null +++ b/idls/vesting.strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m.streamflow.V0_1_0.from_solscan.json @@ -0,0 +1,795 @@ +{ + "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/vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ.vertigo.json b/idls/vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ.vertigo.json deleted file mode 100644 index 4998453..0000000 --- a/idls/vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ.vertigo.json +++ /dev/null @@ -1 +0,0 @@ -{"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/wallet.JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw.jupiter_apepro_smart_wallet.V0_1_0.from_solscan.json b/idls/wallet.JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw.jupiter_apepro_smart_wallet.V0_1_0.from_solscan.json new file mode 100644 index 0000000..0b769f0 --- /dev/null +++ b/idls/wallet.JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw.jupiter_apepro_smart_wallet.V0_1_0.from_solscan.json @@ -0,0 +1,981 @@ +{ + "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/waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF.orca_wavebreak.json b/idls/waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF.orca_wavebreak.json deleted file mode 100644 index 2c861b2..0000000 --- a/idls/waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF.orca_wavebreak.json +++ /dev/null @@ -1 +0,0 @@ -{"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/weighted.swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW.swap_stabble.V1_5_0.from_solscan.json b/idls/weighted.swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW.swap_stabble.V1_5_0.from_solscan.json new file mode 100644 index 0000000..c806748 --- /dev/null +++ b/idls/weighted.swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW.swap_stabble.V1_5_0.from_solscan.json @@ -0,0 +1,825 @@ +{ + "address": "swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW", + "metadata": { + "name": "weighted_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": "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": "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": "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": "swap_fee", + "type": "u64" + }, + { + "name": "weights", + "type": { + "vec": "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": "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": "invariant", + "type": "u64" + }, + { + "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": "weight", + "type": "u64" + } + ] + } + }, + { + "name": "PoolUpdatedData", + "type": { + "kind": "struct", + "fields": [ + { + "name": "is_active", + "type": "bool" + }, + { + "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": "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/whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.orca_whirlpool.json b/idls/whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.orca_whirlpool.json deleted file mode 100644 index 7a4dee9..0000000 --- a/idls/whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.orca_whirlpool.json +++ /dev/null @@ -1 +0,0 @@ -{"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_v1.zip b/idls_v1.zip new file mode 100644 index 0000000..f8b1236 Binary files /dev/null and b/idls_v1.zip differ diff --git a/idls_v2.zip b/idls_v2.zip new file mode 100644 index 0000000..1bef91a Binary files /dev/null and b/idls_v2.zip differ diff --git a/kb-app-demo-desktop/frontend/demo_execution_solana_core.html b/kb-app-demo-desktop/frontend/demo_execution_solana_core.html index 3e6d1b0..fbe5a62 100644 --- a/kb-app-demo-desktop/frontend/demo_execution_solana_core.html +++ b/kb-app-demo-desktop/frontend/demo_execution_solana_core.html @@ -1,5 +1,5 @@ - + @@ -42,7 +42,7 @@
-

System Program

solana_native_classifier +

System Program

solana.core
@@ -72,14 +72,14 @@
-

Résumé

+

Résumé

-

Plan exact

-

Simulation exacte

-

Confirmation et replay

+

Plan exact

+

Simulation exacte

+

Confirmation et replay

diff --git a/kb-app-demo-desktop/frontend/demo_execution_spl.html b/kb-app-demo-desktop/frontend/demo_execution_spl.html index bdec66e..48b0e9e 100644 --- a/kb-app-demo-desktop/frontend/demo_execution_spl.html +++ b/kb-app-demo-desktop/frontend/demo_execution_spl.html @@ -1,5 +1,5 @@ - + @@ -269,7 +269,7 @@
- +
@@ -279,7 +279,7 @@
- +
@@ -289,7 +289,7 @@
- +
@@ -358,7 +358,7 @@ - + @@ -399,7 +399,7 @@ - + @@ -411,7 +411,7 @@

Résumé

- +
diff --git a/kb-app-demo-desktop/frontend/main.html b/kb-app-demo-desktop/frontend/main.html index 6907869..5a39646 100644 --- a/kb-app-demo-desktop/frontend/main.html +++ b/kb-app-demo-desktop/frontend/main.html @@ -57,7 +57,7 @@
  • - +
  • Solana Core
  • SPL
  • diff --git a/kb-app-demo-desktop/frontend/ts/demo_execution_solana_core.ts b/kb-app-demo-desktop/frontend/ts/demo_execution_solana_core.ts index def07e6..54e1ed0 100644 --- a/kb-app-demo-desktop/frontend/ts/demo_execution_solana_core.ts +++ b/kb-app-demo-desktop/frontend/ts/demo_execution_solana_core.ts @@ -1,5 +1,5 @@ // file: kb-app-demo-desktop/frontend/ts/demo_execution_solana_core.ts -// version: 7 +// version: 10 import * as bootstrap from "bootstrap"; import "simplebar"; @@ -7,6 +7,7 @@ import ResizeObserver from "resize-observer-polyfill"; import { invoke } from "@tauri-apps/api/core"; import { listen } from "@tauri-apps/api/event"; import { frontendDebug, frontendError, frontendWarn, installFrontendConsoleBridge } from "./frontend_log"; +import type { DemoExecutionDevnetStoreReadinessPayload } from "./bindings/kb_app_demo_desktop/demo_execution_solana_core/DemoExecutionDevnetStoreReadinessPayload.ts"; import type { DemoExecutionSolanaCoreGeneratedRecipientPayload } from "./bindings/kb_app_demo_desktop/demo_execution_solana_core/DemoExecutionSolanaCoreGeneratedRecipientPayload.ts"; import type { DemoExecutionSolanaCoreOptionsPayload } from "./bindings/kb_app_demo_desktop/demo_execution_solana_core/DemoExecutionSolanaCoreOptionsPayload.ts"; import type { DemoExecutionSolanaCoreProfileOption } from "./bindings/kb_app_demo_desktop/demo_execution_solana_core/DemoExecutionSolanaCoreProfileOption.ts"; @@ -17,15 +18,20 @@ import type { DemoExecutionSolanaCoreSummaryPayload } from "./bindings/kb_app_de (window as Window & typeof globalThis & { ResizeObserver?: typeof ResizeObserver }).ResizeObserver = ResizeObserver; const logLines: string[] = []; let running = false; +let profileStoreReady = false; let profileOptions: DemoExecutionSolanaCoreProfileOption[] = []; function element(selector: string): T { const value=document.querySelector(selector); if(!value){throw new Error(`Missing UI element: ${selector}`);} return value; } function integerValue(selector: string): number { const value=Number.parseInt(element(selector).value,10); if(!Number.isFinite(value)||value<0){throw new Error(`Valeur numérique invalide pour ${selector}`);} return value; } function selectedProfile(): DemoExecutionSolanaCoreProfileOption|null { const name=element("#executionProfileSelect").value; return profileOptions.find(profile=>profile.name===name)??null; } function appendLog(payload: DemoExecutionSolanaCoreProgressPayload|{timestamp:string;level:string;stage:string;message:string;signature?:string|null}):void { const signature=payload.signature?` signature=${payload.signature}`:""; logLines.push(`${payload.timestamp} ${payload.level.toUpperCase()} [${payload.stage}] ${payload.message}${signature}`); const output=element("#executionLogOutput"); output.value=logLines.join("\n"); output.scrollTop=output.scrollHeight; } -function setRunning(value:boolean):void { running=value; const profile=selectedProfile(); element("#simulateExecutionButton").disabled=value||!profile; element("#submitExecutionButton").disabled=value||!profile||!profile.sendEnabled; element("#generateRecipientButton").disabled=value; element("#cancelExecutionButton").disabled=!value; const badge=element("#executionStatusBadge"); badge.textContent=value?"Exécution en cours":"Prêt"; badge.className=value?"badge text-bg-warning":"badge text-bg-success"; } +function setRunning(value:boolean):void { running=value; const profile=selectedProfile(); element("#simulateExecutionButton").disabled=value||!profile||!profileStoreReady; element("#submitExecutionButton").disabled=value||!profile||!profileStoreReady||!profile.sendEnabled; element("#generateRecipientButton").disabled=value; element("#cancelExecutionButton").disabled=!value; const badge=element("#executionStatusBadge"); badge.textContent=value?"Exécution en cours":"Prêt"; badge.className=value?"badge text-bg-warning":"badge text-bg-success"; } function updateProfileHelp():void { const profile=selectedProfile(); const help=element("#executionProfileHelp"); if(!profile){help.textContent="Aucun profil Devnet compatible.";return;} help.textContent=`wallet=${profile.walletAlias}, spendMax=${profile.maxSpendLamports}, airdropMax=${profile.maxAirdropLamports}, send=${profile.sendEnabled?"enabled":"disabled"}`; element("#executionAirdropInput").max=String(profile.maxAirdropLamports); element("#executionLamportsInput").max=String(profile.maxSpendLamports); setRunning(running); } function buildRequest(submit:boolean):DemoExecutionSolanaCoreRequest { const recipient=element("#executionRecipientInput").value.trim(); if(recipient.length===0){throw new Error("Le destinataire est obligatoire.");} return {profileName:element("#executionProfileSelect").value,recipient,lamports:integerValue("#executionLamportsInput"),airdropLamports:integerValue("#executionAirdropInput"),submit,operatorConfirmed:element("#executionOperatorConfirmedInput").checked,forcePostValidationReplay:element("#executionForceReplayInput").checked,materializeAfterDecode:element("#executionMaterializeInput").checked}; } -function displaySummary(summary:DemoExecutionSolanaCoreSummaryPayload):void { element("#executionSummaryOutput").value=JSON.stringify(summary,null,2); element("#executionPlanOutput").value=summary.planJson; element("#executionSimulationOutput").value=summary.simulationJson; element("#executionDiagnosticsOutput").value=summary.diagnosticsJson; } -async function execute(submit:boolean):Promise{if(running){return;}try{const request=buildRequest(submit);if(submit&&!request.operatorConfirmed){frontendWarn("kb-app-demo-desktop.frontend.demo_execution_solana_core","Submission blocked: operator confirmation missing");return;}setRunning(true);const summary=await invoke("demo_execution_solana_core_execute",{request});displaySummary(summary);}catch(caughtError){const message=caughtError instanceof Error?caughtError.message:String(caughtError);frontendError("kb-app-demo-desktop.frontend.demo_execution_solana_core",`Execution failed: ${message}`);}finally{setRunning(false);}} -async function loadOptions():Promise{const options=await invoke("demo_execution_solana_core_options");profileOptions=options.profiles;const select=element("#executionProfileSelect");select.replaceChildren();for(const profile of profileOptions){const option=document.createElement("option");option.value=profile.name;option.textContent=profile.name;option.selected=profile.name===options.defaultProfileName;select.append(option);}element("#executionLamportsInput").value=String(options.defaultTransferLamports);updateProfileHelp();setRunning(options.running);} -document.addEventListener("DOMContentLoaded",async()=>{installFrontendConsoleBridge("kb-app-demo-desktop.frontend.demo_execution_solana_core");frontendDebug("kb-app-demo-desktop.frontend.demo_execution_solana_core","Solana Core execution window loaded");await listen("demo-execution-solana-core-progress",event=>appendLog(event.payload));element("#executionProfileSelect").addEventListener("change",updateProfileHelp);element("#generateRecipientButton").addEventListener("click",async()=>{const payload=await invoke("demo_execution_solana_core_generate_recipient");element("#executionRecipientInput").value=payload.publicKey;});element("#simulateExecutionButton").addEventListener("click",()=>void execute(false));element("#submitExecutionButton").addEventListener("click",()=>void execute(true));element("#cancelExecutionButton").addEventListener("click",()=>void invoke("demo_execution_solana_core_cancel"));element("#executionLogOutput").addEventListener("app-log-clear",()=>{logLines.length=0;});try{await loadOptions();}catch(caughtError){const message=caughtError instanceof Error?caughtError.message:String(caughtError);frontendError("kb-app-demo-desktop.frontend.demo_execution_solana_core",`Options loading failed: ${message}`);}}); +function titledJson(title:string,value:string):string { try { const parsed:unknown=JSON.parse(value); if(parsed!==null&&typeof parsed==="object"&&!Array.isArray(parsed)){return JSON.stringify({title,...parsed},null,2);} return JSON.stringify({title,value:parsed},null,2); } catch { return JSON.stringify({title,status:"invalid_json",raw:value},null,2); } } +function displaySummary(summary:DemoExecutionSolanaCoreSummaryPayload):void { element("#executionSummaryOutput").value=JSON.stringify({title:"Résumé",...summary},null,2); element("#executionPlanOutput").value=titledJson("Plan exact",summary.planJson); element("#executionSimulationOutput").value=titledJson("Simulation exacte",summary.simulationJson); element("#executionDiagnosticsOutput").value=titledJson("Confirmation et replay",summary.diagnosticsJson); } +function displayExecutionFailure(message:string,submit:boolean):void { element("#executionSummaryOutput").value=JSON.stringify({title:"Résumé",status:"error",message},null,2); element("#executionPlanOutput").value=JSON.stringify({title:"Plan exact",status:"unavailable",reason:"preflight_failed",message:"Aucun plan exécutable n’a été produit.",error:message},null,2); element("#executionSimulationOutput").value=JSON.stringify({title:"Simulation exacte",status:"not_started",reason:"preflight_failed",message:"La simulation n’a pas été lancée.",error:message},null,2); element("#executionDiagnosticsOutput").value=JSON.stringify({title:"Confirmation et replay",status:"not_started",reason:"execution_failed_before_submission",message:submit?"La signature, l’envoi, la confirmation et le replay n’ont pas été exécutés.":"La confirmation et le replay ne s’appliquent pas à cette simulation refusée.",error:message},null,2); appendLog({timestamp:new Date().toISOString(),level:"error",stage:"failed",message}); } +async function execute(submit:boolean):Promise{if(running){return;}try{const request=buildRequest(submit);if(submit&&!request.operatorConfirmed){const message="La confirmation opérateur explicite est obligatoire avant signature et envoi.";displayExecutionFailure(message,submit);frontendWarn("kb-app-demo-desktop.frontend.demo_execution_solana_core","Submission blocked: operator confirmation missing");return;}setRunning(true);const summary=await invoke("demo_execution_solana_core_execute",{request});displaySummary(summary);}catch(caughtError){const message=caughtError instanceof Error?caughtError.message:String(caughtError);displayExecutionFailure(message,submit);frontendError("kb-app-demo-desktop.frontend.demo_execution_solana_core",`Execution failed: ${message}`);}finally{setRunning(false);}} + +async function prepareSelectedProfile():Promise{const profile=selectedProfile();profileStoreReady=false;setRunning(running);if(!profile){return;}appendLog({timestamp:new Date().toISOString(),level:"info",stage:"store_prepare",message:`Vérification PostgreSQL du profil ${profile.name}.`});try{const readiness=await invoke("demo_execution_devnet_prepare_profile",{profileName:profile.name});profileStoreReady=true;appendLog({timestamp:new Date().toISOString(),level:"info",stage:"store_ready",message:`PostgreSQL prêt: ${readiness.existingTablesAfter}/${readiness.expectedTables} tables, créées=${readiness.createdTables}, autoInit=${readiness.autoInitializeSchema}.`});}catch(caughtError){const message=caughtError instanceof Error?caughtError.message:String(caughtError);frontendError("kb-app-demo-desktop.frontend.demo_execution_solana_core",`Devnet store preparation failed: ${message}`);}finally{setRunning(running);}} +async function loadOptions():Promise{const options=await invoke("demo_execution_solana_core_options");profileOptions=options.profiles;const select=element("#executionProfileSelect");select.replaceChildren();for(const profile of profileOptions){const option=document.createElement("option");option.value=profile.name;option.textContent=profile.name;option.selected=profile.name===options.defaultProfileName;select.append(option);}element("#executionLamportsInput").value=String(options.defaultTransferLamports);updateProfileHelp();setRunning(options.running);await prepareSelectedProfile();} +document.addEventListener("DOMContentLoaded",async()=>{installFrontendConsoleBridge("kb-app-demo-desktop.frontend.demo_execution_solana_core");frontendDebug("kb-app-demo-desktop.frontend.demo_execution_solana_core","Solana Core execution window loaded");await listen("demo-execution-solana-core-progress",event=>appendLog(event.payload));element("#executionProfileSelect").addEventListener("change",()=>{updateProfileHelp();void prepareSelectedProfile();});element("#generateRecipientButton").addEventListener("click",async()=>{const payload=await invoke("demo_execution_solana_core_generate_recipient");element("#executionRecipientInput").value=payload.publicKey;});element("#simulateExecutionButton").addEventListener("click",()=>void execute(false));element("#submitExecutionButton").addEventListener("click",()=>void execute(true));element("#cancelExecutionButton").addEventListener("click",()=>void invoke("demo_execution_solana_core_cancel"));element("#executionLogOutput").addEventListener("app-log-clear",()=>{logLines.length=0;});try{await loadOptions();}catch(caughtError){const message=caughtError instanceof Error?caughtError.message:String(caughtError);frontendError("kb-app-demo-desktop.frontend.demo_execution_solana_core",`Options loading failed: ${message}`);}}); diff --git a/kb-app-demo-desktop/frontend/ts/demo_execution_spl.ts b/kb-app-demo-desktop/frontend/ts/demo_execution_spl.ts index cd42222..d71f6d8 100644 --- a/kb-app-demo-desktop/frontend/ts/demo_execution_spl.ts +++ b/kb-app-demo-desktop/frontend/ts/demo_execution_spl.ts @@ -1,5 +1,5 @@ // file: kb-app-demo-desktop/frontend/ts/demo_execution_spl.ts -// version: 4 +// version: 9 import * as bootstrap from "bootstrap"; import "simplebar"; @@ -7,6 +7,7 @@ import ResizeObserver from "resize-observer-polyfill"; import { invoke } from "@tauri-apps/api/core"; import { listen } from "@tauri-apps/api/event"; import { frontendDebug, frontendError, frontendWarn, installFrontendConsoleBridge } from "./frontend_log"; +import type { DemoExecutionDevnetStoreReadinessPayload } from "./bindings/kb_app_demo_desktop/demo_execution_solana_core/DemoExecutionDevnetStoreReadinessPayload.ts"; import type { DemoExecutionSolanaCoreGeneratedRecipientPayload } from "./bindings/kb_app_demo_desktop/demo_execution_solana_core/DemoExecutionSolanaCoreGeneratedRecipientPayload.ts"; import type { DemoExecutionSolanaCoreOptionsPayload } from "./bindings/kb_app_demo_desktop/demo_execution_solana_core/DemoExecutionSolanaCoreOptionsPayload.ts"; import type { DemoExecutionSolanaCoreProfileOption } from "./bindings/kb_app_demo_desktop/demo_execution_solana_core/DemoExecutionSolanaCoreProfileOption.ts"; @@ -36,6 +37,7 @@ import type { DemoSplToken2022FixturePayload } from "./bindings/kb_app_demo_desk const logLines: string[] = []; const maximumLogLines = 1200; let running = false; +let profileStoreReady = false; let profileOptions: DemoExecutionSolanaCoreProfileOption[] = []; let token_2022Fixture: DemoSplToken2022FixturePayload | null = null; @@ -55,6 +57,61 @@ function integerValue(selector: string): number { return value; } +function parsedJson(value: string): unknown { + try { + return JSON.parse(value) as unknown; + } catch { + return { raw: value }; + } +} + +function writePanel(selector: string, title: string, payload: Record): void { + element(selector).value = JSON.stringify({ title, ...payload }, null, 2); +} + +function writeJsonPanel(selector: string, title: string, value: string): void { + const parsed = parsedJson(value); + if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed)) { + writePanel(selector, title, parsed as Record); + return; + } + writePanel(selector, title, { value: parsed }); +} + +function writePlanPanel(preflightJson: string | null, planJson: string): void { + const payload: Record = { plan: parsedJson(planJson) }; + if (preflightJson !== null) { + payload.preflight = parsedJson(preflightJson); + } + writePanel("#executionPlanOutput", "Plan exact", payload); +} + +function writeExecutionState(status: string, message: string, error: string | null = null): void { + const summary: Record = { status, message }; + if (error !== null) { + summary.error = error; + } + writePanel("#executionSummaryOutput", "Résumé", summary); + writePanel("#executionPlanOutput", "Plan exact", { + status: status === "running" ? "pending" : "unavailable", + reason: status, + message: status === "running" ? "Préparation du plan en cours." : "Aucun plan exécutable n’a été produit.", + ...(error === null ? {} : { error }), + }); + writePanel("#executionSimulationOutput", "Simulation exacte", { + status: status === "running" ? "pending" : "not_started", + reason: status, + message: status === "running" ? "Simulation en attente du plan exact." : "La simulation n’a pas été lancée.", + ...(error === null ? {} : { error }), + }); + writePanel("#executionDiagnosticsOutput", "Confirmation et replay", { + status: status === "running" ? "pending" : "not_started", + reason: status, + message: status === "running" ? "En attente de la simulation et d’un éventuel envoi." : "La confirmation et le replay n’ont pas été exécutés.", + ...(error === null ? {} : { error }), + }); +} + function appendLog(payload: DemoExecutionSolanaCoreProgressPayload | { timestamp: string; level: string; stage: string; message: string; signature?: string | null }): void { const signature = payload.signature ? ` signature=${payload.signature}` : ""; logLines.push(`${payload.timestamp} ${payload.level.toUpperCase()} [${payload.stage}] ${payload.message}${signature}`); @@ -69,18 +126,19 @@ function appendLog(payload: DemoExecutionSolanaCoreProgressPayload | { timestamp function setRunning(value: boolean): void { running = value; const profile = selectedProfile(); - element("#simulateExecutionButton").disabled = value || !profile; - element("#submitExecutionButton").disabled = value || !profile || !profile.sendEnabled; - element("#simulateMemoButton").disabled = value || !profile; - element("#submitMemoButton").disabled = value || !profile || !profile.sendEnabled; - element("#simulateTokenButton").disabled = value || !profile; - element("#submitTokenButton").disabled = value || !profile || !profile.sendEnabled; - element("#deriveAtaButton").disabled = value || !profile; - element("#simulateAtaButton").disabled = value || !profile; - element("#submitAtaButton").disabled = value || !profile || !profile.sendEnabled; - element("#simulateToken2022Button").disabled = value || !profile; - element("#submitToken2022Button").disabled = value || !profile || !profile.sendEnabled; - element("#loadToken2022FixtureButton").disabled = value || !profile; + const unavailable = value || !profile || !profileStoreReady; + element("#simulateExecutionButton").disabled = unavailable; + element("#submitExecutionButton").disabled = unavailable || !profile?.sendEnabled; + element("#simulateMemoButton").disabled = unavailable; + element("#submitMemoButton").disabled = unavailable || !profile?.sendEnabled; + element("#simulateTokenButton").disabled = unavailable; + element("#submitTokenButton").disabled = unavailable || !profile?.sendEnabled; + element("#deriveAtaButton").disabled = unavailable; + element("#simulateAtaButton").disabled = unavailable; + element("#submitAtaButton").disabled = unavailable || !profile?.sendEnabled; + element("#simulateToken2022Button").disabled = unavailable; + element("#submitToken2022Button").disabled = unavailable || !profile?.sendEnabled; + element("#loadToken2022FixtureButton").disabled = unavailable; element("#generateRecipientButton").disabled = value; element("#cancelExecutionButton").disabled = !value; const badge = element("#executionStatusBadge"); @@ -146,10 +204,10 @@ function displaySummary(summary: DemoExecutionSolanaCoreSummaryPayload): void { decodeCompleted: summary.decodeCompleted, decodeFailedInputs: summary.decodeFailedInputs, }; - element("#executionSummaryOutput").value = JSON.stringify(concise, null, 2); - element("#executionPlanOutput").value = summary.planJson; - element("#executionSimulationOutput").value = summary.simulationJson; - element("#executionDiagnosticsOutput").value = summary.diagnosticsJson; + writePanel("#executionSummaryOutput", "Résumé", concise); + writePlanPanel(null, summary.planJson); + writeJsonPanel("#executionSimulationOutput", "Simulation exacte", summary.simulationJson); + writeJsonPanel("#executionDiagnosticsOutput", "Confirmation et replay", summary.diagnosticsJson); } function buildMemoRequest(submit: boolean): DemoExecutionMemoRequest { @@ -165,7 +223,7 @@ function buildMemoRequest(submit: boolean): DemoExecutionMemoRequest { function displayMemoSummary(summary: DemoExecutionMemoSummaryPayload): void { const concise = { - operation: "spl_memo_v4.add_memo", + operation: "spl.memo.v4.add_memo", profileName: summary.profileName, cluster: summary.cluster, genesisHash: summary.genesisHash, @@ -183,10 +241,10 @@ function displayMemoSummary(summary: DemoExecutionMemoSummaryPayload): void { annotationCount: summary.annotationCount, idempotenceValidated: summary.idempotenceValidated, }; - element("#executionSummaryOutput").value = JSON.stringify(concise, null, 2); - element("#executionPlanOutput").value = summary.planJson; - element("#executionSimulationOutput").value = summary.simulationJson; - element("#executionDiagnosticsOutput").value = summary.diagnosticsJson; + writePanel("#executionSummaryOutput", "Résumé", concise); + writePlanPanel(null, summary.planJson); + writeJsonPanel("#executionSimulationOutput", "Simulation exacte", summary.simulationJson); + writeJsonPanel("#executionDiagnosticsOutput", "Confirmation et replay", summary.diagnosticsJson); } function requiredText(selector: string, label: string): string { @@ -247,10 +305,10 @@ function displayTokenSummary(summary: DemoExecutionSplTokenSummaryPayload): void materializationCount: summary.materializationCount, idempotenceValidated: summary.idempotenceValidated, }; - element("#executionSummaryOutput").value = JSON.stringify(concise, null, 2); - element("#executionPlanOutput").value = `PRÉFLIGHT\n${summary.readinessJson}\n\nPLAN\n${summary.planJson}`; - element("#executionSimulationOutput").value = summary.simulationJson; - element("#executionDiagnosticsOutput").value = summary.diagnosticsJson; + writePanel("#executionSummaryOutput", "Résumé", concise); + writePlanPanel(summary.readinessJson, summary.planJson); + writeJsonPanel("#executionSimulationOutput", "Simulation exacte", summary.simulationJson); + writeJsonPanel("#executionDiagnosticsOutput", "Confirmation et replay", summary.diagnosticsJson); } function ataDerivationRequest(): DemoSplAtaDerivationRequest { @@ -272,7 +330,7 @@ async function deriveAta(): Promise { } function displayAtaSummary(summary: DemoExecutionSplAtaSummaryPayload): void { - element("#executionSummaryOutput").value = JSON.stringify({ + writePanel("#executionSummaryOutput", "Résumé", { operation: summary.operation, profileName: summary.profileName, walletPublicKey: summary.walletPublicKey, @@ -287,10 +345,10 @@ function displayAtaSummary(summary: DemoExecutionSplAtaSummaryPayload): void { confirmationStatus: summary.confirmationStatus, materializationCount: summary.materializationCount, idempotenceValidated: summary.idempotenceValidated, - }, null, 2); - element("#executionPlanOutput").value = `PRÉFLIGHT\n${summary.readinessJson}\n\nPLAN\n${summary.planJson}`; - element("#executionSimulationOutput").value = summary.simulationJson; - element("#executionDiagnosticsOutput").value = summary.diagnosticsJson; + }); + writePlanPanel(summary.readinessJson, summary.planJson); + writeJsonPanel("#executionSimulationOutput", "Simulation exacte", summary.simulationJson); + writeJsonPanel("#executionDiagnosticsOutput", "Confirmation et replay", summary.diagnosticsJson); } async function executeAta(submit: boolean): Promise { @@ -305,6 +363,7 @@ async function executeAta(submit: boolean): Promise { stage: "ata_validation", message, }); + writeExecutionState("error", message, message); frontendError("kb-app-demo-desktop.frontend.execution_spl", message); return; } @@ -321,6 +380,7 @@ async function executeAta(submit: boolean): Promise { forcePostValidationReplay: element("#executionForceReplayInput").checked, }; setRunning(true); + writeExecutionState("running", "Préflight et exécution SPL ATA en cours."); appendLog({ timestamp: new Date().toISOString(), level: "info", @@ -344,6 +404,7 @@ async function executeAta(submit: boolean): Promise { } } catch (caughtError) { const message = caughtError instanceof Error ? caughtError.message : String(caughtError); + writeExecutionState("error", message, message); appendLog({ timestamp: new Date().toISOString(), level: "error", stage: "ata_failed", message }); frontendError("kb-app-demo-desktop.frontend.demo_execution_spl", `ATA execution failed: ${message}`); } finally { @@ -367,13 +428,23 @@ async function loadAtaJournal(): Promise { button.disabled = true; try { const rows = await invoke("demo_spl_ata_journal", { request: ataJournalRequest() }); - element("#ataJournalOutput").value = JSON.stringify(rows.map(row => ({ - ...row, - payloadJson: JSON.parse(row.payloadJson) as unknown, - })), null, 2); + element("#ataJournalOutput").value = JSON.stringify({ + title: "Journal lifecycle ATA", + status: "success", + count: rows.length, + rows: rows.map(row => ({ + ...row, + payloadJson: parsedJson(row.payloadJson), + })), + }, null, 2); } catch (caughtError) { const message = caughtError instanceof Error ? caughtError.message : String(caughtError); - element("#ataJournalOutput").value = JSON.stringify({ error: message }, null, 2); + element("#ataJournalOutput").value = JSON.stringify({ + title: "Journal lifecycle ATA", + status: "error", + message, + error: message, + }, null, 2); } finally { button.disabled = false; } @@ -387,7 +458,7 @@ async function execute(submit: boolean): Promise { const request = buildRequest(submit); if (submit && !request.operatorConfirmed) { const message = "La confirmation opérateur doit être cochée avant signature et envoi."; - element("#executionSummaryOutput").value = JSON.stringify({ warning: message }, null, 2); + writeExecutionState("warning", message); appendLog({ timestamp: new Date().toISOString(), level: "warn", @@ -398,7 +469,7 @@ async function execute(submit: boolean): Promise { return; } setRunning(true); - element("#executionSummaryOutput").value = "Exécution en cours..."; + writeExecutionState("running", "Exécution Solana Core en cours."); appendLog({ timestamp: new Date().toISOString(), level: "info", @@ -416,7 +487,7 @@ async function execute(submit: boolean): Promise { }); } catch (caughtError) { const message = caughtError instanceof Error ? caughtError.message : String(caughtError); - element("#executionSummaryOutput").value = JSON.stringify({ error: message }, null, 2); + writeExecutionState("error", message, message); appendLog({ timestamp: new Date().toISOString(), level: "error", stage: "failed", message }); frontendError("kb-app-demo-desktop.frontend.demo_execution_spl", `Execution failed: ${message}`); } finally { @@ -432,12 +503,13 @@ async function executeMemo(submit: boolean): Promise { const request = buildMemoRequest(submit); if (submit && !request.operatorConfirmed) { const message = "La confirmation opérateur doit être cochée avant signature et envoi du Memo."; + writeExecutionState("warning", message); appendLog({ timestamp: new Date().toISOString(), level: "warn", stage: "memo_policy", message }); frontendWarn("kb-app-demo-desktop.frontend.demo_execution_spl", `Memo execution blocked by policy: ${message}`); return; } setRunning(true); - element("#executionSummaryOutput").value = "Exécution Memo en cours..."; + writeExecutionState("running", "Exécution Memo v4 en cours."); appendLog({ timestamp: new Date().toISOString(), level: "info", @@ -455,7 +527,7 @@ async function executeMemo(submit: boolean): Promise { }); } catch (caughtError) { const message = caughtError instanceof Error ? caughtError.message : String(caughtError); - element("#executionSummaryOutput").value = JSON.stringify({ error: message }, null, 2); + writeExecutionState("error", message, message); appendLog({ timestamp: new Date().toISOString(), level: "error", stage: "memo_failed", message }); frontendError("kb-app-demo-desktop.frontend.demo_execution_spl", `Memo execution failed: ${message}`); } finally { @@ -471,12 +543,13 @@ async function executeToken(submit: boolean): Promise { const request = buildTokenRequest(submit); if (submit && !request.operatorConfirmed) { const message = "La confirmation opérateur doit être cochée avant signature et envoi Token."; + writeExecutionState("warning", message); appendLog({ timestamp: new Date().toISOString(), level: "warn", stage: "spl_token_policy", message }); frontendWarn("kb-app-demo-desktop.frontend.demo_execution_spl", `Token execution blocked by policy: ${message}`); return; } setRunning(true); - element("#executionSummaryOutput").value = "Préflight et exécution SPL Token en cours..."; + writeExecutionState("running", "Préflight et exécution SPL Token en cours."); appendLog({ timestamp: new Date().toISOString(), level: "info", @@ -498,7 +571,7 @@ async function executeToken(submit: boolean): Promise { } } catch (caughtError) { const message = caughtError instanceof Error ? caughtError.message : String(caughtError); - element("#executionSummaryOutput").value = JSON.stringify({ error: message }, null, 2); + writeExecutionState("error", message, message); appendLog({ timestamp: new Date().toISOString(), level: "error", stage: "spl_token_failed", message }); frontendError("kb-app-demo-desktop.frontend.demo_execution_spl", `Token execution failed: ${message}`); } finally { @@ -529,7 +602,11 @@ function renderTokenJournal(rows: DemoSplTokenJournalRow[]): void { cell.textContent = "Aucun événement correspondant."; row.append(cell); body.append(row); - element("#tokenJournalDetailOutput").value = "Aucun événement sélectionné."; + element("#tokenJournalDetailOutput").value = JSON.stringify({ + title: "Journal métier SPL Token", + status: "empty", + message: "Aucun événement sélectionné.", + }, null, 2); return; } for (const item of rows) { @@ -550,7 +627,14 @@ function renderTokenJournal(rows: DemoSplTokenJournalRow[]): void { } row.title = item.signature; const select = (): void => { - element("#tokenJournalDetailOutput").value = item.payloadJson; + element("#tokenJournalDetailOutput").value = JSON.stringify({ + title: "Journal métier SPL Token", + status: "success", + row: { + ...item, + payloadJson: parsedJson(item.payloadJson), + }, + }, null, 2); }; row.addEventListener("click", select); row.addEventListener("keydown", event => { @@ -561,22 +645,32 @@ function renderTokenJournal(rows: DemoSplTokenJournalRow[]): void { }); body.append(row); } - element("#tokenJournalDetailOutput").value = rows[0].payloadJson; + element("#tokenJournalDetailOutput").value = JSON.stringify({ + title: "Journal métier SPL Token", + status: "success", + row: { + ...rows[0], + payloadJson: parsedJson(rows[0].payloadJson), + }, + }, null, 2); } function token_2022ScenarioAmount(fixture: DemoSplToken2022FixturePayload, scenarioId: string): string { if (scenarioId === "token_2022_mint_to_checked") { - return "1"; + return fixture.mintAmountRaw; + } + if (scenarioId === "token_2022_transfer_checked") { + return fixture.transferAmountRaw; } if (scenarioId === "token_2022_approve_checked") { - return "2"; + return fixture.approveAmountRaw; } if (scenarioId === "token_2022_burn_checked") { - return "1"; + return fixture.burnAmountRaw; } - return fixture.defaultAmountRaw; + return "0"; } function applyToken2022Fixture(): void { @@ -666,7 +760,7 @@ function buildToken2022Request(submit: boolean): DemoExecutionSplToken2022Reques } function displayToken2022Summary(summary: DemoExecutionSplToken2022SummaryPayload): void { - element("#executionSummaryOutput").value = JSON.stringify({ + writePanel("#executionSummaryOutput", "Résumé", { scenarioId: summary.scenarioId, operation: summary.operation, profileName: summary.profileName, @@ -684,10 +778,10 @@ function displayToken2022Summary(summary: DemoExecutionSplToken2022SummaryPayloa decodeReplayed: summary.decodeReplayed, materializationCount: summary.materializationCount, idempotenceValidated: summary.idempotenceValidated, - }, null, 2); - element("#executionPlanOutput").value = `PRÉFLIGHT\n${summary.preflightJson}\n\nPLAN\n${summary.planJson}`; - element("#executionSimulationOutput").value = summary.simulationJson; - element("#executionDiagnosticsOutput").value = summary.diagnosticsJson; + }); + writePlanPanel(summary.preflightJson, summary.planJson); + writeJsonPanel("#executionSimulationOutput", "Simulation exacte", summary.simulationJson); + writeJsonPanel("#executionDiagnosticsOutput", "Confirmation et replay", summary.diagnosticsJson); } async function executeToken2022(submit: boolean): Promise { @@ -699,17 +793,18 @@ async function executeToken2022(submit: boolean): Promise { request = buildToken2022Request(submit); if (submit && !request.operatorConfirmed) { const message = "La confirmation opérateur est obligatoire avant signature Token-2022."; - element("#executionSummaryOutput").value = JSON.stringify({ warning: message }, null, 2); + writeExecutionState("warning", message); appendLog({ timestamp: new Date().toISOString(), level: "error", stage: "token_2022_failed", message }); return; } } catch (caughtError) { const message = caughtError instanceof Error ? caughtError.message : String(caughtError); + writeExecutionState("error", message, message); appendLog({ timestamp: new Date().toISOString(), level: "error", stage: "token_2022_failed", message }); return; } setRunning(true); - element("#executionSummaryOutput").value = "Préflight et exécution Token-2022 en cours..."; + writeExecutionState("running", "Préflight et exécution Token-2022 en cours."); appendLog({ timestamp: new Date().toISOString(), level: "info", @@ -728,7 +823,7 @@ async function executeToken2022(submit: boolean): Promise { }); } catch (caughtError) { const message = caughtError instanceof Error ? caughtError.message : String(caughtError); - element("#executionSummaryOutput").value = JSON.stringify({ error: message }, null, 2); + writeExecutionState("error", message, message); appendLog({ timestamp: new Date().toISOString(), level: "error", stage: "token_2022_failed", message }); frontendError("kb-app-demo-desktop.frontend.demo_execution_spl", `Token-2022 execution failed: ${message}`); } finally { @@ -750,7 +845,12 @@ async function loadTokenJournal(): Promise { }); } catch (caughtError) { const message = caughtError instanceof Error ? caughtError.message : String(caughtError); - element("#tokenJournalDetailOutput").value = JSON.stringify({ error: message }, null, 2); + element("#tokenJournalDetailOutput").value = JSON.stringify({ + title: "Journal métier SPL Token", + status: "error", + message, + error: message, + }, null, 2); frontendError("kb-app-demo-desktop.frontend.demo_execution_spl", `Token journal loading failed: ${message}`); } finally { button.disabled = false; @@ -788,6 +888,27 @@ async function cancelExecution(): Promise { } } + +async function prepareSelectedProfile(): Promise { + const profile = selectedProfile(); + profileStoreReady = false; + setRunning(running); + if (!profile) { + return; + } + appendLog({ timestamp: new Date().toISOString(), level: "info", stage: "store_prepare", message: `Vérification PostgreSQL du profil ${profile.name}.` }); + try { + const readiness = await invoke("demo_execution_devnet_prepare_profile", { profileName: profile.name }); + profileStoreReady = true; + appendLog({ timestamp: new Date().toISOString(), level: "info", stage: "store_ready", message: `PostgreSQL prêt: ${readiness.existingTablesAfter}/${readiness.expectedTables} tables, créées=${readiness.createdTables}, autoInit=${readiness.autoInitializeSchema}.` }); + } catch (caughtError) { + const message = caughtError instanceof Error ? caughtError.message : String(caughtError); + frontendError("kb-app-demo-desktop.frontend.demo_execution_spl", `Devnet store preparation failed: ${message}`); + } finally { + setRunning(running); + } +} + async function loadOptions(): Promise { const options = await invoke("demo_execution_solana_core_options"); profileOptions = options.profiles; @@ -803,6 +924,7 @@ async function loadOptions(): Promise { element("#executionLamportsInput").value = String(options.defaultTransferLamports); updateProfileHelp(); setRunning(options.running); + await prepareSelectedProfile(); if (profileOptions.length === 0) { element("#simulateExecutionButton").disabled = true; element("#submitExecutionButton").disabled = true; @@ -824,7 +946,10 @@ document.addEventListener("DOMContentLoaded", () => { installFrontendConsoleBridge("kb-app-demo-desktop.frontend.demo_execution_spl"); frontendDebug("kb-app-demo-desktop.frontend.demo_execution_spl", "execution demo window loaded"); document.querySelectorAll('[data-bs-toggle="tooltip"]').forEach(item => new bootstrap.Tooltip(item)); - element("#executionProfileSelect").addEventListener("change", updateProfileHelp); + element("#executionProfileSelect").addEventListener("change", () => { + updateProfileHelp(); + void prepareSelectedProfile(); + }); element("#generateRecipientButton").addEventListener("click", () => { void generateRecipient(); }); diff --git a/kb-app-demo-desktop/src/demo_decode_replay.rs b/kb-app-demo-desktop/src/demo_decode_replay.rs index 0ff7bed..710173c 100644 --- a/kb-app-demo-desktop/src/demo_decode_replay.rs +++ b/kb-app-demo-desktop/src/demo_decode_replay.rs @@ -1,5 +1,5 @@ // file: kb-app-demo-desktop/src/demo_decode_replay.rs -// version: 32 +// version: 33 //! Tauri commands and UI payloads for contextual instruction decode replay. @@ -600,7 +600,7 @@ pub(crate) fn coverage_payload( pub(crate) fn annotation_payload( row: kb_store::MaterializedEventQueryRow, ) -> std::result::Result { - if row.processor_name != "transaction_annotations" + if row.processor_name != "materializer.transaction.annotations" || row.materialized_family != "transaction_annotation" { return std::result::Result::Err( @@ -720,9 +720,9 @@ mod tests { program_id: kb_lib::MdProgramId( kb_program_ids::ASSOCIATED_TOKEN_PROGRAM_ID.to_string(), ), - protocol_code: kb_lib::MdProtocolCode("spl_associated_token_account".to_string()), - surface_code: kb_lib::MdSurfaceCode("spl_associated_token_account".to_string()), - event_code: kb_lib::MdEventCode(format!("spl_associated_token_account.{entry}")), + protocol_code: kb_lib::MdProtocolCode("spl.associated_token_account".to_string()), + surface_code: kb_lib::MdSurfaceCode("spl.associated_token_account".to_string()), + event_code: kb_lib::MdEventCode(format!("spl.associated_token_account.{entry}")), event_name: kb_lib::MdEventName(entry.to_string()), event_family: kb_lib::MdEventFamily::Lifecycle, source_kind: kb_lib::MdEventSourceKind::Instruction, @@ -750,13 +750,13 @@ mod tests { .collect::>(); names.sort(); let mut expected_names = std::vec![ - "metadata_metaplex_token_metadata".to_string(), - "solana_native_classifier".to_string(), - "spl_associated_token_account".to_string(), - "spl_elgamal_registry".to_string(), - "spl_memo".to_string(), - "spl_token".to_string(), - "spl_token_2022".to_string(), + "metadata.metaplex_token_metadata".to_string(), + "solana.core".to_string(), + "spl.associated_token_account".to_string(), + "spl.elgamal_registry".to_string(), + "spl.memo".to_string(), + "spl.token".to_string(), + "spl.token_2022".to_string(), ]; expected_names.sort(); assert_eq!(names, expected_names); @@ -773,14 +773,14 @@ mod tests { assert_eq!( names, std::vec![ - "solana_native_admin".to_string(), - "solana_native_compliance_audit".to_string(), - "fees".to_string(), - "solana_native_lifecycle".to_string(), - "solana_native_staking".to_string(), - "spl_token_accounts".to_string(), - "spl_token_risk".to_string(), - "transaction_annotations".to_string(), + "materializer.admin".to_string(), + "materializer.compliance.audit".to_string(), + "materializer.fees".to_string(), + "materializer.lifecycle".to_string(), + "materializer.staking".to_string(), + "materializer.token.accounts".to_string(), + "materializer.risk".to_string(), + "materializer.transaction.annotations".to_string(), ] ); } @@ -788,10 +788,13 @@ mod tests { #[test] fn ata_materializer_ownership_is_exact_in_the_runtime_registry() { for (entry, expected) in [ - ("create", std::vec!["spl_token_accounts".to_string()]), + ("create", std::vec!["materializer.token.accounts".to_string()]), ( "recover_nested", - std::vec!["spl_token_accounts".to_string(), "spl_token_risk".to_string(),], + std::vec![ + "materializer.token.accounts".to_string(), + "materializer.risk".to_string(), + ], ), ] { let observation = ata_observation(entry); @@ -821,7 +824,7 @@ mod tests { program_id: std::option::Option::None, instruction_state: "actionable".to_string(), instruction_paths_text: std::option::Option::None, - decoder_names: std::vec!["solana_native_classifier".to_string()], + decoder_names: std::vec!["solana.core".to_string()], limit: 10, max_concurrent_inputs: 2, all_compatible: false, @@ -918,12 +921,12 @@ mod tests { #[test] fn committed_annotation_row_is_mapped_to_ui_safe_contract() { let row = kb_store::MaterializedEventQueryRow { - processor_name: "transaction_annotations".to_string(), + processor_name: "materializer.transaction.annotations".to_string(), processor_version: "0.4.3".to_string(), input_key: "input".to_string(), output_key: "output".to_string(), source_event_key: "memo:0".to_string(), - source_decoder_name: "spl_memo".to_string(), + source_decoder_name: "spl.memo".to_string(), source_decoder_version: "0.4.3".to_string(), signature: "signature".to_string(), slot: u64::MAX, @@ -954,12 +957,12 @@ mod tests { #[test] fn malformed_annotation_payload_fails_closed() { let row = kb_store::MaterializedEventQueryRow { - processor_name: "transaction_annotations".to_string(), + processor_name: "materializer.transaction.annotations".to_string(), processor_version: "0.4.3".to_string(), input_key: "input".to_string(), output_key: "output".to_string(), source_event_key: "memo:0".to_string(), - source_decoder_name: "spl_memo".to_string(), + source_decoder_name: "spl.memo".to_string(), source_decoder_version: "0.4.3".to_string(), signature: "signature".to_string(), slot: 1, diff --git a/kb-app-demo-desktop/src/demo_devnet_common.rs b/kb-app-demo-desktop/src/demo_devnet_common.rs new file mode 100644 index 0000000..c7c5fe1 --- /dev/null +++ b/kb-app-demo-desktop/src/demo_devnet_common.rs @@ -0,0 +1,50 @@ +// file: kb-app-demo-desktop/src/demo_devnet_common.rs +// version: 2 + +//! Shared Devnet demo UI contracts. + +use ts_rs::TS; // rust-rules: derive-import + +/// Readiness report for one Devnet profile PostgreSQL store. +#[derive(Clone, Debug, serde::Serialize, TS)] +#[serde(rename_all = "camelCase")] +#[ts( + export, + export_to = "../frontend/ts/bindings/kb_app_demo_desktop/demo_execution_solana_core/DemoExecutionDevnetStoreReadinessPayload.ts" +)] +pub(crate) struct DemoExecutionDevnetStoreReadinessPayload { + /// Selected Devnet profile. + pub(crate) profile_name: std::string::String, + /// Whether schema creation was allowed by configuration. + pub(crate) auto_initialize_schema: bool, + /// Number of known tables already present before preparation. + pub(crate) existing_tables_before: u32, + /// Number of known tables created during preparation. + pub(crate) created_tables: u32, + /// Number of known tables present after preparation. + pub(crate) existing_tables_after: u32, + /// Total number of known tables expected by the current store. + pub(crate) expected_tables: u32, +} + +/// Converts one collection length to the bounded UI counter type. +fn bounded_u32(value: usize) -> u32 { + return match u32::try_from(value) { + std::result::Result::Ok(converted) => converted, + std::result::Result::Err(_) => u32::MAX, + }; +} + +/// Converts the reusable scenario readiness report to the desktop TS-RS payload. +pub(crate) fn devnet_store_readiness_payload( + readiness: kb_pipeline_demo_scenarios::DevnetProfileStoreReadiness, +) -> DemoExecutionDevnetStoreReadinessPayload { + return DemoExecutionDevnetStoreReadinessPayload { + profile_name: readiness.profile_name, + auto_initialize_schema: readiness.auto_initialize_schema, + existing_tables_before: bounded_u32(readiness.existing_tables_before), + created_tables: bounded_u32(readiness.created_tables), + existing_tables_after: bounded_u32(readiness.existing_tables_after), + expected_tables: bounded_u32(readiness.expected_tables), + }; +} diff --git a/kb-app-demo-desktop/src/demo_execution_solana_core.rs b/kb-app-demo-desktop/src/demo_execution_solana_core.rs index f195d33..f3cf624 100644 --- a/kb-app-demo-desktop/src/demo_execution_solana_core.rs +++ b/kb-app-demo-desktop/src/demo_execution_solana_core.rs @@ -1,5 +1,5 @@ // file: kb-app-demo-desktop/src/demo_execution_solana_core.rs -// version: 6 +// version: 8 //! Tauri adapter for bounded Solana Core execution on Devnet. @@ -395,18 +395,11 @@ pub(crate) fn select_devnet_profile( config: &kb_config::AppConfig, profile_name: &str, ) -> std::result::Result { - for profile in &config.profiles { - if profile.name == profile_name - && profile.wallet.cluster == "devnet" - && profile.wallet.temporary_wallet_enabled - && profile.wallet.temporary_wallet_persist - { - return std::result::Result::Ok(profile.clone()); - } - } - return std::result::Result::Err(format!( - "Devnet execution profile '{profile_name}' is unavailable" - )); + return kb_pipeline_demo_scenarios::resolve_demo_devnet_profile( + config, + std::option::Option::Some(profile_name), + ) + .map_err(|error| return error.to_string()); } pub(crate) fn demo_execution_solana_core_summary_payload( diff --git a/kb-app-demo-desktop/src/demo_spl_token.rs b/kb-app-demo-desktop/src/demo_spl_token.rs index b03fb6d..6e4619f 100644 --- a/kb-app-demo-desktop/src/demo_spl_token.rs +++ b/kb-app-demo-desktop/src/demo_spl_token.rs @@ -1,5 +1,5 @@ // file: kb-app-demo-desktop/src/demo_spl_token.rs -// version: 3 +// version: 4 //! Thin Tauri adapter for classic SPL Token execution and materialized journals. @@ -109,7 +109,7 @@ pub(crate) struct DemoSplTokenJournalRequest { pub(crate) account: std::option::Option, /// Optional exact materialized family. pub(crate) family: std::option::Option, - /// Optional exact operation code without the `spl_token.` prefix. + /// Optional exact operation code without the `spl.token.` prefix. pub(crate) operation: std::option::Option, /// Maximum number of rows returned after typed filtering. pub(crate) limit: u32, @@ -463,12 +463,12 @@ mod tests { std::option::Option::Some("18446744073709551615") ); let row = crate::demo_spl_token_journal_row(kb_store::MaterializedEventQueryRow { - processor_name: "spl_token_accounts".to_string(), + processor_name: "materializer.token.accounts".to_string(), processor_version: "0.4.4".to_string(), input_key: "input".to_string(), output_key: "output".to_string(), source_event_key: "event".to_string(), - source_decoder_name: "spl_token".to_string(), + source_decoder_name: "spl.token".to_string(), source_decoder_version: "0.4.4".to_string(), signature: "signature".to_string(), slot: u64::MAX, diff --git a/kb-app-demo-desktop/src/demo_spl_token_2022.rs b/kb-app-demo-desktop/src/demo_spl_token_2022.rs index 128e12c..7f0fa6d 100644 --- a/kb-app-demo-desktop/src/demo_spl_token_2022.rs +++ b/kb-app-demo-desktop/src/demo_spl_token_2022.rs @@ -1,5 +1,5 @@ // file: kb-app-demo-desktop/src/demo_spl_token_2022.rs -// version: 6 +// version: 7 //! Thin Tauri adapter for independent public Token-2022 Devnet validation scenarios. @@ -33,8 +33,14 @@ pub(crate) struct DemoSplToken2022FixturePayload { pub(crate) freeze_authority: std::string::String, /// Mint decimals. pub(crate) decimals: u8, - /// Default raw amount for the selected scenario. - pub(crate) default_amount_raw: std::string::String, + /// Raw amount used by `MintToChecked`. + pub(crate) mint_amount_raw: std::string::String, + /// Raw amount used by `TransferChecked`. + pub(crate) transfer_amount_raw: std::string::String, + /// Raw amount used by `ApproveChecked`. + pub(crate) approve_amount_raw: std::string::String, + /// Raw amount used by `BurnChecked`. + pub(crate) burn_amount_raw: std::string::String, } /// Request for one independent public Token-2022 Devnet scenario. diff --git a/kb-app-demo-desktop/src/lib.rs b/kb-app-demo-desktop/src/lib.rs index 45c2101..debdaf7 100644 --- a/kb-app-demo-desktop/src/lib.rs +++ b/kb-app-demo-desktop/src/lib.rs @@ -1,5 +1,5 @@ // file: kb-app-demo-desktop/src/lib.rs -// version: 13 +// version: 15 //! Tauri desktop demo application for `khadhroony-bot3`. @@ -13,6 +13,7 @@ mod demo_backfill; mod demo_config; mod demo_core_extraction; mod demo_decode_replay; +mod demo_devnet_common; mod demo_execution_solana_core; mod demo_execution_spl; mod demo_http; @@ -129,6 +130,10 @@ pub(crate) use self::demo_decode_replay::optional_line_count; pub(crate) use self::demo_decode_replay::register_active_campaign; /// Internal demo decode replay item. pub(crate) use self::demo_decode_replay::text_sample; +/// Readiness report for one Devnet profile PostgreSQL store. +pub(crate) use self::demo_devnet_common::DemoExecutionDevnetStoreReadinessPayload; +/// Converts the reusable scenario readiness report to the desktop TS-RS payload. +pub(crate) use self::demo_devnet_common::devnet_store_readiness_payload; /// Request sent by the Memo v4 Devnet execution panel. pub(crate) use self::demo_execution_solana_core::DemoExecutionMemoRequest; /// UI-safe result of one Memo v4 Devnet execution orchestration. diff --git a/kb-app-demo-desktop/src/tauri.rs b/kb-app-demo-desktop/src/tauri.rs index d189977..7e13886 100644 --- a/kb-app-demo-desktop/src/tauri.rs +++ b/kb-app-demo-desktop/src/tauri.rs @@ -1,5 +1,5 @@ // file: kb-app-demo-desktop/src/tauri.rs -// version: 17 +// version: 21 //! Tauri runtime assembly and private command wrappers. @@ -67,6 +67,7 @@ pub fn run() -> kb_core::Result<()> { load_demo_sql_replay_entities, export_demo_sql_replay_csv, demo_execution_solana_core_options, + demo_execution_devnet_prepare_profile, demo_execution_solana_core_generate_recipient, demo_execution_solana_core_execute, open_demo_execution_solana_core_window, @@ -498,7 +499,7 @@ async fn demo_decode_replay_annotations( request: crate::DemoTransactionAnnotationRequest, ) -> std::result::Result, std::string::String> { let filter_result = kb_store::MaterializedEventFilter::new( - std::option::Option::Some("transaction_annotations".to_string()), + std::option::Option::Some("materializer.transaction.annotations".to_string()), std::option::Option::Some("transaction_annotation".to_string()), request.signature_contains, request.limit, @@ -1106,6 +1107,26 @@ fn open_demo_execution_solana_core_window( ); } +/// Verifies or initializes the PostgreSQL schema selected by one Devnet profile. +#[tauri::command] +async fn demo_execution_devnet_prepare_profile( + state: tauri::State<'_, crate::AppState>, + profile_name: std::string::String, +) -> std::result::Result { + let profile = match crate::select_devnet_profile(state.app_config(), profile_name.as_str()) { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => return std::result::Result::Err(error), + }; + let readiness = + match kb_pipeline_demo_scenarios::prepare_demo_devnet_profile_store(&profile).await { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => { + return std::result::Result::Err(error.to_string()); + }, + }; + return std::result::Result::Ok(crate::devnet_store_readiness_payload(readiness)); +} + /// Returns compatible Devnet profiles and conservative defaults. #[tauri::command] fn demo_execution_solana_core_options( @@ -1506,7 +1527,7 @@ async fn demo_spl_token_journal( }; let mut output = std::vec::Vec::new(); for row in rows { - if row.source_decoder_name != "spl_token" + if row.source_decoder_name != "spl.token" || !crate::payload_matches(&row.payload_json, &validated) { continue; @@ -1683,7 +1704,7 @@ async fn demo_spl_ata_journal( std::result::Result::Err(error) => return std::result::Result::Err(error.to_string()), }; let filter = match kb_store::MaterializedEventFilter::new( - std::option::Option::Some("spl_token_accounts".to_string()), + std::option::Option::Some("materializer.token.accounts".to_string()), std::option::Option::None, request.signature_contains.clone(), 500, @@ -1698,7 +1719,7 @@ async fn demo_spl_ata_journal( }; let mut output = std::vec::Vec::new(); for row in rows { - if row.source_decoder_name != "spl_associated_token_account" + if row.source_decoder_name != "spl.associated_token_account" || !crate::journal_matches(&row.payload_json, &request) { continue; @@ -1886,9 +1907,21 @@ fn demo_spl_token_2022_fixture( authority, freeze_authority, decimals, - default_amount_raw: values - .get("TOKEN_2022_TRANSFER_AMOUNT_RAW") - .cloned() - .unwrap_or_else(|| return "1".to_string()), + mint_amount_raw: match required("TOKEN_2022_MINT_AMOUNT_RAW") { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => return std::result::Result::Err(error), + }, + transfer_amount_raw: match required("TOKEN_2022_TRANSFER_AMOUNT_RAW") { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => return std::result::Result::Err(error), + }, + approve_amount_raw: match required("TOKEN_2022_APPROVE_AMOUNT_RAW") { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => return std::result::Result::Err(error), + }, + burn_amount_raw: match required("TOKEN_2022_BURN_AMOUNT_RAW") { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => return std::result::Result::Err(error), + }, }); } diff --git a/kb-lib/src/decoder.rs b/kb-lib/src/decoder.rs index 6434dd5..b4f632c 100644 --- a/kb-lib/src/decoder.rs +++ b/kb-lib/src/decoder.rs @@ -4,7 +4,6 @@ //! Consolidated decoder modules. mod adapter; -mod admin; mod amm; mod anchor; mod api; @@ -27,6 +26,8 @@ mod solana; mod spl; mod stable; mod staking; +mod storage; +mod strategy; mod treasury; mod vault; mod vesting; @@ -35,10 +36,9 @@ mod weighted; /// Reserved `kb-lib.decoder.adapter.saber_decimal_wrapper` decoder. pub use self::adapter::DcAdapterSaberDecimalWrapperDecoder; -/// Reserved `kb-lib.decoder.admin.jupiter_lock` decoder. -pub use self::admin::DcAdminJupiterLockDecoder; -/// Reserved `kb-lib.decoder.admin.pump_fees` decoder. -pub use self::admin::DcAdminPumpFeesDecoder; +/// Approve Collection Authority discriminator. +/// Reserved `kb-lib.decoder.adapter.spl_token_wrap` decoder. +pub use self::adapter::DcAdapterSplTokenWrapDecoder; /// Reserved `kb-lib.decoder.amm.aldrin_v1` decoder. pub use self::amm::DcAmmAldrinV1Decoder; /// Reserved `kb-lib.decoder.amm.aldrin_v2` decoder. @@ -61,8 +61,6 @@ pub use self::amm::DcAmmGoosefxV2Decoder; pub use self::amm::DcAmmGuacSwapDecoder; /// Reserved `kb-lib.decoder.amm.lifinity_swap_v2` decoder. pub use self::amm::DcAmmLifinitySwapV2Decoder; -/// Reserved `kb-lib.decoder.amm.metadao_futarchy_amm` decoder. -pub use self::amm::DcAmmMetadaoFutarchyAmmDecoder; /// Reserved `kb-lib.decoder.amm.metadao_v0_5` decoder. pub use self::amm::DcAmmMetadaoV05Decoder; /// Reserved `kb-lib.decoder.amm.meteora_damm_v1` decoder. @@ -83,8 +81,6 @@ pub use self::amm::DcAmmSolfiDecoder; pub use self::amm::DcAmmSolfiV2Decoder; /// Reserved `kb-lib.decoder.amm.vertigo` decoder. pub use self::amm::DcAmmVertigoDecoder; -/// Reserved `kb-lib.decoder.amm.virtuals` decoder. -pub use self::amm::DcAmmVirtualsDecoder; /// Reserved `kb-lib.decoder.amm.woofi` decoder. pub use self::amm::DcAmmWoofiDecoder; /// Reserved `kb-lib.decoder.amm.zero_fi` decoder. @@ -161,8 +157,14 @@ pub use self::dlmm::DcDlmmMeteoraDecoder; pub use self::fees::DcFeesBagsFeeShareV1Decoder; /// Reserved `kb-lib.decoder.fees.bags_fee_share_v2` decoder. pub use self::fees::DcFeesBagsFeeShareV2Decoder; +/// Reserved `kb-lib.decoder.admin.pump_fees` decoder. +pub use self::fees::DcFeesPumpFeesDecoder; /// Reserved `kb-lib.decoder.governance.metadao_bid_wall` decoder. pub use self::governance::DcGovernanceMetadaoBidWallDecoder; +/// Reserved `kb-lib.decoder.amm.metadao_futarchy_amm` decoder. +pub use self::governance::DcGovernanceMetadaoFutarchyDecoder; +/// Reserved `kb-lib.decoder.governance.squads_multisig` decoder. +pub use self::governance::DcGovernanceSquadsMultisigDecoder; /// Reserved `kb-lib.decoder.launchpad.boop_fun` decoder. pub use self::launchpad::DcLaunchpadBoopFunDecoder; /// Reserved `kb-lib.decoder.launchpad.metadao_ico` decoder. @@ -181,6 +183,8 @@ pub use self::launchpad::DcLaunchpadPumpFunDecoder; pub use self::launchpad::DcLaunchpadPumpPumpupAiDecoder; /// Reserved `kb-lib.decoder.launchpad.raydium_launchlab` decoder. pub use self::launchpad::DcLaunchpadRaydiumLaunchlabDecoder; +/// Reserved `kb-lib.decoder.amm.virtuals` decoder. +pub use self::launchpad::DcLaunchpadVirtualsDecoder; /// Reserved `kb-lib.decoder.lending.clone` decoder. pub use self::lending::DcLendingCloneDecoder; /// Reserved `kb-lib.decoder.lending.jupiter_lend_borrow` decoder. @@ -197,176 +201,6 @@ pub use self::lending::DcLendingKaminoDecoder; pub use self::lending::DcLendingMarginfiV2Decoder; /// Reserved `kb-lib.decoder.lock.raydium_lp` decoder. pub use self::lock::DcLockRaydiumLpDecoder; -/// Exhaustive published Metaplex account-key inventory. -pub use self::metadata::DC_METADATA_MTM_METADATA_ACCOUNT_LAYOUT_AUDIT; -/// Exact decoder for the Metaplex Token Metadata program. -pub use self::metadata::DcMetadataMetaplexTokenMetadataDecoder; -/// Canonical projection shared by Collection and Use Authority records. -pub use self::metadata::DcMetadataMtmAuthorityRecordAccountSnapshot; -/// Stable identity and policy of one canonical account snapshot. -pub use self::metadata::DcMetadataMtmCanonicalAccountIdentity; -/// Lifecycle class of one canonical account layout. -pub use self::metadata::DcMetadataMtmCanonicalAccountLifecycle; -/// Provenance retained for one canonical account observation. -pub use self::metadata::DcMetadataMtmCanonicalAccountProvenance; -/// Execution policy separated from historical materialization. -pub use self::metadata::DcMetadataMtmCanonicalExecutionPolicy; -/// Materialization policy for active or historical state. -pub use self::metadata::DcMetadataMtmCanonicalMaterializationPolicy; -/// Canonical account envelope used by materializers and replay. -pub use self::metadata::DcMetadataMtmCanonicalMetadataAccountSnapshot; -/// Typed canonical Metaplex account state. -pub use self::metadata::DcMetadataMtmCanonicalMetadataAccountState; -/// Origin of one canonical account observation. -pub use self::metadata::DcMetadataMtmCanonicalObservationSource; -/// Canonical projection shared by Metadata and Holder delegate records. -pub use self::metadata::DcMetadataMtmDelegateRecordAccountSnapshot; -/// Supported edition account layout. -pub use self::metadata::DcMetadataMtmEditionAccountKind; -/// Canonical bounded projection of one edition or master-edition account. -pub use self::metadata::DcMetadataMtmEditionAccountSnapshot; -/// Supported Edition Marker account layout. -pub use self::metadata::DcMetadataMtmEditionMarkerAccountKind; -/// Canonical bounded projection of one Edition Marker account. -pub use self::metadata::DcMetadataMtmEditionMarkerAccountSnapshot; -/// Bounded error returned while decoding a Metadata account. -pub use self::metadata::DcMetadataMtmMetadataAccountDecodeError; -/// One entry in the exhaustive published account-key audit. -pub use self::metadata::DcMetadataMtmMetadataAccountLayoutAuditEntry; -/// Canonical bounded projection of one Metadata account. -pub use self::metadata::DcMetadataMtmMetadataAccountSnapshot; -/// One bounded historical reservation entry. -pub use self::metadata::DcMetadataMtmReservationEntrySnapshot; -/// Historical Reservation List account generation. -pub use self::metadata::DcMetadataMtmReservationListAccountKind; -/// Canonical decode-only projection of a historical Reservation List account. -pub use self::metadata::DcMetadataMtmReservationListAccountSnapshot; -/// Canonical projection of one Token Owned Escrow account. -pub use self::metadata::DcMetadataMtmTokenOwnedEscrowAccountSnapshot; -/// Authority form used by one Token Owned Escrow account. -pub use self::metadata::DcMetadataMtmTokenOwnedEscrowAuthorityKind; -/// Canonical bounded projection of one programmable Token Record account. -pub use self::metadata::DcMetadataMtmTokenRecordAccountSnapshot; -/// Reserved `kb-lib.decoder.metadata.spl_name_service` decoder. -pub use self::metadata::DcMetadataSplNameServiceDecoder; -/// Decodes one Collection Authority Record account. -pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_collection_authority_record_account; -/// Decodes and validates one edition or master-edition account snapshot. -pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_edition_account; -/// Decodes and validates one Edition Marker account snapshot. -pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_edition_marker_account; -/// Decodes one Holder Delegate Record account. -pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_holder_delegate_record_account; -/// Decodes and validates one canonical Metadata account snapshot. -pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_metadata_account; -/// Decodes one Metadata Delegate Record account. -pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_metadata_delegate_record_account; -/// Decodes one historical Reservation List V1 or V2 account. -pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_reservation_list_account; -/// Decodes one Token Owned Escrow account. -pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_token_owned_escrow_account; -/// Decodes and validates one programmable Token Record account snapshot. -pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_token_record_account; -/// Decodes one Use Authority Record account. -pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_use_authority_record_account; -/// Reserved `kb-lib.decoder.nft.metaplex_bubblegum` decoder. -pub use self::nft::DcNftMetaplexBubblegumDecoder; -/// Reserved `kb-lib.decoder.orderbook.jupiter_limit_order` decoder. -pub use self::orderbook::DcOrderbookJupiterLimitOrderDecoder; -/// Reserved `kb-lib.decoder.orderbook.jupiter_limit_order_v2` decoder. -pub use self::orderbook::DcOrderbookJupiterLimitOrderV2Decoder; -/// Reserved `kb-lib.decoder.orderbook.openbook_v2` decoder. -pub use self::orderbook::DcOrderbookOpenbookV2Decoder; -/// Reserved `kb-lib.decoder.perpetuals.drift_v2` decoder. -pub use self::perpetuals::DcPerpetualsDriftV2Decoder; -/// Reserved `kb-lib.decoder.perpetuals.jupiter` decoder. -pub use self::perpetuals::DcPerpetualsJupiterDecoder; -/// Reserved `kb-lib.decoder.perpetuals.zeta` decoder. -pub use self::perpetuals::DcPerpetualsZetaDecoder; -/// Reserved `kb-lib.decoder.router.dflow_aggregator_v4` decoder. -pub use self::router::DcRouterDflowAggregatorV4Decoder; -/// Reserved `kb-lib.decoder.router.jupiter_aggregator_v4` decoder. -pub use self::router::DcRouterJupiterAggregatorV4Decoder; -/// Reserved `kb-lib.decoder.router.jupiter_aggregator_v6` decoder. -pub use self::router::DcRouterJupiterAggregatorV6Decoder; -/// Reserved `kb-lib.decoder.router.jupiter_dca` decoder. -pub use self::router::DcRouterJupiterDcaDecoder; -/// Reserved `kb-lib.decoder.router.okx_labs_v1` decoder. -pub use self::router::DcRouterOkxLabsV1Decoder; -/// Reserved `kb-lib.decoder.router.okx_labs_v2` decoder. -pub use self::router::DcRouterOkxLabsV2Decoder; -/// Reserved `kb-lib.decoder.rwa.ondo_global_markets` decoder. -pub use self::rwa::DcRwaOndoGlobalMarketsDecoder; -/// Runtime-native Solana decoder with phased maximal native coverage. -pub use self::solana::DcSolanaCoreDecoder; -/// Exact byte length of one SPL ElGamal registry account. -pub use self::spl::DC_SPL_ELGAMAL_REGISTRY_ACCOUNT_LEN; -/// Reserved `kb-lib.decoder.spl.account_compression` decoder. -pub use self::spl::DcSplAccountCompressionDecoder; -/// Exact decoder for the SPL Associated Token Account program. -pub use self::spl::DcSplAssociatedTokenAccountDecoder; -/// Parsed SPL ElGamal public-key registry account. -pub use self::spl::DcSplElGamalRegistryState; -/// Exact decoder for the SPL ElGamal registry program. -pub use self::spl::DcSplElgamalRegistryDecoder; -/// Exact decoder for the three registered SPL Memo generations. -pub use self::spl::DcSplMemoDecoder; -/// Reserved `kb-lib.decoder.spl.noop` decoder. -pub use self::spl::DcSplNoopDecoder; -/// Reserved `kb-lib.decoder.spl.single_pool` decoder. -pub use self::spl::DcSplSinglePoolDecoder; -/// Reserved `kb-lib.decoder.spl.stake_pool` decoder. -pub use self::spl::DcSplStakePoolDecoder; -/// Exact decoder for the Token-2022 program. -pub use self::spl::DcSplToken2022Decoder; -/// Exact decoder for the classic SPL Token program. -pub use self::spl::DcSplTokenDecoder; -/// Parsed Token-2022 Mint, Account, or Multisig state. -pub use self::spl::DcToken2022State; -/// Exact Token-2022 base account state kind. -pub use self::spl::DcToken2022StateKind; -/// One exact Token-2022 TLV entry. -pub use self::spl::DcToken2022TlvEntry; -/// Parses one exact SPL ElGamal registry account. -pub use self::spl::decoder_spl_elgamal_registry_parse_elgamal_registry_state; -/// Parses one Token-2022 Mint, Account, or Multisig state. -pub use self::spl::decoder_spl_token_2022_parse_token_2022_state; -/// Reserved `kb-lib.decoder.stable.swap_hylo_exchange` decoder. -pub use self::stable::DcStableSwapHyloExchangeDecoder; -/// Reserved `kb-lib.decoder.stable.swap_jupiter_stable` decoder. -pub use self::stable::DcStableSwapJupiterStableDecoder; -/// Reserved `kb-lib.decoder.stable.swap_numeraire` decoder. -pub use self::stable::DcStableSwapNumeraireDecoder; -/// Reserved `kb-lib.decoder.stable.swap_stabble` decoder. -pub use self::stable::DcStableSwapStabbleDecoder; -/// Reserved `kb-lib.decoder.staking.kamino_farm` decoder. -pub use self::staking::DcStakingKaminoFarmDecoder; -/// Reserved `kb-lib.decoder.staking.marinade_finance` decoder. -pub use self::staking::DcStakingMarinadeFinanceDecoder; -/// Reserved `kb-lib.decoder.staking.solayer` decoder. -pub use self::staking::DcStakingSolayerDecoder; -/// Reserved `kb-lib.decoder.treasury.helium_treasury_management` decoder. -pub use self::treasury::DcTreasuryHeliumTreasuryManagementDecoder; -/// Reserved `kb-lib.decoder.vault.carrot_defi` decoder. -pub use self::vault::DcVaultCarrotDefiDecoder; -/// Reserved `kb-lib.decoder.vault.hylo_stability_pool` decoder. -pub use self::vault::DcVaultHyloStabilityPoolDecoder; -/// Reserved `kb-lib.decoder.vault.kamino` decoder. -pub use self::vault::DcVaultKaminoDecoder; -/// Reserved `kb-lib.decoder.vault.kamino_v2` decoder. -pub use self::vault::DcVaultKaminoV2Decoder; -/// Reserved `kb-lib.decoder.vault.kamino_yvaults` decoder. -pub use self::vault::DcVaultKaminoYvaultsDecoder; -/// Reserved `kb-lib.decoder.vault.meteora` decoder. -pub use self::vault::DcVaultMeteoraDecoder; -/// Reserved `kb-lib.decoder.vesting.streamflow` decoder. -pub use self::vesting::DcVestingStreamflowDecoder; -/// Reserved `kb-lib.decoder.wallet.jupiter_apepro_smart_wallet` decoder. -pub use self::wallet::DcWalletJupiterApeproSmartWalletDecoder; -/// Reserved `kb-lib.decoder.weighted.swap_stabble` decoder. -pub use self::weighted::DcWeightedSwapStabbleDecoder; - -/// Approve Collection Authority discriminator. pub(crate) use self::metadata::DC_METADATA_MTM_APPROVE_COLLECTION_AUTHORITY_DISCRIMINATOR; /// Approve Use Authority discriminator. pub(crate) use self::metadata::DC_METADATA_MTM_APPROVE_USE_AUTHORITY_DISCRIMINATOR; @@ -430,6 +264,8 @@ pub(crate) use self::metadata::DC_METADATA_MTM_MAX_BASE64_BYTES; pub(crate) use self::metadata::DC_METADATA_MTM_MAX_INSTRUCTION_ACCOUNTS; /// Maximum retained instruction payload size. pub(crate) use self::metadata::DC_METADATA_MTM_MAX_INSTRUCTION_BYTES; +/// Exhaustive published Metaplex account-key inventory. +pub use self::metadata::DC_METADATA_MTM_METADATA_ACCOUNT_LAYOUT_AUDIT; /// Migrate discriminator. pub(crate) use self::metadata::DC_METADATA_MTM_MIGRATE_DISCRIMINATOR; /// Modern Mint discriminator. @@ -496,14 +332,116 @@ pub(crate) use self::metadata::DC_METADATA_MTM_VERIFY_COLLECTION_DISCRIMINATOR; pub(crate) use self::metadata::DC_METADATA_MTM_VERIFY_DISCRIMINATOR; /// Verify Sized Collection Item discriminator. pub(crate) use self::metadata::DC_METADATA_MTM_VERIFY_SIZED_COLLECTION_ITEM_DISCRIMINATOR; +/// Exact decoder for the Metaplex Token Metadata program. +pub use self::metadata::DcMetadataMetaplexTokenMetadataDecoder; +/// Canonical projection shared by Collection and Use Authority records. +pub use self::metadata::DcMetadataMtmAuthorityRecordAccountSnapshot; +/// Stable identity and policy of one canonical account snapshot. +pub use self::metadata::DcMetadataMtmCanonicalAccountIdentity; +/// Lifecycle class of one canonical account layout. +pub use self::metadata::DcMetadataMtmCanonicalAccountLifecycle; +/// Provenance retained for one canonical account observation. +pub use self::metadata::DcMetadataMtmCanonicalAccountProvenance; +/// Execution policy separated from historical materialization. +pub use self::metadata::DcMetadataMtmCanonicalExecutionPolicy; +/// Materialization policy for active or historical state. +pub use self::metadata::DcMetadataMtmCanonicalMaterializationPolicy; +/// Canonical account envelope used by materializers and replay. +pub use self::metadata::DcMetadataMtmCanonicalMetadataAccountSnapshot; +/// Typed canonical Metaplex account state. +pub use self::metadata::DcMetadataMtmCanonicalMetadataAccountState; +/// Origin of one canonical account observation. +pub use self::metadata::DcMetadataMtmCanonicalObservationSource; +/// Canonical projection shared by Metadata and Holder delegate records. +pub use self::metadata::DcMetadataMtmDelegateRecordAccountSnapshot; +/// Supported edition account layout. +pub use self::metadata::DcMetadataMtmEditionAccountKind; +/// Canonical bounded projection of one edition or master-edition account. +pub use self::metadata::DcMetadataMtmEditionAccountSnapshot; +/// Supported Edition Marker account layout. +pub use self::metadata::DcMetadataMtmEditionMarkerAccountKind; +/// Canonical bounded projection of one Edition Marker account. +pub use self::metadata::DcMetadataMtmEditionMarkerAccountSnapshot; +/// Bounded error returned while decoding a Metadata account. +pub use self::metadata::DcMetadataMtmMetadataAccountDecodeError; +/// One entry in the exhaustive published account-key audit. +pub use self::metadata::DcMetadataMtmMetadataAccountLayoutAuditEntry; +/// Canonical bounded projection of one Metadata account. +pub use self::metadata::DcMetadataMtmMetadataAccountSnapshot; +/// One bounded historical reservation entry. +pub use self::metadata::DcMetadataMtmReservationEntrySnapshot; +/// Historical Reservation List account generation. +pub use self::metadata::DcMetadataMtmReservationListAccountKind; +/// Canonical decode-only projection of a historical Reservation List account. +pub use self::metadata::DcMetadataMtmReservationListAccountSnapshot; +/// Canonical projection of one Token Owned Escrow account. +pub use self::metadata::DcMetadataMtmTokenOwnedEscrowAccountSnapshot; +/// Authority form used by one Token Owned Escrow account. +pub use self::metadata::DcMetadataMtmTokenOwnedEscrowAuthorityKind; +/// Canonical bounded projection of one programmable Token Record account. +pub use self::metadata::DcMetadataMtmTokenRecordAccountSnapshot; +/// Reserved `kb-lib.decoder.metadata.solana_program_metadata` decoder. +pub use self::metadata::DcMetadataSolanaProgramMetadataDecoder; +/// Reserved `kb-lib.decoder.metadata.spl_name_service` decoder. +pub use self::metadata::DcMetadataSplNameServiceDecoder; /// Canonical tracing target for this crate. pub(crate) use self::metadata::TRACING_TARGET_DECODER_METADATA_METAPLEX_TOKEN_METADATA; /// Crate-root access to `decode` from `instruction`. pub(crate) use self::metadata::decoder_metadata_metaplex_token_metadata_decode; +/// Decodes one Collection Authority Record account. +pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_collection_authority_record_account; +/// Decodes and validates one edition or master-edition account snapshot. +pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_edition_account; +/// Decodes and validates one Edition Marker account snapshot. +pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_edition_marker_account; +/// Decodes one Holder Delegate Record account. +pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_holder_delegate_record_account; +/// Decodes and validates one canonical Metadata account snapshot. +pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_metadata_account; +/// Decodes one Metadata Delegate Record account. +pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_metadata_delegate_record_account; +/// Decodes one historical Reservation List V1 or V2 account. +pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_reservation_list_account; +/// Decodes one Token Owned Escrow account. +pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_token_owned_escrow_account; +/// Decodes and validates one programmable Token Record account snapshot. +pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_token_record_account; +/// Decodes one Use Authority Record account. +pub use self::metadata::decoder_metadata_metaplex_token_metadata_decode_use_authority_record_account; /// Crate-root access to `entry_for_discriminator` from `instruction`. pub(crate) use self::metadata::decoder_metadata_metaplex_token_metadata_entry_for_discriminator; /// Crate-root access to `payload_discriminator` from `instruction`. pub(crate) use self::metadata::decoder_metadata_metaplex_token_metadata_payload_discriminator; +/// Reserved `kb-lib.decoder.nft.metaplex_bubblegum` decoder. +pub use self::nft::DcNftMetaplexBubblegumDecoder; +/// Reserved `kb-lib.decoder.nft.tensor_cnft` decoder. +pub use self::nft::DcNftTensorCnftDecoder; +/// Reserved `kb-lib.decoder.orderbook.jupiter_limit_order` decoder. +pub use self::orderbook::DcOrderbookJupiterLimitOrderDecoder; +/// Reserved `kb-lib.decoder.orderbook.jupiter_limit_order_v2` decoder. +pub use self::orderbook::DcOrderbookJupiterLimitOrderV2Decoder; +/// Reserved `kb-lib.decoder.orderbook.openbook_v2` decoder. +pub use self::orderbook::DcOrderbookOpenbookV2Decoder; +/// Reserved `kb-lib.decoder.perpetuals.drift_v2` decoder. +pub use self::perpetuals::DcPerpetualsDriftV2Decoder; +/// Reserved `kb-lib.decoder.perpetuals.jupiter` decoder. +pub use self::perpetuals::DcPerpetualsJupiterDecoder; +/// Reserved `kb-lib.decoder.perpetuals.phoenix_eternal` decoder. +pub use self::perpetuals::DcPerpetualsPhoenixEternalDecoder; +/// Reserved `kb-lib.decoder.perpetuals.zeta` decoder. +pub use self::perpetuals::DcPerpetualsZetaDecoder; +/// Reserved `kb-lib.decoder.router.dflow_aggregator_v4` decoder. +pub use self::router::DcRouterDflowAggregatorV4Decoder; +/// Reserved `kb-lib.decoder.router.jupiter_aggregator_v4` decoder. +pub use self::router::DcRouterJupiterAggregatorV4Decoder; +/// Reserved `kb-lib.decoder.router.jupiter_aggregator_v6` decoder. +pub use self::router::DcRouterJupiterAggregatorV6Decoder; +/// Reserved `kb-lib.decoder.router.okx_labs_v1` decoder. +pub use self::router::DcRouterOkxLabsV1Decoder; +/// Reserved `kb-lib.decoder.router.okx_labs_v2` decoder. +pub use self::router::DcRouterOkxLabsV2Decoder; +/// Reserved `kb-lib.decoder.rwa.ondo_global_markets` decoder. +pub use self::rwa::DcRwaOndoGlobalMarketsDecoder; pub(crate) use self::solana::DC_SOLANA_CORE_ADDRESS_LOOKUP_TABLE_SURFACE_CODE; pub(crate) use self::solana::DC_SOLANA_CORE_BPF_LOADER_DEPRECATED_SURFACE_CODE; pub(crate) use self::solana::DC_SOLANA_CORE_BPF_LOADER_SURFACE_CODE; @@ -534,6 +472,8 @@ pub(crate) use self::solana::DC_SOLANA_CORE_VOTE_SURFACE_CODE; pub(crate) use self::solana::DC_SOLANA_CORE_ZK_ELGAMAL_PROOF_SURFACE_CODE; pub(crate) use self::solana::DC_SOLANA_CORE_ZK_TOKEN_PROOF_SURFACE_CODE; pub(crate) use self::solana::DcSolanaCoreAccountRole; +/// Runtime-native Solana decoder with phased maximal native coverage. +pub use self::solana::DcSolanaCoreDecoder; pub(crate) use self::solana::DcSolanaCoreResolvedInstructionPayload; pub(crate) use self::solana::TRACING_TARGET_DECODER_SOLANA_CORE; pub(crate) use self::solana::decoder_solana_core_address_lookup_table_coverage; @@ -605,6 +545,8 @@ pub(crate) use self::spl::DC_SPL_ATA_MAX_INSTRUCTION_BYTES; pub(crate) use self::spl::DC_SPL_ATA_MAX_TRANSACTION_KEYS; /// Stable protocol and surface code for the Associated Token Account program. pub(crate) use self::spl::DC_SPL_ATA_SURFACE_CODE; +/// Exact byte length of one SPL ElGamal registry account. +pub use self::spl::DC_SPL_ELGAMAL_REGISTRY_ACCOUNT_LEN; /// Current stable SPL ElGamal registry event contract version. pub(crate) use self::spl::DC_SPL_ELGAMAL_REGISTRY_EVENT_VERSION; /// Maximum retained SPL ElGamal registry instruction payload size. @@ -655,8 +597,34 @@ pub(crate) use self::spl::DC_SPL_TOKEN_MAX_BATCH_INSTRUCTIONS; pub(crate) use self::spl::DC_SPL_TOKEN_MAX_INSTRUCTION_BYTES; /// Stable protocol and surface code for the classic SPL Token program. pub(crate) use self::spl::DC_SPL_TOKEN_SURFACE_CODE; +/// Reserved `kb-lib.decoder.spl.account_compression` decoder. +pub use self::spl::DcSplAccountCompressionDecoder; +/// Exact decoder for the SPL Associated Token Account program. +pub use self::spl::DcSplAssociatedTokenAccountDecoder; /// One parsed SPL ElGamal registry instruction. pub(crate) use self::spl::DcSplElGamalRegistryParsedRegistryInstruction; +/// Parsed SPL ElGamal public-key registry account. +pub use self::spl::DcSplElGamalRegistryState; +/// Exact decoder for the SPL ElGamal registry program. +pub use self::spl::DcSplElgamalRegistryDecoder; +/// Exact decoder for the three registered SPL Memo generations. +pub use self::spl::DcSplMemoDecoder; +/// Reserved `kb-lib.decoder.spl.noop` decoder. +pub use self::spl::DcSplNoopDecoder; +/// Reserved `kb-lib.decoder.spl.single_pool` decoder. +pub use self::spl::DcSplSinglePoolDecoder; +/// Reserved `kb-lib.decoder.spl.stake_pool` decoder. +pub use self::spl::DcSplStakePoolDecoder; +/// Exact decoder for the Token-2022 program. +pub use self::spl::DcSplToken2022Decoder; +/// Exact decoder for the classic SPL Token program. +pub use self::spl::DcSplTokenDecoder; +/// Parsed Token-2022 Mint, Account, or Multisig state. +pub use self::spl::DcToken2022State; +/// Exact Token-2022 base account state kind. +pub use self::spl::DcToken2022StateKind; +/// One exact Token-2022 TLV entry. +pub use self::spl::DcToken2022TlvEntry; /// Canonical tracing target for the Associated Token Account decoder. pub(crate) use self::spl::TRACING_TARGET_DECODER_SPL_ATA; /// Canonical tracing target for the SPL ElGamal registry decoder. @@ -679,12 +647,16 @@ pub(crate) use self::spl::decoder_spl_elgamal_registry_decode; pub(crate) use self::spl::decoder_spl_elgamal_registry_decode_payload; /// Parses one exact SPL ElGamal registry instruction. pub(crate) use self::spl::decoder_spl_elgamal_registry_parse; +/// Parses one exact SPL ElGamal registry account. +pub use self::spl::decoder_spl_elgamal_registry_parse_elgamal_registry_state; /// Decodes one bounded SPL Memo instruction. pub(crate) use self::spl::decoder_spl_memo_decode; /// Decodes one bounded Token-2022 instruction. pub(crate) use self::spl::decoder_spl_token_2022_decode; /// Returns the exact entry matching one Token-2022 tag. pub(crate) use self::spl::decoder_spl_token_2022_entry_for_tag; +/// Parses one Token-2022 Mint, Account, or Multisig state. +pub use self::spl::decoder_spl_token_2022_parse_token_2022_state; /// Returns the first byte of one retained Token-2022 payload. pub(crate) use self::spl::decoder_spl_token_2022_payload_tag; /// Decodes one bounded classic SPL Token instruction. @@ -693,15 +665,63 @@ pub(crate) use self::spl::decoder_spl_token_decode; pub(crate) use self::spl::decoder_spl_token_entry_for_tag; /// Returns the first byte of one retained classic SPL Token payload. pub(crate) use self::spl::decoder_spl_token_payload_tag; - +/// Reserved `kb-lib.decoder.stable.swap_hylo_exchange` decoder. +pub use self::stable::DcStableSwapHyloExchangeDecoder; +/// Reserved `kb-lib.decoder.stable.swap_jupiter_stable` decoder. +pub use self::stable::DcStableSwapJupiterStableDecoder; +/// Reserved `kb-lib.decoder.stable.swap_numeraire` decoder. +pub use self::stable::DcStableSwapNumeraireDecoder; +/// Reserved `kb-lib.decoder.stable.swap_stabble` decoder. +pub use self::stable::DcStableSwapStabbleDecoder; +/// Reserved `kb-lib.decoder.staking.jito_tip_distribution` decoder. +pub use self::staking::DcStakingJitoTipDistributionDecoder; +/// Reserved `kb-lib.decoder.staking.kamino_farm` decoder. +pub use self::staking::DcStakingKaminoFarmDecoder; +/// Reserved `kb-lib.decoder.staking.marinade_finance` decoder. +pub use self::staking::DcStakingMarinadeFinanceDecoder; +/// Reserved `kb-lib.decoder.staking.solayer` decoder. +pub use self::staking::DcStakingSolayerDecoder; +/// Reserved `kb-lib.decoder.storage.solana_record` decoder. +pub use self::storage::DcStorageSolanaRecordDecoder; +/// Reserved `kb-lib.decoder.router.jupiter_dca` decoder. +pub use self::strategy::DcStrategyJupiterDcaDecoder; +/// Reserved `kb-lib.decoder.treasury.helium_treasury_management` decoder. +pub use self::treasury::DcTreasuryHeliumTreasuryManagementDecoder; +/// Reserved `kb-lib.decoder.vault.carrot_defi` decoder. +pub use self::vault::DcVaultCarrotDefiDecoder; +/// Reserved `kb-lib.decoder.vault.hylo_stability_pool` decoder. +pub use self::vault::DcVaultHyloStabilityPoolDecoder; +/// Reserved `kb-lib.decoder.vault.kamino` decoder. +pub use self::vault::DcVaultKaminoDecoder; +/// Reserved `kb-lib.decoder.vault.kamino_v2` decoder. +pub use self::vault::DcVaultKaminoV2Decoder; +/// Reserved `kb-lib.decoder.vault.kamino_yvaults` decoder. +pub use self::vault::DcVaultKaminoYvaultsDecoder; +/// Reserved `kb-lib.decoder.vault.meteora` decoder. +pub use self::vault::DcVaultMeteoraDecoder; +/// Reserved `kb-lib.decoder.admin.jupiter_lock` decoder. +pub use self::vesting::DcVestingJupiterLockDecoder; +/// Reserved `kb-lib.decoder.vesting.streamflow` decoder. +pub use self::vesting::DcVestingStreamflowDecoder; +/// Reserved `kb-lib.decoder.wallet.jupiter_apepro_smart_wallet` decoder. +pub use self::wallet::DcWalletJupiterApeproSmartWalletDecoder; +/// Reserved `kb-lib.decoder.weighted.swap_stabble` decoder. +pub use self::weighted::DcWeightedSwapStabbleDecoder; #[cfg(test)] mod reserved_decoder_tests { #[test] fn every_reserved_decoder_exposes_only_registered_program_ids() { - let decoders: [&dyn crate::DcApiProtocolDecoder; 98] = [ + let decoders: [&dyn crate::DcApiProtocolDecoder; 105] = [ &crate::DcAdapterSaberDecimalWrapperDecoder, - &crate::DcAdminJupiterLockDecoder, - &crate::DcAdminPumpFeesDecoder, + &crate::DcAdapterSplTokenWrapDecoder, + &crate::DcGovernanceSquadsMultisigDecoder, + &crate::DcMetadataSolanaProgramMetadataDecoder, + &crate::DcNftTensorCnftDecoder, + &crate::DcPerpetualsPhoenixEternalDecoder, + &crate::DcStakingJitoTipDistributionDecoder, + &crate::DcStorageSolanaRecordDecoder, + &crate::DcVestingJupiterLockDecoder, + &crate::DcFeesPumpFeesDecoder, &crate::DcAmmAldrinV1Decoder, &crate::DcAmmAldrinV2Decoder, &crate::DcAmmAlphaqDecoder, @@ -713,7 +733,7 @@ mod reserved_decoder_tests { &crate::DcAmmGoosefxV2Decoder, &crate::DcAmmGuacSwapDecoder, &crate::DcAmmLifinitySwapV2Decoder, - &crate::DcAmmMetadaoFutarchyAmmDecoder, + &crate::DcGovernanceMetadaoFutarchyDecoder, &crate::DcAmmMetadaoV05Decoder, &crate::DcAmmMeteoraDammV1Decoder, &crate::DcAmmMeteoraDammV2Decoder, @@ -724,7 +744,7 @@ mod reserved_decoder_tests { &crate::DcAmmSolfiDecoder, &crate::DcAmmSolfiV2Decoder, &crate::DcAmmVertigoDecoder, - &crate::DcAmmVirtualsDecoder, + &crate::DcLaunchpadVirtualsDecoder, &crate::DcAmmWoofiDecoder, &crate::DcAmmZeroFiDecoder, &crate::DcAmmZoraDecoder, @@ -772,7 +792,7 @@ mod reserved_decoder_tests { &crate::DcRouterDflowAggregatorV4Decoder, &crate::DcRouterJupiterAggregatorV4Decoder, &crate::DcRouterJupiterAggregatorV6Decoder, - &crate::DcRouterJupiterDcaDecoder, + &crate::DcStrategyJupiterDcaDecoder, &crate::DcRouterOkxLabsV1Decoder, &crate::DcRouterOkxLabsV2Decoder, &crate::DcRwaOndoGlobalMarketsDecoder, @@ -827,6 +847,6 @@ mod reserved_decoder_tests { assert!(decode_result.is_ok_and(|events| return events.is_empty())); } } - assert_eq!(names.len(), 98); + assert_eq!(names.len(), 105); } } diff --git a/kb-lib/src/decoder/adapter.rs b/kb-lib/src/decoder/adapter.rs index 228a026..66d6958 100644 --- a/kb-lib/src/decoder/adapter.rs +++ b/kb-lib/src/decoder/adapter.rs @@ -1,9 +1,12 @@ // file: kb-lib/src/decoder/adapter.rs -// version: 4 +// version: 5 //! `adapter` decoder family. mod saber_decimal_wrapper; +mod spl_token_wrap; /// Reserved `kb-lib.decoder.adapter.saber_decimal_wrapper` decoder. pub use self::saber_decimal_wrapper::DcAdapterSaberDecimalWrapperDecoder; +/// Reserved `kb-lib.decoder.adapter.spl_token_wrap` decoder. +pub use self::spl_token_wrap::DcAdapterSplTokenWrapDecoder; diff --git a/kb-lib/src/decoder/adapter/spl_token_wrap.rs b/kb-lib/src/decoder/adapter/spl_token_wrap.rs new file mode 100644 index 0000000..4ab612b --- /dev/null +++ b/kb-lib/src/decoder/adapter/spl_token_wrap.rs @@ -0,0 +1,39 @@ +// file: kb-lib/src/decoder/adapter/spl_token_wrap.rs +// version: 1 + +//! Reserved protocol decoder for `adapter_spl_token_wrap`. + +/// Reserved decoder for the `adapter_spl_token_wrap` program surface. +#[derive(Clone, Debug, Default)] +pub struct DcAdapterSplTokenWrapDecoder; + +impl crate::DcApiProtocolDecoder for crate::DcAdapterSplTokenWrapDecoder { + fn decoder_name(&self) -> &'static str { + return "kb-lib.decoder.adapter.spl_token_wrap"; + } + + fn decoder_version(&self) -> &'static str { + return env!("CARGO_PKG_VERSION"); + } + + fn program_ids(&self) -> &'static [&'static str] { + return &[kb_program_ids::ADAPTER_SPL_TOKEN_WRAP_PROGRAM_ID]; + } + + fn supports_observation( + &self, + observation: &crate::MdProgramObservation, + ) -> crate::DcApiDecoderSupport { + if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) { + return crate::DcApiDecoderSupport::Maybe; + } + return crate::DcApiDecoderSupport::No; + } + + fn decode_observation( + &self, + _observation: &crate::MdProgramObservation, + ) -> kb_core::Result> { + return std::result::Result::Ok(std::vec::Vec::new()); + } +} diff --git a/kb-lib/src/decoder/admin.rs b/kb-lib/src/decoder/admin.rs deleted file mode 100644 index 2ddd10a..0000000 --- a/kb-lib/src/decoder/admin.rs +++ /dev/null @@ -1,12 +0,0 @@ -// file: kb-lib/src/decoder/admin.rs -// version: 4 - -//! `admin` decoder family. - -mod jupiter_lock; -mod pump_fees; - -/// Reserved `kb-lib.decoder.admin.jupiter_lock` decoder. -pub use self::jupiter_lock::DcAdminJupiterLockDecoder; -/// Reserved `kb-lib.decoder.admin.pump_fees` decoder. -pub use self::pump_fees::DcAdminPumpFeesDecoder; diff --git a/kb-lib/src/decoder/amm.rs b/kb-lib/src/decoder/amm.rs index f2d9146..8d37ff4 100644 --- a/kb-lib/src/decoder/amm.rs +++ b/kb-lib/src/decoder/amm.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/decoder/amm.rs -// version: 4 +// version: 5 //! `amm` decoder family. @@ -14,7 +14,6 @@ mod goosefx_gamma; mod goosefx_v2; mod guac_swap; mod lifinity_swap_v2; -mod metadao_futarchy_amm; mod metadao_v0_5; mod meteora_damm_v1; mod meteora_damm_v2; @@ -25,7 +24,6 @@ mod raydium_lp_v4; mod solfi; mod solfi_v2; mod vertigo; -mod virtuals; mod woofi; mod zero_fi; mod zora; @@ -52,8 +50,6 @@ pub use self::goosefx_v2::DcAmmGoosefxV2Decoder; pub use self::guac_swap::DcAmmGuacSwapDecoder; /// Reserved `kb-lib.decoder.amm.lifinity_swap_v2` decoder. pub use self::lifinity_swap_v2::DcAmmLifinitySwapV2Decoder; -/// Reserved `kb-lib.decoder.amm.metadao_futarchy_amm` decoder. -pub use self::metadao_futarchy_amm::DcAmmMetadaoFutarchyAmmDecoder; /// Reserved `kb-lib.decoder.amm.metadao_v0_5` decoder. pub use self::metadao_v0_5::DcAmmMetadaoV05Decoder; /// Reserved `kb-lib.decoder.amm.meteora_damm_v1` decoder. @@ -74,8 +70,6 @@ pub use self::solfi::DcAmmSolfiDecoder; pub use self::solfi_v2::DcAmmSolfiV2Decoder; /// Reserved `kb-lib.decoder.amm.vertigo` decoder. pub use self::vertigo::DcAmmVertigoDecoder; -/// Reserved `kb-lib.decoder.amm.virtuals` decoder. -pub use self::virtuals::DcAmmVirtualsDecoder; /// Reserved `kb-lib.decoder.amm.woofi` decoder. pub use self::woofi::DcAmmWoofiDecoder; /// Reserved `kb-lib.decoder.amm.zero_fi` decoder. diff --git a/kb-lib/src/decoder/fees.rs b/kb-lib/src/decoder/fees.rs index 71eacd4..fee0a30 100644 --- a/kb-lib/src/decoder/fees.rs +++ b/kb-lib/src/decoder/fees.rs @@ -1,12 +1,15 @@ // file: kb-lib/src/decoder/fees.rs -// version: 4 +// version: 5 //! `fees` decoder family. mod bags_fee_share_v1; mod bags_fee_share_v2; +mod pump_fees; /// Reserved `kb-lib.decoder.fees.bags_fee_share_v1` decoder. pub use self::bags_fee_share_v1::DcFeesBagsFeeShareV1Decoder; /// Reserved `kb-lib.decoder.fees.bags_fee_share_v2` decoder. pub use self::bags_fee_share_v2::DcFeesBagsFeeShareV2Decoder; +/// Reserved `kb-lib.decoder.fees.pump_fees` decoder. +pub use self::pump_fees::DcFeesPumpFeesDecoder; diff --git a/kb-lib/src/decoder/amm/virtuals.rs b/kb-lib/src/decoder/fees/pump_fees.rs similarity index 69% rename from kb-lib/src/decoder/amm/virtuals.rs rename to kb-lib/src/decoder/fees/pump_fees.rs index 8522150..6556747 100644 --- a/kb-lib/src/decoder/amm/virtuals.rs +++ b/kb-lib/src/decoder/fees/pump_fees.rs @@ -1,15 +1,15 @@ -// file: kb-lib/src/decoder/amm/virtuals.rs +// file: kb-lib/src/decoder/fees/pump_fees.rs // version: 4 -//! Reserved protocol decoder for `amm_virtuals`. +//! Reserved protocol decoder for `fees_pump_fees`. -/// Reserved decoder for the `amm_virtuals` program surface. +/// Reserved decoder for the `fees_pump_fees` program surface. #[derive(Clone, Debug, Default)] -pub struct DcAmmVirtualsDecoder; +pub struct DcFeesPumpFeesDecoder; -impl crate::DcApiProtocolDecoder for crate::DcAmmVirtualsDecoder { +impl crate::DcApiProtocolDecoder for crate::DcFeesPumpFeesDecoder { fn decoder_name(&self) -> &'static str { - return "kb-lib.decoder.amm.virtuals"; + return "kb-lib.decoder.fees.pump_fees"; } fn decoder_version(&self) -> &'static str { @@ -17,7 +17,7 @@ impl crate::DcApiProtocolDecoder for crate::DcAmmVirtualsDecoder { } fn program_ids(&self) -> &'static [&'static str] { - return &[kb_program_ids::AMM_VIRTUALS_PROGRAM_ID]; + return &[kb_program_ids::FEES_PUMP_FEES_PROGRAM_ID]; } fn supports_observation( diff --git a/kb-lib/src/decoder/governance.rs b/kb-lib/src/decoder/governance.rs index 426d250..4a45cd9 100644 --- a/kb-lib/src/decoder/governance.rs +++ b/kb-lib/src/decoder/governance.rs @@ -1,9 +1,15 @@ // file: kb-lib/src/decoder/governance.rs -// version: 4 +// version: 5 //! `governance` decoder family. mod metadao_bid_wall; +mod metadao_futarchy; +mod squads_multisig; /// Reserved `kb-lib.decoder.governance.metadao_bid_wall` decoder. pub use self::metadao_bid_wall::DcGovernanceMetadaoBidWallDecoder; +/// Reserved `kb-lib.decoder.governance.metadao_futarchy` decoder. +pub use self::metadao_futarchy::DcGovernanceMetadaoFutarchyDecoder; +/// Reserved `kb-lib.decoder.governance.squads_multisig` decoder. +pub use self::squads_multisig::DcGovernanceSquadsMultisigDecoder; diff --git a/kb-lib/src/decoder/amm/metadao_futarchy_amm.rs b/kb-lib/src/decoder/governance/metadao_futarchy.rs similarity index 64% rename from kb-lib/src/decoder/amm/metadao_futarchy_amm.rs rename to kb-lib/src/decoder/governance/metadao_futarchy.rs index 1cb1ec5..01aecc1 100644 --- a/kb-lib/src/decoder/amm/metadao_futarchy_amm.rs +++ b/kb-lib/src/decoder/governance/metadao_futarchy.rs @@ -1,15 +1,15 @@ -// file: kb-lib/src/decoder/amm/metadao_futarchy_amm.rs +// file: kb-lib/src/decoder/governance/metadao_futarchy.rs // version: 4 -//! Reserved protocol decoder for `amm_metadao_futarchy_amm`. +//! Reserved protocol decoder for `governance_metadao_futarchy`. -/// Reserved decoder for the `amm_metadao_futarchy_amm` program surface. +/// Reserved decoder for the `governance_metadao_futarchy` program surface. #[derive(Clone, Debug, Default)] -pub struct DcAmmMetadaoFutarchyAmmDecoder; +pub struct DcGovernanceMetadaoFutarchyDecoder; -impl crate::DcApiProtocolDecoder for crate::DcAmmMetadaoFutarchyAmmDecoder { +impl crate::DcApiProtocolDecoder for crate::DcGovernanceMetadaoFutarchyDecoder { fn decoder_name(&self) -> &'static str { - return "kb-lib.decoder.amm.metadao_futarchy_amm"; + return "kb-lib.decoder.governance.metadao_futarchy"; } fn decoder_version(&self) -> &'static str { @@ -17,7 +17,7 @@ impl crate::DcApiProtocolDecoder for crate::DcAmmMetadaoFutarchyAmmDecoder { } fn program_ids(&self) -> &'static [&'static str] { - return &[kb_program_ids::AMM_METADAO_FUTARCHY_AMM_PROGRAM_ID]; + return &[kb_program_ids::GOVERNANCE_METADAO_FUTARCHY_PROGRAM_ID]; } fn supports_observation( diff --git a/kb-lib/src/decoder/governance/squads_multisig.rs b/kb-lib/src/decoder/governance/squads_multisig.rs new file mode 100644 index 0000000..77bc631 --- /dev/null +++ b/kb-lib/src/decoder/governance/squads_multisig.rs @@ -0,0 +1,39 @@ +// file: kb-lib/src/decoder/governance/squads_multisig.rs +// version: 1 + +//! Reserved protocol decoder for `governance_squads_multisig`. + +/// Reserved decoder for the `governance_squads_multisig` program surface. +#[derive(Clone, Debug, Default)] +pub struct DcGovernanceSquadsMultisigDecoder; + +impl crate::DcApiProtocolDecoder for crate::DcGovernanceSquadsMultisigDecoder { + fn decoder_name(&self) -> &'static str { + return "kb-lib.decoder.governance.squads_multisig"; + } + + fn decoder_version(&self) -> &'static str { + return env!("CARGO_PKG_VERSION"); + } + + fn program_ids(&self) -> &'static [&'static str] { + return &[kb_program_ids::GOVERNANCE_SQUADS_MULTISIG_PROGRAM_ID]; + } + + fn supports_observation( + &self, + observation: &crate::MdProgramObservation, + ) -> crate::DcApiDecoderSupport { + if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) { + return crate::DcApiDecoderSupport::Maybe; + } + return crate::DcApiDecoderSupport::No; + } + + fn decode_observation( + &self, + _observation: &crate::MdProgramObservation, + ) -> kb_core::Result> { + return std::result::Result::Ok(std::vec::Vec::new()); + } +} diff --git a/kb-lib/src/decoder/launchpad.rs b/kb-lib/src/decoder/launchpad.rs index d3f5060..4ec96d7 100644 --- a/kb-lib/src/decoder/launchpad.rs +++ b/kb-lib/src/decoder/launchpad.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/decoder/launchpad.rs -// version: 4 +// version: 5 //! `launchpad` decoder family. @@ -12,6 +12,7 @@ mod printr; mod pump_fun; mod pump_pumpup_ai; mod raydium_launchlab; +mod virtuals; /// Reserved `kb-lib.decoder.launchpad.boop_fun` decoder. pub use self::boop_fun::DcLaunchpadBoopFunDecoder; @@ -31,3 +32,5 @@ pub use self::pump_fun::DcLaunchpadPumpFunDecoder; pub use self::pump_pumpup_ai::DcLaunchpadPumpPumpupAiDecoder; /// Reserved `kb-lib.decoder.launchpad.raydium_launchlab` decoder. pub use self::raydium_launchlab::DcLaunchpadRaydiumLaunchlabDecoder; +/// Reserved `kb-lib.decoder.launchpad.virtuals` decoder. +pub use self::virtuals::DcLaunchpadVirtualsDecoder; diff --git a/kb-lib/src/decoder/admin/jupiter_lock.rs b/kb-lib/src/decoder/launchpad/virtuals.rs similarity index 67% rename from kb-lib/src/decoder/admin/jupiter_lock.rs rename to kb-lib/src/decoder/launchpad/virtuals.rs index 16661e6..ddde032 100644 --- a/kb-lib/src/decoder/admin/jupiter_lock.rs +++ b/kb-lib/src/decoder/launchpad/virtuals.rs @@ -1,15 +1,15 @@ -// file: kb-lib/src/decoder/admin/jupiter_lock.rs +// file: kb-lib/src/decoder/launchpad/virtuals.rs // version: 4 -//! Reserved protocol decoder for `admin_jupiter_lock`. +//! Reserved protocol decoder for `launchpad_virtuals`. -/// Reserved decoder for the `admin_jupiter_lock` program surface. +/// Reserved decoder for the `launchpad_virtuals` program surface. #[derive(Clone, Debug, Default)] -pub struct DcAdminJupiterLockDecoder; +pub struct DcLaunchpadVirtualsDecoder; -impl crate::DcApiProtocolDecoder for crate::DcAdminJupiterLockDecoder { +impl crate::DcApiProtocolDecoder for crate::DcLaunchpadVirtualsDecoder { fn decoder_name(&self) -> &'static str { - return "kb-lib.decoder.admin.jupiter_lock"; + return "kb-lib.decoder.launchpad.virtuals"; } fn decoder_version(&self) -> &'static str { @@ -17,7 +17,7 @@ impl crate::DcApiProtocolDecoder for crate::DcAdminJupiterLockDecoder { } fn program_ids(&self) -> &'static [&'static str] { - return &[kb_program_ids::ADMIN_JUPITER_LOCK_PROGRAM_ID]; + return &[kb_program_ids::LAUNCHPAD_VIRTUALS_PROGRAM_ID]; } fn supports_observation( diff --git a/kb-lib/src/decoder/metadata.rs b/kb-lib/src/decoder/metadata.rs index 9e33b8c..8a6fd8a 100644 --- a/kb-lib/src/decoder/metadata.rs +++ b/kb-lib/src/decoder/metadata.rs @@ -4,6 +4,7 @@ //! `metadata` decoder family. mod metaplex_token_metadata; +mod solana_program_metadata; mod spl_name_service; /// Exhaustive published Metaplex account-key inventory. @@ -76,6 +77,8 @@ pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_ pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_token_record_account; /// Decodes one Use Authority Record account. pub use self::metaplex_token_metadata::decoder_metadata_metaplex_token_metadata_decode_use_authority_record_account; +/// Reserved `kb-lib.decoder.metadata.solana_program_metadata` decoder. +pub use self::solana_program_metadata::DcMetadataSolanaProgramMetadataDecoder; /// Reserved `kb-lib.decoder.metadata.spl_name_service` decoder. pub use self::spl_name_service::DcMetadataSplNameServiceDecoder; diff --git a/kb-lib/src/decoder/metadata/metaplex_token_metadata/constants.rs b/kb-lib/src/decoder/metadata/metaplex_token_metadata/constants.rs index 04dc2a6..971e922 100644 --- a/kb-lib/src/decoder/metadata/metaplex_token_metadata/constants.rs +++ b/kb-lib/src/decoder/metadata/metaplex_token_metadata/constants.rs @@ -1,10 +1,10 @@ // file: kb-lib/src/decoder/metadata/metaplex_token_metadata/constants.rs -// version: 30 +// version: 31 //! Internal constants for Metaplex Token Metadata decoding. /// Stable decoder surface code. -pub(crate) const DC_METADATA_MTM_SURFACE_CODE: &str = "metadata_metaplex_token_metadata"; +pub(crate) const DC_METADATA_MTM_SURFACE_CODE: &str = "metadata.metaplex_token_metadata"; /// Maximum retained instruction payload size. pub(crate) const DC_METADATA_MTM_MAX_INSTRUCTION_BYTES: usize = 16_384; /// Maximum encoded base64 instruction payload size. diff --git a/kb-lib/src/decoder/metadata/solana_program_metadata.rs b/kb-lib/src/decoder/metadata/solana_program_metadata.rs new file mode 100644 index 0000000..08e7fd7 --- /dev/null +++ b/kb-lib/src/decoder/metadata/solana_program_metadata.rs @@ -0,0 +1,39 @@ +// file: kb-lib/src/decoder/metadata/solana_program_metadata.rs +// version: 1 + +//! Reserved protocol decoder for `metadata_solana_program_metadata`. + +/// Reserved decoder for the `metadata_solana_program_metadata` program surface. +#[derive(Clone, Debug, Default)] +pub struct DcMetadataSolanaProgramMetadataDecoder; + +impl crate::DcApiProtocolDecoder for crate::DcMetadataSolanaProgramMetadataDecoder { + fn decoder_name(&self) -> &'static str { + return "kb-lib.decoder.metadata.solana_program_metadata"; + } + + fn decoder_version(&self) -> &'static str { + return env!("CARGO_PKG_VERSION"); + } + + fn program_ids(&self) -> &'static [&'static str] { + return &[kb_program_ids::METADATA_SOLANA_PROGRAM_METADATA_PROGRAM_ID]; + } + + fn supports_observation( + &self, + observation: &crate::MdProgramObservation, + ) -> crate::DcApiDecoderSupport { + if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) { + return crate::DcApiDecoderSupport::Maybe; + } + return crate::DcApiDecoderSupport::No; + } + + fn decode_observation( + &self, + _observation: &crate::MdProgramObservation, + ) -> kb_core::Result> { + return std::result::Result::Ok(std::vec::Vec::new()); + } +} diff --git a/kb-lib/src/decoder/nft.rs b/kb-lib/src/decoder/nft.rs index c344076..968a41f 100644 --- a/kb-lib/src/decoder/nft.rs +++ b/kb-lib/src/decoder/nft.rs @@ -1,9 +1,12 @@ // file: kb-lib/src/decoder/nft.rs -// version: 4 +// version: 5 //! `nft` decoder family. mod metaplex_bubblegum; +mod tensor_cnft; /// Reserved `kb-lib.decoder.nft.metaplex_bubblegum` decoder. pub use self::metaplex_bubblegum::DcNftMetaplexBubblegumDecoder; +/// Reserved `kb-lib.decoder.nft.tensor_cnft` decoder. +pub use self::tensor_cnft::DcNftTensorCnftDecoder; diff --git a/kb-lib/src/decoder/admin/pump_fees.rs b/kb-lib/src/decoder/nft/tensor_cnft.rs similarity index 68% rename from kb-lib/src/decoder/admin/pump_fees.rs rename to kb-lib/src/decoder/nft/tensor_cnft.rs index 9ada4cb..986e9bb 100644 --- a/kb-lib/src/decoder/admin/pump_fees.rs +++ b/kb-lib/src/decoder/nft/tensor_cnft.rs @@ -1,15 +1,15 @@ -// file: kb-lib/src/decoder/admin/pump_fees.rs -// version: 4 +// file: kb-lib/src/decoder/nft/tensor_cnft.rs +// version: 1 -//! Reserved protocol decoder for `admin_pump_fees`. +//! Reserved protocol decoder for `nft_tensor_cnft`. -/// Reserved decoder for the `admin_pump_fees` program surface. +/// Reserved decoder for the `nft_tensor_cnft` program surface. #[derive(Clone, Debug, Default)] -pub struct DcAdminPumpFeesDecoder; +pub struct DcNftTensorCnftDecoder; -impl crate::DcApiProtocolDecoder for crate::DcAdminPumpFeesDecoder { +impl crate::DcApiProtocolDecoder for crate::DcNftTensorCnftDecoder { fn decoder_name(&self) -> &'static str { - return "kb-lib.decoder.admin.pump_fees"; + return "kb-lib.decoder.nft.tensor_cnft"; } fn decoder_version(&self) -> &'static str { @@ -17,7 +17,7 @@ impl crate::DcApiProtocolDecoder for crate::DcAdminPumpFeesDecoder { } fn program_ids(&self) -> &'static [&'static str] { - return &[kb_program_ids::ADMIN_PUMP_FEES_PROGRAM_ID]; + return &[kb_program_ids::NFT_TENSOR_CNFT_PROGRAM_ID]; } fn supports_observation( diff --git a/kb-lib/src/decoder/perpetuals.rs b/kb-lib/src/decoder/perpetuals.rs index 8c2f2e0..9683170 100644 --- a/kb-lib/src/decoder/perpetuals.rs +++ b/kb-lib/src/decoder/perpetuals.rs @@ -1,15 +1,18 @@ // file: kb-lib/src/decoder/perpetuals.rs -// version: 4 +// version: 5 //! `perpetuals` decoder family. mod drift_v2; mod jupiter; +mod phoenix_eternal; mod zeta; /// Reserved `kb-lib.decoder.perpetuals.drift_v2` decoder. pub use self::drift_v2::DcPerpetualsDriftV2Decoder; /// Reserved `kb-lib.decoder.perpetuals.jupiter` decoder. pub use self::jupiter::DcPerpetualsJupiterDecoder; +/// Reserved `kb-lib.decoder.perpetuals.phoenix_eternal` decoder. +pub use self::phoenix_eternal::DcPerpetualsPhoenixEternalDecoder; /// Reserved `kb-lib.decoder.perpetuals.zeta` decoder. pub use self::zeta::DcPerpetualsZetaDecoder; diff --git a/kb-lib/src/decoder/perpetuals/phoenix_eternal.rs b/kb-lib/src/decoder/perpetuals/phoenix_eternal.rs new file mode 100644 index 0000000..2171e55 --- /dev/null +++ b/kb-lib/src/decoder/perpetuals/phoenix_eternal.rs @@ -0,0 +1,39 @@ +// file: kb-lib/src/decoder/perpetuals/phoenix_eternal.rs +// version: 1 + +//! Reserved protocol decoder for `perpetuals_phoenix_eternal`. + +/// Reserved decoder for the `perpetuals_phoenix_eternal` program surface. +#[derive(Clone, Debug, Default)] +pub struct DcPerpetualsPhoenixEternalDecoder; + +impl crate::DcApiProtocolDecoder for crate::DcPerpetualsPhoenixEternalDecoder { + fn decoder_name(&self) -> &'static str { + return "kb-lib.decoder.perpetuals.phoenix_eternal"; + } + + fn decoder_version(&self) -> &'static str { + return env!("CARGO_PKG_VERSION"); + } + + fn program_ids(&self) -> &'static [&'static str] { + return &[kb_program_ids::PERPETUALS_PHOENIX_ETERNAL_PROGRAM_ID]; + } + + fn supports_observation( + &self, + observation: &crate::MdProgramObservation, + ) -> crate::DcApiDecoderSupport { + if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) { + return crate::DcApiDecoderSupport::Maybe; + } + return crate::DcApiDecoderSupport::No; + } + + fn decode_observation( + &self, + _observation: &crate::MdProgramObservation, + ) -> kb_core::Result> { + return std::result::Result::Ok(std::vec::Vec::new()); + } +} diff --git a/kb-lib/src/decoder/router.rs b/kb-lib/src/decoder/router.rs index b99cbd3..1ef0b6f 100644 --- a/kb-lib/src/decoder/router.rs +++ b/kb-lib/src/decoder/router.rs @@ -1,12 +1,11 @@ // file: kb-lib/src/decoder/router.rs -// version: 4 +// version: 5 //! `router` decoder family. mod dflow_aggregator_v4; mod jupiter_aggregator_v4; mod jupiter_aggregator_v6; -mod jupiter_dca; mod okx_labs_v1; mod okx_labs_v2; @@ -16,8 +15,6 @@ pub use self::dflow_aggregator_v4::DcRouterDflowAggregatorV4Decoder; pub use self::jupiter_aggregator_v4::DcRouterJupiterAggregatorV4Decoder; /// Reserved `kb-lib.decoder.router.jupiter_aggregator_v6` decoder. pub use self::jupiter_aggregator_v6::DcRouterJupiterAggregatorV6Decoder; -/// Reserved `kb-lib.decoder.router.jupiter_dca` decoder. -pub use self::jupiter_dca::DcRouterJupiterDcaDecoder; /// Reserved `kb-lib.decoder.router.okx_labs_v1` decoder. pub use self::okx_labs_v1::DcRouterOkxLabsV1Decoder; /// Reserved `kb-lib.decoder.router.okx_labs_v2` decoder. diff --git a/kb-lib/src/decoder/solana/core/constants.rs b/kb-lib/src/decoder/solana/core/constants.rs index a26e742..a6836dc 100644 --- a/kb-lib/src/decoder/solana/core/constants.rs +++ b/kb-lib/src/decoder/solana/core/constants.rs @@ -1,48 +1,48 @@ // file: kb-lib/src/decoder/solana/core/constants.rs -// version: 14 +// version: 15 //! Local constants for the Solana Core decoder component. /// Stable protocol code shared by native Solana events. -pub(crate) const DC_SOLANA_CORE_PROTOCOL_CODE: &str = "solana_native"; +pub(crate) const DC_SOLANA_CORE_PROTOCOL_CODE: &str = "solana.core"; /// Stable System Program surface code. -pub(crate) const DC_SOLANA_CORE_SYSTEM_SURFACE_CODE: &str = "solana_native_system"; +pub(crate) const DC_SOLANA_CORE_SYSTEM_SURFACE_CODE: &str = "solana.core.system"; /// Stable deprecated immutable BPF Loader surface code. pub(crate) const DC_SOLANA_CORE_BPF_LOADER_DEPRECATED_SURFACE_CODE: &str = - "solana_native_bpf_loader_deprecated"; + "solana.core.bpf_loader_deprecated"; /// Stable immutable BPF Loader v2 surface code. -pub(crate) const DC_SOLANA_CORE_BPF_LOADER_SURFACE_CODE: &str = "solana_native_bpf_loader"; +pub(crate) const DC_SOLANA_CORE_BPF_LOADER_SURFACE_CODE: &str = "solana.core.bpf_loader"; /// Stable upgradeable BPF Loader surface code. pub(crate) const DC_SOLANA_CORE_BPF_LOADER_UPGRADEABLE_SURFACE_CODE: &str = - "solana_native_bpf_loader_upgradeable"; + "solana.core.bpf_loader_upgradeable"; /// Stable Loader v4 surface code. -pub(crate) const DC_SOLANA_CORE_LOADER_V4_SURFACE_CODE: &str = "solana_native_loader_v4"; +pub(crate) const DC_SOLANA_CORE_LOADER_V4_SURFACE_CODE: &str = "solana.core.loader_v4"; /// Stable Native Loader surface code. -pub(crate) const DC_SOLANA_CORE_NATIVE_LOADER_SURFACE_CODE: &str = "solana_native_loader"; +pub(crate) const DC_SOLANA_CORE_NATIVE_LOADER_SURFACE_CODE: &str = "solana.core.loader"; /// Stable Compute Budget surface code. -pub(crate) const DC_SOLANA_CORE_COMPUTE_BUDGET_SURFACE_CODE: &str = "solana_native_compute_budget"; +pub(crate) const DC_SOLANA_CORE_COMPUTE_BUDGET_SURFACE_CODE: &str = "solana.core.compute_budget"; /// Stable Address Lookup Table surface code. pub(crate) const DC_SOLANA_CORE_ADDRESS_LOOKUP_TABLE_SURFACE_CODE: &str = - "solana_native_address_lookup_table"; + "solana.core.address_lookup_table"; /// Stable Vote Program surface code. -pub(crate) const DC_SOLANA_CORE_VOTE_SURFACE_CODE: &str = "solana_native_vote"; +pub(crate) const DC_SOLANA_CORE_VOTE_SURFACE_CODE: &str = "solana.core.vote"; /// Stable Stake Program surface code. -pub(crate) const DC_SOLANA_CORE_STAKE_SURFACE_CODE: &str = "solana_native_stake"; +pub(crate) const DC_SOLANA_CORE_STAKE_SURFACE_CODE: &str = "solana.core.stake"; /// Stable Config Program surface code. -pub(crate) const DC_SOLANA_CORE_CONFIG_SURFACE_CODE: &str = "solana_native_config"; +pub(crate) const DC_SOLANA_CORE_CONFIG_SURFACE_CODE: &str = "solana.core.config"; /// Stable Feature Gate surface code. -pub(crate) const DC_SOLANA_CORE_FEATURE_SURFACE_CODE: &str = "solana_native_feature"; +pub(crate) const DC_SOLANA_CORE_FEATURE_SURFACE_CODE: &str = "solana.core.feature"; /// Stable Ed25519 signature precompile surface code. -pub(crate) const DC_SOLANA_CORE_ED25519_SURFACE_CODE: &str = "solana_native_ed25519"; +pub(crate) const DC_SOLANA_CORE_ED25519_SURFACE_CODE: &str = "solana.core.ed25519"; /// Stable secp256k1 signature precompile surface code. -pub(crate) const DC_SOLANA_CORE_SECP256K1_SURFACE_CODE: &str = "solana_native_secp256k1"; +pub(crate) const DC_SOLANA_CORE_SECP256K1_SURFACE_CODE: &str = "solana.core.secp256k1"; /// Stable secp256r1 signature precompile surface code. -pub(crate) const DC_SOLANA_CORE_SECP256R1_SURFACE_CODE: &str = "solana_native_secp256r1"; +pub(crate) const DC_SOLANA_CORE_SECP256R1_SURFACE_CODE: &str = "solana.core.secp256r1"; /// Stable native ZK ElGamal Proof surface code. pub(crate) const DC_SOLANA_CORE_ZK_ELGAMAL_PROOF_SURFACE_CODE: &str = - "solana_native_zk_elgamal_proof"; + "solana.core.zk_elgamal_proof"; /// Stable historical ZK Token Proof surface code. -pub(crate) const DC_SOLANA_CORE_ZK_TOKEN_PROOF_SURFACE_CODE: &str = "solana_native_zk_token_proof"; +pub(crate) const DC_SOLANA_CORE_ZK_TOKEN_PROOF_SURFACE_CODE: &str = "solana.core.zk_token_proof"; /// Byte length shared by compact Ed25519, secp256k1 and secp256r1 signatures. pub(crate) const DC_SOLANA_CORE_SIGNATURE_BYTES: usize = 64; /// Byte length of an Ed25519 public key. @@ -56,7 +56,7 @@ pub(crate) const DC_SOLANA_CORE_U16_OFFSETS_BYTES: usize = 14; /// Byte length of one secp256k1 offsets entry. pub(crate) const DC_SOLANA_CORE_U8_OFFSETS_BYTES: usize = 11; /// Stable Slashing Program decoder surface code. -pub(crate) const DC_SOLANA_CORE_SLASHING_SURFACE_CODE: &str = "solana_native_slashing"; +pub(crate) const DC_SOLANA_CORE_SLASHING_SURFACE_CODE: &str = "solana.core.slashing"; /// Runtime maximum number of secp256r1 signatures in one precompile instruction. pub(crate) const DC_SOLANA_CORE_SECP256R1_MAX_SIGNATURES: usize = 8; /// Maximum number of component bytes retained as a hexadecimal event prefix. diff --git a/kb-lib/src/decoder/solana/core/decoder.rs b/kb-lib/src/decoder/solana/core/decoder.rs index 8525833..8440fea 100644 --- a/kb-lib/src/decoder/solana/core/decoder.rs +++ b/kb-lib/src/decoder/solana/core/decoder.rs @@ -1,97 +1,97 @@ // file: kb-lib/src/decoder/solana/core/decoder.rs -// version: 26 +// version: 27 //! Runtime-native Solana program classifier for the common decode pipeline. const NATIVE_SURFACES: &[crate::DcApiDecoderSurface] = &[ crate::DcApiDecoderSurface { program_id: kb_program_ids::ADDRESS_LOOKUP_TABLE_PROGRAM_ID, - surface_code: "solana_native_address_lookup_table", + surface_code: "solana.core.address_lookup_table", priority: 100, }, crate::DcApiDecoderSurface { program_id: kb_program_ids::BPF_LOADER_DEPRECATED_PROGRAM_ID, - surface_code: "solana_native_bpf_loader_deprecated", + surface_code: "solana.core.bpf_loader_deprecated", priority: 100, }, crate::DcApiDecoderSurface { program_id: kb_program_ids::BPF_LOADER_PROGRAM_ID, - surface_code: "solana_native_bpf_loader", + surface_code: "solana.core.bpf_loader", priority: 100, }, crate::DcApiDecoderSurface { program_id: kb_program_ids::BPF_LOADER_UPGRADEABLE_PROGRAM_ID, - surface_code: "solana_native_bpf_loader_upgradeable", + surface_code: "solana.core.bpf_loader_upgradeable", priority: 100, }, crate::DcApiDecoderSurface { program_id: kb_program_ids::COMPUTE_BUDGET_PROGRAM_ID, - surface_code: "solana_native_compute_budget", + surface_code: "solana.core.compute_budget", priority: 100, }, crate::DcApiDecoderSurface { program_id: kb_program_ids::CONFIG_PROGRAM_ID, - surface_code: "solana_native_config", + surface_code: "solana.core.config", priority: 100, }, crate::DcApiDecoderSurface { program_id: kb_program_ids::ED25519_PROGRAM_ID, - surface_code: "solana_native_ed25519", + surface_code: "solana.core.ed25519", priority: 100, }, crate::DcApiDecoderSurface { program_id: kb_program_ids::FEATURE_PROGRAM_ID, - surface_code: "solana_native_feature", + surface_code: "solana.core.feature", priority: 100, }, crate::DcApiDecoderSurface { program_id: kb_program_ids::LOADER_V4_PROGRAM_ID, - surface_code: "solana_native_loader_v4", + surface_code: "solana.core.loader_v4", priority: 100, }, crate::DcApiDecoderSurface { program_id: kb_program_ids::NATIVE_LOADER_PROGRAM_ID, - surface_code: "solana_native_loader", + surface_code: "solana.core.loader", priority: 100, }, crate::DcApiDecoderSurface { program_id: kb_program_ids::SECP256K1_PROGRAM_ID, - surface_code: "solana_native_secp256k1", + surface_code: "solana.core.secp256k1", priority: 100, }, crate::DcApiDecoderSurface { program_id: kb_program_ids::SECP256R1_PROGRAM_ID, - surface_code: "solana_native_secp256r1", + surface_code: "solana.core.secp256r1", priority: 100, }, crate::DcApiDecoderSurface { program_id: kb_program_ids::SLASHING_PROGRAM_ID, - surface_code: "solana_native_slashing", + surface_code: "solana.core.slashing", priority: 100, }, crate::DcApiDecoderSurface { program_id: kb_program_ids::STAKE_PROGRAM_ID, - surface_code: "solana_native_stake", + surface_code: "solana.core.stake", priority: 100, }, crate::DcApiDecoderSurface { program_id: kb_program_ids::SYSTEM_PROGRAM_ID, - surface_code: "solana_native_system", + surface_code: "solana.core.system", priority: 100, }, crate::DcApiDecoderSurface { program_id: kb_program_ids::VOTE_PROGRAM_ID, - surface_code: "solana_native_vote", + surface_code: "solana.core.vote", priority: 100, }, crate::DcApiDecoderSurface { program_id: kb_program_ids::ZK_ELGAMAL_PROOF_PROGRAM_ID, - surface_code: "solana_native_zk_elgamal_proof", + surface_code: "solana.core.zk_elgamal_proof", priority: 100, }, crate::DcApiDecoderSurface { program_id: kb_program_ids::ZK_TOKEN_PROOF_PROGRAM_ID, - surface_code: "solana_native_zk_token_proof", + surface_code: "solana.core.zk_token_proof", priority: 100, }, ]; @@ -157,7 +157,7 @@ impl crate::DcApiProtocolDecoder for crate::DcSolanaCoreDecoder { impl crate::DcApiInstructionDecoder for crate::DcSolanaCoreDecoder { fn identity(&self) -> crate::DcApiDecoderIdentity { return crate::DcApiDecoderIdentity { - name: "solana_native_classifier".to_string(), + name: "solana.core".to_string(), version: env!("CARGO_PKG_VERSION").to_string(), }; } @@ -304,7 +304,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSolanaCoreDecoder { slot = input.slot, instruction_path = %input.instruction_path, program_id = %input.program_id, - processor_name = "solana_native_classifier", + processor_name = "solana.core", processor_version = env!("CARGO_PKG_VERSION"), input_key = %input.replay_input_key, payload_hash = ?input.instruction_payload_hash, @@ -376,7 +376,7 @@ mod tests { assert!(recognition.compatible); assert_eq!( recognition.surface_code.as_deref(), - std::option::Option::Some("solana_native_vote") + std::option::Option::Some("solana.core.vote") ); assert_eq!( recognition.entry_code.as_deref(), @@ -395,7 +395,7 @@ mod tests { assert!(recognition.compatible); assert_eq!( recognition.surface_code.as_deref(), - std::option::Option::Some("solana_native_stake") + std::option::Option::Some("solana.core.stake") ); assert_eq!( recognition.entry_code.as_deref(), @@ -414,7 +414,7 @@ mod tests { assert!(recognition.compatible); assert_eq!( recognition.surface_code.as_deref(), - std::option::Option::Some("solana_native_zk_token_proof") + std::option::Option::Some("solana.core.zk_token_proof") ); assert_eq!( recognition.entry_code.as_deref(), @@ -486,7 +486,7 @@ mod tests { assert!(recognition.compatible); assert_eq!( recognition.surface_code.as_deref(), - std::option::Option::Some("solana_native_slashing") + std::option::Option::Some("solana.core.slashing") ); assert_eq!( recognition.entry_code.as_deref(), diff --git a/kb-lib/src/decoder/solana/core/precompiles.rs b/kb-lib/src/decoder/solana/core/precompiles.rs index 9335e7d..e703625 100644 --- a/kb-lib/src/decoder/solana/core/precompiles.rs +++ b/kb-lib/src/decoder/solana/core/precompiles.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/decoder/solana/core/precompiles.rs -// version: 4 +// version: 5 //! Bounded structural decoding for Solana signature verification precompiles. @@ -1654,7 +1654,7 @@ mod tests { assert_eq!(first, second); assert_eq!( first.observations[0].event.event_code.0, - "solana_native_secp256r1.signature_verification" + "solana.core.secp256r1.signature_verification" ); assert_eq!(parameters(&first)["runtimeVerification"], "accepted_in_successful_transaction"); let decoded_bytes = match crate::decoder_solana_core_decode_instruction_data(&input) { diff --git a/kb-lib/src/decoder/spl/associated_token_account/constants.rs b/kb-lib/src/decoder/spl/associated_token_account/constants.rs index f605d38..279067d 100644 --- a/kb-lib/src/decoder/spl/associated_token_account/constants.rs +++ b/kb-lib/src/decoder/spl/associated_token_account/constants.rs @@ -1,10 +1,10 @@ // file: kb-lib/src/decoder/spl/associated_token_account/constants.rs -// version: 2 +// version: 3 //! Local constants for the `kb-lib` SPL Associated Token Account component. /// Stable protocol and surface code for the Associated Token Account program. -pub(crate) const DC_SPL_ATA_SURFACE_CODE: &str = "spl_associated_token_account"; +pub(crate) const DC_SPL_ATA_SURFACE_CODE: &str = "spl.associated_token_account"; /// Current stable decoded event contract version. pub(crate) const DC_SPL_ATA_EVENT_VERSION: u32 = 1; /// Maximum retained instruction payload size. diff --git a/kb-lib/src/decoder/spl/elgamal_registry/constants.rs b/kb-lib/src/decoder/spl/elgamal_registry/constants.rs index 2fce804..c61ae17 100644 --- a/kb-lib/src/decoder/spl/elgamal_registry/constants.rs +++ b/kb-lib/src/decoder/spl/elgamal_registry/constants.rs @@ -1,9 +1,9 @@ // file: kb-lib/src/decoder/spl/elgamal_registry/constants.rs -// version: 2 +// version: 3 //! Constants for the SPL ElGamal registry decoder. -pub(crate) const DC_SPL_ELGAMAL_REGISTRY_SURFACE_CODE: &str = "spl_elgamal_registry"; +pub(crate) const DC_SPL_ELGAMAL_REGISTRY_SURFACE_CODE: &str = "spl.elgamal_registry"; pub(crate) const DC_SPL_ELGAMAL_REGISTRY_EVENT_VERSION: u32 = 1; pub(crate) const DC_SPL_ELGAMAL_REGISTRY_MAX_INSTRUCTION_BYTES: usize = 16; diff --git a/kb-lib/src/decoder/spl/elgamal_registry/decoder.rs b/kb-lib/src/decoder/spl/elgamal_registry/decoder.rs index 9108aed..1d77ed1 100644 --- a/kb-lib/src/decoder/spl/elgamal_registry/decoder.rs +++ b/kb-lib/src/decoder/spl/elgamal_registry/decoder.rs @@ -6,7 +6,7 @@ const SURFACES: &[crate::DcApiDecoderSurface] = &[crate::DcApiDecoderSurface { program_id: kb_program_ids::SPL_TOKEN_2022_ELGAMAL_REGISTRY_PROGRAM_ID, surface_code: crate::DC_SPL_ELGAMAL_REGISTRY_SURFACE_CODE, - priority: 100, + priority: 101, }]; const PROGRAM_IDS: &[&str] = &[kb_program_ids::SPL_TOKEN_2022_ELGAMAL_REGISTRY_PROGRAM_ID]; @@ -50,7 +50,7 @@ impl crate::DcApiProtocolDecoder for crate::DcSplElgamalRegistryDecoder { impl crate::DcApiInstructionDecoder for crate::DcSplElgamalRegistryDecoder { fn identity(&self) -> crate::DcApiDecoderIdentity { return crate::DcApiDecoderIdentity { - name: "spl_elgamal_registry".to_string(), + name: "spl.elgamal_registry".to_string(), version: env!("CARGO_PKG_VERSION").to_string(), }; } @@ -131,7 +131,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplElgamalRegistryDecoder { slot = input.slot, instruction_path = %input.instruction_path, program_id = %input.program_id, - processor_name = "spl_elgamal_registry", + processor_name = "spl.elgamal_registry", processor_version = env!("CARGO_PKG_VERSION"), input_key = %input.replay_input_key, payload_hash = ?input.instruction_payload_hash, diff --git a/kb-lib/src/decoder/spl/memo/constants.rs b/kb-lib/src/decoder/spl/memo/constants.rs index 7feb23c..4086f8d 100644 --- a/kb-lib/src/decoder/spl/memo/constants.rs +++ b/kb-lib/src/decoder/spl/memo/constants.rs @@ -1,16 +1,16 @@ // file: kb-lib/src/decoder/spl/memo/constants.rs -// version: 3 +// version: 4 //! Local constants for the `kb-lib` SPL Memo component. Program identifiers live in `kb_program_ids`. /// Stable protocol code shared by Memo generations. -pub(crate) const DC_SPL_MEMO_PROTOCOL_CODE: &str = "spl_memo"; +pub(crate) const DC_SPL_MEMO_PROTOCOL_CODE: &str = "spl.memo"; /// Stable Memo v1 surface code. -pub(crate) const DC_SPL_MEMO_V1_SURFACE_CODE: &str = "spl_memo_v1"; +pub(crate) const DC_SPL_MEMO_V1_SURFACE_CODE: &str = "spl.memo.v1"; /// Stable Memo v3 surface code. -pub(crate) const DC_SPL_MEMO_V3_SURFACE_CODE: &str = "spl_memo_v3"; +pub(crate) const DC_SPL_MEMO_V3_SURFACE_CODE: &str = "spl.memo.v3"; /// Stable Memo v4 surface code. -pub(crate) const DC_SPL_MEMO_V4_SURFACE_CODE: &str = "spl_memo_v4"; +pub(crate) const DC_SPL_MEMO_V4_SURFACE_CODE: &str = "spl.memo.v4"; /// Maximum decoded instruction data retained as a complete Memo payload. pub(crate) const DC_SPL_MEMO_MAX_PAYLOAD_BYTES: usize = 4_096; /// Maximum payload prefix retained for bounded diagnostics. diff --git a/kb-lib/src/decoder/spl/memo/decoder.rs b/kb-lib/src/decoder/spl/memo/decoder.rs index 1b8e8ed..18f76b3 100644 --- a/kb-lib/src/decoder/spl/memo/decoder.rs +++ b/kb-lib/src/decoder/spl/memo/decoder.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/decoder/spl/memo/decoder.rs -// version: 3 +// version: 4 //! Exact SPL Memo v1, v3 and v4 dispatch for the common decode pipeline. @@ -65,7 +65,7 @@ impl crate::DcApiProtocolDecoder for crate::DcSplMemoDecoder { impl crate::DcApiInstructionDecoder for crate::DcSplMemoDecoder { fn identity(&self) -> crate::DcApiDecoderIdentity { return crate::DcApiDecoderIdentity { - name: "spl_memo".to_string(), + name: "spl.memo".to_string(), version: env!("CARGO_PKG_VERSION").to_string(), }; } @@ -130,7 +130,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplMemoDecoder { slot = input.slot, instruction_path = %input.instruction_path, program_id = %input.program_id, - processor_name = "spl_memo", + processor_name = "spl.memo", processor_version = env!("CARGO_PKG_VERSION"), input_key = %input.replay_input_key, payload_hash = ?input.instruction_payload_hash, diff --git a/kb-lib/src/decoder/spl/token/constants.rs b/kb-lib/src/decoder/spl/token/constants.rs index 370ba8f..40b6d62 100644 --- a/kb-lib/src/decoder/spl/token/constants.rs +++ b/kb-lib/src/decoder/spl/token/constants.rs @@ -1,10 +1,10 @@ // file: kb-lib/src/decoder/spl/token/constants.rs -// version: 2 +// version: 3 //! Local constants for the `kb-lib` SPL Token component. Program identifiers live in `kb_program_ids`. /// Stable protocol and surface code for the classic SPL Token program. -pub(crate) const DC_SPL_TOKEN_SURFACE_CODE: &str = "spl_token"; +pub(crate) const DC_SPL_TOKEN_SURFACE_CODE: &str = "spl.token"; /// Current stable decoded event contract version. pub(crate) const DC_SPL_TOKEN_EVENT_VERSION: u32 = 1; /// Maximum retained instruction payload size. diff --git a/kb-lib/src/decoder/spl/token/decoder.rs b/kb-lib/src/decoder/spl/token/decoder.rs index 0236919..7686338 100644 --- a/kb-lib/src/decoder/spl/token/decoder.rs +++ b/kb-lib/src/decoder/spl/token/decoder.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/decoder/spl/token/decoder.rs -// version: 3 +// version: 4 //! Exact classic SPL Token dispatch for the common decode pipeline. @@ -50,7 +50,7 @@ impl crate::DcApiProtocolDecoder for crate::DcSplTokenDecoder { impl crate::DcApiInstructionDecoder for crate::DcSplTokenDecoder { fn identity(&self) -> crate::DcApiDecoderIdentity { return crate::DcApiDecoderIdentity { - name: "spl_token".to_string(), + name: "spl.token".to_string(), version: env!("CARGO_PKG_VERSION").to_string(), }; } @@ -115,7 +115,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplTokenDecoder { slot = input.slot, instruction_path = %input.instruction_path, program_id = %input.program_id, - processor_name = "spl_token", + processor_name = "spl.token", processor_version = env!("CARGO_PKG_VERSION"), input_key = %input.replay_input_key, payload_hash = ?input.instruction_payload_hash, diff --git a/kb-lib/src/decoder/spl/token_2022/constants.rs b/kb-lib/src/decoder/spl/token_2022/constants.rs index 02d298a..5cad341 100644 --- a/kb-lib/src/decoder/spl/token_2022/constants.rs +++ b/kb-lib/src/decoder/spl/token_2022/constants.rs @@ -1,10 +1,10 @@ // file: kb-lib/src/decoder/spl/token_2022/constants.rs -// version: 3 +// version: 4 //! Local constants for the exact Token-2022 decoder. Program identifiers live in `kb_program_ids`. /// Stable Token-2022 surface code. -pub(crate) const DC_SPL_TOKEN_2022_SURFACE_CODE: &str = "spl_token_2022"; +pub(crate) const DC_SPL_TOKEN_2022_SURFACE_CODE: &str = "spl.token_2022"; /// Current decoded event contract version. pub(crate) const DC_SPL_TOKEN_2022_EVENT_VERSION: u32 = 1; /// Maximum retained instruction payload size. diff --git a/kb-lib/src/decoder/spl/token_2022/decoder.rs b/kb-lib/src/decoder/spl/token_2022/decoder.rs index 5ecf566..a4ac65e 100644 --- a/kb-lib/src/decoder/spl/token_2022/decoder.rs +++ b/kb-lib/src/decoder/spl/token_2022/decoder.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/decoder/spl/token_2022/decoder.rs -// version: 4 +// version: 5 //! Exact Token-2022 dispatch for the common decode pipeline. @@ -50,7 +50,7 @@ impl crate::DcApiProtocolDecoder for crate::DcSplToken2022Decoder { impl crate::DcApiInstructionDecoder for crate::DcSplToken2022Decoder { fn identity(&self) -> crate::DcApiDecoderIdentity { return crate::DcApiDecoderIdentity { - name: "spl_token_2022".to_string(), + name: "spl.token_2022".to_string(), version: env!("CARGO_PKG_VERSION").to_string(), }; } @@ -115,7 +115,7 @@ impl crate::DcApiInstructionDecoder for crate::DcSplToken2022Decoder { slot = input.slot, instruction_path = %input.instruction_path, program_id = %input.program_id, - processor_name = "spl_token_2022", + processor_name = "spl.token_2022", processor_version = env!("CARGO_PKG_VERSION"), input_key = %input.replay_input_key, payload_hash = ?input.instruction_payload_hash, diff --git a/kb-lib/src/decoder/staking.rs b/kb-lib/src/decoder/staking.rs index c64bc0b..0566dbf 100644 --- a/kb-lib/src/decoder/staking.rs +++ b/kb-lib/src/decoder/staking.rs @@ -1,12 +1,15 @@ // file: kb-lib/src/decoder/staking.rs -// version: 4 +// version: 5 //! `staking` decoder family. +mod jito_tip_distribution; mod kamino_farm; mod marinade_finance; mod solayer; +/// Reserved `kb-lib.decoder.staking.jito_tip_distribution` decoder. +pub use self::jito_tip_distribution::DcStakingJitoTipDistributionDecoder; /// Reserved `kb-lib.decoder.staking.kamino_farm` decoder. pub use self::kamino_farm::DcStakingKaminoFarmDecoder; /// Reserved `kb-lib.decoder.staking.marinade_finance` decoder. diff --git a/kb-lib/src/decoder/staking/jito_tip_distribution.rs b/kb-lib/src/decoder/staking/jito_tip_distribution.rs new file mode 100644 index 0000000..53aa6bd --- /dev/null +++ b/kb-lib/src/decoder/staking/jito_tip_distribution.rs @@ -0,0 +1,39 @@ +// file: kb-lib/src/decoder/staking/jito_tip_distribution.rs +// version: 1 + +//! Reserved protocol decoder for `staking_jito_tip_distribution`. + +/// Reserved decoder for the `staking_jito_tip_distribution` program surface. +#[derive(Clone, Debug, Default)] +pub struct DcStakingJitoTipDistributionDecoder; + +impl crate::DcApiProtocolDecoder for crate::DcStakingJitoTipDistributionDecoder { + fn decoder_name(&self) -> &'static str { + return "kb-lib.decoder.staking.jito_tip_distribution"; + } + + fn decoder_version(&self) -> &'static str { + return env!("CARGO_PKG_VERSION"); + } + + fn program_ids(&self) -> &'static [&'static str] { + return &[kb_program_ids::STAKING_JITO_TIP_DISTRIBUTION_PROGRAM_ID]; + } + + fn supports_observation( + &self, + observation: &crate::MdProgramObservation, + ) -> crate::DcApiDecoderSupport { + if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) { + return crate::DcApiDecoderSupport::Maybe; + } + return crate::DcApiDecoderSupport::No; + } + + fn decode_observation( + &self, + _observation: &crate::MdProgramObservation, + ) -> kb_core::Result> { + return std::result::Result::Ok(std::vec::Vec::new()); + } +} diff --git a/kb-lib/src/decoder/storage.rs b/kb-lib/src/decoder/storage.rs new file mode 100644 index 0000000..603560f --- /dev/null +++ b/kb-lib/src/decoder/storage.rs @@ -0,0 +1,9 @@ +// file: kb-lib/src/decoder/storage.rs +// version: 5 + +//! `storage` decoder family. + +mod solana_record; + +/// Reserved `kb-lib.decoder.storage.solana_record` decoder. +pub use self::solana_record::DcStorageSolanaRecordDecoder; diff --git a/kb-lib/src/decoder/storage/solana_record.rs b/kb-lib/src/decoder/storage/solana_record.rs new file mode 100644 index 0000000..f6a1dad --- /dev/null +++ b/kb-lib/src/decoder/storage/solana_record.rs @@ -0,0 +1,39 @@ +// file: kb-lib/src/decoder/storage/solana_record.rs +// version: 1 + +//! Reserved protocol decoder for `storage_solana_record`. + +/// Reserved decoder for the `storage_solana_record` program surface. +#[derive(Clone, Debug, Default)] +pub struct DcStorageSolanaRecordDecoder; + +impl crate::DcApiProtocolDecoder for crate::DcStorageSolanaRecordDecoder { + fn decoder_name(&self) -> &'static str { + return "kb-lib.decoder.storage.solana_record"; + } + + fn decoder_version(&self) -> &'static str { + return env!("CARGO_PKG_VERSION"); + } + + fn program_ids(&self) -> &'static [&'static str] { + return &[kb_program_ids::STORAGE_SOLANA_RECORD_PROGRAM_ID]; + } + + fn supports_observation( + &self, + observation: &crate::MdProgramObservation, + ) -> crate::DcApiDecoderSupport { + if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) { + return crate::DcApiDecoderSupport::Maybe; + } + return crate::DcApiDecoderSupport::No; + } + + fn decode_observation( + &self, + _observation: &crate::MdProgramObservation, + ) -> kb_core::Result> { + return std::result::Result::Ok(std::vec::Vec::new()); + } +} diff --git a/kb-lib/src/decoder/strategy.rs b/kb-lib/src/decoder/strategy.rs new file mode 100644 index 0000000..bb4f09c --- /dev/null +++ b/kb-lib/src/decoder/strategy.rs @@ -0,0 +1,9 @@ +// file: kb-lib/src/decoder/strategy.rs +// version: 5 + +//! `strategy` decoder family. + +mod jupiter_dca; + +/// Reserved `kb-lib.decoder.strategy.jupiter_dca` decoder. +pub use self::jupiter_dca::DcStrategyJupiterDcaDecoder; diff --git a/kb-lib/src/decoder/router/jupiter_dca.rs b/kb-lib/src/decoder/strategy/jupiter_dca.rs similarity index 67% rename from kb-lib/src/decoder/router/jupiter_dca.rs rename to kb-lib/src/decoder/strategy/jupiter_dca.rs index 52b0296..8badd64 100644 --- a/kb-lib/src/decoder/router/jupiter_dca.rs +++ b/kb-lib/src/decoder/strategy/jupiter_dca.rs @@ -1,15 +1,15 @@ -// file: kb-lib/src/decoder/router/jupiter_dca.rs +// file: kb-lib/src/decoder/strategy/jupiter_dca.rs // version: 4 -//! Reserved protocol decoder for `router_jupiter_dca`. +//! Reserved protocol decoder for `strategy_jupiter_dca`. -/// Reserved decoder for the `router_jupiter_dca` program surface. +/// Reserved decoder for the `strategy_jupiter_dca` program surface. #[derive(Clone, Debug, Default)] -pub struct DcRouterJupiterDcaDecoder; +pub struct DcStrategyJupiterDcaDecoder; -impl crate::DcApiProtocolDecoder for crate::DcRouterJupiterDcaDecoder { +impl crate::DcApiProtocolDecoder for crate::DcStrategyJupiterDcaDecoder { fn decoder_name(&self) -> &'static str { - return "kb-lib.decoder.router.jupiter_dca"; + return "kb-lib.decoder.strategy.jupiter_dca"; } fn decoder_version(&self) -> &'static str { @@ -17,7 +17,7 @@ impl crate::DcApiProtocolDecoder for crate::DcRouterJupiterDcaDecoder { } fn program_ids(&self) -> &'static [&'static str] { - return &[kb_program_ids::ROUTER_JUPITER_DCA_PROGRAM_ID]; + return &[kb_program_ids::STRATEGY_JUPITER_DCA_PROGRAM_ID]; } fn supports_observation( diff --git a/kb-lib/src/decoder/vesting.rs b/kb-lib/src/decoder/vesting.rs index 3c6e7b1..c7cc698 100644 --- a/kb-lib/src/decoder/vesting.rs +++ b/kb-lib/src/decoder/vesting.rs @@ -1,9 +1,12 @@ // file: kb-lib/src/decoder/vesting.rs -// version: 4 +// version: 5 //! `vesting` decoder family. +mod jupiter_lock; mod streamflow; +/// Reserved `kb-lib.decoder.vesting.jupiter_lock` decoder. +pub use self::jupiter_lock::DcVestingJupiterLockDecoder; /// Reserved `kb-lib.decoder.vesting.streamflow` decoder. pub use self::streamflow::DcVestingStreamflowDecoder; diff --git a/kb-lib/src/decoder/vesting/jupiter_lock.rs b/kb-lib/src/decoder/vesting/jupiter_lock.rs new file mode 100644 index 0000000..46da3dd --- /dev/null +++ b/kb-lib/src/decoder/vesting/jupiter_lock.rs @@ -0,0 +1,39 @@ +// file: kb-lib/src/decoder/vesting/jupiter_lock.rs +// version: 4 + +//! Reserved protocol decoder for `vesting_jupiter_lock`. + +/// Reserved decoder for the `vesting_jupiter_lock` program surface. +#[derive(Clone, Debug, Default)] +pub struct DcVestingJupiterLockDecoder; + +impl crate::DcApiProtocolDecoder for crate::DcVestingJupiterLockDecoder { + fn decoder_name(&self) -> &'static str { + return "kb-lib.decoder.vesting.jupiter_lock"; + } + + fn decoder_version(&self) -> &'static str { + return env!("CARGO_PKG_VERSION"); + } + + fn program_ids(&self) -> &'static [&'static str] { + return &[kb_program_ids::VESTING_JUPITER_LOCK_PROGRAM_ID]; + } + + fn supports_observation( + &self, + observation: &crate::MdProgramObservation, + ) -> crate::DcApiDecoderSupport { + if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) { + return crate::DcApiDecoderSupport::Maybe; + } + return crate::DcApiDecoderSupport::No; + } + + fn decode_observation( + &self, + _observation: &crate::MdProgramObservation, + ) -> kb_core::Result> { + return std::result::Result::Ok(std::vec::Vec::new()); + } +} diff --git a/kb-lib/src/executor.rs b/kb-lib/src/executor.rs index 8914a70..24f7b9b 100644 --- a/kb-lib/src/executor.rs +++ b/kb-lib/src/executor.rs @@ -4,7 +4,6 @@ //! Consolidated executor modules. mod adapter; -mod admin; mod amm; mod api; mod bridge; @@ -27,6 +26,8 @@ mod solana; mod spl; mod stable; mod staking; +mod storage; +mod strategy; mod treasury; mod vault; mod vesting; @@ -35,10 +36,8 @@ mod weighted; /// Exposes the reserved `adapter/saber_decimal_wrapper` executor. pub use self::adapter::ExAdapterSaberDecimalWrapperExecutor; -/// Exposes the reserved `admin/jupiter_lock` executor. -pub use self::admin::ExAdminJupiterLockExecutor; -/// Exposes the reserved `admin/pump_fees` executor. -pub use self::admin::ExAdminPumpFeesExecutor; +/// Reserved `kb-lib.executor.adapter.spl_token_wrap` executor. +pub use self::adapter::ExAdapterSplTokenWrapExecutor; /// Exposes the reserved `amm/aldrin_v1` executor. pub use self::amm::ExAmmAldrinV1Executor; /// Exposes the reserved `amm/aldrin_v2` executor. @@ -61,8 +60,6 @@ pub use self::amm::ExAmmGoosefxV2Executor; pub use self::amm::ExAmmGuacSwapExecutor; /// Exposes the reserved `amm/lifinity_swap_v2` executor. pub use self::amm::ExAmmLifinitySwapV2Executor; -/// Exposes the reserved `amm/metadao_futarchy_amm` executor. -pub use self::amm::ExAmmMetadaoFutarchyAmmExecutor; /// Exposes the reserved `amm/metadao_v0_5` executor. pub use self::amm::ExAmmMetadaoV05Executor; /// Exposes the reserved `amm/meteora_damm_v1` executor. @@ -83,8 +80,6 @@ pub use self::amm::ExAmmSolfiExecutor; pub use self::amm::ExAmmSolfiV2Executor; /// Exposes the reserved `amm/vertigo` executor. pub use self::amm::ExAmmVertigoExecutor; -/// Exposes the reserved `amm/virtuals` executor. -pub use self::amm::ExAmmVirtualsExecutor; /// Exposes the reserved `amm/woofi` executor. pub use self::amm::ExAmmWoofiExecutor; /// Exposes the reserved `amm/zero_fi` executor. @@ -169,8 +164,14 @@ pub use self::dlmm::ExDlmmMeteoraExecutor; pub use self::fees::ExFeesBagsFeeShareV1Executor; /// Exposes the reserved `fees/bags_fee_share_v2` executor. pub use self::fees::ExFeesBagsFeeShareV2Executor; +/// Exposes the reserved `admin/pump_fees` executor. +pub use self::fees::ExFeesPumpFeesExecutor; /// Exposes the reserved `governance/metadao_bid_wall` executor. pub use self::governance::ExGovernanceMetadaoBidWallExecutor; +/// Exposes the reserved `amm/metadao_futarchy_amm` executor. +pub use self::governance::ExGovernanceMetadaoFutarchyExecutor; +/// Reserved `kb-lib.executor.governance.squads_multisig` executor. +pub use self::governance::ExGovernanceSquadsMultisigExecutor; /// Exposes the reserved `launchpad/boop_fun` executor. pub use self::launchpad::ExLaunchpadBoopFunExecutor; /// Exposes the reserved `launchpad/metadao_ico` executor. @@ -189,6 +190,8 @@ pub use self::launchpad::ExLaunchpadPumpFunExecutor; pub use self::launchpad::ExLaunchpadPumpPumpupAiExecutor; /// Exposes the reserved `launchpad/raydium_launchlab` executor. pub use self::launchpad::ExLaunchpadRaydiumLaunchlabExecutor; +/// Exposes the reserved `amm/virtuals` executor. +pub use self::launchpad::ExLaunchpadVirtualsExecutor; /// Exposes the reserved `lending/clone` executor. pub use self::lending::ExLendingCloneExecutor; /// Exposes the reserved `lending/jupiter_lend_borrow` executor. @@ -207,10 +210,14 @@ pub use self::lending::ExLendingMarginfiV2Executor; pub use self::lock::ExLockRaydiumLpExecutor; /// Exposes the reserved `metadata/metaplex_token_metadata` executor. pub use self::metadata::ExMetadataMetaplexTokenMetadataExecutor; +/// Reserved `kb-lib.executor.metadata.solana_program_metadata` executor. +pub use self::metadata::ExMetadataSolanaProgramMetadataExecutor; /// Exposes the reserved `metadata/spl_name_service` executor. pub use self::metadata::ExMetadataSplNameServiceExecutor; /// Exposes the reserved `nft/metaplex_bubblegum` executor. pub use self::nft::ExNftMetaplexBubblegumExecutor; +/// Reserved `kb-lib.executor.nft.tensor_cnft` executor. +pub use self::nft::ExNftTensorCnftExecutor; /// Exposes the reserved `orderbook/jupiter_limit_order` executor. pub use self::orderbook::ExOrderbookJupiterLimitOrderExecutor; /// Exposes the reserved `orderbook/jupiter_limit_order_v2` executor. @@ -221,6 +228,8 @@ pub use self::orderbook::ExOrderbookOpenbookV2Executor; pub use self::perpetuals::ExPerpetualsDriftV2Executor; /// Exposes the reserved `perpetuals/jupiter` executor. pub use self::perpetuals::ExPerpetualsJupiterExecutor; +/// Reserved `kb-lib.executor.perpetuals.phoenix_eternal` executor. +pub use self::perpetuals::ExPerpetualsPhoenixEternalExecutor; /// Exposes the reserved `perpetuals/zeta` executor. pub use self::perpetuals::ExPerpetualsZetaExecutor; /// Exposes the reserved `router/dflow_aggregator_v4` executor. @@ -229,8 +238,6 @@ pub use self::router::ExRouterDflowAggregatorV4Executor; pub use self::router::ExRouterJupiterAggregatorV4Executor; /// Exposes the reserved `router/jupiter_aggregator_v6` executor. pub use self::router::ExRouterJupiterAggregatorV6Executor; -/// Exposes the reserved `router/jupiter_dca` executor. -pub use self::router::ExRouterJupiterDcaExecutor; /// Exposes the reserved `router/okx_labs_v1` executor. pub use self::router::ExRouterOkxLabsV1Executor; /// Exposes the reserved `router/okx_labs_v2` executor. @@ -873,12 +880,18 @@ pub use self::stable::ExStableSwapJupiterStableExecutor; pub use self::stable::ExStableSwapNumeraireExecutor; /// Exposes the reserved `stable/swap_stabble` executor. pub use self::stable::ExStableSwapStabbleExecutor; +/// Reserved `kb-lib.executor.staking.jito_tip_distribution` executor. +pub use self::staking::ExStakingJitoTipDistributionExecutor; /// Exposes the reserved `staking/kamino_farm` executor. pub use self::staking::ExStakingKaminoFarmExecutor; /// Exposes the reserved `staking/marinade_finance` executor. pub use self::staking::ExStakingMarinadeFinanceExecutor; /// Exposes the reserved `staking/solayer` executor. pub use self::staking::ExStakingSolayerExecutor; +/// Reserved `kb-lib.executor.storage.solana_record` executor. +pub use self::storage::ExStorageSolanaRecordExecutor; +/// Exposes the reserved `router/jupiter_dca` executor. +pub use self::strategy::ExStrategyJupiterDcaExecutor; /// Exposes the reserved `treasury/helium_treasury_management` executor. pub use self::treasury::ExTreasuryHeliumTreasuryManagementExecutor; /// Exposes the reserved `vault/carrot_defi` executor. @@ -893,6 +906,8 @@ pub use self::vault::ExVaultKaminoV2Executor; pub use self::vault::ExVaultKaminoYvaultsExecutor; /// Exposes the reserved `vault/meteora` executor. pub use self::vault::ExVaultMeteoraExecutor; +/// Exposes the reserved `admin/jupiter_lock` executor. +pub use self::vesting::ExVestingJupiterLockExecutor; /// Exposes the reserved `vesting/streamflow` executor. pub use self::vesting::ExVestingStreamflowExecutor; /// Exposes the reserved `wallet/jupiter_apepro_smart_wallet` executor. @@ -983,10 +998,17 @@ pub(crate) use self::spl::executor_spl_token_build_prepared_plan; mod reserved_executor_tests { #[test] fn every_reserved_executor_is_registered_and_builds_only_an_empty_plan() { - let executors: [&dyn crate::ExApiInstructionExecutor; 98] = [ + let executors: [&dyn crate::ExApiInstructionExecutor; 105] = [ &crate::ExAdapterSaberDecimalWrapperExecutor, - &crate::ExAdminJupiterLockExecutor, - &crate::ExAdminPumpFeesExecutor, + &crate::ExAdapterSplTokenWrapExecutor, + &crate::ExGovernanceSquadsMultisigExecutor, + &crate::ExMetadataSolanaProgramMetadataExecutor, + &crate::ExNftTensorCnftExecutor, + &crate::ExPerpetualsPhoenixEternalExecutor, + &crate::ExStakingJitoTipDistributionExecutor, + &crate::ExStorageSolanaRecordExecutor, + &crate::ExVestingJupiterLockExecutor, + &crate::ExFeesPumpFeesExecutor, &crate::ExAmmAldrinV1Executor, &crate::ExAmmAldrinV2Executor, &crate::ExAmmAlphaqExecutor, @@ -998,7 +1020,7 @@ mod reserved_executor_tests { &crate::ExAmmGoosefxV2Executor, &crate::ExAmmGuacSwapExecutor, &crate::ExAmmLifinitySwapV2Executor, - &crate::ExAmmMetadaoFutarchyAmmExecutor, + &crate::ExGovernanceMetadaoFutarchyExecutor, &crate::ExAmmMetadaoV05Executor, &crate::ExAmmMeteoraDammV1Executor, &crate::ExAmmMeteoraDammV2Executor, @@ -1009,7 +1031,7 @@ mod reserved_executor_tests { &crate::ExAmmSolfiExecutor, &crate::ExAmmSolfiV2Executor, &crate::ExAmmVertigoExecutor, - &crate::ExAmmVirtualsExecutor, + &crate::ExLaunchpadVirtualsExecutor, &crate::ExAmmWoofiExecutor, &crate::ExAmmZeroFiExecutor, &crate::ExAmmZoraExecutor, @@ -1057,7 +1079,7 @@ mod reserved_executor_tests { &crate::ExRouterDflowAggregatorV4Executor, &crate::ExRouterJupiterAggregatorV4Executor, &crate::ExRouterJupiterAggregatorV6Executor, - &crate::ExRouterJupiterDcaExecutor, + &crate::ExStrategyJupiterDcaExecutor, &crate::ExRouterOkxLabsV1Executor, &crate::ExRouterOkxLabsV2Executor, &crate::ExRwaOndoGlobalMarketsExecutor, @@ -1083,7 +1105,7 @@ mod reserved_executor_tests { &crate::ExWalletJupiterApeproSmartWalletExecutor, &crate::ExWeightedSwapStabbleExecutor, ]; - assert_eq!(executors.len(), 98); + assert_eq!(executors.len(), 105); for executor in executors { assert!(!executor.program_ids().is_empty()); for program_id in executor.program_ids() { diff --git a/kb-lib/src/executor/adapter.rs b/kb-lib/src/executor/adapter.rs index 92d784f..7f24b5a 100644 --- a/kb-lib/src/executor/adapter.rs +++ b/kb-lib/src/executor/adapter.rs @@ -1,8 +1,12 @@ // file: kb-lib/src/executor/adapter.rs -// version: 2 +// version: 3 //! `adapter` executor family. mod saber_decimal_wrapper; +mod spl_token_wrap; + /// Exposes the reserved `adapter/saber_decimal_wrapper` executor. pub use self::saber_decimal_wrapper::ExAdapterSaberDecimalWrapperExecutor; +/// Exposes the reserved `adapter/spl_token_wrap` executor. +pub use self::spl_token_wrap::ExAdapterSplTokenWrapExecutor; diff --git a/kb-lib/src/executor/adapter/spl_token_wrap.rs b/kb-lib/src/executor/adapter/spl_token_wrap.rs new file mode 100644 index 0000000..b42ef0b --- /dev/null +++ b/kb-lib/src/executor/adapter/spl_token_wrap.rs @@ -0,0 +1,49 @@ +// file: kb-lib/src/executor/adapter/spl_token_wrap.rs +// version: 1 + +//! Reserved executor for `adapter_spl_token_wrap`. + +/// Reserved executor for the `adapter_spl_token_wrap` program surface. +#[derive(Clone, Debug, Default)] +pub struct ExAdapterSplTokenWrapExecutor; + +impl crate::ExApiInstructionExecutor for crate::ExAdapterSplTokenWrapExecutor { + fn executor_name(&self) -> &'static str { + return "kb-lib.executor.adapter.spl_token_wrap"; + } + + fn executor_version(&self) -> &'static str { + return env!("CARGO_PKG_VERSION"); + } + + fn program_ids(&self) -> &'static [&'static str] { + return &[kb_program_ids::ADAPTER_SPL_TOKEN_WRAP_PROGRAM_ID]; + } + + fn supports_request( + &self, + request: &crate::ExApiExecutionRequest, + ) -> crate::ExApiExecutionSupport { + if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) { + return crate::ExApiExecutionSupport::Maybe; + } + return crate::ExApiExecutionSupport::No; + } + + fn build_plan( + &self, + _request: &crate::ExApiExecutionRequest, + ) -> kb_core::Result { + let payload_json = match crate::executor_api_serialize_payload_json( + &serde_json::json!({"status":"reserved_executor","surface":"adapter_spl_token_wrap"}), + ) { + std::result::Result::Ok(serialized) => serialized, + std::result::Result::Err(error) => return std::result::Result::Err(error), + }; + return std::result::Result::Ok(crate::ExApiExecutionPlan { + executor_name: "kb-lib.executor.adapter.spl_token_wrap".to_string(), + instruction_count: 0, + payload_json, + }); + } +} diff --git a/kb-lib/src/executor/admin.rs b/kb-lib/src/executor/admin.rs deleted file mode 100644 index c361970..0000000 --- a/kb-lib/src/executor/admin.rs +++ /dev/null @@ -1,11 +0,0 @@ -// file: kb-lib/src/executor/admin.rs -// version: 2 - -//! `admin` executor family. - -mod jupiter_lock; -mod pump_fees; -/// Exposes the reserved `admin/jupiter_lock` executor. -pub use self::jupiter_lock::ExAdminJupiterLockExecutor; -/// Exposes the reserved `admin/pump_fees` executor. -pub use self::pump_fees::ExAdminPumpFeesExecutor; diff --git a/kb-lib/src/executor/amm.rs b/kb-lib/src/executor/amm.rs index 29dfda8..8234a8d 100644 --- a/kb-lib/src/executor/amm.rs +++ b/kb-lib/src/executor/amm.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/executor/amm.rs -// version: 2 +// version: 3 //! `amm` executor family. @@ -14,7 +14,6 @@ mod goosefx_gamma; mod goosefx_v2; mod guac_swap; mod lifinity_swap_v2; -mod metadao_futarchy_amm; mod metadao_v0_5; mod meteora_damm_v1; mod meteora_damm_v2; @@ -25,10 +24,10 @@ mod raydium_lp_v4; mod solfi; mod solfi_v2; mod vertigo; -mod virtuals; mod woofi; mod zero_fi; mod zora; + /// Exposes the reserved `amm/aldrin_v1` executor. pub use self::aldrin_v1::ExAmmAldrinV1Executor; /// Exposes the reserved `amm/aldrin_v2` executor. @@ -51,8 +50,6 @@ pub use self::goosefx_v2::ExAmmGoosefxV2Executor; pub use self::guac_swap::ExAmmGuacSwapExecutor; /// Exposes the reserved `amm/lifinity_swap_v2` executor. pub use self::lifinity_swap_v2::ExAmmLifinitySwapV2Executor; -/// Exposes the reserved `amm/metadao_futarchy_amm` executor. -pub use self::metadao_futarchy_amm::ExAmmMetadaoFutarchyAmmExecutor; /// Exposes the reserved `amm/metadao_v0_5` executor. pub use self::metadao_v0_5::ExAmmMetadaoV05Executor; /// Exposes the reserved `amm/meteora_damm_v1` executor. @@ -73,8 +70,6 @@ pub use self::solfi::ExAmmSolfiExecutor; pub use self::solfi_v2::ExAmmSolfiV2Executor; /// Exposes the reserved `amm/vertigo` executor. pub use self::vertigo::ExAmmVertigoExecutor; -/// Exposes the reserved `amm/virtuals` executor. -pub use self::virtuals::ExAmmVirtualsExecutor; /// Exposes the reserved `amm/woofi` executor. pub use self::woofi::ExAmmWoofiExecutor; /// Exposes the reserved `amm/zero_fi` executor. diff --git a/kb-lib/src/executor/fees.rs b/kb-lib/src/executor/fees.rs index 458b23a..8a064e2 100644 --- a/kb-lib/src/executor/fees.rs +++ b/kb-lib/src/executor/fees.rs @@ -1,11 +1,15 @@ // file: kb-lib/src/executor/fees.rs -// version: 2 +// version: 3 //! `fees` executor family. mod bags_fee_share_v1; mod bags_fee_share_v2; +mod pump_fees; + /// Exposes the reserved `fees/bags_fee_share_v1` executor. pub use self::bags_fee_share_v1::ExFeesBagsFeeShareV1Executor; /// Exposes the reserved `fees/bags_fee_share_v2` executor. pub use self::bags_fee_share_v2::ExFeesBagsFeeShareV2Executor; +/// Exposes the reserved `fees/pump_fees` executor. +pub use self::pump_fees::ExFeesPumpFeesExecutor; diff --git a/kb-lib/src/executor/amm/virtuals.rs b/kb-lib/src/executor/fees/pump_fees.rs similarity index 71% rename from kb-lib/src/executor/amm/virtuals.rs rename to kb-lib/src/executor/fees/pump_fees.rs index e55c952..e7a5ebe 100644 --- a/kb-lib/src/executor/amm/virtuals.rs +++ b/kb-lib/src/executor/fees/pump_fees.rs @@ -1,15 +1,15 @@ -// file: kb-lib/src/executor/amm/virtuals.rs +// file: kb-lib/src/executor/fees/pump_fees.rs // version: 3 -//! Reserved executor for `amm_virtuals`. +//! Reserved executor for `fees_pump_fees`. -/// Reserved executor for the `amm_virtuals` program surface. +/// Reserved executor for the `fees_pump_fees` program surface. #[derive(Clone, Debug, Default)] -pub struct ExAmmVirtualsExecutor; +pub struct ExFeesPumpFeesExecutor; -impl crate::ExApiInstructionExecutor for crate::ExAmmVirtualsExecutor { +impl crate::ExApiInstructionExecutor for crate::ExFeesPumpFeesExecutor { fn executor_name(&self) -> &'static str { - return "kb-lib.executor.amm.virtuals"; + return "kb-lib.executor.fees.pump_fees"; } fn executor_version(&self) -> &'static str { @@ -17,7 +17,7 @@ impl crate::ExApiInstructionExecutor for crate::ExAmmVirtualsExecutor { } fn program_ids(&self) -> &'static [&'static str] { - return &[kb_program_ids::AMM_VIRTUALS_PROGRAM_ID]; + return &[kb_program_ids::FEES_PUMP_FEES_PROGRAM_ID]; } fn supports_request( @@ -35,13 +35,13 @@ impl crate::ExApiInstructionExecutor for crate::ExAmmVirtualsExecutor { _request: &crate::ExApiExecutionRequest, ) -> kb_core::Result { let payload_json = match crate::executor_api_serialize_payload_json( - &serde_json::json!({"status":"reserved_executor","surface":"amm_virtuals"}), + &serde_json::json!({"status":"reserved_executor","surface":"fees_pump_fees"}), ) { std::result::Result::Ok(serialized) => serialized, std::result::Result::Err(error) => return std::result::Result::Err(error), }; return std::result::Result::Ok(crate::ExApiExecutionPlan { - executor_name: "kb-lib.executor.amm.virtuals".to_string(), + executor_name: "kb-lib.executor.fees.pump_fees".to_string(), instruction_count: 0, payload_json, }); diff --git a/kb-lib/src/executor/governance.rs b/kb-lib/src/executor/governance.rs index 5d12d23..16c8fc9 100644 --- a/kb-lib/src/executor/governance.rs +++ b/kb-lib/src/executor/governance.rs @@ -1,8 +1,15 @@ // file: kb-lib/src/executor/governance.rs -// version: 2 +// version: 3 //! `governance` executor family. mod metadao_bid_wall; +mod metadao_futarchy; +mod squads_multisig; + /// Exposes the reserved `governance/metadao_bid_wall` executor. pub use self::metadao_bid_wall::ExGovernanceMetadaoBidWallExecutor; +/// Exposes the reserved `governance/metadao_futarchy` executor. +pub use self::metadao_futarchy::ExGovernanceMetadaoFutarchyExecutor; +/// Exposes the reserved `governance/squads_multisig` executor. +pub use self::squads_multisig::ExGovernanceSquadsMultisigExecutor; diff --git a/kb-lib/src/executor/amm/metadao_futarchy_amm.rs b/kb-lib/src/executor/governance/metadao_futarchy.rs similarity index 67% rename from kb-lib/src/executor/amm/metadao_futarchy_amm.rs rename to kb-lib/src/executor/governance/metadao_futarchy.rs index 1e041f0..36cfff3 100644 --- a/kb-lib/src/executor/amm/metadao_futarchy_amm.rs +++ b/kb-lib/src/executor/governance/metadao_futarchy.rs @@ -1,15 +1,15 @@ -// file: kb-lib/src/executor/amm/metadao_futarchy_amm.rs +// file: kb-lib/src/executor/governance/metadao_futarchy.rs // version: 3 -//! Reserved executor for `amm_metadao_futarchy_amm`. +//! Reserved executor for `governance_metadao_futarchy`. -/// Reserved executor for the `amm_metadao_futarchy_amm` program surface. +/// Reserved executor for the `governance_metadao_futarchy` program surface. #[derive(Clone, Debug, Default)] -pub struct ExAmmMetadaoFutarchyAmmExecutor; +pub struct ExGovernanceMetadaoFutarchyExecutor; -impl crate::ExApiInstructionExecutor for crate::ExAmmMetadaoFutarchyAmmExecutor { +impl crate::ExApiInstructionExecutor for crate::ExGovernanceMetadaoFutarchyExecutor { fn executor_name(&self) -> &'static str { - return "kb-lib.executor.amm.metadao_futarchy_amm"; + return "kb-lib.executor.governance.metadao_futarchy"; } fn executor_version(&self) -> &'static str { @@ -17,7 +17,7 @@ impl crate::ExApiInstructionExecutor for crate::ExAmmMetadaoFutarchyAmmExecutor } fn program_ids(&self) -> &'static [&'static str] { - return &[kb_program_ids::AMM_METADAO_FUTARCHY_AMM_PROGRAM_ID]; + return &[kb_program_ids::GOVERNANCE_METADAO_FUTARCHY_PROGRAM_ID]; } fn supports_request( @@ -35,13 +35,13 @@ impl crate::ExApiInstructionExecutor for crate::ExAmmMetadaoFutarchyAmmExecutor _request: &crate::ExApiExecutionRequest, ) -> kb_core::Result { let payload_json = match crate::executor_api_serialize_payload_json( - &serde_json::json!({"status":"reserved_executor","surface":"amm_metadao_futarchy_amm"}), + &serde_json::json!({"status":"reserved_executor","surface":"governance_metadao_futarchy"}), ) { std::result::Result::Ok(serialized) => serialized, std::result::Result::Err(error) => return std::result::Result::Err(error), }; return std::result::Result::Ok(crate::ExApiExecutionPlan { - executor_name: "kb-lib.executor.amm.metadao_futarchy_amm".to_string(), + executor_name: "kb-lib.executor.governance.metadao_futarchy".to_string(), instruction_count: 0, payload_json, }); diff --git a/kb-lib/src/executor/governance/squads_multisig.rs b/kb-lib/src/executor/governance/squads_multisig.rs new file mode 100644 index 0000000..c9f688b --- /dev/null +++ b/kb-lib/src/executor/governance/squads_multisig.rs @@ -0,0 +1,49 @@ +// file: kb-lib/src/executor/governance/squads_multisig.rs +// version: 1 + +//! Reserved executor for `governance_squads_multisig`. + +/// Reserved executor for the `governance_squads_multisig` program surface. +#[derive(Clone, Debug, Default)] +pub struct ExGovernanceSquadsMultisigExecutor; + +impl crate::ExApiInstructionExecutor for crate::ExGovernanceSquadsMultisigExecutor { + fn executor_name(&self) -> &'static str { + return "kb-lib.executor.governance.squads_multisig"; + } + + fn executor_version(&self) -> &'static str { + return env!("CARGO_PKG_VERSION"); + } + + fn program_ids(&self) -> &'static [&'static str] { + return &[kb_program_ids::GOVERNANCE_SQUADS_MULTISIG_PROGRAM_ID]; + } + + fn supports_request( + &self, + request: &crate::ExApiExecutionRequest, + ) -> crate::ExApiExecutionSupport { + if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) { + return crate::ExApiExecutionSupport::Maybe; + } + return crate::ExApiExecutionSupport::No; + } + + fn build_plan( + &self, + _request: &crate::ExApiExecutionRequest, + ) -> kb_core::Result { + let payload_json = match crate::executor_api_serialize_payload_json( + &serde_json::json!({"status":"reserved_executor","surface":"governance_squads_multisig"}), + ) { + std::result::Result::Ok(serialized) => serialized, + std::result::Result::Err(error) => return std::result::Result::Err(error), + }; + return std::result::Result::Ok(crate::ExApiExecutionPlan { + executor_name: "kb-lib.executor.governance.squads_multisig".to_string(), + instruction_count: 0, + payload_json, + }); + } +} diff --git a/kb-lib/src/executor/launchpad.rs b/kb-lib/src/executor/launchpad.rs index cbd7a6e..b67ccee 100644 --- a/kb-lib/src/executor/launchpad.rs +++ b/kb-lib/src/executor/launchpad.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/executor/launchpad.rs -// version: 2 +// version: 3 //! `launchpad` executor family. @@ -12,6 +12,8 @@ mod printr; mod pump_fun; mod pump_pumpup_ai; mod raydium_launchlab; +mod virtuals; + /// Exposes the reserved `launchpad/boop_fun` executor. pub use self::boop_fun::ExLaunchpadBoopFunExecutor; /// Exposes the reserved `launchpad/metadao_ico` executor. @@ -30,3 +32,5 @@ pub use self::pump_fun::ExLaunchpadPumpFunExecutor; pub use self::pump_pumpup_ai::ExLaunchpadPumpPumpupAiExecutor; /// Exposes the reserved `launchpad/raydium_launchlab` executor. pub use self::raydium_launchlab::ExLaunchpadRaydiumLaunchlabExecutor; +/// Exposes the reserved `launchpad/virtuals` executor. +pub use self::virtuals::ExLaunchpadVirtualsExecutor; diff --git a/kb-lib/src/executor/router/jupiter_dca.rs b/kb-lib/src/executor/launchpad/virtuals.rs similarity index 71% rename from kb-lib/src/executor/router/jupiter_dca.rs rename to kb-lib/src/executor/launchpad/virtuals.rs index 8cacef6..31187f7 100644 --- a/kb-lib/src/executor/router/jupiter_dca.rs +++ b/kb-lib/src/executor/launchpad/virtuals.rs @@ -1,15 +1,15 @@ -// file: kb-lib/src/executor/router/jupiter_dca.rs +// file: kb-lib/src/executor/launchpad/virtuals.rs // version: 3 -//! Reserved executor for `router_jupiter_dca`. +//! Reserved executor for `launchpad_virtuals`. -/// Reserved executor for the `router_jupiter_dca` program surface. +/// Reserved executor for the `launchpad_virtuals` program surface. #[derive(Clone, Debug, Default)] -pub struct ExRouterJupiterDcaExecutor; +pub struct ExLaunchpadVirtualsExecutor; -impl crate::ExApiInstructionExecutor for crate::ExRouterJupiterDcaExecutor { +impl crate::ExApiInstructionExecutor for crate::ExLaunchpadVirtualsExecutor { fn executor_name(&self) -> &'static str { - return "kb-lib.executor.router.jupiter_dca"; + return "kb-lib.executor.launchpad.virtuals"; } fn executor_version(&self) -> &'static str { @@ -17,7 +17,7 @@ impl crate::ExApiInstructionExecutor for crate::ExRouterJupiterDcaExecutor { } fn program_ids(&self) -> &'static [&'static str] { - return &[kb_program_ids::ROUTER_JUPITER_DCA_PROGRAM_ID]; + return &[kb_program_ids::LAUNCHPAD_VIRTUALS_PROGRAM_ID]; } fn supports_request( @@ -35,13 +35,13 @@ impl crate::ExApiInstructionExecutor for crate::ExRouterJupiterDcaExecutor { _request: &crate::ExApiExecutionRequest, ) -> kb_core::Result { let payload_json = match crate::executor_api_serialize_payload_json( - &serde_json::json!({"status":"reserved_executor","surface":"router_jupiter_dca"}), + &serde_json::json!({"status":"reserved_executor","surface":"launchpad_virtuals"}), ) { std::result::Result::Ok(serialized) => serialized, std::result::Result::Err(error) => return std::result::Result::Err(error), }; return std::result::Result::Ok(crate::ExApiExecutionPlan { - executor_name: "kb-lib.executor.router.jupiter_dca".to_string(), + executor_name: "kb-lib.executor.launchpad.virtuals".to_string(), instruction_count: 0, payload_json, }); diff --git a/kb-lib/src/executor/metadata.rs b/kb-lib/src/executor/metadata.rs index ce8605d..32ad82d 100644 --- a/kb-lib/src/executor/metadata.rs +++ b/kb-lib/src/executor/metadata.rs @@ -4,8 +4,11 @@ //! `metadata` executor family. mod metaplex_token_metadata; +mod solana_program_metadata; mod spl_name_service; /// Exposes the reserved `metadata/metaplex_token_metadata` executor. pub use self::metaplex_token_metadata::ExMetadataMetaplexTokenMetadataExecutor; +/// Exposes the reserved `metadata/solana_program_metadata` executor. +pub use self::solana_program_metadata::ExMetadataSolanaProgramMetadataExecutor; /// Exposes the reserved `metadata/spl_name_service` executor. pub use self::spl_name_service::ExMetadataSplNameServiceExecutor; diff --git a/kb-lib/src/executor/metadata/metaplex_token_metadata.rs b/kb-lib/src/executor/metadata/metaplex_token_metadata.rs index 988865a..4a947f2 100644 --- a/kb-lib/src/executor/metadata/metaplex_token_metadata.rs +++ b/kb-lib/src/executor/metadata/metaplex_token_metadata.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/executor/metadata/metaplex_token_metadata.rs -// version: 3 +// version: 4 //! Reserved executor for `metadata_metaplex_token_metadata`. @@ -35,7 +35,7 @@ impl crate::ExApiInstructionExecutor for crate::ExMetadataMetaplexTokenMetadataE _request: &crate::ExApiExecutionRequest, ) -> kb_core::Result { let payload_json = match crate::executor_api_serialize_payload_json( - &serde_json::json!({"status":"reserved_executor","surface":"metadata_metaplex_token_metadata"}), + &serde_json::json!({"status":"reserved_executor","surface":"metadata.metaplex_token_metadata"}), ) { std::result::Result::Ok(serialized) => serialized, std::result::Result::Err(error) => return std::result::Result::Err(error), diff --git a/kb-lib/src/executor/metadata/solana_program_metadata.rs b/kb-lib/src/executor/metadata/solana_program_metadata.rs new file mode 100644 index 0000000..8c1a6c2 --- /dev/null +++ b/kb-lib/src/executor/metadata/solana_program_metadata.rs @@ -0,0 +1,49 @@ +// file: kb-lib/src/executor/metadata/solana_program_metadata.rs +// version: 1 + +//! Reserved executor for `metadata_solana_program_metadata`. + +/// Reserved executor for the `metadata_solana_program_metadata` program surface. +#[derive(Clone, Debug, Default)] +pub struct ExMetadataSolanaProgramMetadataExecutor; + +impl crate::ExApiInstructionExecutor for crate::ExMetadataSolanaProgramMetadataExecutor { + fn executor_name(&self) -> &'static str { + return "kb-lib.executor.metadata.solana_program_metadata"; + } + + fn executor_version(&self) -> &'static str { + return env!("CARGO_PKG_VERSION"); + } + + fn program_ids(&self) -> &'static [&'static str] { + return &[kb_program_ids::METADATA_SOLANA_PROGRAM_METADATA_PROGRAM_ID]; + } + + fn supports_request( + &self, + request: &crate::ExApiExecutionRequest, + ) -> crate::ExApiExecutionSupport { + if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) { + return crate::ExApiExecutionSupport::Maybe; + } + return crate::ExApiExecutionSupport::No; + } + + fn build_plan( + &self, + _request: &crate::ExApiExecutionRequest, + ) -> kb_core::Result { + let payload_json = match crate::executor_api_serialize_payload_json( + &serde_json::json!({"status":"reserved_executor","surface":"metadata_solana_program_metadata"}), + ) { + std::result::Result::Ok(serialized) => serialized, + std::result::Result::Err(error) => return std::result::Result::Err(error), + }; + return std::result::Result::Ok(crate::ExApiExecutionPlan { + executor_name: "kb-lib.executor.metadata.solana_program_metadata".to_string(), + instruction_count: 0, + payload_json, + }); + } +} diff --git a/kb-lib/src/executor/nft.rs b/kb-lib/src/executor/nft.rs index dd60238..f01f0c7 100644 --- a/kb-lib/src/executor/nft.rs +++ b/kb-lib/src/executor/nft.rs @@ -1,8 +1,12 @@ // file: kb-lib/src/executor/nft.rs -// version: 2 +// version: 3 //! `nft` executor family. mod metaplex_bubblegum; +mod tensor_cnft; + /// Exposes the reserved `nft/metaplex_bubblegum` executor. pub use self::metaplex_bubblegum::ExNftMetaplexBubblegumExecutor; +/// Exposes the reserved `nft/tensor_cnft` executor. +pub use self::tensor_cnft::ExNftTensorCnftExecutor; diff --git a/kb-lib/src/executor/admin/pump_fees.rs b/kb-lib/src/executor/nft/tensor_cnft.rs similarity index 71% rename from kb-lib/src/executor/admin/pump_fees.rs rename to kb-lib/src/executor/nft/tensor_cnft.rs index 3bbaa75..c774ea8 100644 --- a/kb-lib/src/executor/admin/pump_fees.rs +++ b/kb-lib/src/executor/nft/tensor_cnft.rs @@ -1,15 +1,15 @@ -// file: kb-lib/src/executor/admin/pump_fees.rs -// version: 3 +// file: kb-lib/src/executor/nft/tensor_cnft.rs +// version: 1 -//! Reserved executor for `admin_pump_fees`. +//! Reserved executor for `nft_tensor_cnft`. -/// Reserved executor for the `admin_pump_fees` program surface. +/// Reserved executor for the `nft_tensor_cnft` program surface. #[derive(Clone, Debug, Default)] -pub struct ExAdminPumpFeesExecutor; +pub struct ExNftTensorCnftExecutor; -impl crate::ExApiInstructionExecutor for crate::ExAdminPumpFeesExecutor { +impl crate::ExApiInstructionExecutor for crate::ExNftTensorCnftExecutor { fn executor_name(&self) -> &'static str { - return "kb-lib.executor.admin.pump_fees"; + return "kb-lib.executor.nft.tensor_cnft"; } fn executor_version(&self) -> &'static str { @@ -17,7 +17,7 @@ impl crate::ExApiInstructionExecutor for crate::ExAdminPumpFeesExecutor { } fn program_ids(&self) -> &'static [&'static str] { - return &[kb_program_ids::ADMIN_PUMP_FEES_PROGRAM_ID]; + return &[kb_program_ids::NFT_TENSOR_CNFT_PROGRAM_ID]; } fn supports_request( @@ -35,13 +35,13 @@ impl crate::ExApiInstructionExecutor for crate::ExAdminPumpFeesExecutor { _request: &crate::ExApiExecutionRequest, ) -> kb_core::Result { let payload_json = match crate::executor_api_serialize_payload_json( - &serde_json::json!({"status":"reserved_executor","surface":"admin_pump_fees"}), + &serde_json::json!({"status":"reserved_executor","surface":"nft_tensor_cnft"}), ) { std::result::Result::Ok(serialized) => serialized, std::result::Result::Err(error) => return std::result::Result::Err(error), }; return std::result::Result::Ok(crate::ExApiExecutionPlan { - executor_name: "kb-lib.executor.admin.pump_fees".to_string(), + executor_name: "kb-lib.executor.nft.tensor_cnft".to_string(), instruction_count: 0, payload_json, }); diff --git a/kb-lib/src/executor/perpetuals.rs b/kb-lib/src/executor/perpetuals.rs index 80ee97c..31a36bb 100644 --- a/kb-lib/src/executor/perpetuals.rs +++ b/kb-lib/src/executor/perpetuals.rs @@ -1,14 +1,18 @@ // file: kb-lib/src/executor/perpetuals.rs -// version: 2 +// version: 3 //! `perpetuals` executor family. mod drift_v2; mod jupiter; +mod phoenix_eternal; mod zeta; + /// Exposes the reserved `perpetuals/drift_v2` executor. pub use self::drift_v2::ExPerpetualsDriftV2Executor; /// Exposes the reserved `perpetuals/jupiter` executor. pub use self::jupiter::ExPerpetualsJupiterExecutor; +/// Exposes the reserved `perpetuals/phoenix_eternal` executor. +pub use self::phoenix_eternal::ExPerpetualsPhoenixEternalExecutor; /// Exposes the reserved `perpetuals/zeta` executor. pub use self::zeta::ExPerpetualsZetaExecutor; diff --git a/kb-lib/src/executor/perpetuals/phoenix_eternal.rs b/kb-lib/src/executor/perpetuals/phoenix_eternal.rs new file mode 100644 index 0000000..e431f41 --- /dev/null +++ b/kb-lib/src/executor/perpetuals/phoenix_eternal.rs @@ -0,0 +1,49 @@ +// file: kb-lib/src/executor/perpetuals/phoenix_eternal.rs +// version: 1 + +//! Reserved executor for `perpetuals_phoenix_eternal`. + +/// Reserved executor for the `perpetuals_phoenix_eternal` program surface. +#[derive(Clone, Debug, Default)] +pub struct ExPerpetualsPhoenixEternalExecutor; + +impl crate::ExApiInstructionExecutor for crate::ExPerpetualsPhoenixEternalExecutor { + fn executor_name(&self) -> &'static str { + return "kb-lib.executor.perpetuals.phoenix_eternal"; + } + + fn executor_version(&self) -> &'static str { + return env!("CARGO_PKG_VERSION"); + } + + fn program_ids(&self) -> &'static [&'static str] { + return &[kb_program_ids::PERPETUALS_PHOENIX_ETERNAL_PROGRAM_ID]; + } + + fn supports_request( + &self, + request: &crate::ExApiExecutionRequest, + ) -> crate::ExApiExecutionSupport { + if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) { + return crate::ExApiExecutionSupport::Maybe; + } + return crate::ExApiExecutionSupport::No; + } + + fn build_plan( + &self, + _request: &crate::ExApiExecutionRequest, + ) -> kb_core::Result { + let payload_json = match crate::executor_api_serialize_payload_json( + &serde_json::json!({"status":"reserved_executor","surface":"perpetuals_phoenix_eternal"}), + ) { + std::result::Result::Ok(serialized) => serialized, + std::result::Result::Err(error) => return std::result::Result::Err(error), + }; + return std::result::Result::Ok(crate::ExApiExecutionPlan { + executor_name: "kb-lib.executor.perpetuals.phoenix_eternal".to_string(), + instruction_count: 0, + payload_json, + }); + } +} diff --git a/kb-lib/src/executor/router.rs b/kb-lib/src/executor/router.rs index 60c3cf1..546b5df 100644 --- a/kb-lib/src/executor/router.rs +++ b/kb-lib/src/executor/router.rs @@ -1,22 +1,20 @@ // file: kb-lib/src/executor/router.rs -// version: 2 +// version: 3 //! `router` executor family. mod dflow_aggregator_v4; mod jupiter_aggregator_v4; mod jupiter_aggregator_v6; -mod jupiter_dca; mod okx_labs_v1; mod okx_labs_v2; + /// Exposes the reserved `router/dflow_aggregator_v4` executor. pub use self::dflow_aggregator_v4::ExRouterDflowAggregatorV4Executor; /// Exposes the reserved `router/jupiter_aggregator_v4` executor. pub use self::jupiter_aggregator_v4::ExRouterJupiterAggregatorV4Executor; /// Exposes the reserved `router/jupiter_aggregator_v6` executor. pub use self::jupiter_aggregator_v6::ExRouterJupiterAggregatorV6Executor; -/// Exposes the reserved `router/jupiter_dca` executor. -pub use self::jupiter_dca::ExRouterJupiterDcaExecutor; /// Exposes the reserved `router/okx_labs_v1` executor. pub use self::okx_labs_v1::ExRouterOkxLabsV1Executor; /// Exposes the reserved `router/okx_labs_v2` executor. diff --git a/kb-lib/src/executor/solana/core/executor.rs b/kb-lib/src/executor/solana/core/executor.rs index dcb0733..1cbb9ec 100644 --- a/kb-lib/src/executor/solana/core/executor.rs +++ b/kb-lib/src/executor/solana/core/executor.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/executor/solana/core/executor.rs -// version: 2 +// version: 3 //! Exact capability dispatch and typed plan construction for Solana core. @@ -566,7 +566,7 @@ mod tests { &crate::MdProgramId(std::string::String::from( kb_program_ids::ZK_TOKEN_PROOF_PROGRAM_ID, )), - "solana_core.zk_token.verify_zero_balance", + "solana.core.zk_token.verify_zero_balance", ); assert!(matches!( historical_zk, diff --git a/kb-lib/src/executor/solana/core/intent.rs b/kb-lib/src/executor/solana/core/intent.rs index 88f0a95..e62cfa6 100644 --- a/kb-lib/src/executor/solana/core/intent.rs +++ b/kb-lib/src/executor/solana/core/intent.rs @@ -1,302 +1,302 @@ // file: kb-lib/src/executor/solana/core/intent.rs -// version: 1 +// version: 2 //! Typed Solana core execution intents. use ts_rs::TS; // rust-rules: derive-import /// Stable operation code for a System Program lamport transfer. -pub const EX_SOLANA_CORE_SYSTEM_TRANSFER_OPERATION: &str = "solana_core.system.transfer"; +pub const EX_SOLANA_CORE_SYSTEM_TRANSFER_OPERATION: &str = "solana.core.system.transfer"; /// Stable operation code for a bounded batch of System Program transfers. -pub const EX_SOLANA_CORE_SYSTEM_TRANSFER_MANY_OPERATION: &str = "solana_core.system.transfer_many"; +pub const EX_SOLANA_CORE_SYSTEM_TRANSFER_MANY_OPERATION: &str = "solana.core.system.transfer_many"; /// Stable operation code for controlled System Program account creation. pub const EX_SOLANA_CORE_SYSTEM_CREATE_ACCOUNT_OPERATION: &str = - "solana_core.system.create_account"; + "solana.core.system.create_account"; /// Stable operation code for System Program account creation with a seed. pub const EX_SOLANA_CORE_SYSTEM_CREATE_ACCOUNT_WITH_SEED_OPERATION: &str = - "solana_core.system.create_account_with_seed"; + "solana.core.system.create_account_with_seed"; /// Stable operation code for System Program account allocation. -pub const EX_SOLANA_CORE_SYSTEM_ALLOCATE_OPERATION: &str = "solana_core.system.allocate"; +pub const EX_SOLANA_CORE_SYSTEM_ALLOCATE_OPERATION: &str = "solana.core.system.allocate"; /// Stable operation code for System Program seeded account allocation. pub const EX_SOLANA_CORE_SYSTEM_ALLOCATE_WITH_SEED_OPERATION: &str = - "solana_core.system.allocate_with_seed"; + "solana.core.system.allocate_with_seed"; /// Stable operation code for System Program account owner assignment. -pub const EX_SOLANA_CORE_SYSTEM_ASSIGN_OPERATION: &str = "solana_core.system.assign"; +pub const EX_SOLANA_CORE_SYSTEM_ASSIGN_OPERATION: &str = "solana.core.system.assign"; /// Stable operation code for System Program seeded account owner assignment. pub const EX_SOLANA_CORE_SYSTEM_ASSIGN_WITH_SEED_OPERATION: &str = - "solana_core.system.assign_with_seed"; + "solana.core.system.assign_with_seed"; /// Stable operation code for a System Program transfer from a seeded account. pub const EX_SOLANA_CORE_SYSTEM_TRANSFER_WITH_SEED_OPERATION: &str = - "solana_core.system.transfer_with_seed"; + "solana.core.system.transfer_with_seed"; /// Stable operation code for System Program account creation that accepts prefunding. pub const EX_SOLANA_CORE_SYSTEM_CREATE_ACCOUNT_ALLOW_PREFUND_OPERATION: &str = - "solana_core.system.create_account_allow_prefund"; + "solana.core.system.create_account_allow_prefund"; /// Stable operation code for durable nonce account creation. -pub const EX_SOLANA_CORE_SYSTEM_NONCE_CREATE_OPERATION: &str = "solana_core.system.nonce.create"; +pub const EX_SOLANA_CORE_SYSTEM_NONCE_CREATE_OPERATION: &str = "solana.core.system.nonce.create"; /// Stable operation code for seeded durable nonce account creation. pub const EX_SOLANA_CORE_SYSTEM_NONCE_CREATE_WITH_SEED_OPERATION: &str = - "solana_core.system.nonce.create_with_seed"; + "solana.core.system.nonce.create_with_seed"; /// Stable operation code for durable nonce initialization. pub const EX_SOLANA_CORE_SYSTEM_NONCE_INITIALIZE_OPERATION: &str = - "solana_core.system.nonce.initialize"; + "solana.core.system.nonce.initialize"; /// Stable operation code for durable nonce advancement. -pub const EX_SOLANA_CORE_SYSTEM_NONCE_ADVANCE_OPERATION: &str = "solana_core.system.nonce.advance"; +pub const EX_SOLANA_CORE_SYSTEM_NONCE_ADVANCE_OPERATION: &str = "solana.core.system.nonce.advance"; /// Stable operation code for durable nonce authority changes. pub const EX_SOLANA_CORE_SYSTEM_NONCE_AUTHORIZE_OPERATION: &str = - "solana_core.system.nonce.authorize"; + "solana.core.system.nonce.authorize"; /// Stable operation code for durable nonce withdrawal. pub const EX_SOLANA_CORE_SYSTEM_NONCE_WITHDRAW_OPERATION: &str = - "solana_core.system.nonce.withdraw"; + "solana.core.system.nonce.withdraw"; /// Stable operation code for durable nonce state upgrade. -pub const EX_SOLANA_CORE_SYSTEM_NONCE_UPGRADE_OPERATION: &str = "solana_core.system.nonce.upgrade"; +pub const EX_SOLANA_CORE_SYSTEM_NONCE_UPGRADE_OPERATION: &str = "solana.core.system.nonce.upgrade"; /// Stable operation code for a Compute Budget heap-frame request. pub const EX_SOLANA_CORE_COMPUTE_BUDGET_REQUEST_HEAP_FRAME_OPERATION: &str = - "solana_core.compute_budget.request_heap_frame"; + "solana.core.compute_budget.request_heap_frame"; /// Stable operation code for a Compute Budget unit limit. pub const EX_SOLANA_CORE_COMPUTE_BUDGET_SET_UNIT_LIMIT_OPERATION: &str = - "solana_core.compute_budget.set_compute_unit_limit"; + "solana.core.compute_budget.set_compute_unit_limit"; /// Stable operation code for a Compute Budget unit price. pub const EX_SOLANA_CORE_COMPUTE_BUDGET_SET_UNIT_PRICE_OPERATION: &str = - "solana_core.compute_budget.set_compute_unit_price"; + "solana.core.compute_budget.set_compute_unit_price"; /// Stable operation code for a Compute Budget loaded-account data-size limit. pub const EX_SOLANA_CORE_COMPUTE_BUDGET_SET_LOADED_ACCOUNTS_DATA_SIZE_LIMIT_OPERATION: &str = - "solana_core.compute_budget.set_loaded_accounts_data_size_limit"; + "solana.core.compute_budget.set_loaded_accounts_data_size_limit"; /// Stable operation code for Address Lookup Table creation. pub const EX_SOLANA_CORE_ADDRESS_LOOKUP_TABLE_CREATE_OPERATION: &str = - "solana_core.address_lookup_table.create"; + "solana.core.address_lookup_table.create"; /// Stable operation code for Address Lookup Table extension. pub const EX_SOLANA_CORE_ADDRESS_LOOKUP_TABLE_EXTEND_OPERATION: &str = - "solana_core.address_lookup_table.extend"; + "solana.core.address_lookup_table.extend"; /// Stable operation code for permanently freezing an Address Lookup Table. pub const EX_SOLANA_CORE_ADDRESS_LOOKUP_TABLE_FREEZE_OPERATION: &str = - "solana_core.address_lookup_table.freeze"; + "solana.core.address_lookup_table.freeze"; /// Stable operation code for Address Lookup Table deactivation. pub const EX_SOLANA_CORE_ADDRESS_LOOKUP_TABLE_DEACTIVATE_OPERATION: &str = - "solana_core.address_lookup_table.deactivate"; + "solana.core.address_lookup_table.deactivate"; /// Stable operation code for closing an Address Lookup Table. pub const EX_SOLANA_CORE_ADDRESS_LOOKUP_TABLE_CLOSE_OPERATION: &str = - "solana_core.address_lookup_table.close"; + "solana.core.address_lookup_table.close"; /// Stable operation code for one inline Ed25519 verification. pub const EX_SOLANA_CORE_ED25519_VERIFY_INLINE_OPERATION: &str = - "solana_core.ed25519.verify_inline"; + "solana.core.ed25519.verify_inline"; /// Stable operation code for an Ed25519 verification table with explicit offsets. pub const EX_SOLANA_CORE_ED25519_VERIFY_OFFSETS_OPERATION: &str = - "solana_core.ed25519.verify_offsets"; + "solana.core.ed25519.verify_offsets"; /// Stable operation code for one inline secp256k1 verification. pub const EX_SOLANA_CORE_SECP256K1_VERIFY_INLINE_OPERATION: &str = - "solana_core.secp256k1.verify_inline"; + "solana.core.secp256k1.verify_inline"; /// Stable operation code for a secp256k1 verification table with explicit offsets. pub const EX_SOLANA_CORE_SECP256K1_VERIFY_OFFSETS_OPERATION: &str = - "solana_core.secp256k1.verify_offsets"; + "solana.core.secp256k1.verify_offsets"; /// Stable operation code for one inline secp256r1 verification. pub const EX_SOLANA_CORE_SECP256R1_VERIFY_INLINE_OPERATION: &str = - "solana_core.secp256r1.verify_inline"; + "solana.core.secp256r1.verify_inline"; /// Stable operation code for a secp256r1 verification table with explicit offsets. pub const EX_SOLANA_CORE_SECP256R1_VERIFY_OFFSETS_OPERATION: &str = - "solana_core.secp256r1.verify_offsets"; + "solana.core.secp256r1.verify_offsets"; /// Stable operation code for initializing a Stake account. -pub const EX_SOLANA_CORE_STAKE_INITIALIZE_OPERATION: &str = "solana_core.stake.initialize"; +pub const EX_SOLANA_CORE_STAKE_INITIALIZE_OPERATION: &str = "solana.core.stake.initialize"; /// Stable operation code for checked Stake account initialization. pub const EX_SOLANA_CORE_STAKE_INITIALIZE_CHECKED_OPERATION: &str = - "solana_core.stake.initialize_checked"; + "solana.core.stake.initialize_checked"; /// Stable operation code for creating and initializing a Stake account. -pub const EX_SOLANA_CORE_STAKE_CREATE_ACCOUNT_OPERATION: &str = "solana_core.stake.create_account"; +pub const EX_SOLANA_CORE_STAKE_CREATE_ACCOUNT_OPERATION: &str = "solana.core.stake.create_account"; /// Stable operation code for seeded Stake account creation. pub const EX_SOLANA_CORE_STAKE_CREATE_ACCOUNT_WITH_SEED_OPERATION: &str = - "solana_core.stake.create_account_with_seed"; + "solana.core.stake.create_account_with_seed"; /// Stable operation code for checked Stake account creation. pub const EX_SOLANA_CORE_STAKE_CREATE_ACCOUNT_CHECKED_OPERATION: &str = - "solana_core.stake.create_account_checked"; + "solana.core.stake.create_account_checked"; /// Stable operation code for checked seeded Stake account creation. pub const EX_SOLANA_CORE_STAKE_CREATE_ACCOUNT_WITH_SEED_CHECKED_OPERATION: &str = - "solana_core.stake.create_account_with_seed_checked"; + "solana.core.stake.create_account_with_seed_checked"; /// Stable operation code for splitting a Stake account. -pub const EX_SOLANA_CORE_STAKE_SPLIT_OPERATION: &str = "solana_core.stake.split"; +pub const EX_SOLANA_CORE_STAKE_SPLIT_OPERATION: &str = "solana.core.stake.split"; /// Stable operation code for splitting into a seeded Stake account. pub const EX_SOLANA_CORE_STAKE_SPLIT_WITH_SEED_OPERATION: &str = - "solana_core.stake.split_with_seed"; + "solana.core.stake.split_with_seed"; /// Stable operation code for merging Stake accounts. -pub const EX_SOLANA_CORE_STAKE_MERGE_OPERATION: &str = "solana_core.stake.merge"; +pub const EX_SOLANA_CORE_STAKE_MERGE_OPERATION: &str = "solana.core.stake.merge"; /// Stable operation code for creating and delegating a Stake account. pub const EX_SOLANA_CORE_STAKE_CREATE_ACCOUNT_AND_DELEGATE_OPERATION: &str = - "solana_core.stake.create_account_and_delegate"; + "solana.core.stake.create_account_and_delegate"; /// Stable operation code for seeded Stake account creation and delegation. pub const EX_SOLANA_CORE_STAKE_CREATE_ACCOUNT_WITH_SEED_AND_DELEGATE_OPERATION: &str = - "solana_core.stake.create_account_with_seed_and_delegate"; + "solana.core.stake.create_account_with_seed_and_delegate"; /// Stable operation code for changing a Stake authority. -pub const EX_SOLANA_CORE_STAKE_AUTHORIZE_OPERATION: &str = "solana_core.stake.authorize"; +pub const EX_SOLANA_CORE_STAKE_AUTHORIZE_OPERATION: &str = "solana.core.stake.authorize"; /// Stable operation code for a checked Stake authority change. pub const EX_SOLANA_CORE_STAKE_AUTHORIZE_CHECKED_OPERATION: &str = - "solana_core.stake.authorize_checked"; + "solana.core.stake.authorize_checked"; /// Stable operation code for changing a seeded Stake authority. pub const EX_SOLANA_CORE_STAKE_AUTHORIZE_WITH_SEED_OPERATION: &str = - "solana_core.stake.authorize_with_seed"; + "solana.core.stake.authorize_with_seed"; /// Stable operation code for a checked seeded Stake authority change. pub const EX_SOLANA_CORE_STAKE_AUTHORIZE_CHECKED_WITH_SEED_OPERATION: &str = - "solana_core.stake.authorize_checked_with_seed"; + "solana.core.stake.authorize_checked_with_seed"; /// Stable operation code for delegating Stake. -pub const EX_SOLANA_CORE_STAKE_DELEGATE_OPERATION: &str = "solana_core.stake.delegate"; +pub const EX_SOLANA_CORE_STAKE_DELEGATE_OPERATION: &str = "solana.core.stake.delegate"; /// Stable operation code for withdrawing lamports from a Stake account. -pub const EX_SOLANA_CORE_STAKE_WITHDRAW_OPERATION: &str = "solana_core.stake.withdraw"; +pub const EX_SOLANA_CORE_STAKE_WITHDRAW_OPERATION: &str = "solana.core.stake.withdraw"; /// Stable operation code for deactivating Stake. -pub const EX_SOLANA_CORE_STAKE_DEACTIVATE_OPERATION: &str = "solana_core.stake.deactivate"; +pub const EX_SOLANA_CORE_STAKE_DEACTIVATE_OPERATION: &str = "solana.core.stake.deactivate"; /// Stable operation code for changing a Stake lockup. -pub const EX_SOLANA_CORE_STAKE_SET_LOCKUP_OPERATION: &str = "solana_core.stake.set_lockup"; +pub const EX_SOLANA_CORE_STAKE_SET_LOCKUP_OPERATION: &str = "solana.core.stake.set_lockup"; /// Stable operation code for a checked Stake lockup change. pub const EX_SOLANA_CORE_STAKE_SET_LOCKUP_CHECKED_OPERATION: &str = - "solana_core.stake.set_lockup_checked"; + "solana.core.stake.set_lockup_checked"; /// Stable operation code for querying the minimum delegation. pub const EX_SOLANA_CORE_STAKE_GET_MINIMUM_DELEGATION_OPERATION: &str = - "solana_core.stake.get_minimum_delegation"; + "solana.core.stake.get_minimum_delegation"; /// Stable operation code for deactivating delinquent Stake. pub const EX_SOLANA_CORE_STAKE_DEACTIVATE_DELINQUENT_OPERATION: &str = - "solana_core.stake.deactivate_delinquent"; + "solana.core.stake.deactivate_delinquent"; /// Stable operation code for moving delegated Stake. -pub const EX_SOLANA_CORE_STAKE_MOVE_STAKE_OPERATION: &str = "solana_core.stake.move_stake"; +pub const EX_SOLANA_CORE_STAKE_MOVE_STAKE_OPERATION: &str = "solana.core.stake.move_stake"; /// Stable operation code for moving lamports between Stake accounts. -pub const EX_SOLANA_CORE_STAKE_MOVE_LAMPORTS_OPERATION: &str = "solana_core.stake.move_lamports"; +pub const EX_SOLANA_CORE_STAKE_MOVE_LAMPORTS_OPERATION: &str = "solana.core.stake.move_lamports"; /// Stable operation code for initializing a legacy Vote account. pub const EX_SOLANA_CORE_VOTE_INITIALIZE_ACCOUNT_OPERATION: &str = - "solana_core.vote.initialize_account"; + "solana.core.vote.initialize_account"; /// Stable operation code for initializing a Vote v2 account. pub const EX_SOLANA_CORE_VOTE_INITIALIZE_ACCOUNT_V2_OPERATION: &str = - "solana_core.vote.initialize_account_v2"; + "solana.core.vote.initialize_account_v2"; /// Stable operation code for creating and initializing a legacy Vote account. -pub const EX_SOLANA_CORE_VOTE_CREATE_ACCOUNT_OPERATION: &str = "solana_core.vote.create_account"; +pub const EX_SOLANA_CORE_VOTE_CREATE_ACCOUNT_OPERATION: &str = "solana.core.vote.create_account"; /// Stable operation code for creating a seeded legacy Vote account. pub const EX_SOLANA_CORE_VOTE_CREATE_ACCOUNT_WITH_SEED_OPERATION: &str = - "solana_core.vote.create_account_with_seed"; + "solana.core.vote.create_account_with_seed"; /// Stable operation code for creating and initializing a Vote v2 account. pub const EX_SOLANA_CORE_VOTE_CREATE_ACCOUNT_V2_OPERATION: &str = - "solana_core.vote.create_account_v2"; + "solana.core.vote.create_account_v2"; /// Stable operation code for creating a seeded Vote v2 account. pub const EX_SOLANA_CORE_VOTE_CREATE_ACCOUNT_WITH_SEED_V2_OPERATION: &str = - "solana_core.vote.create_account_with_seed_v2"; + "solana.core.vote.create_account_with_seed_v2"; /// Stable operation code for changing a Vote authority. -pub const EX_SOLANA_CORE_VOTE_AUTHORIZE_OPERATION: &str = "solana_core.vote.authorize"; +pub const EX_SOLANA_CORE_VOTE_AUTHORIZE_OPERATION: &str = "solana.core.vote.authorize"; /// Stable operation code for a checked Vote authority change. pub const EX_SOLANA_CORE_VOTE_AUTHORIZE_CHECKED_OPERATION: &str = - "solana_core.vote.authorize_checked"; + "solana.core.vote.authorize_checked"; /// Stable operation code for changing a seed-derived Vote authority. pub const EX_SOLANA_CORE_VOTE_AUTHORIZE_WITH_SEED_OPERATION: &str = - "solana_core.vote.authorize_with_seed"; + "solana.core.vote.authorize_with_seed"; /// Stable operation code for a checked seed-derived Vote authority change. pub const EX_SOLANA_CORE_VOTE_AUTHORIZE_CHECKED_WITH_SEED_OPERATION: &str = - "solana_core.vote.authorize_checked_with_seed"; + "solana.core.vote.authorize_checked_with_seed"; /// Stable operation code for submitting a Vote instruction. -pub const EX_SOLANA_CORE_VOTE_SUBMIT_OPERATION: &str = "solana_core.vote.vote"; +pub const EX_SOLANA_CORE_VOTE_SUBMIT_OPERATION: &str = "solana.core.vote.vote"; /// Stable operation code for submitting a switch-proof Vote instruction. -pub const EX_SOLANA_CORE_VOTE_SWITCH_OPERATION: &str = "solana_core.vote.vote_switch"; +pub const EX_SOLANA_CORE_VOTE_SWITCH_OPERATION: &str = "solana.core.vote.vote_switch"; /// Stable operation code for withdrawing lamports from a Vote account. -pub const EX_SOLANA_CORE_VOTE_WITHDRAW_OPERATION: &str = "solana_core.vote.withdraw"; +pub const EX_SOLANA_CORE_VOTE_WITHDRAW_OPERATION: &str = "solana.core.vote.withdraw"; /// Stable operation code for changing a validator identity. pub const EX_SOLANA_CORE_VOTE_UPDATE_VALIDATOR_IDENTITY_OPERATION: &str = - "solana_core.vote.update_validator_identity"; + "solana.core.vote.update_validator_identity"; /// Stable operation code for changing a legacy Vote commission percentage. pub const EX_SOLANA_CORE_VOTE_UPDATE_COMMISSION_OPERATION: &str = - "solana_core.vote.update_commission"; + "solana.core.vote.update_commission"; /// Stable operation code for replacing Vote state. pub const EX_SOLANA_CORE_VOTE_UPDATE_VOTE_STATE_OPERATION: &str = - "solana_core.vote.update_vote_state"; + "solana.core.vote.update_vote_state"; /// Stable operation code for replacing Vote state with a switch proof. pub const EX_SOLANA_CORE_VOTE_UPDATE_VOTE_STATE_SWITCH_OPERATION: &str = - "solana_core.vote.update_vote_state_switch"; + "solana.core.vote.update_vote_state_switch"; /// Stable operation code for compact Vote-state replacement. pub const EX_SOLANA_CORE_VOTE_COMPACT_UPDATE_VOTE_STATE_OPERATION: &str = - "solana_core.vote.compact_update_vote_state"; + "solana.core.vote.compact_update_vote_state"; /// Stable operation code for compact Vote-state replacement with a switch proof. pub const EX_SOLANA_CORE_VOTE_COMPACT_UPDATE_VOTE_STATE_SWITCH_OPERATION: &str = - "solana_core.vote.compact_update_vote_state_switch"; + "solana.core.vote.compact_update_vote_state_switch"; /// Stable operation code for synchronizing a Vote tower. -pub const EX_SOLANA_CORE_VOTE_TOWER_SYNC_OPERATION: &str = "solana_core.vote.tower_sync"; +pub const EX_SOLANA_CORE_VOTE_TOWER_SYNC_OPERATION: &str = "solana.core.vote.tower_sync"; /// Stable operation code for synchronizing a Vote tower with a switch proof. pub const EX_SOLANA_CORE_VOTE_TOWER_SYNC_SWITCH_OPERATION: &str = - "solana_core.vote.tower_sync_switch"; + "solana.core.vote.tower_sync_switch"; /// Stable operation code for changing a Vote v2 commission collector. pub const EX_SOLANA_CORE_VOTE_UPDATE_COMMISSION_COLLECTOR_OPERATION: &str = - "solana_core.vote.update_commission_collector"; + "solana.core.vote.update_commission_collector"; /// Stable operation code for changing a Vote v2 commission in basis points. pub const EX_SOLANA_CORE_VOTE_UPDATE_COMMISSION_BPS_OPERATION: &str = - "solana_core.vote.update_commission_bps"; + "solana.core.vote.update_commission_bps"; /// Stable operation code for depositing delegator rewards into a Vote account. pub const EX_SOLANA_CORE_VOTE_DEPOSIT_DELEGATOR_REWARDS_OPERATION: &str = - "solana_core.vote.deposit_delegator_rewards"; + "solana.core.vote.deposit_delegator_rewards"; /// Stable operation code for atomically creating and initializing a Loader v3 buffer. pub const EX_SOLANA_CORE_LOADER_V3_CREATE_BUFFER_OPERATION: &str = - "solana_core.loader_v3.create_buffer"; + "solana.core.loader_v3.create_buffer"; /// Stable operation code for writing one bounded chunk into a Loader v3 buffer. -pub const EX_SOLANA_CORE_LOADER_V3_WRITE_OPERATION: &str = "solana_core.loader_v3.write"; +pub const EX_SOLANA_CORE_LOADER_V3_WRITE_OPERATION: &str = "solana.core.loader_v3.write"; /// Stable operation code for atomically creating and deploying a Loader v3 program. pub const EX_SOLANA_CORE_LOADER_V3_DEPLOY_WITH_MAX_PROGRAM_LEN_OPERATION: &str = - "solana_core.loader_v3.deploy_with_max_program_len"; + "solana.core.loader_v3.deploy_with_max_program_len"; /// Stable operation code for upgrading a Loader v3 program from a buffer. -pub const EX_SOLANA_CORE_LOADER_V3_UPGRADE_OPERATION: &str = "solana_core.loader_v3.upgrade"; +pub const EX_SOLANA_CORE_LOADER_V3_UPGRADE_OPERATION: &str = "solana.core.loader_v3.upgrade"; /// Stable operation code for changing a Loader v3 buffer authority. pub const EX_SOLANA_CORE_LOADER_V3_SET_BUFFER_AUTHORITY_OPERATION: &str = - "solana_core.loader_v3.set_buffer_authority"; + "solana.core.loader_v3.set_buffer_authority"; /// Stable operation code for a checked Loader v3 buffer authority change. pub const EX_SOLANA_CORE_LOADER_V3_SET_BUFFER_AUTHORITY_CHECKED_OPERATION: &str = - "solana_core.loader_v3.set_buffer_authority_checked"; + "solana.core.loader_v3.set_buffer_authority_checked"; /// Stable operation code for changing or revoking a Loader v3 program authority. pub const EX_SOLANA_CORE_LOADER_V3_SET_UPGRADE_AUTHORITY_OPERATION: &str = - "solana_core.loader_v3.set_upgrade_authority"; + "solana.core.loader_v3.set_upgrade_authority"; /// Stable operation code for a checked Loader v3 program authority change. pub const EX_SOLANA_CORE_LOADER_V3_SET_UPGRADE_AUTHORITY_CHECKED_OPERATION: &str = - "solana_core.loader_v3.set_upgrade_authority_checked"; + "solana.core.loader_v3.set_upgrade_authority_checked"; /// Stable operation code for closing an initialized Loader v3 buffer. -pub const EX_SOLANA_CORE_LOADER_V3_CLOSE_OPERATION: &str = "solana_core.loader_v3.close"; +pub const EX_SOLANA_CORE_LOADER_V3_CLOSE_OPERATION: &str = "solana.core.loader_v3.close"; /// Stable operation code for closing any supported Loader v3 account shape. -pub const EX_SOLANA_CORE_LOADER_V3_CLOSE_ANY_OPERATION: &str = "solana_core.loader_v3.close_any"; +pub const EX_SOLANA_CORE_LOADER_V3_CLOSE_ANY_OPERATION: &str = "solana.core.loader_v3.close_any"; /// Stable operation code for extending a Loader v3 ProgramData allocation. pub const EX_SOLANA_CORE_LOADER_V3_EXTEND_PROGRAM_OPERATION: &str = - "solana_core.loader_v3.extend_program"; + "solana.core.loader_v3.extend_program"; /// Stable operation code for atomically creating and initializing a Loader v4 buffer. pub const EX_SOLANA_CORE_LOADER_V4_CREATE_BUFFER_OPERATION: &str = - "solana_core.loader_v4.create_buffer"; + "solana.core.loader_v4.create_buffer"; /// Stable operation code for changing a Loader v4 program allocation. pub const EX_SOLANA_CORE_LOADER_V4_SET_PROGRAM_LENGTH_OPERATION: &str = - "solana_core.loader_v4.set_program_length"; + "solana.core.loader_v4.set_program_length"; /// Stable operation code for writing one bounded chunk into a Loader v4 program account. -pub const EX_SOLANA_CORE_LOADER_V4_WRITE_OPERATION: &str = "solana_core.loader_v4.write"; +pub const EX_SOLANA_CORE_LOADER_V4_WRITE_OPERATION: &str = "solana.core.loader_v4.write"; /// Stable operation code for copying bytes between Loader v4 program accounts. -pub const EX_SOLANA_CORE_LOADER_V4_COPY_OPERATION: &str = "solana_core.loader_v4.copy"; +pub const EX_SOLANA_CORE_LOADER_V4_COPY_OPERATION: &str = "solana.core.loader_v4.copy"; /// Stable operation code for deploying a Loader v4 program in place. -pub const EX_SOLANA_CORE_LOADER_V4_DEPLOY_OPERATION: &str = "solana_core.loader_v4.deploy"; +pub const EX_SOLANA_CORE_LOADER_V4_DEPLOY_OPERATION: &str = "solana.core.loader_v4.deploy"; /// Stable operation code for deploying a Loader v4 program from a source buffer. pub const EX_SOLANA_CORE_LOADER_V4_DEPLOY_FROM_SOURCE_OPERATION: &str = - "solana_core.loader_v4.deploy_from_source"; + "solana.core.loader_v4.deploy_from_source"; /// Stable operation code for retracting a Loader v4 program into maintenance. -pub const EX_SOLANA_CORE_LOADER_V4_RETRACT_OPERATION: &str = "solana_core.loader_v4.retract"; +pub const EX_SOLANA_CORE_LOADER_V4_RETRACT_OPERATION: &str = "solana.core.loader_v4.retract"; /// Stable operation code for transferring Loader v4 program authority. pub const EX_SOLANA_CORE_LOADER_V4_TRANSFER_AUTHORITY_OPERATION: &str = - "solana_core.loader_v4.transfer_authority"; + "solana.core.loader_v4.transfer_authority"; /// Stable operation code for finalizing a Loader v4 program. -pub const EX_SOLANA_CORE_LOADER_V4_FINALIZE_OPERATION: &str = "solana_core.loader_v4.finalize"; +pub const EX_SOLANA_CORE_LOADER_V4_FINALIZE_OPERATION: &str = "solana.core.loader_v4.finalize"; /// Stable operation code for creating and initializing a Config Program account. pub const EX_SOLANA_CORE_CONFIG_CREATE_ACCOUNT_OPERATION: &str = - "solana_core.config.create_account"; + "solana.core.config.create_account"; /// Stable operation code for storing opaque serialized data in a Config Program account. -pub const EX_SOLANA_CORE_CONFIG_STORE_OPERATION: &str = "solana_core.config.store"; +pub const EX_SOLANA_CORE_CONFIG_STORE_OPERATION: &str = "solana.core.config.store"; /// Stable operation code for activating a native feature account. -pub const EX_SOLANA_CORE_FEATURE_ACTIVATE_OPERATION: &str = "solana_core.feature.activate"; +pub const EX_SOLANA_CORE_FEATURE_ACTIVATE_OPERATION: &str = "solana.core.feature.activate"; /// Stable operation code for revoking a pending native feature activation. pub const EX_SOLANA_CORE_FEATURE_REVOKE_PENDING_ACTIVATION_OPERATION: &str = - "solana_core.feature.revoke_pending_activation"; + "solana.core.feature.revoke_pending_activation"; /// Stable operation code for closing a retained Slashing violation report. pub const EX_SOLANA_CORE_SLASHING_CLOSE_VIOLATION_REPORT_OPERATION: &str = - "solana_core.slashing.close_violation_report"; + "solana.core.slashing.close_violation_report"; /// Stable operation code for the atomic duplicate-block proof submission plan. pub const EX_SOLANA_CORE_SLASHING_SUBMIT_DUPLICATE_BLOCK_PROOF_OPERATION: &str = - "solana_core.slashing.submit_duplicate_block_proof"; + "solana.core.slashing.submit_duplicate_block_proof"; /// Stable operation code for an inline ZK ElGamal proof verification. pub const EX_SOLANA_CORE_ZK_ELGAMAL_VERIFY_INLINE_OPERATION: &str = - "solana_core.zk_elgamal.verify_inline"; + "solana.core.zk_elgamal.verify_inline"; /// Stable operation code for a ZK ElGamal proof read from an account. pub const EX_SOLANA_CORE_ZK_ELGAMAL_VERIFY_FROM_ACCOUNT_OPERATION: &str = - "solana_core.zk_elgamal.verify_from_account"; + "solana.core.zk_elgamal.verify_from_account"; /// Stable operation code for closing a ZK ElGamal context-state account. pub const EX_SOLANA_CORE_ZK_ELGAMAL_CLOSE_CONTEXT_STATE_OPERATION: &str = - "solana_core.zk_elgamal.close_context_state"; + "solana.core.zk_elgamal.close_context_state"; /// Every stable callable operation code exposed by the Solana core executor. pub const EX_SOLANA_CORE_OPERATION_CODES: [&str; 109] = [ diff --git a/kb-lib/src/executor/solana/transaction/constants.rs b/kb-lib/src/executor/solana/transaction/constants.rs index 9375c09..b78bd06 100644 --- a/kb-lib/src/executor/solana/transaction/constants.rs +++ b/kb-lib/src/executor/solana/transaction/constants.rs @@ -1,11 +1,11 @@ // file: kb-lib/src/executor/solana/transaction/constants.rs -// version: 2 +// version: 3 //! Local constants for Solana transaction assembly. /// Stable operation code for the nonce advance injected by durable transaction assembly. pub(crate) const EX_SOLANA_TRANSACTION_DURABLE_NONCE_ADVANCE_OPERATION: &str = - "solana_core.system.nonce.advance"; + "solana.core.system.nonce.advance"; /// Maximum over-the-wire size of a Solana transaction packet. pub(crate) const EX_SOLANA_TRANSACTION_MAX_WIRE_BYTES: usize = 1_232; /// Canonical tracing target for Solana transaction assembly. diff --git a/kb-lib/src/executor/spl/associated_token_account/executor.rs b/kb-lib/src/executor/spl/associated_token_account/executor.rs index ee80d51..7a4f23d 100644 --- a/kb-lib/src/executor/spl/associated_token_account/executor.rs +++ b/kb-lib/src/executor/spl/associated_token_account/executor.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/executor/spl/associated_token_account/executor.rs -// version: 5 +// version: 6 //! Exact ATA capability dispatch and typed plan construction. @@ -218,7 +218,7 @@ mod tests { (kb_program_ids::SYSTEM_PROGRAM_ID, crate::EX_SPL_ATA_CREATE_OPERATION), ( kb_program_ids::ASSOCIATED_TOKEN_PROGRAM_ID, - "spl_associated_token_account.close", + "spl.associated_token_account.close", ), ] { let request = request(program_id, operation_code); diff --git a/kb-lib/src/executor/spl/associated_token_account/intent.rs b/kb-lib/src/executor/spl/associated_token_account/intent.rs index 7798200..f68f065 100644 --- a/kb-lib/src/executor/spl/associated_token_account/intent.rs +++ b/kb-lib/src/executor/spl/associated_token_account/intent.rs @@ -1,17 +1,17 @@ // file: kb-lib/src/executor/spl/associated_token_account/intent.rs -// version: 4 +// version: 5 //! Typed SPL Associated Token Account execution intents. use ts_rs::TS; // rust-rules: derive-import /// Stable operation code for strict ATA creation. -pub const EX_SPL_ATA_CREATE_OPERATION: &str = "spl_associated_token_account.create"; +pub const EX_SPL_ATA_CREATE_OPERATION: &str = "spl.associated_token_account.create"; /// Stable operation code for idempotent ATA creation or reuse. pub const EX_SPL_ATA_CREATE_IDEMPOTENT_OPERATION: &str = - "spl_associated_token_account.create_idempotent"; + "spl.associated_token_account.create_idempotent"; /// Stable operation code for nested ATA recovery. -pub const EX_SPL_ATA_RECOVER_NESTED_OPERATION: &str = "spl_associated_token_account.recover_nested"; +pub const EX_SPL_ATA_RECOVER_NESTED_OPERATION: &str = "spl.associated_token_account.recover_nested"; /// Every current officially constructible ATA operation. pub const EX_SPL_ATA_SUPPORTED_OPERATION_CODES: &[&str] = &[ EX_SPL_ATA_CREATE_OPERATION, diff --git a/kb-lib/src/executor/spl/elgamal_registry/intent.rs b/kb-lib/src/executor/spl/elgamal_registry/intent.rs index b4f8602..72b09ee 100644 --- a/kb-lib/src/executor/spl/elgamal_registry/intent.rs +++ b/kb-lib/src/executor/spl/elgamal_registry/intent.rs @@ -1,14 +1,14 @@ // file: kb-lib/src/executor/spl/elgamal_registry/intent.rs -// version: 2 +// version: 3 //! Typed intents for the SPL ElGamal public-key registry. use ts_rs::TS; // rust-rules: derive-import /// Stable operation code for registry creation. -pub const EX_SPL_ELGAMAL_REGISTRY_CREATE_OPERATION: &str = "spl_elgamal_registry.create_registry"; +pub const EX_SPL_ELGAMAL_REGISTRY_CREATE_OPERATION: &str = "spl.elgamal_registry.create_registry"; /// Stable operation code for registry update. -pub const EX_SPL_ELGAMAL_REGISTRY_UPDATE_OPERATION: &str = "spl_elgamal_registry.update_registry"; +pub const EX_SPL_ELGAMAL_REGISTRY_UPDATE_OPERATION: &str = "spl.elgamal_registry.update_registry"; /// Exact location of the public-key validity proof. #[derive(Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize, TS)] diff --git a/kb-lib/src/executor/spl/memo/executor.rs b/kb-lib/src/executor/spl/memo/executor.rs index 90c4130..8dfb3cf 100644 --- a/kb-lib/src/executor/spl/memo/executor.rs +++ b/kb-lib/src/executor/spl/memo/executor.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/executor/spl/memo/executor.rs -// version: 2 +// version: 3 //! Exact capability dispatch and typed plan construction for SPL Memo. @@ -257,7 +257,7 @@ mod tests { ); let unsupported_operation = request( kb_program_ids::SPL_MEMO_V4_PROGRAM_ID, - "spl_memo.remove_memo", + "spl.memo.remove_memo", std::string::String::from("{}"), ); assert_eq!( diff --git a/kb-lib/src/executor/spl/memo/intent.rs b/kb-lib/src/executor/spl/memo/intent.rs index 01ca697..a928b48 100644 --- a/kb-lib/src/executor/spl/memo/intent.rs +++ b/kb-lib/src/executor/spl/memo/intent.rs @@ -1,12 +1,12 @@ // file: kb-lib/src/executor/spl/memo/intent.rs -// version: 1 +// version: 2 //! Typed SPL Memo execution intents. use ts_rs::TS; // rust-rules: derive-import /// Stable operation code for adding one SPL Memo annotation. -pub const EX_SPL_MEMO_ADD_MEMO_OPERATION: &str = "spl_memo.add_memo"; +pub const EX_SPL_MEMO_ADD_MEMO_OPERATION: &str = "spl.memo.add_memo"; /// Conservative UTF-8 payload bound used before transaction assembly. pub const EX_SPL_MEMO_MAX_MESSAGE_BYTES: usize = 566; /// Conservative bound on ordered signer occurrences accepted by one intent. diff --git a/kb-lib/src/executor/spl/token/executor.rs b/kb-lib/src/executor/spl/token/executor.rs index 73aeebe..71f2bb4 100644 --- a/kb-lib/src/executor/spl/token/executor.rs +++ b/kb-lib/src/executor/spl/token/executor.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/executor/spl/token/executor.rs -// version: 8 +// version: 9 //! Exact classic SPL Token capability dispatch and typed plan construction. @@ -24,10 +24,10 @@ impl crate::ExSplTokenExecutor { } if matches!( operation_code, - "spl_token.initialize_mint_with_rent" - | "spl_token.initialize_account_with_rent" - | "spl_token.initialize_multisig_with_rent" - | "spl_token.initialize_account2" + "spl.token.initialize_mint_with_rent" + | "spl.token.initialize_account_with_rent" + | "spl.token.initialize_multisig_with_rent" + | "spl.token.initialize_account2" ) { return crate::ExApiExecutionCapability::unsupported( "execution_spl_token_historical_variant_decode_only", @@ -176,10 +176,10 @@ mod tests { ); } for operation_code in [ - "spl_token.initialize_mint_with_rent", - "spl_token.initialize_account_with_rent", - "spl_token.initialize_multisig_with_rent", - "spl_token.initialize_account2", + "spl.token.initialize_mint_with_rent", + "spl.token.initialize_account_with_rent", + "spl.token.initialize_multisig_with_rent", + "spl.token.initialize_account2", ] { let capability = crate::ExApiTypedInstructionExecutor::capability( &executor, diff --git a/kb-lib/src/executor/spl/token/intent.rs b/kb-lib/src/executor/spl/token/intent.rs index 3a70af2..e78ff41 100644 --- a/kb-lib/src/executor/spl/token/intent.rs +++ b/kb-lib/src/executor/spl/token/intent.rs @@ -1,60 +1,60 @@ // file: kb-lib/src/executor/spl/token/intent.rs -// version: 4 +// version: 5 //! Typed classic SPL Token execution intents. use ts_rs::TS; // rust-rules: derive-import /// Stable operation code for mint initialization through `InitializeMint2`. -pub const EX_SPL_TOKEN_INITIALIZE_MINT_OPERATION: &str = "spl_token.initialize_mint"; +pub const EX_SPL_TOKEN_INITIALIZE_MINT_OPERATION: &str = "spl.token.initialize_mint"; /// Stable operation code for token-account initialization through `InitializeAccount3`. -pub const EX_SPL_TOKEN_INITIALIZE_ACCOUNT_OPERATION: &str = "spl_token.initialize_account"; +pub const EX_SPL_TOKEN_INITIALIZE_ACCOUNT_OPERATION: &str = "spl.token.initialize_account"; /// Stable operation code for multisig initialization through `InitializeMultisig2`. -pub const EX_SPL_TOKEN_INITIALIZE_MULTISIG_OPERATION: &str = "spl_token.initialize_multisig"; +pub const EX_SPL_TOKEN_INITIALIZE_MULTISIG_OPERATION: &str = "spl.token.initialize_multisig"; /// Stable operation code for an unchecked token transfer. -pub const EX_SPL_TOKEN_TRANSFER_OPERATION: &str = "spl_token.transfer"; +pub const EX_SPL_TOKEN_TRANSFER_OPERATION: &str = "spl.token.transfer"; /// Stable operation code for an approval. -pub const EX_SPL_TOKEN_APPROVE_OPERATION: &str = "spl_token.approve"; +pub const EX_SPL_TOKEN_APPROVE_OPERATION: &str = "spl.token.approve"; /// Stable operation code for a delegate revocation. -pub const EX_SPL_TOKEN_REVOKE_OPERATION: &str = "spl_token.revoke"; +pub const EX_SPL_TOKEN_REVOKE_OPERATION: &str = "spl.token.revoke"; /// Stable operation code for an authority change. -pub const EX_SPL_TOKEN_SET_AUTHORITY_OPERATION: &str = "spl_token.set_authority"; +pub const EX_SPL_TOKEN_SET_AUTHORITY_OPERATION: &str = "spl.token.set_authority"; /// Stable operation code for minting tokens. -pub const EX_SPL_TOKEN_MINT_TO_OPERATION: &str = "spl_token.mint_to"; +pub const EX_SPL_TOKEN_MINT_TO_OPERATION: &str = "spl.token.mint_to"; /// Stable operation code for burning tokens. -pub const EX_SPL_TOKEN_BURN_OPERATION: &str = "spl_token.burn"; +pub const EX_SPL_TOKEN_BURN_OPERATION: &str = "spl.token.burn"; /// Stable operation code for closing a token account. -pub const EX_SPL_TOKEN_CLOSE_ACCOUNT_OPERATION: &str = "spl_token.close_account"; +pub const EX_SPL_TOKEN_CLOSE_ACCOUNT_OPERATION: &str = "spl.token.close_account"; /// Stable operation code for freezing a token account. -pub const EX_SPL_TOKEN_FREEZE_ACCOUNT_OPERATION: &str = "spl_token.freeze_account"; +pub const EX_SPL_TOKEN_FREEZE_ACCOUNT_OPERATION: &str = "spl.token.freeze_account"; /// Stable operation code for thawing a token account. -pub const EX_SPL_TOKEN_THAW_ACCOUNT_OPERATION: &str = "spl_token.thaw_account"; +pub const EX_SPL_TOKEN_THAW_ACCOUNT_OPERATION: &str = "spl.token.thaw_account"; /// Stable operation code for a checked token transfer. -pub const EX_SPL_TOKEN_TRANSFER_CHECKED_OPERATION: &str = "spl_token.transfer_checked"; +pub const EX_SPL_TOKEN_TRANSFER_CHECKED_OPERATION: &str = "spl.token.transfer_checked"; /// Stable operation code for a checked approval. -pub const EX_SPL_TOKEN_APPROVE_CHECKED_OPERATION: &str = "spl_token.approve_checked"; +pub const EX_SPL_TOKEN_APPROVE_CHECKED_OPERATION: &str = "spl.token.approve_checked"; /// Stable operation code for checked minting. -pub const EX_SPL_TOKEN_MINT_TO_CHECKED_OPERATION: &str = "spl_token.mint_to_checked"; +pub const EX_SPL_TOKEN_MINT_TO_CHECKED_OPERATION: &str = "spl.token.mint_to_checked"; /// Stable operation code for checked burning. -pub const EX_SPL_TOKEN_BURN_CHECKED_OPERATION: &str = "spl_token.burn_checked"; +pub const EX_SPL_TOKEN_BURN_CHECKED_OPERATION: &str = "spl.token.burn_checked"; /// Stable operation code for synchronizing wrapped SOL. -pub const EX_SPL_TOKEN_SYNC_NATIVE_OPERATION: &str = "spl_token.sync_native"; +pub const EX_SPL_TOKEN_SYNC_NATIVE_OPERATION: &str = "spl.token.sync_native"; /// Stable operation code for querying account data size. -pub const EX_SPL_TOKEN_GET_ACCOUNT_DATA_SIZE_OPERATION: &str = "spl_token.get_account_data_size"; +pub const EX_SPL_TOKEN_GET_ACCOUNT_DATA_SIZE_OPERATION: &str = "spl.token.get_account_data_size"; /// Stable operation code for the classic compatibility no-op. pub const EX_SPL_TOKEN_INITIALIZE_IMMUTABLE_OWNER_OPERATION: &str = - "spl_token.initialize_immutable_owner"; + "spl.token.initialize_immutable_owner"; /// Stable operation code for raw-to-UI amount conversion. -pub const EX_SPL_TOKEN_AMOUNT_TO_UI_AMOUNT_OPERATION: &str = "spl_token.amount_to_ui_amount"; +pub const EX_SPL_TOKEN_AMOUNT_TO_UI_AMOUNT_OPERATION: &str = "spl.token.amount_to_ui_amount"; /// Stable operation code for UI-to-raw amount conversion. -pub const EX_SPL_TOKEN_UI_AMOUNT_TO_AMOUNT_OPERATION: &str = "spl_token.ui_amount_to_amount"; +pub const EX_SPL_TOKEN_UI_AMOUNT_TO_AMOUNT_OPERATION: &str = "spl.token.ui_amount_to_amount"; /// Stable operation code for rescuing excess lamports. pub const EX_SPL_TOKEN_WITHDRAW_EXCESS_LAMPORTS_OPERATION: &str = - "spl_token.withdraw_excess_lamports"; + "spl.token.withdraw_excess_lamports"; /// Stable operation code for the recent wrapped-SOL partial unwrap. -pub const EX_SPL_TOKEN_UNWRAP_LAMPORTS_OPERATION: &str = "spl_token.unwrap_lamports"; +pub const EX_SPL_TOKEN_UNWRAP_LAMPORTS_OPERATION: &str = "spl.token.unwrap_lamports"; /// Stable operation code for a recent bounded batch. -pub const EX_SPL_TOKEN_BATCH_OPERATION: &str = "spl_token.batch"; +pub const EX_SPL_TOKEN_BATCH_OPERATION: &str = "spl.token.batch"; /// Operation codes constructible by this executor. pub const EX_SPL_TOKEN_SUPPORTED_OPERATION_CODES: &[&str] = &[ diff --git a/kb-lib/src/executor/spl/token_2022/executor.rs b/kb-lib/src/executor/spl/token_2022/executor.rs index 732e3e4..ef44b76 100644 --- a/kb-lib/src/executor/spl/token_2022/executor.rs +++ b/kb-lib/src/executor/spl/token_2022/executor.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/executor/spl/token_2022/executor.rs -// version: 22 +// version: 23 //! Exact Token-2022 capability dispatch and typed plan construction. @@ -30,10 +30,10 @@ impl crate::ExSplToken2022Executor { } if matches!( operation_code, - "spl_token_2022.initialize_mint_with_rent" - | "spl_token_2022.initialize_account_with_rent" - | "spl_token_2022.initialize_multisig_with_rent" - | "spl_token_2022.initialize_account2" + "spl.token_2022.initialize_mint_with_rent" + | "spl.token_2022.initialize_account_with_rent" + | "spl.token_2022.initialize_multisig_with_rent" + | "spl.token_2022.initialize_account2" ) { return crate::ExApiExecutionCapability::unsupported( "execution_spl_token_2022_historical_variant_decode_only", @@ -183,10 +183,10 @@ mod tests { ); } for operation_code in [ - "spl_token_2022.initialize_mint_with_rent", - "spl_token_2022.initialize_account_with_rent", - "spl_token_2022.initialize_multisig_with_rent", - "spl_token_2022.initialize_account2", + "spl.token_2022.initialize_mint_with_rent", + "spl.token_2022.initialize_account_with_rent", + "spl.token_2022.initialize_multisig_with_rent", + "spl.token_2022.initialize_account2", ] { let capability = crate::ExApiTypedInstructionExecutor::capability( &executor, @@ -240,7 +240,7 @@ mod tests { assert_eq!(instructions.len(), 48); for operation_code in crate::EX_SPL_TOKEN_2022_SUPPORTED_OPERATION_CODES { let name = operation_code - .strip_prefix("spl_token_2022.") + .strip_prefix("spl.token_2022.") .unwrap_or_else(|| panic!("invalid operation code {operation_code}")); let matrix_name = match name { "initialize_interest_bearing_mint" | "update_interest_bearing_rate" => { diff --git a/kb-lib/src/executor/spl/token_2022/intent.rs b/kb-lib/src/executor/spl/token_2022/intent.rs index bc6586e..4e58a6b 100644 --- a/kb-lib/src/executor/spl/token_2022/intent.rs +++ b/kb-lib/src/executor/spl/token_2022/intent.rs @@ -1,258 +1,258 @@ // file: kb-lib/src/executor/spl/token_2022/intent.rs -// version: 25 +// version: 26 //! Typed Token-2022 execution intents. use ts_rs::TS; // rust-rules: derive-import /// Stable operation code for mint initialization through `InitializeMint2`. -pub const EX_SPL_TOKEN_2022_INITIALIZE_MINT_OPERATION: &str = "spl_token_2022.initialize_mint"; +pub const EX_SPL_TOKEN_2022_INITIALIZE_MINT_OPERATION: &str = "spl.token_2022.initialize_mint"; /// Stable operation code for token-account initialization through `InitializeAccount3`. pub const EX_SPL_TOKEN_2022_INITIALIZE_ACCOUNT_OPERATION: &str = - "spl_token_2022.initialize_account"; + "spl.token_2022.initialize_account"; /// Stable operation code for multisig initialization through `InitializeMultisig2`. pub const EX_SPL_TOKEN_2022_INITIALIZE_MULTISIG_OPERATION: &str = - "spl_token_2022.initialize_multisig"; + "spl.token_2022.initialize_multisig"; /// Stable operation code for an unchecked token transfer. -pub const EX_SPL_TOKEN_2022_TRANSFER_OPERATION: &str = "spl_token_2022.transfer"; +pub const EX_SPL_TOKEN_2022_TRANSFER_OPERATION: &str = "spl.token_2022.transfer"; /// Stable operation code for an approval. -pub const EX_SPL_TOKEN_2022_APPROVE_OPERATION: &str = "spl_token_2022.approve"; +pub const EX_SPL_TOKEN_2022_APPROVE_OPERATION: &str = "spl.token_2022.approve"; /// Stable operation code for a delegate revocation. -pub const EX_SPL_TOKEN_2022_REVOKE_OPERATION: &str = "spl_token_2022.revoke"; +pub const EX_SPL_TOKEN_2022_REVOKE_OPERATION: &str = "spl.token_2022.revoke"; /// Stable operation code for an authority change. -pub const EX_SPL_TOKEN_2022_SET_AUTHORITY_OPERATION: &str = "spl_token_2022.set_authority"; +pub const EX_SPL_TOKEN_2022_SET_AUTHORITY_OPERATION: &str = "spl.token_2022.set_authority"; /// Stable operation code for minting tokens. -pub const EX_SPL_TOKEN_2022_MINT_TO_OPERATION: &str = "spl_token_2022.mint_to"; +pub const EX_SPL_TOKEN_2022_MINT_TO_OPERATION: &str = "spl.token_2022.mint_to"; /// Stable operation code for burning tokens. -pub const EX_SPL_TOKEN_2022_BURN_OPERATION: &str = "spl_token_2022.burn"; +pub const EX_SPL_TOKEN_2022_BURN_OPERATION: &str = "spl.token_2022.burn"; /// Stable operation code for closing a token account. -pub const EX_SPL_TOKEN_2022_CLOSE_ACCOUNT_OPERATION: &str = "spl_token_2022.close_account"; +pub const EX_SPL_TOKEN_2022_CLOSE_ACCOUNT_OPERATION: &str = "spl.token_2022.close_account"; /// Stable operation code for freezing a token account. -pub const EX_SPL_TOKEN_2022_FREEZE_ACCOUNT_OPERATION: &str = "spl_token_2022.freeze_account"; +pub const EX_SPL_TOKEN_2022_FREEZE_ACCOUNT_OPERATION: &str = "spl.token_2022.freeze_account"; /// Stable operation code for thawing a token account. -pub const EX_SPL_TOKEN_2022_THAW_ACCOUNT_OPERATION: &str = "spl_token_2022.thaw_account"; +pub const EX_SPL_TOKEN_2022_THAW_ACCOUNT_OPERATION: &str = "spl.token_2022.thaw_account"; /// Stable operation code for a checked token transfer. -pub const EX_SPL_TOKEN_2022_TRANSFER_CHECKED_OPERATION: &str = "spl_token_2022.transfer_checked"; +pub const EX_SPL_TOKEN_2022_TRANSFER_CHECKED_OPERATION: &str = "spl.token_2022.transfer_checked"; /// Stable operation code for a checked approval. -pub const EX_SPL_TOKEN_2022_APPROVE_CHECKED_OPERATION: &str = "spl_token_2022.approve_checked"; +pub const EX_SPL_TOKEN_2022_APPROVE_CHECKED_OPERATION: &str = "spl.token_2022.approve_checked"; /// Stable operation code for checked minting. -pub const EX_SPL_TOKEN_2022_MINT_TO_CHECKED_OPERATION: &str = "spl_token_2022.mint_to_checked"; +pub const EX_SPL_TOKEN_2022_MINT_TO_CHECKED_OPERATION: &str = "spl.token_2022.mint_to_checked"; /// Stable operation code for checked burning. -pub const EX_SPL_TOKEN_2022_BURN_CHECKED_OPERATION: &str = "spl_token_2022.burn_checked"; +pub const EX_SPL_TOKEN_2022_BURN_CHECKED_OPERATION: &str = "spl.token_2022.burn_checked"; /// Stable operation code for synchronizing wrapped SOL. -pub const EX_SPL_TOKEN_2022_SYNC_NATIVE_OPERATION: &str = "spl_token_2022.sync_native"; +pub const EX_SPL_TOKEN_2022_SYNC_NATIVE_OPERATION: &str = "spl.token_2022.sync_native"; /// Stable operation code for querying account data size. pub const EX_SPL_TOKEN_2022_GET_ACCOUNT_DATA_SIZE_OPERATION: &str = - "spl_token_2022.get_account_data_size"; + "spl.token_2022.get_account_data_size"; /// Stable operation code for the classic compatibility no-op. pub const EX_SPL_TOKEN_2022_INITIALIZE_IMMUTABLE_OWNER_OPERATION: &str = - "spl_token_2022.initialize_immutable_owner"; + "spl.token_2022.initialize_immutable_owner"; /// Stable operation code for raw-to-UI amount conversion. pub const EX_SPL_TOKEN_2022_AMOUNT_TO_UI_AMOUNT_OPERATION: &str = - "spl_token_2022.amount_to_ui_amount"; + "spl.token_2022.amount_to_ui_amount"; /// Stable operation code for UI-to-raw amount conversion. pub const EX_SPL_TOKEN_2022_UI_AMOUNT_TO_AMOUNT_OPERATION: &str = - "spl_token_2022.ui_amount_to_amount"; + "spl.token_2022.ui_amount_to_amount"; /// Stable operation code for rescuing excess lamports. pub const EX_SPL_TOKEN_2022_WITHDRAW_EXCESS_LAMPORTS_OPERATION: &str = - "spl_token_2022.withdraw_excess_lamports"; + "spl.token_2022.withdraw_excess_lamports"; /// Stable operation code for the recent wrapped-SOL partial unwrap. -pub const EX_SPL_TOKEN_2022_UNWRAP_LAMPORTS_OPERATION: &str = "spl_token_2022.unwrap_lamports"; +pub const EX_SPL_TOKEN_2022_UNWRAP_LAMPORTS_OPERATION: &str = "spl.token_2022.unwrap_lamports"; /// Stable operation code for Token-2022 account reallocation. -pub const EX_SPL_TOKEN_2022_REALLOCATE_OPERATION: &str = "spl_token_2022.reallocate"; +pub const EX_SPL_TOKEN_2022_REALLOCATE_OPERATION: &str = "spl.token_2022.reallocate"; /// Stable operation code for initializing a non-transferable mint. pub const EX_SPL_TOKEN_2022_INITIALIZE_NON_TRANSFERABLE_MINT_OPERATION: &str = - "spl_token_2022.initialize_non_transferable_mint"; + "spl.token_2022.initialize_non_transferable_mint"; /// Stable operation code for initializing a permanent delegate. pub const EX_SPL_TOKEN_2022_INITIALIZE_PERMANENT_DELEGATE_OPERATION: &str = - "spl_token_2022.initialize_permanent_delegate"; + "spl.token_2022.initialize_permanent_delegate"; /// Stable operation code for initializing an interest-bearing mint. pub const EX_SPL_TOKEN_2022_INITIALIZE_INTEREST_BEARING_MINT_OPERATION: &str = - "spl_token_2022.initialize_interest_bearing_mint"; + "spl.token_2022.initialize_interest_bearing_mint"; /// Stable operation code for updating an interest-bearing mint rate. pub const EX_SPL_TOKEN_2022_UPDATE_INTEREST_BEARING_RATE_OPERATION: &str = - "spl_token_2022.update_interest_bearing_rate"; + "spl.token_2022.update_interest_bearing_rate"; /// Stable operation code for transfer-fee configuration initialization. pub const EX_SPL_TOKEN_2022_INITIALIZE_TRANSFER_FEE_CONFIG_OPERATION: &str = - "spl_token_2022.initialize_transfer_fee_config"; + "spl.token_2022.initialize_transfer_fee_config"; /// Stable operation code for updating transfer-fee parameters. -pub const EX_SPL_TOKEN_2022_SET_TRANSFER_FEE_OPERATION: &str = "spl_token_2022.set_transfer_fee"; +pub const EX_SPL_TOKEN_2022_SET_TRANSFER_FEE_OPERATION: &str = "spl.token_2022.set_transfer_fee"; /// Stable operation code for a checked transfer with an expected fee. pub const EX_SPL_TOKEN_2022_TRANSFER_CHECKED_WITH_FEE_OPERATION: &str = - "spl_token_2022.transfer_checked_with_fee"; + "spl.token_2022.transfer_checked_with_fee"; /// Stable operation code for withdrawing withheld fees from a mint. pub const EX_SPL_TOKEN_2022_WITHDRAW_WITHHELD_TOKENS_FROM_MINT_OPERATION: &str = - "spl_token_2022.withdraw_withheld_tokens_from_mint"; + "spl.token_2022.withdraw_withheld_tokens_from_mint"; /// Stable operation code for withdrawing withheld fees from token accounts. pub const EX_SPL_TOKEN_2022_WITHDRAW_WITHHELD_TOKENS_FROM_ACCOUNTS_OPERATION: &str = - "spl_token_2022.withdraw_withheld_tokens_from_accounts"; + "spl.token_2022.withdraw_withheld_tokens_from_accounts"; /// Stable operation code for harvesting withheld fees into a mint. pub const EX_SPL_TOKEN_2022_HARVEST_WITHHELD_TOKENS_TO_MINT_OPERATION: &str = - "spl_token_2022.harvest_withheld_tokens_to_mint"; + "spl.token_2022.harvest_withheld_tokens_to_mint"; /// Stable operation code for initializing a default account state. pub const EX_SPL_TOKEN_2022_INITIALIZE_DEFAULT_ACCOUNT_STATE_OPERATION: &str = - "spl_token_2022.initialize_default_account_state"; + "spl.token_2022.initialize_default_account_state"; /// Stable operation code for updating a default account state. pub const EX_SPL_TOKEN_2022_UPDATE_DEFAULT_ACCOUNT_STATE_OPERATION: &str = - "spl_token_2022.update_default_account_state"; + "spl.token_2022.update_default_account_state"; /// Stable operation code for requiring memos on incoming transfers. pub const EX_SPL_TOKEN_2022_ENABLE_REQUIRED_TRANSFER_MEMOS_OPERATION: &str = - "spl_token_2022.enable_required_transfer_memos"; + "spl.token_2022.enable_required_transfer_memos"; /// Stable operation code for disabling required incoming-transfer memos. pub const EX_SPL_TOKEN_2022_DISABLE_REQUIRED_TRANSFER_MEMOS_OPERATION: &str = - "spl_token_2022.disable_required_transfer_memos"; + "spl.token_2022.disable_required_transfer_memos"; /// Stable operation code for enabling CPI Guard on a token account. -pub const EX_SPL_TOKEN_2022_ENABLE_CPI_GUARD_OPERATION: &str = "spl_token_2022.enable_cpi_guard"; +pub const EX_SPL_TOKEN_2022_ENABLE_CPI_GUARD_OPERATION: &str = "spl.token_2022.enable_cpi_guard"; /// Stable operation code for disabling CPI Guard on a token account. -pub const EX_SPL_TOKEN_2022_DISABLE_CPI_GUARD_OPERATION: &str = "spl_token_2022.disable_cpi_guard"; +pub const EX_SPL_TOKEN_2022_DISABLE_CPI_GUARD_OPERATION: &str = "spl.token_2022.disable_cpi_guard"; /// Stable operation code for initializing a transfer-hook pointer. pub const EX_SPL_TOKEN_2022_INITIALIZE_TRANSFER_HOOK_OPERATION: &str = - "spl_token_2022.initialize_transfer_hook"; + "spl.token_2022.initialize_transfer_hook"; /// Stable operation code for updating or clearing a transfer-hook program id. pub const EX_SPL_TOKEN_2022_UPDATE_TRANSFER_HOOK_OPERATION: &str = - "spl_token_2022.update_transfer_hook"; + "spl.token_2022.update_transfer_hook"; /// Stable operation code for initializing a metadata pointer. pub const EX_SPL_TOKEN_2022_INITIALIZE_METADATA_POINTER_OPERATION: &str = - "spl_token_2022.initialize_metadata_pointer"; + "spl.token_2022.initialize_metadata_pointer"; /// Stable operation code for updating or clearing a metadata pointer. pub const EX_SPL_TOKEN_2022_UPDATE_METADATA_POINTER_OPERATION: &str = - "spl_token_2022.update_metadata_pointer"; + "spl.token_2022.update_metadata_pointer"; /// Stable operation code for initializing a group pointer. pub const EX_SPL_TOKEN_2022_INITIALIZE_GROUP_POINTER_OPERATION: &str = - "spl_token_2022.initialize_group_pointer"; + "spl.token_2022.initialize_group_pointer"; /// Stable operation code for updating or clearing a group pointer. pub const EX_SPL_TOKEN_2022_UPDATE_GROUP_POINTER_OPERATION: &str = - "spl_token_2022.update_group_pointer"; + "spl.token_2022.update_group_pointer"; /// Stable operation code for initializing a group-member pointer. pub const EX_SPL_TOKEN_2022_INITIALIZE_GROUP_MEMBER_POINTER_OPERATION: &str = - "spl_token_2022.initialize_group_member_pointer"; + "spl.token_2022.initialize_group_member_pointer"; /// Stable operation code for updating or clearing a group-member pointer. pub const EX_SPL_TOKEN_2022_UPDATE_GROUP_MEMBER_POINTER_OPERATION: &str = - "spl_token_2022.update_group_member_pointer"; + "spl.token_2022.update_group_member_pointer"; /// Stable operation code for initializing Token-2022 embedded metadata. pub const EX_SPL_TOKEN_2022_INITIALIZE_TOKEN_METADATA_OPERATION: &str = - "spl_token_2022.initialize_token_metadata"; + "spl.token_2022.initialize_token_metadata"; /// Stable operation code for updating an embedded metadata field. pub const EX_SPL_TOKEN_2022_UPDATE_TOKEN_METADATA_FIELD_OPERATION: &str = - "spl_token_2022.update_token_metadata_field"; + "spl.token_2022.update_token_metadata_field"; /// Stable operation code for removing an embedded metadata key. pub const EX_SPL_TOKEN_2022_REMOVE_TOKEN_METADATA_KEY_OPERATION: &str = - "spl_token_2022.remove_token_metadata_key"; + "spl.token_2022.remove_token_metadata_key"; /// Stable operation code for initializing an embedded token group. pub const EX_SPL_TOKEN_2022_INITIALIZE_TOKEN_GROUP_OPERATION: &str = - "spl_token_2022.initialize_token_group"; + "spl.token_2022.initialize_token_group"; /// Stable operation code for updating an embedded token-group maximum size. pub const EX_SPL_TOKEN_2022_UPDATE_TOKEN_GROUP_MAX_SIZE_OPERATION: &str = - "spl_token_2022.update_token_group_max_size"; + "spl.token_2022.update_token_group_max_size"; /// Stable operation code for initializing an embedded token-group member. pub const EX_SPL_TOKEN_2022_INITIALIZE_TOKEN_GROUP_MEMBER_OPERATION: &str = - "spl_token_2022.initialize_token_group_member"; + "spl.token_2022.initialize_token_group_member"; /// Stable operation code for initializing scaled UI amounts. pub const EX_SPL_TOKEN_2022_INITIALIZE_SCALED_UI_AMOUNT_OPERATION: &str = - "spl_token_2022.initialize_scaled_ui_amount"; + "spl.token_2022.initialize_scaled_ui_amount"; /// Stable operation code for scheduling a scaled UI multiplier update. pub const EX_SPL_TOKEN_2022_UPDATE_SCALED_UI_AMOUNT_MULTIPLIER_OPERATION: &str = - "spl_token_2022.update_scaled_ui_amount_multiplier"; + "spl.token_2022.update_scaled_ui_amount_multiplier"; /// Stable operation code for initializing pausable mint state. pub const EX_SPL_TOKEN_2022_INITIALIZE_PAUSABLE_CONFIG_OPERATION: &str = - "spl_token_2022.initialize_pausable_config"; + "spl.token_2022.initialize_pausable_config"; /// Stable operation code for pausing mint activity. -pub const EX_SPL_TOKEN_2022_PAUSE_OPERATION: &str = "spl_token_2022.pause"; +pub const EX_SPL_TOKEN_2022_PAUSE_OPERATION: &str = "spl.token_2022.pause"; /// Stable operation code for resuming mint activity. -pub const EX_SPL_TOKEN_2022_RESUME_OPERATION: &str = "spl_token_2022.resume"; +pub const EX_SPL_TOKEN_2022_RESUME_OPERATION: &str = "spl.token_2022.resume"; /// Stable operation code for initializing permissioned burn. pub const EX_SPL_TOKEN_2022_INITIALIZE_PERMISSIONED_BURN_OPERATION: &str = - "spl_token_2022.initialize_permissioned_burn"; + "spl.token_2022.initialize_permissioned_burn"; /// Stable operation code for a permissioned burn. -pub const EX_SPL_TOKEN_2022_PERMISSIONED_BURN_OPERATION: &str = "spl_token_2022.permissioned_burn"; +pub const EX_SPL_TOKEN_2022_PERMISSIONED_BURN_OPERATION: &str = "spl.token_2022.permissioned_burn"; /// Stable operation code for a checked permissioned burn. pub const EX_SPL_TOKEN_2022_PERMISSIONED_BURN_CHECKED_OPERATION: &str = - "spl_token_2022.permissioned_burn_checked"; + "spl.token_2022.permissioned_burn_checked"; /// Stable operation code for initializing Confidential Transfer mint configuration. pub const EX_SPL_TOKEN_2022_INITIALIZE_CONFIDENTIAL_TRANSFER_MINT_OPERATION: &str = - "spl_token_2022.initialize_confidential_transfer_mint"; + "spl.token_2022.initialize_confidential_transfer_mint"; /// Stable operation code for updating Confidential Transfer mint configuration. pub const EX_SPL_TOKEN_2022_UPDATE_CONFIDENTIAL_TRANSFER_MINT_OPERATION: &str = - "spl_token_2022.update_confidential_transfer_mint"; + "spl.token_2022.update_confidential_transfer_mint"; /// Stable operation code for applying pending confidential balance credits. pub const EX_SPL_TOKEN_2022_APPLY_PENDING_CONFIDENTIAL_BALANCE_OPERATION: &str = - "spl_token_2022.apply_pending_confidential_balance"; + "spl.token_2022.apply_pending_confidential_balance"; /// Stable operation code for approving a configured confidential account. pub const EX_SPL_TOKEN_2022_APPROVE_CONFIDENTIAL_TRANSFER_ACCOUNT_OPERATION: &str = - "spl_token_2022.approve_confidential_transfer_account"; + "spl.token_2022.approve_confidential_transfer_account"; /// Stable operation code for depositing public tokens into a confidential pending balance. pub const EX_SPL_TOKEN_2022_DEPOSIT_CONFIDENTIAL_TOKENS_OPERATION: &str = - "spl_token_2022.deposit_confidential_tokens"; + "spl.token_2022.deposit_confidential_tokens"; /// Stable operation code for enabling incoming confidential credits. pub const EX_SPL_TOKEN_2022_ENABLE_CONFIDENTIAL_CREDITS_OPERATION: &str = - "spl_token_2022.enable_confidential_credits"; + "spl.token_2022.enable_confidential_credits"; /// Stable operation code for disabling incoming confidential credits. pub const EX_SPL_TOKEN_2022_DISABLE_CONFIDENTIAL_CREDITS_OPERATION: &str = - "spl_token_2022.disable_confidential_credits"; + "spl.token_2022.disable_confidential_credits"; /// Stable operation code for enabling incoming non-confidential credits. pub const EX_SPL_TOKEN_2022_ENABLE_NON_CONFIDENTIAL_CREDITS_OPERATION: &str = - "spl_token_2022.enable_non_confidential_credits"; + "spl.token_2022.enable_non_confidential_credits"; /// Stable operation code for disabling incoming non-confidential credits. pub const EX_SPL_TOKEN_2022_DISABLE_NON_CONFIDENTIAL_CREDITS_OPERATION: &str = - "spl_token_2022.disable_non_confidential_credits"; + "spl.token_2022.disable_non_confidential_credits"; /// Stable operation code for configuring one confidential token account. pub const EX_SPL_TOKEN_2022_CONFIGURE_CONFIDENTIAL_TRANSFER_ACCOUNT_OPERATION: &str = - "spl_token_2022.configure_confidential_transfer_account"; + "spl.token_2022.configure_confidential_transfer_account"; /// Stable operation code for configuring one confidential token account through the registry. pub const EX_SPL_TOKEN_2022_CONFIGURE_CONFIDENTIAL_TRANSFER_ACCOUNT_WITH_REGISTRY_OPERATION: &str = - "spl_token_2022.configure_confidential_transfer_account_with_registry"; + "spl.token_2022.configure_confidential_transfer_account_with_registry"; /// Stable operation code for emptying a confidential available balance before close. pub const EX_SPL_TOKEN_2022_EMPTY_CONFIDENTIAL_TRANSFER_ACCOUNT_OPERATION: &str = - "spl_token_2022.empty_confidential_transfer_account"; + "spl.token_2022.empty_confidential_transfer_account"; /// Stable operation code for withdrawing confidential balance into public balance. pub const EX_SPL_TOKEN_2022_WITHDRAW_CONFIDENTIAL_TOKENS_OPERATION: &str = - "spl_token_2022.withdraw_confidential_tokens"; + "spl.token_2022.withdraw_confidential_tokens"; /// Stable operation code for transferring confidential tokens. pub const EX_SPL_TOKEN_2022_TRANSFER_CONFIDENTIAL_TOKENS_OPERATION: &str = - "spl_token_2022.transfer_confidential_tokens"; + "spl.token_2022.transfer_confidential_tokens"; /// Stable operation code for confidential transfer with fee. pub const EX_SPL_TOKEN_2022_TRANSFER_CONFIDENTIAL_TOKENS_WITH_FEE_OPERATION: &str = - "spl_token_2022.transfer_confidential_tokens_with_fee"; + "spl.token_2022.transfer_confidential_tokens_with_fee"; /// Stable operation code for initializing confidential transfer fee configuration. pub const EX_SPL_TOKEN_2022_INITIALIZE_CONFIDENTIAL_TRANSFER_FEE_CONFIG_OPERATION: &str = - "spl_token_2022.initialize_confidential_transfer_fee_config"; + "spl.token_2022.initialize_confidential_transfer_fee_config"; /// Stable operation code for enabling confidential fee harvest to the mint. pub const EX_SPL_TOKEN_2022_ENABLE_CONFIDENTIAL_TRANSFER_FEE_HARVEST_OPERATION: &str = - "spl_token_2022.enable_confidential_transfer_fee_harvest"; + "spl.token_2022.enable_confidential_transfer_fee_harvest"; /// Stable operation code for disabling confidential fee harvest to the mint. pub const EX_SPL_TOKEN_2022_DISABLE_CONFIDENTIAL_TRANSFER_FEE_HARVEST_OPERATION: &str = - "spl_token_2022.disable_confidential_transfer_fee_harvest"; + "spl.token_2022.disable_confidential_transfer_fee_harvest"; /// Stable operation code for harvesting confidential withheld fees to the mint. pub const EX_SPL_TOKEN_2022_HARVEST_CONFIDENTIAL_WITHHELD_TOKENS_TO_MINT_OPERATION: &str = - "spl_token_2022.harvest_confidential_withheld_tokens_to_mint"; + "spl.token_2022.harvest_confidential_withheld_tokens_to_mint"; /// Stable operation code for withdrawing confidential withheld fees from the mint. pub const EX_SPL_TOKEN_2022_WITHDRAW_CONFIDENTIAL_WITHHELD_TOKENS_FROM_MINT_OPERATION: &str = - "spl_token_2022.withdraw_confidential_withheld_tokens_from_mint"; + "spl.token_2022.withdraw_confidential_withheld_tokens_from_mint"; /// Stable operation code for withdrawing confidential withheld fees from token accounts. pub const EX_SPL_TOKEN_2022_WITHDRAW_CONFIDENTIAL_WITHHELD_TOKENS_FROM_ACCOUNTS_OPERATION: &str = - "spl_token_2022.withdraw_confidential_withheld_tokens_from_accounts"; + "spl.token_2022.withdraw_confidential_withheld_tokens_from_accounts"; /// Stable operation code for initializing confidential mint and burn. pub const EX_SPL_TOKEN_2022_INITIALIZE_CONFIDENTIAL_MINT_BURN_MINT_OPERATION: &str = - "spl_token_2022.initialize_confidential_mint_burn_mint"; + "spl.token_2022.initialize_confidential_mint_burn_mint"; /// Stable operation code for rotating the confidential supply ElGamal public key. pub const EX_SPL_TOKEN_2022_ROTATE_CONFIDENTIAL_SUPPLY_ELGAMAL_PUBKEY_OPERATION: &str = - "spl_token_2022.rotate_confidential_supply_elgamal_pubkey"; + "spl.token_2022.rotate_confidential_supply_elgamal_pubkey"; /// Stable operation code for updating the decryptable confidential supply. pub const EX_SPL_TOKEN_2022_UPDATE_CONFIDENTIAL_DECRYPTABLE_SUPPLY_OPERATION: &str = - "spl_token_2022.update_confidential_decryptable_supply"; + "spl.token_2022.update_confidential_decryptable_supply"; /// Stable operation code for applying pending confidential burns. pub const EX_SPL_TOKEN_2022_APPLY_PENDING_CONFIDENTIAL_BURN_OPERATION: &str = - "spl_token_2022.apply_pending_confidential_burn"; + "spl.token_2022.apply_pending_confidential_burn"; /// Stable operation code for confidential minting. -pub const EX_SPL_TOKEN_2022_CONFIDENTIAL_MINT_OPERATION: &str = "spl_token_2022.confidential_mint"; +pub const EX_SPL_TOKEN_2022_CONFIDENTIAL_MINT_OPERATION: &str = "spl.token_2022.confidential_mint"; /// Stable operation code for confidential burning. -pub const EX_SPL_TOKEN_2022_CONFIDENTIAL_BURN_OPERATION: &str = "spl_token_2022.confidential_burn"; +pub const EX_SPL_TOKEN_2022_CONFIDENTIAL_BURN_OPERATION: &str = "spl.token_2022.confidential_burn"; /// Stable operation code for permissioned confidential burning. pub const EX_SPL_TOKEN_2022_PERMISSIONED_CONFIDENTIAL_BURN_OPERATION: &str = - "spl_token_2022.permissioned_confidential_burn"; + "spl.token_2022.permissioned_confidential_burn"; /// Stable operation code for a recent bounded batch. -pub const EX_SPL_TOKEN_2022_BATCH_OPERATION: &str = "spl_token_2022.batch"; +pub const EX_SPL_TOKEN_2022_BATCH_OPERATION: &str = "spl.token_2022.batch"; /// Operation codes constructible by this executor. pub const EX_SPL_TOKEN_2022_SUPPORTED_OPERATION_CODES: &[&str] = &[ diff --git a/kb-lib/src/executor/staking.rs b/kb-lib/src/executor/staking.rs index 92e3652..a7549a6 100644 --- a/kb-lib/src/executor/staking.rs +++ b/kb-lib/src/executor/staking.rs @@ -1,11 +1,15 @@ // file: kb-lib/src/executor/staking.rs -// version: 2 +// version: 3 //! `staking` executor family. +mod jito_tip_distribution; mod kamino_farm; mod marinade_finance; mod solayer; + +/// Exposes the reserved `staking/jito_tip_distribution` executor. +pub use self::jito_tip_distribution::ExStakingJitoTipDistributionExecutor; /// Exposes the reserved `staking/kamino_farm` executor. pub use self::kamino_farm::ExStakingKaminoFarmExecutor; /// Exposes the reserved `staking/marinade_finance` executor. diff --git a/kb-lib/src/executor/staking/jito_tip_distribution.rs b/kb-lib/src/executor/staking/jito_tip_distribution.rs new file mode 100644 index 0000000..b3cc31a --- /dev/null +++ b/kb-lib/src/executor/staking/jito_tip_distribution.rs @@ -0,0 +1,49 @@ +// file: kb-lib/src/executor/staking/jito_tip_distribution.rs +// version: 1 + +//! Reserved executor for `staking_jito_tip_distribution`. + +/// Reserved executor for the `staking_jito_tip_distribution` program surface. +#[derive(Clone, Debug, Default)] +pub struct ExStakingJitoTipDistributionExecutor; + +impl crate::ExApiInstructionExecutor for crate::ExStakingJitoTipDistributionExecutor { + fn executor_name(&self) -> &'static str { + return "kb-lib.executor.staking.jito_tip_distribution"; + } + + fn executor_version(&self) -> &'static str { + return env!("CARGO_PKG_VERSION"); + } + + fn program_ids(&self) -> &'static [&'static str] { + return &[kb_program_ids::STAKING_JITO_TIP_DISTRIBUTION_PROGRAM_ID]; + } + + fn supports_request( + &self, + request: &crate::ExApiExecutionRequest, + ) -> crate::ExApiExecutionSupport { + if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) { + return crate::ExApiExecutionSupport::Maybe; + } + return crate::ExApiExecutionSupport::No; + } + + fn build_plan( + &self, + _request: &crate::ExApiExecutionRequest, + ) -> kb_core::Result { + let payload_json = match crate::executor_api_serialize_payload_json( + &serde_json::json!({"status":"reserved_executor","surface":"staking_jito_tip_distribution"}), + ) { + std::result::Result::Ok(serialized) => serialized, + std::result::Result::Err(error) => return std::result::Result::Err(error), + }; + return std::result::Result::Ok(crate::ExApiExecutionPlan { + executor_name: "kb-lib.executor.staking.jito_tip_distribution".to_string(), + instruction_count: 0, + payload_json, + }); + } +} diff --git a/kb-lib/src/executor/storage.rs b/kb-lib/src/executor/storage.rs new file mode 100644 index 0000000..2157247 --- /dev/null +++ b/kb-lib/src/executor/storage.rs @@ -0,0 +1,9 @@ +// file: kb-lib/src/executor/storage.rs +// version: 3 + +//! `storage` executor family. + +mod solana_record; + +/// Exposes the reserved `storage/solana_record` executor. +pub use self::solana_record::ExStorageSolanaRecordExecutor; diff --git a/kb-lib/src/executor/storage/solana_record.rs b/kb-lib/src/executor/storage/solana_record.rs new file mode 100644 index 0000000..22d5b7d --- /dev/null +++ b/kb-lib/src/executor/storage/solana_record.rs @@ -0,0 +1,49 @@ +// file: kb-lib/src/executor/storage/solana_record.rs +// version: 1 + +//! Reserved executor for `storage_solana_record`. + +/// Reserved executor for the `storage_solana_record` program surface. +#[derive(Clone, Debug, Default)] +pub struct ExStorageSolanaRecordExecutor; + +impl crate::ExApiInstructionExecutor for crate::ExStorageSolanaRecordExecutor { + fn executor_name(&self) -> &'static str { + return "kb-lib.executor.storage.solana_record"; + } + + fn executor_version(&self) -> &'static str { + return env!("CARGO_PKG_VERSION"); + } + + fn program_ids(&self) -> &'static [&'static str] { + return &[kb_program_ids::STORAGE_SOLANA_RECORD_PROGRAM_ID]; + } + + fn supports_request( + &self, + request: &crate::ExApiExecutionRequest, + ) -> crate::ExApiExecutionSupport { + if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) { + return crate::ExApiExecutionSupport::Maybe; + } + return crate::ExApiExecutionSupport::No; + } + + fn build_plan( + &self, + _request: &crate::ExApiExecutionRequest, + ) -> kb_core::Result { + let payload_json = match crate::executor_api_serialize_payload_json( + &serde_json::json!({"status":"reserved_executor","surface":"storage_solana_record"}), + ) { + std::result::Result::Ok(serialized) => serialized, + std::result::Result::Err(error) => return std::result::Result::Err(error), + }; + return std::result::Result::Ok(crate::ExApiExecutionPlan { + executor_name: "kb-lib.executor.storage.solana_record".to_string(), + instruction_count: 0, + payload_json, + }); + } +} diff --git a/kb-lib/src/executor/strategy.rs b/kb-lib/src/executor/strategy.rs new file mode 100644 index 0000000..f6427ec --- /dev/null +++ b/kb-lib/src/executor/strategy.rs @@ -0,0 +1,9 @@ +// file: kb-lib/src/executor/strategy.rs +// version: 3 + +//! `strategy` executor family. + +mod jupiter_dca; + +/// Exposes the reserved `strategy/jupiter_dca` executor. +pub use self::jupiter_dca::ExStrategyJupiterDcaExecutor; diff --git a/kb-lib/src/executor/strategy/jupiter_dca.rs b/kb-lib/src/executor/strategy/jupiter_dca.rs new file mode 100644 index 0000000..6ca6e28 --- /dev/null +++ b/kb-lib/src/executor/strategy/jupiter_dca.rs @@ -0,0 +1,49 @@ +// file: kb-lib/src/executor/strategy/jupiter_dca.rs +// version: 3 + +//! Reserved executor for `strategy_jupiter_dca`. + +/// Reserved executor for the `strategy_jupiter_dca` program surface. +#[derive(Clone, Debug, Default)] +pub struct ExStrategyJupiterDcaExecutor; + +impl crate::ExApiInstructionExecutor for crate::ExStrategyJupiterDcaExecutor { + fn executor_name(&self) -> &'static str { + return "kb-lib.executor.strategy.jupiter_dca"; + } + + fn executor_version(&self) -> &'static str { + return env!("CARGO_PKG_VERSION"); + } + + fn program_ids(&self) -> &'static [&'static str] { + return &[kb_program_ids::STRATEGY_JUPITER_DCA_PROGRAM_ID]; + } + + fn supports_request( + &self, + request: &crate::ExApiExecutionRequest, + ) -> crate::ExApiExecutionSupport { + if crate::ExApiInstructionExecutor::handles_program_id(self, &request.program_id) { + return crate::ExApiExecutionSupport::Maybe; + } + return crate::ExApiExecutionSupport::No; + } + + fn build_plan( + &self, + _request: &crate::ExApiExecutionRequest, + ) -> kb_core::Result { + let payload_json = match crate::executor_api_serialize_payload_json( + &serde_json::json!({"status":"reserved_executor","surface":"strategy_jupiter_dca"}), + ) { + std::result::Result::Ok(serialized) => serialized, + std::result::Result::Err(error) => return std::result::Result::Err(error), + }; + return std::result::Result::Ok(crate::ExApiExecutionPlan { + executor_name: "kb-lib.executor.strategy.jupiter_dca".to_string(), + instruction_count: 0, + payload_json, + }); + } +} diff --git a/kb-lib/src/executor/vesting.rs b/kb-lib/src/executor/vesting.rs index baa6648..d3d2034 100644 --- a/kb-lib/src/executor/vesting.rs +++ b/kb-lib/src/executor/vesting.rs @@ -1,8 +1,12 @@ // file: kb-lib/src/executor/vesting.rs -// version: 2 +// version: 3 //! `vesting` executor family. +mod jupiter_lock; mod streamflow; + +/// Exposes the reserved `vesting/jupiter_lock` executor. +pub use self::jupiter_lock::ExVestingJupiterLockExecutor; /// Exposes the reserved `vesting/streamflow` executor. pub use self::streamflow::ExVestingStreamflowExecutor; diff --git a/kb-lib/src/executor/admin/jupiter_lock.rs b/kb-lib/src/executor/vesting/jupiter_lock.rs similarity index 69% rename from kb-lib/src/executor/admin/jupiter_lock.rs rename to kb-lib/src/executor/vesting/jupiter_lock.rs index 146b991..b588608 100644 --- a/kb-lib/src/executor/admin/jupiter_lock.rs +++ b/kb-lib/src/executor/vesting/jupiter_lock.rs @@ -1,15 +1,15 @@ -// file: kb-lib/src/executor/admin/jupiter_lock.rs +// file: kb-lib/src/executor/vesting/jupiter_lock.rs // version: 3 -//! Reserved executor for `admin_jupiter_lock`. +//! Reserved executor for `vesting_jupiter_lock`. -/// Reserved executor for the `admin_jupiter_lock` program surface. +/// Reserved executor for the `vesting_jupiter_lock` program surface. #[derive(Clone, Debug, Default)] -pub struct ExAdminJupiterLockExecutor; +pub struct ExVestingJupiterLockExecutor; -impl crate::ExApiInstructionExecutor for crate::ExAdminJupiterLockExecutor { +impl crate::ExApiInstructionExecutor for crate::ExVestingJupiterLockExecutor { fn executor_name(&self) -> &'static str { - return "kb-lib.executor.admin.jupiter_lock"; + return "kb-lib.executor.vesting.jupiter_lock"; } fn executor_version(&self) -> &'static str { @@ -17,7 +17,7 @@ impl crate::ExApiInstructionExecutor for crate::ExAdminJupiterLockExecutor { } fn program_ids(&self) -> &'static [&'static str] { - return &[kb_program_ids::ADMIN_JUPITER_LOCK_PROGRAM_ID]; + return &[kb_program_ids::VESTING_JUPITER_LOCK_PROGRAM_ID]; } fn supports_request( @@ -35,13 +35,13 @@ impl crate::ExApiInstructionExecutor for crate::ExAdminJupiterLockExecutor { _request: &crate::ExApiExecutionRequest, ) -> kb_core::Result { let payload_json = match crate::executor_api_serialize_payload_json( - &serde_json::json!({"status":"reserved_executor","surface":"admin_jupiter_lock"}), + &serde_json::json!({"status":"reserved_executor","surface":"vesting_jupiter_lock"}), ) { std::result::Result::Ok(serialized) => serialized, std::result::Result::Err(error) => return std::result::Result::Err(error), }; return std::result::Result::Ok(crate::ExApiExecutionPlan { - executor_name: "kb-lib.executor.admin.jupiter_lock".to_string(), + executor_name: "kb-lib.executor.vesting.jupiter_lock".to_string(), instruction_count: 0, payload_json, }); diff --git a/kb-lib/src/lib.rs b/kb-lib/src/lib.rs index 76c7f44..6b707c1 100644 --- a/kb-lib/src/lib.rs +++ b/kb-lib/src/lib.rs @@ -19,10 +19,9 @@ pub use self::decoder::DC_METADATA_MTM_METADATA_ACCOUNT_LAYOUT_AUDIT; pub use self::decoder::DC_SPL_ELGAMAL_REGISTRY_ACCOUNT_LEN; /// Reserved `kb-lib.decoder.adapter.saber_decimal_wrapper` decoder. pub use self::decoder::DcAdapterSaberDecimalWrapperDecoder; -/// Reserved `kb-lib.decoder.admin.jupiter_lock` decoder. -pub use self::decoder::DcAdminJupiterLockDecoder; -/// Reserved `kb-lib.decoder.admin.pump_fees` decoder. -pub use self::decoder::DcAdminPumpFeesDecoder; +/// Approve Collection Authority discriminator. +/// Exposes the reserved `DcAdapterSplTokenWrapDecoder` implementation. +pub use self::decoder::DcAdapterSplTokenWrapDecoder; /// Reserved `kb-lib.decoder.amm.aldrin_v1` decoder. pub use self::decoder::DcAmmAldrinV1Decoder; /// Reserved `kb-lib.decoder.amm.aldrin_v2` decoder. @@ -45,8 +44,6 @@ pub use self::decoder::DcAmmGoosefxV2Decoder; pub use self::decoder::DcAmmGuacSwapDecoder; /// Reserved `kb-lib.decoder.amm.lifinity_swap_v2` decoder. pub use self::decoder::DcAmmLifinitySwapV2Decoder; -/// Reserved `kb-lib.decoder.amm.metadao_futarchy_amm` decoder. -pub use self::decoder::DcAmmMetadaoFutarchyAmmDecoder; /// Reserved `kb-lib.decoder.amm.metadao_v0_5` decoder. pub use self::decoder::DcAmmMetadaoV05Decoder; /// Reserved `kb-lib.decoder.amm.meteora_damm_v1` decoder. @@ -67,8 +64,6 @@ pub use self::decoder::DcAmmSolfiDecoder; pub use self::decoder::DcAmmSolfiV2Decoder; /// Reserved `kb-lib.decoder.amm.vertigo` decoder. pub use self::decoder::DcAmmVertigoDecoder; -/// Reserved `kb-lib.decoder.amm.virtuals` decoder. -pub use self::decoder::DcAmmVirtualsDecoder; /// Reserved `kb-lib.decoder.amm.woofi` decoder. pub use self::decoder::DcAmmWoofiDecoder; /// Reserved `kb-lib.decoder.amm.zero_fi` decoder. @@ -135,8 +130,14 @@ pub use self::decoder::DcDlmmMeteoraDecoder; pub use self::decoder::DcFeesBagsFeeShareV1Decoder; /// Reserved `kb-lib.decoder.fees.bags_fee_share_v2` decoder. pub use self::decoder::DcFeesBagsFeeShareV2Decoder; +/// Reserved `kb-lib.decoder.admin.pump_fees` decoder. +pub use self::decoder::DcFeesPumpFeesDecoder; /// Reserved `kb-lib.decoder.governance.metadao_bid_wall` decoder. pub use self::decoder::DcGovernanceMetadaoBidWallDecoder; +/// Reserved `kb-lib.decoder.amm.metadao_futarchy_amm` decoder. +pub use self::decoder::DcGovernanceMetadaoFutarchyDecoder; +/// Exposes the reserved `DcGovernanceSquadsMultisigDecoder` implementation. +pub use self::decoder::DcGovernanceSquadsMultisigDecoder; /// Reserved `kb-lib.decoder.launchpad.boop_fun` decoder. pub use self::decoder::DcLaunchpadBoopFunDecoder; /// Reserved `kb-lib.decoder.launchpad.metadao_ico` decoder. @@ -155,6 +156,8 @@ pub use self::decoder::DcLaunchpadPumpFunDecoder; pub use self::decoder::DcLaunchpadPumpPumpupAiDecoder; /// Reserved `kb-lib.decoder.launchpad.raydium_launchlab` decoder. pub use self::decoder::DcLaunchpadRaydiumLaunchlabDecoder; +/// Reserved `kb-lib.decoder.amm.virtuals` decoder. +pub use self::decoder::DcLaunchpadVirtualsDecoder; /// Reserved `kb-lib.decoder.lending.clone` decoder. pub use self::decoder::DcLendingCloneDecoder; /// Reserved `kb-lib.decoder.lending.jupiter_lend_borrow` decoder. @@ -219,10 +222,14 @@ pub use self::decoder::DcMetadataMtmTokenOwnedEscrowAccountSnapshot; pub use self::decoder::DcMetadataMtmTokenOwnedEscrowAuthorityKind; /// Canonical bounded projection of one programmable Token Record account. pub use self::decoder::DcMetadataMtmTokenRecordAccountSnapshot; +/// Exposes the reserved `DcMetadataSolanaProgramMetadataDecoder` implementation. +pub use self::decoder::DcMetadataSolanaProgramMetadataDecoder; /// Reserved `kb-lib.decoder.metadata.spl_name_service` decoder. pub use self::decoder::DcMetadataSplNameServiceDecoder; /// Reserved `kb-lib.decoder.nft.metaplex_bubblegum` decoder. pub use self::decoder::DcNftMetaplexBubblegumDecoder; +/// Exposes the reserved `DcNftTensorCnftDecoder` implementation. +pub use self::decoder::DcNftTensorCnftDecoder; /// Reserved `kb-lib.decoder.orderbook.jupiter_limit_order` decoder. pub use self::decoder::DcOrderbookJupiterLimitOrderDecoder; /// Reserved `kb-lib.decoder.orderbook.jupiter_limit_order_v2` decoder. @@ -233,6 +240,8 @@ pub use self::decoder::DcOrderbookOpenbookV2Decoder; pub use self::decoder::DcPerpetualsDriftV2Decoder; /// Reserved `kb-lib.decoder.perpetuals.jupiter` decoder. pub use self::decoder::DcPerpetualsJupiterDecoder; +/// Exposes the reserved `DcPerpetualsPhoenixEternalDecoder` implementation. +pub use self::decoder::DcPerpetualsPhoenixEternalDecoder; /// Reserved `kb-lib.decoder.perpetuals.zeta` decoder. pub use self::decoder::DcPerpetualsZetaDecoder; /// Reserved `kb-lib.decoder.router.dflow_aggregator_v4` decoder. @@ -241,8 +250,6 @@ pub use self::decoder::DcRouterDflowAggregatorV4Decoder; pub use self::decoder::DcRouterJupiterAggregatorV4Decoder; /// Reserved `kb-lib.decoder.router.jupiter_aggregator_v6` decoder. pub use self::decoder::DcRouterJupiterAggregatorV6Decoder; -/// Reserved `kb-lib.decoder.router.jupiter_dca` decoder. -pub use self::decoder::DcRouterJupiterDcaDecoder; /// Reserved `kb-lib.decoder.router.okx_labs_v1` decoder. pub use self::decoder::DcRouterOkxLabsV1Decoder; /// Reserved `kb-lib.decoder.router.okx_labs_v2` decoder. @@ -279,12 +286,18 @@ pub use self::decoder::DcStableSwapJupiterStableDecoder; pub use self::decoder::DcStableSwapNumeraireDecoder; /// Reserved `kb-lib.decoder.stable.swap_stabble` decoder. pub use self::decoder::DcStableSwapStabbleDecoder; +/// Exposes the reserved `DcStakingJitoTipDistributionDecoder` implementation. +pub use self::decoder::DcStakingJitoTipDistributionDecoder; /// Reserved `kb-lib.decoder.staking.kamino_farm` decoder. pub use self::decoder::DcStakingKaminoFarmDecoder; /// Reserved `kb-lib.decoder.staking.marinade_finance` decoder. pub use self::decoder::DcStakingMarinadeFinanceDecoder; /// Reserved `kb-lib.decoder.staking.solayer` decoder. pub use self::decoder::DcStakingSolayerDecoder; +/// Exposes the reserved `DcStorageSolanaRecordDecoder` implementation. +pub use self::decoder::DcStorageSolanaRecordDecoder; +/// Reserved `kb-lib.decoder.router.jupiter_dca` decoder. +pub use self::decoder::DcStrategyJupiterDcaDecoder; /// Parsed Token-2022 Mint, Account, or Multisig state. pub use self::decoder::DcToken2022State; /// Exact Token-2022 base account state kind. @@ -305,6 +318,8 @@ pub use self::decoder::DcVaultKaminoV2Decoder; pub use self::decoder::DcVaultKaminoYvaultsDecoder; /// Reserved `kb-lib.decoder.vault.meteora` decoder. pub use self::decoder::DcVaultMeteoraDecoder; +/// Reserved `kb-lib.decoder.admin.jupiter_lock` decoder. +pub use self::decoder::DcVestingJupiterLockDecoder; /// Reserved `kb-lib.decoder.vesting.streamflow` decoder. pub use self::decoder::DcVestingStreamflowDecoder; /// Reserved `kb-lib.decoder.wallet.jupiter_apepro_smart_wallet` decoder. @@ -833,10 +848,8 @@ pub use self::executor::EX_SPL_TOKEN_UNWRAP_LAMPORTS_OPERATION; pub use self::executor::EX_SPL_TOKEN_WITHDRAW_EXCESS_LAMPORTS_OPERATION; /// Exposes the reserved `ExAdapterSaberDecimalWrapperExecutor` implementation. pub use self::executor::ExAdapterSaberDecimalWrapperExecutor; -/// Exposes the reserved `ExAdminJupiterLockExecutor` implementation. -pub use self::executor::ExAdminJupiterLockExecutor; -/// Exposes the reserved `ExAdminPumpFeesExecutor` implementation. -pub use self::executor::ExAdminPumpFeesExecutor; +/// Exposes the reserved `ExAdapterSplTokenWrapExecutor` implementation. +pub use self::executor::ExAdapterSplTokenWrapExecutor; /// Exposes the reserved `ExAmmAldrinV1Executor` implementation. pub use self::executor::ExAmmAldrinV1Executor; /// Exposes the reserved `ExAmmAldrinV2Executor` implementation. @@ -859,8 +872,6 @@ pub use self::executor::ExAmmGoosefxV2Executor; pub use self::executor::ExAmmGuacSwapExecutor; /// Exposes the reserved `ExAmmLifinitySwapV2Executor` implementation. pub use self::executor::ExAmmLifinitySwapV2Executor; -/// Exposes the reserved `ExAmmMetadaoFutarchyAmmExecutor` implementation. -pub use self::executor::ExAmmMetadaoFutarchyAmmExecutor; /// Exposes the reserved `ExAmmMetadaoV05Executor` implementation. pub use self::executor::ExAmmMetadaoV05Executor; /// Exposes the reserved `ExAmmMeteoraDammV1Executor` implementation. @@ -881,8 +892,6 @@ pub use self::executor::ExAmmSolfiExecutor; pub use self::executor::ExAmmSolfiV2Executor; /// Exposes the reserved `ExAmmVertigoExecutor` implementation. pub use self::executor::ExAmmVertigoExecutor; -/// Exposes the reserved `ExAmmVirtualsExecutor` implementation. -pub use self::executor::ExAmmVirtualsExecutor; /// Exposes the reserved `ExAmmWoofiExecutor` implementation. pub use self::executor::ExAmmWoofiExecutor; /// Exposes the reserved `ExAmmZeroFiExecutor` implementation. @@ -963,8 +972,14 @@ pub use self::executor::ExDlmmMeteoraExecutor; pub use self::executor::ExFeesBagsFeeShareV1Executor; /// Exposes the reserved `ExFeesBagsFeeShareV2Executor` implementation. pub use self::executor::ExFeesBagsFeeShareV2Executor; +/// Exposes the reserved `ExFeesPumpFeesExecutor` implementation. +pub use self::executor::ExFeesPumpFeesExecutor; /// Exposes the reserved `ExGovernanceMetadaoBidWallExecutor` implementation. pub use self::executor::ExGovernanceMetadaoBidWallExecutor; +/// Exposes the reserved `ExGovernanceMetadaoFutarchyExecutor` implementation. +pub use self::executor::ExGovernanceMetadaoFutarchyExecutor; +/// Exposes the reserved `ExGovernanceSquadsMultisigExecutor` implementation. +pub use self::executor::ExGovernanceSquadsMultisigExecutor; /// Exposes the reserved `ExLaunchpadBoopFunExecutor` implementation. pub use self::executor::ExLaunchpadBoopFunExecutor; /// Exposes the reserved `ExLaunchpadMetadaoIcoExecutor` implementation. @@ -983,6 +998,8 @@ pub use self::executor::ExLaunchpadPumpFunExecutor; pub use self::executor::ExLaunchpadPumpPumpupAiExecutor; /// Exposes the reserved `ExLaunchpadRaydiumLaunchlabExecutor` implementation. pub use self::executor::ExLaunchpadRaydiumLaunchlabExecutor; +/// Exposes the reserved `ExLaunchpadVirtualsExecutor` implementation. +pub use self::executor::ExLaunchpadVirtualsExecutor; /// Exposes the reserved `ExLendingCloneExecutor` implementation. pub use self::executor::ExLendingCloneExecutor; /// Exposes the reserved `ExLendingJupiterLendBorrowExecutor` implementation. @@ -1001,10 +1018,14 @@ pub use self::executor::ExLendingMarginfiV2Executor; pub use self::executor::ExLockRaydiumLpExecutor; /// Exposes the reserved `ExMetadataMetaplexTokenMetadataExecutor` implementation. pub use self::executor::ExMetadataMetaplexTokenMetadataExecutor; +/// Exposes the reserved `ExMetadataSolanaProgramMetadataExecutor` implementation. +pub use self::executor::ExMetadataSolanaProgramMetadataExecutor; /// Exposes the reserved `ExMetadataSplNameServiceExecutor` implementation. pub use self::executor::ExMetadataSplNameServiceExecutor; /// Exposes the reserved `ExNftMetaplexBubblegumExecutor` implementation. pub use self::executor::ExNftMetaplexBubblegumExecutor; +/// Exposes the reserved `ExNftTensorCnftExecutor` implementation. +pub use self::executor::ExNftTensorCnftExecutor; /// Exposes the reserved `ExOrderbookJupiterLimitOrderExecutor` implementation. pub use self::executor::ExOrderbookJupiterLimitOrderExecutor; /// Exposes the reserved `ExOrderbookJupiterLimitOrderV2Executor` implementation. @@ -1015,6 +1036,8 @@ pub use self::executor::ExOrderbookOpenbookV2Executor; pub use self::executor::ExPerpetualsDriftV2Executor; /// Exposes the reserved `ExPerpetualsJupiterExecutor` implementation. pub use self::executor::ExPerpetualsJupiterExecutor; +/// Exposes the reserved `ExPerpetualsPhoenixEternalExecutor` implementation. +pub use self::executor::ExPerpetualsPhoenixEternalExecutor; /// Exposes the reserved `ExPerpetualsZetaExecutor` implementation. pub use self::executor::ExPerpetualsZetaExecutor; /// Exposes the reserved `ExRouterDflowAggregatorV4Executor` implementation. @@ -1023,8 +1046,6 @@ pub use self::executor::ExRouterDflowAggregatorV4Executor; pub use self::executor::ExRouterJupiterAggregatorV4Executor; /// Exposes the reserved `ExRouterJupiterAggregatorV6Executor` implementation. pub use self::executor::ExRouterJupiterAggregatorV6Executor; -/// Exposes the reserved `ExRouterJupiterDcaExecutor` implementation. -pub use self::executor::ExRouterJupiterDcaExecutor; /// Exposes the reserved `ExRouterOkxLabsV1Executor` implementation. pub use self::executor::ExRouterOkxLabsV1Executor; /// Exposes the reserved `ExRouterOkxLabsV2Executor` implementation. @@ -1169,12 +1190,18 @@ pub use self::executor::ExStableSwapJupiterStableExecutor; pub use self::executor::ExStableSwapNumeraireExecutor; /// Exposes the reserved `ExStableSwapStabbleExecutor` implementation. pub use self::executor::ExStableSwapStabbleExecutor; +/// Exposes the reserved `ExStakingJitoTipDistributionExecutor` implementation. +pub use self::executor::ExStakingJitoTipDistributionExecutor; /// Exposes the reserved `ExStakingKaminoFarmExecutor` implementation. pub use self::executor::ExStakingKaminoFarmExecutor; /// Exposes the reserved `ExStakingMarinadeFinanceExecutor` implementation. pub use self::executor::ExStakingMarinadeFinanceExecutor; /// Exposes the reserved `ExStakingSolayerExecutor` implementation. pub use self::executor::ExStakingSolayerExecutor; +/// Exposes the reserved `ExStorageSolanaRecordExecutor` implementation. +pub use self::executor::ExStorageSolanaRecordExecutor; +/// Exposes the reserved `ExStrategyJupiterDcaExecutor` implementation. +pub use self::executor::ExStrategyJupiterDcaExecutor; /// Exposes the reserved `ExTreasuryHeliumTreasuryManagementExecutor` implementation. pub use self::executor::ExTreasuryHeliumTreasuryManagementExecutor; /// Exposes the reserved `ExVaultCarrotDefiExecutor` implementation. @@ -1189,6 +1216,8 @@ pub use self::executor::ExVaultKaminoV2Executor; pub use self::executor::ExVaultKaminoYvaultsExecutor; /// Exposes the reserved `ExVaultMeteoraExecutor` implementation. pub use self::executor::ExVaultMeteoraExecutor; +/// Exposes the reserved `ExVestingJupiterLockExecutor` implementation. +pub use self::executor::ExVestingJupiterLockExecutor; /// Exposes the reserved `ExVestingStreamflowExecutor` implementation. pub use self::executor::ExVestingStreamflowExecutor; /// Exposes the reserved `ExWalletJupiterApeproSmartWalletExecutor` implementation. diff --git a/kb-lib/src/materializer/admin/constants.rs b/kb-lib/src/materializer/admin/constants.rs index aac246e..2837700 100644 --- a/kb-lib/src/materializer/admin/constants.rs +++ b/kb-lib/src/materializer/admin/constants.rs @@ -1,9 +1,9 @@ // file: kb-lib/src/materializer/admin/constants.rs -// version: 2 +// version: 3 //! Local constants for the native and SPL administration materializer. /// Canonical processor name for this component. -pub(crate) const MT_ADMIN_PROCESSOR_NAME: &str = "solana_native_admin"; +pub(crate) const MT_ADMIN_PROCESSOR_NAME: &str = "materializer.admin"; /// Canonical tracing target for this component. pub(crate) const TRACING_TARGET_MATERIALIZER_ADMIN: &str = "kb-lib.materializer.admin"; diff --git a/kb-lib/src/materializer/admin/core.rs b/kb-lib/src/materializer/admin/core.rs index 218e9fe..4ccc7c2 100644 --- a/kb-lib/src/materializer/admin/core.rs +++ b/kb-lib/src/materializer/admin/core.rs @@ -1,21 +1,21 @@ // file: kb-lib/src/materializer/admin/core.rs -// version: 19 +// version: 20 //! Stable administrative projections derived from exact committed observations. const ACCEPTED_FAMILIES: &[crate::MdEventFamily] = &[crate::MdEventFamily::Admin, crate::MdEventFamily::TokenAccount]; -const SYSTEM_SURFACE: &str = "solana_native_system"; +const SYSTEM_SURFACE: &str = "solana.core.system"; const SYSTEM_ENTRIES: &[&str] = &["assign", "assign_with_seed"]; -const CONFIG_SURFACE: &str = "solana_native_config"; +const CONFIG_SURFACE: &str = "solana.core.config"; const CONFIG_ENTRIES: &[&str] = &["store"]; -const BPF_LOADER_UPGRADEABLE_SURFACE: &str = "solana_native_bpf_loader_upgradeable"; +const BPF_LOADER_UPGRADEABLE_SURFACE: &str = "solana.core.bpf_loader_upgradeable"; const BPF_LOADER_UPGRADEABLE_ENTRIES: &[&str] = &["set_authority", "set_authority_checked"]; -const LOADER_V4_SURFACE: &str = "solana_native_loader_v4"; +const LOADER_V4_SURFACE: &str = "solana.core.loader_v4"; const LOADER_V4_ENTRIES: &[&str] = &["transfer_authority"]; -const SPL_TOKEN_SURFACE: &str = "spl_token"; -const SPL_TOKEN_2022_SURFACE: &str = "spl_token_2022"; -const SPL_ELGAMAL_REGISTRY_SURFACE: &str = "spl_elgamal_registry"; +const SPL_TOKEN_SURFACE: &str = "spl.token"; +const SPL_TOKEN_2022_SURFACE: &str = "spl.token_2022"; +const SPL_ELGAMAL_REGISTRY_SURFACE: &str = "spl.elgamal_registry"; const SPL_ELGAMAL_REGISTRY_ENTRIES: &[&str] = &["create_registry", "update_registry"]; const SPL_TOKEN_AUTHORITY_ENTRIES: &[&str] = &[ "set_authority", @@ -56,7 +56,7 @@ impl ProjectionKind { Self::ProgramLoaderAuthority(_) => "program_loader_authority", Self::SplTokenAuthority => "spl_token_authority", Self::SplTokenMultisig => "spl_token_multisig", - Self::SplElgamalRegistry => "spl_elgamal_registry", + Self::SplElgamalRegistry => "spl.elgamal_registry", Self::SplToken2022ExtensionAdmin => "spl_token_2022_extension_admin", }; } @@ -118,7 +118,7 @@ impl crate::MtMaterializer for crate::MtAdminMaterializer { impl crate::MtApiEventMaterializer for crate::MtAdminMaterializer { fn identity(&self) -> crate::MtApiMaterializerIdentity { return crate::MtApiMaterializerIdentity { - name: "solana_native_admin".to_string(), + name: "materializer.admin".to_string(), version: env!("CARGO_PKG_VERSION").to_string(), }; } @@ -505,7 +505,7 @@ mod tests { slot: crate::MdSlot(42), instruction_path: crate::MdInstructionPath("0".to_string()), program_id: crate::MdProgramId("program-id".to_string()), - protocol_code: crate::MdProtocolCode("solana_native".to_string()), + protocol_code: crate::MdProtocolCode("solana.core".to_string()), surface_code: crate::MdSurfaceCode(surface_code.to_string()), event_code: crate::MdEventCode(format!("{surface_code}.{entry_code}")), event_name: crate::MdEventName(entry_code.to_string()), @@ -717,7 +717,7 @@ mod tests { #[test] fn ata_instructions_do_not_create_admin_outputs() { let mut observation = observation( - "spl_associated_token_account", + "spl.associated_token_account", "create", false, serde_json::json!([]), diff --git a/kb-lib/src/materializer/compliance/audit.rs b/kb-lib/src/materializer/compliance/audit.rs index 06f9d23..997c612 100644 --- a/kb-lib/src/materializer/compliance/audit.rs +++ b/kb-lib/src/materializer/compliance/audit.rs @@ -1,10 +1,10 @@ // file: kb-lib/src/materializer/compliance/audit.rs -// version: 9 +// version: 10 //! Stable compliance-audit projections for committed native bytecode mutations and execution profiles. const ACCEPTED_FAMILIES: &[crate::MdEventFamily] = &[crate::MdEventFamily::Audit]; -const COMPUTE_BUDGET_SURFACE: &str = "solana_native_compute_budget"; +const COMPUTE_BUDGET_SURFACE: &str = "solana.core.compute_budget"; const COMPUTE_BUDGET_ENTRIES: &[&str] = &[ "request_units_deprecated", "request_heap_frame", @@ -12,10 +12,10 @@ const COMPUTE_BUDGET_ENTRIES: &[&str] = &[ "set_compute_unit_price", "set_loaded_accounts_data_size_limit", ]; -const BPF_LOADER_DEPRECATED_SURFACE: &str = "solana_native_bpf_loader_deprecated"; -const BPF_LOADER_SURFACE: &str = "solana_native_bpf_loader"; -const BPF_LOADER_UPGRADEABLE_SURFACE: &str = "solana_native_bpf_loader_upgradeable"; -const LOADER_V4_SURFACE: &str = "solana_native_loader_v4"; +const BPF_LOADER_DEPRECATED_SURFACE: &str = "solana.core.bpf_loader_deprecated"; +const BPF_LOADER_SURFACE: &str = "solana.core.bpf_loader"; +const BPF_LOADER_UPGRADEABLE_SURFACE: &str = "solana.core.bpf_loader_upgradeable"; +const LOADER_V4_SURFACE: &str = "solana.core.loader_v4"; const WRITE_ENTRIES: &[&str] = &["write"]; const LOADER_V4_COPY_ENTRIES: &[&str] = &["copy"]; @@ -77,7 +77,7 @@ impl crate::MtMaterializer for crate::MtComplianceAuditMaterializer { impl crate::MtApiEventMaterializer for crate::MtComplianceAuditMaterializer { fn identity(&self) -> crate::MtApiMaterializerIdentity { return crate::MtApiMaterializerIdentity { - name: "solana_native_compliance_audit".to_string(), + name: "materializer.compliance.audit".to_string(), version: env!("CARGO_PKG_VERSION").to_string(), }; } @@ -357,7 +357,7 @@ mod tests { slot: crate::MdSlot(42), instruction_path: crate::MdInstructionPath("0".to_string()), program_id: crate::MdProgramId("program-id".to_string()), - protocol_code: crate::MdProtocolCode("solana_native".to_string()), + protocol_code: crate::MdProtocolCode("solana.core".to_string()), surface_code: crate::MdSurfaceCode(surface_code.to_string()), event_code: crate::MdEventCode(format!("{surface_code}.{entry_code}")), event_name: crate::MdEventName(entry_code.to_string()), @@ -438,7 +438,7 @@ mod tests { let result = crate::MtApiEventMaterializer::materialize(&materializer, &observation); assert_eq!( result.outputs[0].output_key, - "program_loader_code:solana_native_loader_v4:copy:0" + "program_loader_code:solana.core.loader_v4:copy:0" ); assert_eq!( result.outputs[0].payload_json["projection"]["sourceProgramAccount"], diff --git a/kb-lib/src/materializer/fees/core.rs b/kb-lib/src/materializer/fees/core.rs index cac90ba..dfab844 100644 --- a/kb-lib/src/materializer/fees/core.rs +++ b/kb-lib/src/materializer/fees/core.rs @@ -1,10 +1,10 @@ // file: kb-lib/src/materializer/fees/core.rs -// version: 4 +// version: 5 //! Stable fee projections derived from exact committed Token-2022 observations. const ACCEPTED_FAMILIES: &[crate::MdEventFamily] = &[crate::MdEventFamily::Fee]; -const SPL_TOKEN_2022_SURFACE: &str = "spl_token_2022"; +const SPL_TOKEN_2022_SURFACE: &str = "spl.token_2022"; const TOKEN_2022_FEE_ENTRIES: &[&str] = &[ "initialize_transfer_fee_config", "set_transfer_fee", @@ -46,7 +46,7 @@ impl crate::MtMaterializer for crate::MtFeesMaterializer { impl crate::MtApiEventMaterializer for crate::MtFeesMaterializer { fn identity(&self) -> crate::MtApiMaterializerIdentity { return crate::MtApiMaterializerIdentity { - name: "fees".to_string(), + name: "materializer.fees".to_string(), version: env!("CARGO_PKG_VERSION").to_string(), }; } @@ -218,7 +218,7 @@ pub fn materializer_fees_materialize_token_2022_state_snapshots( "confidentialValuesDecrypted": false, "finalAccountStateCaptured": true, "provenance": { - "processorName": "fees", + "processorName": "materializer.fees", "processorVersion": env!("CARGO_PKG_VERSION"), "source": "bounded_token_2022_state_parser" } @@ -243,7 +243,7 @@ mod tests { slot: crate::MdSlot(42), instruction_path: crate::MdInstructionPath("0".to_string()), program_id: crate::MdProgramId(program_id.to_string()), - protocol_code: crate::MdProtocolCode("spl_token_2022".to_string()), + protocol_code: crate::MdProtocolCode("spl.token_2022".to_string()), surface_code: crate::MdSurfaceCode(surface_code.to_string()), event_code: crate::MdEventCode(format!("{surface_code}.{entry_code}")), event_name: crate::MdEventName(entry_code.to_string()), @@ -304,7 +304,7 @@ mod tests { #[test] fn classic_token_and_program_surface_mismatches_are_ignored() { let classic = observation( - "spl_token", + "spl.token", kb_program_ids::SPL_TOKEN_PROGRAM_ID, "set_transfer_fee", false, diff --git a/kb-lib/src/materializer/lifecycle/core.rs b/kb-lib/src/materializer/lifecycle/core.rs index 2f53c3e..1017c0a 100644 --- a/kb-lib/src/materializer/lifecycle/core.rs +++ b/kb-lib/src/materializer/lifecycle/core.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/materializer/lifecycle/core.rs -// version: 15 +// version: 16 //! Stable lifecycle projections derived from exact decoded observations. @@ -8,7 +8,7 @@ const ACCEPTED_FAMILIES: &[crate::MdEventFamily] = &[ crate::MdEventFamily::Admin, crate::MdEventFamily::Audit, ]; -const ADDRESS_LOOKUP_TABLE_SURFACE: &str = "solana_native_address_lookup_table"; +const ADDRESS_LOOKUP_TABLE_SURFACE: &str = "solana.core.address_lookup_table"; const ADDRESS_LOOKUP_TABLE_ENTRIES: &[&str] = &[ "create_lookup_table", "freeze_lookup_table", @@ -16,11 +16,11 @@ const ADDRESS_LOOKUP_TABLE_ENTRIES: &[&str] = &[ "deactivate_lookup_table", "close_lookup_table", ]; -const BPF_LOADER_DEPRECATED_SURFACE: &str = "solana_native_bpf_loader_deprecated"; -const BPF_LOADER_SURFACE: &str = "solana_native_bpf_loader"; -const BPF_LOADER_UPGRADEABLE_SURFACE: &str = "solana_native_bpf_loader_upgradeable"; -const LOADER_V4_SURFACE: &str = "solana_native_loader_v4"; -const FEATURE_SURFACE: &str = "solana_native_feature"; +const BPF_LOADER_DEPRECATED_SURFACE: &str = "solana.core.bpf_loader_deprecated"; +const BPF_LOADER_SURFACE: &str = "solana.core.bpf_loader"; +const BPF_LOADER_UPGRADEABLE_SURFACE: &str = "solana.core.bpf_loader_upgradeable"; +const LOADER_V4_SURFACE: &str = "solana.core.loader_v4"; +const FEATURE_SURFACE: &str = "solana.core.feature"; const FEATURE_ENTRIES: &[&str] = &["revoke_pending_activation"]; const IMMUTABLE_LOADER_ENTRIES: &[&str] = &["finalize"]; const UPGRADEABLE_LOADER_ENTRIES: &[&str] = &[ @@ -31,9 +31,9 @@ const UPGRADEABLE_LOADER_ENTRIES: &[&str] = &[ "extend_program", ]; const LOADER_V4_ENTRIES: &[&str] = &["set_program_length", "deploy", "retract", "finalize"]; -const SLASHING_SURFACE: &str = "solana_native_slashing"; +const SLASHING_SURFACE: &str = "solana.core.slashing"; const SLASHING_ENTRIES: &[&str] = &["close_violation_report", "duplicate_block_proof"]; -const SYSTEM_SURFACE: &str = "solana_native_system"; +const SYSTEM_SURFACE: &str = "solana.core.system"; const SYSTEM_ACCOUNT_ENTRIES: &[&str] = &[ "create_account", "create_account_with_seed", @@ -48,7 +48,7 @@ const SYSTEM_NONCE_ENTRIES: &[&str] = &[ "authorize_nonce_account", "upgrade_nonce_account", ]; -const ZK_ELGAMAL_PROOF_SURFACE: &str = "solana_native_zk_elgamal_proof"; +const ZK_ELGAMAL_PROOF_SURFACE: &str = "solana.core.zk_elgamal_proof"; const ZK_ELGAMAL_CLOSE_ENTRIES: &[&str] = &["close_context_state"]; const ZK_ELGAMAL_VERIFY_ENTRIES: &[&str] = &[ "verify_zero_ciphertext", @@ -152,7 +152,7 @@ impl crate::MtMaterializer for crate::MtLifecycleMaterializer { impl crate::MtApiEventMaterializer for crate::MtLifecycleMaterializer { fn identity(&self) -> crate::MtApiMaterializerIdentity { return crate::MtApiMaterializerIdentity { - name: "solana_native_lifecycle".to_string(), + name: "materializer.lifecycle".to_string(), version: env!("CARGO_PKG_VERSION").to_string(), }; } @@ -491,7 +491,7 @@ mod tests { slot: crate::MdSlot(42), instruction_path: crate::MdInstructionPath("0".to_string()), program_id: crate::MdProgramId("program-id".to_string()), - protocol_code: crate::MdProtocolCode("solana_native".to_string()), + protocol_code: crate::MdProtocolCode("solana.core".to_string()), surface_code: crate::MdSurfaceCode(surface_code.to_string()), event_code: crate::MdEventCode(format!("{surface_code}.{entry_code}")), event_name: crate::MdEventName(entry_code.to_string()), @@ -656,7 +656,7 @@ mod tests { assert_eq!(result.status, crate::MtApiMaterializerOutcomeStatus::Inserted); assert_eq!( result.outputs[0].output_key, - "program_loader:solana_native_bpf_loader_upgradeable:deploy_with_max_data_len:0" + "program_loader:solana.core.bpf_loader_upgradeable:deploy_with_max_data_len:0" ); assert_eq!(result.outputs[0].payload_json["domain"], "program_loader"); assert_eq!( @@ -879,7 +879,7 @@ mod tests { fn historical_zk_token_proof_is_not_materialized() { let materializer = crate::MtLifecycleMaterializer; let observation = observation_with_payload( - "solana_native_zk_token_proof", + "solana.core.zk_token_proof", "close_context_state", crate::MdEventFamily::Audit, false, @@ -915,7 +915,7 @@ mod tests { #[test] fn ata_lifecycle_is_owned_by_token_accounts_materializer_only() { - let mut observation = observation("spl_associated_token_account", "create", false); + let mut observation = observation("spl.associated_token_account", "create", false); observation.event.program_id = crate::MdProgramId(kb_program_ids::ASSOCIATED_TOKEN_PROGRAM_ID.to_string()); assert!(!crate::MtApiEventMaterializer::accepts_observation( diff --git a/kb-lib/src/materializer/risk/constants.rs b/kb-lib/src/materializer/risk/constants.rs index 2e83152..b825fbf 100644 --- a/kb-lib/src/materializer/risk/constants.rs +++ b/kb-lib/src/materializer/risk/constants.rs @@ -1,10 +1,10 @@ // file: kb-lib/src/materializer/risk/constants.rs -// version: 2 +// version: 3 //! Local constants for fact-only risk projections. /// Stable processor name persisted by the replay ledger. -pub(crate) const MT_RISK_PROCESSOR_NAME: &str = "spl_token_risk"; +pub(crate) const MT_RISK_PROCESSOR_NAME: &str = "materializer.risk"; /// Stable projection payload contract version. pub(crate) const MT_RISK_PROJECTION_VERSION: u32 = 2; /// Canonical tracing target for this component. diff --git a/kb-lib/src/materializer/risk/core.rs b/kb-lib/src/materializer/risk/core.rs index c07a268..54e863e 100644 --- a/kb-lib/src/materializer/risk/core.rs +++ b/kb-lib/src/materializer/risk/core.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/materializer/risk/core.rs -// version: 5 +// version: 6 //! Stable fact-only risk projections for committed SPL Token and ATA observations. @@ -168,9 +168,9 @@ impl crate::MtApiEventMaterializer for crate::MtRiskMaterializer { fn accepts_event(event: &crate::MdDecodedProtocolEvent) -> bool { let token_program = (event.program_id.0 == kb_program_ids::SPL_TOKEN_PROGRAM_ID - && event.surface_code.0 == "spl_token") + && event.surface_code.0 == "spl.token") || (event.program_id.0 == kb_program_ids::SPL_TOKEN_2022_PROGRAM_ID - && event.surface_code.0 == "spl_token_2022"); + && event.surface_code.0 == "spl.token_2022"); let token_risk = token_program && RISK_ENTRIES.contains(&event.event_name.0.as_str()); return ACCEPTED_FAMILIES.contains(&event.event_family) && (token_risk || is_ata_recovery(event)); @@ -178,7 +178,7 @@ fn accepts_event(event: &crate::MdDecodedProtocolEvent) -> bool { fn is_ata_recovery(event: &crate::MdDecodedProtocolEvent) -> bool { return event.program_id.0 == kb_program_ids::ASSOCIATED_TOKEN_PROGRAM_ID - && event.surface_code.0 == "spl_associated_token_account" + && event.surface_code.0 == "spl.associated_token_account" && event.event_family == crate::MdEventFamily::Lifecycle && event.event_name.0 == "recover_nested"; } @@ -312,9 +312,9 @@ mod tests { slot: crate::MdSlot(1), instruction_path: crate::MdInstructionPath("0".to_string()), program_id: crate::MdProgramId(kb_program_ids::SPL_TOKEN_PROGRAM_ID.to_string()), - protocol_code: crate::MdProtocolCode("spl_token".to_string()), - surface_code: crate::MdSurfaceCode("spl_token".to_string()), - event_code: crate::MdEventCode(format!("spl_token.{entry}")), + protocol_code: crate::MdProtocolCode("spl.token".to_string()), + surface_code: crate::MdSurfaceCode("spl.token".to_string()), + event_code: crate::MdEventCode(format!("spl.token.{entry}")), event_name: crate::MdEventName(entry.to_string()), event_family: family, source_kind: crate::MdEventSourceKind::Instruction, @@ -341,9 +341,9 @@ mod tests { let mut observation = observation(entry, family, parameters, failed); observation.event.program_id = crate::MdProgramId(kb_program_ids::SPL_TOKEN_2022_PROGRAM_ID.to_string()); - observation.event.protocol_code = crate::MdProtocolCode("spl_token_2022".to_string()); - observation.event.surface_code = crate::MdSurfaceCode("spl_token_2022".to_string()); - observation.event.event_code = crate::MdEventCode(format!("spl_token_2022.{entry}")); + observation.event.protocol_code = crate::MdProtocolCode("spl.token_2022".to_string()); + observation.event.surface_code = crate::MdSurfaceCode("spl.token_2022".to_string()); + observation.event.event_code = crate::MdEventCode(format!("spl.token_2022.{entry}")); observation.event_key = format!("token_2022:{entry}:0"); return observation; } @@ -358,10 +358,10 @@ mod tests { program_id: crate::MdProgramId( kb_program_ids::ASSOCIATED_TOKEN_PROGRAM_ID.to_string(), ), - protocol_code: crate::MdProtocolCode("spl_associated_token_account".to_string()), - surface_code: crate::MdSurfaceCode("spl_associated_token_account".to_string()), + protocol_code: crate::MdProtocolCode("spl.associated_token_account".to_string()), + surface_code: crate::MdSurfaceCode("spl.associated_token_account".to_string()), event_code: crate::MdEventCode( - "spl_associated_token_account.recover_nested".to_string(), + "spl.associated_token_account.recover_nested".to_string(), ), event_name: crate::MdEventName("recover_nested".to_string()), event_family: crate::MdEventFamily::Lifecycle, diff --git a/kb-lib/src/materializer/staking/core.rs b/kb-lib/src/materializer/staking/core.rs index 19ec1c2..fb9e001 100644 --- a/kb-lib/src/materializer/staking/core.rs +++ b/kb-lib/src/materializer/staking/core.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/materializer/staking/core.rs -// version: 9 +// version: 10 //! Instruction-level staking projections for native Stake and Vote observations. @@ -9,8 +9,8 @@ const ACCEPTED_FAMILIES: &[crate::MdEventFamily] = &[ crate::MdEventFamily::Staking, crate::MdEventFamily::Reward, ]; -const STAKE_SURFACE: &str = "solana_native_stake"; -const VOTE_SURFACE: &str = "solana_native_vote"; +const STAKE_SURFACE: &str = "solana.core.stake"; +const VOTE_SURFACE: &str = "solana.core.vote"; const STAKE_ACCOUNT_ENTRIES: &[&str] = &[ "initialize", "initialize_checked", @@ -126,7 +126,7 @@ impl crate::MtMaterializer for crate::MtStakingMaterializer { impl crate::MtApiEventMaterializer for crate::MtStakingMaterializer { fn identity(&self) -> crate::MtApiMaterializerIdentity { return crate::MtApiMaterializerIdentity { - name: "solana_native_staking".to_string(), + name: "materializer.staking".to_string(), version: env!("CARGO_PKG_VERSION").to_string(), }; } @@ -605,7 +605,7 @@ mod tests { slot: crate::MdSlot(42), instruction_path: crate::MdInstructionPath("0".to_string()), program_id: crate::MdProgramId("program-id".to_string()), - protocol_code: crate::MdProtocolCode("solana_native".to_string()), + protocol_code: crate::MdProtocolCode("solana.core".to_string()), surface_code: crate::MdSurfaceCode(surface_code.to_string()), event_code: crate::MdEventCode(format!("{surface_code}.{entry_code}")), event_name: crate::MdEventName(entry_code.to_string()), @@ -821,7 +821,7 @@ mod tests { fn unrelated_or_disabled_observations_are_ignored() { let materializer = crate::MtStakingMaterializer; let unrelated = observation( - "solana_native_system", + "solana.core.system", "create_account", crate::MdEventFamily::Lifecycle, false, diff --git a/kb-lib/src/materializer/token/accounts.rs b/kb-lib/src/materializer/token/accounts.rs index 3eb58c4..ef89aee 100644 --- a/kb-lib/src/materializer/token/accounts.rs +++ b/kb-lib/src/materializer/token/accounts.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/materializer/token/accounts.rs -// version: 6 +// version: 7 //! Stable committed SPL Token mutation and ATA lifecycle projections. @@ -174,9 +174,9 @@ impl crate::MtApiEventMaterializer for crate::MtTokenAccountsMaterializer { fn accepts_event(event: &crate::MdDecodedProtocolEvent) -> bool { let token_program = (event.program_id.0 == kb_program_ids::SPL_TOKEN_PROGRAM_ID - && event.surface_code.0 == "spl_token") + && event.surface_code.0 == "spl.token") || (event.program_id.0 == kb_program_ids::SPL_TOKEN_2022_PROGRAM_ID - && event.surface_code.0 == "spl_token_2022"); + && event.surface_code.0 == "spl.token_2022"); let token_mutation = token_program && MUTATION_ENTRIES.contains(&event.event_name.0.as_str()); let ata = is_ata_event(event); return ACCEPTED_FAMILIES.contains(&event.event_family) && (token_mutation || ata); @@ -184,7 +184,7 @@ fn accepts_event(event: &crate::MdDecodedProtocolEvent) -> bool { fn is_ata_event(event: &crate::MdDecodedProtocolEvent) -> bool { return event.program_id.0 == kb_program_ids::ASSOCIATED_TOKEN_PROGRAM_ID - && event.surface_code.0 == "spl_associated_token_account" + && event.surface_code.0 == "spl.associated_token_account" && event.event_family == crate::MdEventFamily::Lifecycle && ATA_LIFECYCLE_ENTRIES .iter() @@ -474,9 +474,9 @@ mod tests { slot: crate::MdSlot(42), instruction_path: crate::MdInstructionPath("1/0".to_string()), program_id: crate::MdProgramId(kb_program_ids::SPL_TOKEN_PROGRAM_ID.to_string()), - protocol_code: crate::MdProtocolCode("spl_token".to_string()), - surface_code: crate::MdSurfaceCode("spl_token".to_string()), - event_code: crate::MdEventCode(format!("spl_token.{entry}")), + protocol_code: crate::MdProtocolCode("spl.token".to_string()), + surface_code: crate::MdSurfaceCode("spl.token".to_string()), + event_code: crate::MdEventCode(format!("spl.token.{entry}")), event_name: crate::MdEventName(entry.to_string()), event_family: family, source_kind: crate::MdEventSourceKind::InnerInstruction, @@ -510,9 +510,9 @@ mod tests { let mut observation = observation(entry, family, failed); observation.event.program_id = crate::MdProgramId(kb_program_ids::SPL_TOKEN_2022_PROGRAM_ID.to_string()); - observation.event.protocol_code = crate::MdProtocolCode("spl_token_2022".to_string()); - observation.event.surface_code = crate::MdSurfaceCode("spl_token_2022".to_string()); - observation.event.event_code = crate::MdEventCode(format!("spl_token_2022.{entry}")); + observation.event.protocol_code = crate::MdProtocolCode("spl.token_2022".to_string()); + observation.event.surface_code = crate::MdSurfaceCode("spl.token_2022".to_string()); + observation.event.event_code = crate::MdEventCode(format!("spl.token_2022.{entry}")); observation.event_key = format!("token_2022:{entry}:0"); return observation; } @@ -554,9 +554,9 @@ mod tests { program_id: crate::MdProgramId( kb_program_ids::ASSOCIATED_TOKEN_PROGRAM_ID.to_string(), ), - protocol_code: crate::MdProtocolCode("spl_associated_token_account".to_string()), - surface_code: crate::MdSurfaceCode("spl_associated_token_account".to_string()), - event_code: crate::MdEventCode(format!("spl_associated_token_account.{entry}")), + protocol_code: crate::MdProtocolCode("spl.associated_token_account".to_string()), + surface_code: crate::MdSurfaceCode("spl.associated_token_account".to_string()), + event_code: crate::MdEventCode(format!("spl.associated_token_account.{entry}")), event_name: crate::MdEventName(entry.to_string()), event_family: crate::MdEventFamily::Lifecycle, source_kind: crate::MdEventSourceKind::Instruction, diff --git a/kb-lib/src/materializer/token/constants.rs b/kb-lib/src/materializer/token/constants.rs index 0bb0686..ddd8276 100644 --- a/kb-lib/src/materializer/token/constants.rs +++ b/kb-lib/src/materializer/token/constants.rs @@ -1,10 +1,10 @@ // file: kb-lib/src/materializer/token/constants.rs -// version: 2 +// version: 3 //! Local constants for classic SPL Token account projections. /// Stable processor name persisted by the replay ledger. -pub(crate) const MT_TOKEN_ACCOUNTS_PROCESSOR_NAME: &str = "spl_token_accounts"; +pub(crate) const MT_TOKEN_ACCOUNTS_PROCESSOR_NAME: &str = "materializer.token.accounts"; /// Stable projection payload contract version. pub(crate) const MT_TOKEN_ACCOUNTS_PROJECTION_VERSION: u32 = 3; /// Canonical tracing target for this component. diff --git a/kb-lib/src/materializer/transaction/annotations.rs b/kb-lib/src/materializer/transaction/annotations.rs index 7660535..3b8d742 100644 --- a/kb-lib/src/materializer/transaction/annotations.rs +++ b/kb-lib/src/materializer/transaction/annotations.rs @@ -1,5 +1,5 @@ // file: kb-lib/src/materializer/transaction/annotations.rs -// version: 4 +// version: 5 //! Exact committed SPL Memo transaction annotation projection. @@ -16,17 +16,17 @@ enum MemoGeneration { impl MemoGeneration { fn from_event(event: &crate::MdDecodedProtocolEvent) -> std::option::Option { if event.program_id.0 == kb_program_ids::SPL_MEMO_V1_PROGRAM_ID - && event.surface_code.0 == "spl_memo_v1" + && event.surface_code.0 == "spl.memo.v1" { return std::option::Option::Some(Self::V1); } if event.program_id.0 == kb_program_ids::SPL_MEMO_V3_PROGRAM_ID - && event.surface_code.0 == "spl_memo_v3" + && event.surface_code.0 == "spl.memo.v3" { return std::option::Option::Some(Self::V3); } if event.program_id.0 == kb_program_ids::SPL_MEMO_V4_PROGRAM_ID - && event.surface_code.0 == "spl_memo_v4" + && event.surface_code.0 == "spl.memo.v4" { return std::option::Option::Some(Self::V4); } @@ -147,7 +147,7 @@ impl crate::MtApiEventMaterializer for crate::MtTransactionAnnotationMaterialize payload_json: serde_json::json!({ "projectionVersion": crate::MT_TRANSACTION_ANNOTATIONS_PROJECTION_VERSION, "domain": "transaction_annotation", - "annotationKind": "spl_memo", + "annotationKind": "spl.memo", "idempotenceKey": idempotence_key, "signature": observation.event.signature.0.clone(), "slot": observation.event.slot.0, @@ -199,7 +199,7 @@ impl crate::MtApiEventMaterializer for crate::MtTransactionAnnotationMaterialize fn accepts_event(event: &crate::MdDecodedProtocolEvent) -> bool { return event.event_family == crate::MdEventFamily::Audit - && event.protocol_code.0 == "spl_memo" + && event.protocol_code.0 == "spl.memo" && (event.source_kind == crate::MdEventSourceKind::Instruction || event.source_kind == crate::MdEventSourceKind::InnerInstruction) && MemoGeneration::from_event(event).is_some() @@ -416,7 +416,7 @@ mod tests { slot: crate::MdSlot(42), instruction_path: crate::MdInstructionPath("1/0".to_string()), program_id: crate::MdProgramId(program_id.to_string()), - protocol_code: crate::MdProtocolCode("spl_memo".to_string()), + protocol_code: crate::MdProtocolCode("spl.memo".to_string()), surface_code: crate::MdSurfaceCode(surface_code.to_string()), event_code: crate::MdEventCode(format!("{surface_code}.{event_name}")), event_name: crate::MdEventName(event_name.to_string()), @@ -465,7 +465,7 @@ mod tests { fn v4() -> crate::DcApiDecodedObservation { return observation( kb_program_ids::SPL_MEMO_V4_PROGRAM_ID, - "spl_memo_v4", + "spl.memo.v4", "v4", "add_memo", false, @@ -498,9 +498,9 @@ mod tests { #[test] fn exact_v1_v3_and_v4_surfaces_are_accepted() { for (program_id, surface, generation) in [ - (kb_program_ids::SPL_MEMO_V1_PROGRAM_ID, "spl_memo_v1", "v1"), - (kb_program_ids::SPL_MEMO_V3_PROGRAM_ID, "spl_memo_v3", "v3"), - (kb_program_ids::SPL_MEMO_V4_PROGRAM_ID, "spl_memo_v4", "v4"), + (kb_program_ids::SPL_MEMO_V1_PROGRAM_ID, "spl.memo.v1", "v1"), + (kb_program_ids::SPL_MEMO_V3_PROGRAM_ID, "spl.memo.v3", "v3"), + (kb_program_ids::SPL_MEMO_V4_PROGRAM_ID, "spl.memo.v4", "v4"), ] { let observation = observation( program_id, @@ -523,7 +523,7 @@ mod tests { fn v1_observed_accounts_are_not_claimed_as_runtime_verified() { let observation = observation( kb_program_ids::SPL_MEMO_V1_PROGRAM_ID, - "spl_memo_v1", + "spl.memo.v1", "v1", "add_memo", false, @@ -546,7 +546,7 @@ mod tests { fn failed_or_uncommitted_memo_is_refused_without_output() { let observation = observation( kb_program_ids::SPL_MEMO_V4_PROGRAM_ID, - "spl_memo_v4", + "spl.memo.v4", "v4", "memo_intent", true, diff --git a/kb-lib/src/materializer/transaction/constants.rs b/kb-lib/src/materializer/transaction/constants.rs index 92bb2b9..61c643e 100644 --- a/kb-lib/src/materializer/transaction/constants.rs +++ b/kb-lib/src/materializer/transaction/constants.rs @@ -1,12 +1,13 @@ // file: kb-lib/src/materializer/transaction/constants.rs -// version: 2 +// version: 3 //! Local constants for the transaction annotation materializer. /// Maximum Memo payload accepted from the decoded contract. pub(crate) const MT_TRANSACTION_ANNOTATIONS_MAX_MEMO_PAYLOAD_BYTES: u64 = 4_096; /// Stable materializer processor name. -pub(crate) const MT_TRANSACTION_ANNOTATIONS_PROCESSOR_NAME: &str = "transaction_annotations"; +pub(crate) const MT_TRANSACTION_ANNOTATIONS_PROCESSOR_NAME: &str = + "materializer.transaction.annotations"; /// Stable projection contract version. pub(crate) const MT_TRANSACTION_ANNOTATIONS_PROJECTION_VERSION: u32 = 1; /// Canonical tracing target for this component. diff --git a/kb-lib/tests/operation_naming_matrix.rs b/kb-lib/tests/operation_naming_matrix.rs new file mode 100644 index 0000000..ed2f3bf --- /dev/null +++ b/kb-lib/tests/operation_naming_matrix.rs @@ -0,0 +1,66 @@ +// file: kb-lib/tests/operation_naming_matrix.rs +// version: 2 + +//! Integration guard for the persisted operation naming contract. + +#[test] +fn operation_naming_matrix_is_machine_readable_and_uses_canonical_dot_hierarchy() +-> std::result::Result<(), std::string::String> { + let matrix_path = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) + .join("../test-fixtures/contract-matrices/OPERATION_NAMING_MATRIX.json"); + let matrix_text = match std::fs::read_to_string(matrix_path) { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => { + return std::result::Result::Err(std::format!( + "operation naming matrix must be readable: {error}" + )); + }, + }; + let matrix: serde_json::Value = match serde_json::from_str(matrix_text.as_str()) { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => { + return std::result::Result::Err(std::format!( + "operation naming matrix must be valid JSON: {error}" + )); + }, + }; + let entries = match matrix["entries"].as_array() { + std::option::Option::Some(value) => value, + std::option::Option::None => { + return std::result::Result::Err(std::string::String::from( + "operation naming matrix must expose entries", + )); + }, + }; + assert!(!entries.is_empty()); + let obsolete_prefixes = [ + "solana_core.", + "solana_native_", + "spl_memo", + "spl_token.", + "spl_token_2022.", + "spl_associated_token_account.", + "spl_elgamal_registry.", + "metadata_metaplex_token_metadata.", + ]; + for entry in entries { + for field in [ + "processorName", + "surfaceCode", + "operationCode", + "eventCode", + "decoderName", + "executorName", + ] { + let std::option::Option::Some(value) = entry[field].as_str() else { + continue; + }; + assert!(!value.is_empty()); + assert!( + !obsolete_prefixes.iter().any(|prefix| return value.starts_with(prefix)), + "obsolete persisted identifier in {field}: {value}" + ); + } + } + return std::result::Result::Ok(()); +} diff --git a/kb-pipeline-demo-scenarios/Cargo.toml b/kb-pipeline-demo-scenarios/Cargo.toml index 89a7b98..978d0cc 100644 --- a/kb-pipeline-demo-scenarios/Cargo.toml +++ b/kb-pipeline-demo-scenarios/Cargo.toml @@ -1,5 +1,5 @@ # file: kb-pipeline-demo-scenarios/Cargo.toml -# version: 2 +# version: 3 [package] name = "kb-pipeline-demo-scenarios" @@ -7,6 +7,15 @@ version.workspace = true edition.workspace = true license.workspace = true publish.workspace = true +autobins = false + +[lib] +name = "kb_pipeline_demo_scenarios" +path = "src/lib.rs" + +[[bin]] +name = "kb-pipeline-demo-scenarios-cli" +path = "src/bin/kb_pipeline_demo_scenarios_cli.rs" [dependencies] chrono.workspace = true diff --git a/kb-pipeline-demo-scenarios/README.md b/kb-pipeline-demo-scenarios/README.md index 661f103..fd43ae8 100644 --- a/kb-pipeline-demo-scenarios/README.md +++ b/kb-pipeline-demo-scenarios/README.md @@ -2,3 +2,15 @@ ## Environnement des scénarios Les exécutables et tests opt-in peuvent appeler `initialize_demo_scenario_environment(workspace_root)` avant de lire leurs variables. Cette fonction délègue à `kb-config` et applique la même priorité que l'application desktop. La crate ne dépend pas directement de `dotenvy`. + +## Préparation de la fixture Token-2022 + +```bash +cargo run -p kb-pipeline-demo-scenarios --bin kb-pipeline-demo-scenarios-cli -- prepare-token-2022-fixture \ + --rpc-url https://api.devnet.solana.com \ + --wallet wallets/temporary/local_devnet/local-devnet-operator.json \ + --wallet-dir wallets/temporary/local_devnet \ + --decimals 9 +``` + +La commande crée ou réutilise un mint avec freeze authority, trois comptes Token-2022 distincts et un delegate, puis écrit `spl_token_2022_validation/fixture.env`. Les keypairs sont générés avec `solana-keygen --silent` et ne sont jamais inclus dans la sortie JSON. diff --git a/kb-pipeline-demo-scenarios/src/bin/kb_pipeline_demo_scenarios_cli.rs b/kb-pipeline-demo-scenarios/src/bin/kb_pipeline_demo_scenarios_cli.rs new file mode 100644 index 0000000..0adf38d --- /dev/null +++ b/kb-pipeline-demo-scenarios/src/bin/kb_pipeline_demo_scenarios_cli.rs @@ -0,0 +1,152 @@ +// file: kb-pipeline-demo-scenarios/src/bin/kb_pipeline_demo_scenarios_cli.rs +// version: 1 + +#![forbid(unsafe_code)] +#![deny(unreachable_pub)] +#![warn(missing_docs)] + +//! Command-line entry point for reusable Devnet fixture preparation. + +macro_rules! kb_try { + ($expression:expr) => { + match $expression { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => return std::result::Result::Err(error), + } + }; +} + +#[tokio::main] +async fn main() { + let result = run().await; + if let std::result::Result::Err(error) = result { + eprintln!("{}: {}", error.code(), error.message()); + std::process::exit(1); + } +} + +async fn run() -> kb_core::Result<()> { + let arguments = std::env::args().skip(1).collect::>(); + let command = match arguments.first() { + std::option::Option::Some(value) => value.as_str(), + std::option::Option::None => return usage_error("missing command"), + }; + if command != "prepare-token-2022-fixture" { + return usage_error(format!("unknown command {command}").as_str()); + } + let options = kb_try!(parse_prepare_options(arguments.as_slice())); + let summary = kb_try!(kb_pipeline_demo_scenarios::prepare_token_2022_fixture(&options).await); + let output = match serde_json::to_string_pretty(&summary) { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => { + return std::result::Result::Err(kb_core::Error::json(format!( + "unable to serialize Token-2022 fixture summary: {error}" + ))); + }, + }; + println!("{output}"); + return std::result::Result::Ok(()); +} + +fn parse_prepare_options( + arguments: &[std::string::String], +) -> kb_core::Result { + let mut rpc_url = std::option::Option::None; + let mut wallet_path = std::option::Option::None; + let mut wallet_dir = std::option::Option::None; + let mut decimals = 9_u8; + let mut index = 1_usize; + while index < arguments.len() { + let name = arguments[index].as_str(); + let value = match arguments.get(index + 1) { + std::option::Option::Some(value) => value, + std::option::Option::None => { + return usage_error(format!("missing value for {name}").as_str()); + }, + }; + match name { + "--rpc-url" => rpc_url = std::option::Option::Some(value.clone()), + "--wallet" => wallet_path = std::option::Option::Some(std::path::PathBuf::from(value)), + "--wallet-dir" => { + wallet_dir = std::option::Option::Some(std::path::PathBuf::from(value)) + }, + "--decimals" => { + decimals = match value.parse::() { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => { + return std::result::Result::Err(kb_core::Error::config(format!( + "invalid --decimals value {value}: {error}" + ))); + }, + } + }, + _ => return usage_error(format!("unknown option {name}").as_str()), + } + index += 2; + } + let rpc_url = match rpc_url.or_else(|| return std::env::var("KB_DEVNET_RPC_URL").ok()) { + std::option::Option::Some(value) => value, + std::option::Option::None => { + return std::result::Result::Err(kb_core::Error::config( + "missing --rpc-url or KB_DEVNET_RPC_URL", + )); + }, + }; + let wallet_path = match wallet_path + .or_else(|| return std::env::var("KB_DEVNET_WALLET").ok().map(std::path::PathBuf::from)) + { + std::option::Option::Some(value) => value, + std::option::Option::None => { + return std::result::Result::Err(kb_core::Error::config( + "missing --wallet or KB_DEVNET_WALLET", + )); + }, + }; + let wallet_dir = match wallet_dir { + std::option::Option::Some(value) => value, + std::option::Option::None => match wallet_path.parent() { + std::option::Option::Some(value) => std::path::Path::to_path_buf(value), + std::option::Option::None => std::path::PathBuf::from("."), + }, + }; + return std::result::Result::Ok( + kb_pipeline_demo_scenarios::Token2022FixturePreparationOptions { + rpc_url, + wallet_path, + wallet_dir, + decimals, + }, + ); +} + +fn usage_error(message: &str) -> kb_core::Result { + return std::result::Result::Err(kb_core::Error::config(format!( + "{message}. Usage: cargo run -p kb-pipeline-demo-scenarios --bin kb-pipeline-demo-scenarios-cli -- prepare-token-2022-fixture --rpc-url URL --wallet PATH [--wallet-dir PATH] [--decimals 9]" + ))); +} + +#[cfg(test)] +mod tests { + #[test] + fn prepare_options_accept_explicit_values() { + let arguments = vec![ + "prepare-token-2022-fixture".to_string(), + "--rpc-url".to_string(), + "https://api.devnet.solana.com".to_string(), + "--wallet".to_string(), + "wallet.json".to_string(), + "--wallet-dir".to_string(), + "wallet-dir".to_string(), + "--decimals".to_string(), + "9".to_string(), + ]; + let options = super::parse_prepare_options(arguments.as_slice()); + assert!(options.is_ok()); + let options = match options { + std::result::Result::Ok(value) => value, + std::result::Result::Err(_) => return, + }; + assert_eq!(options.wallet_dir, std::path::PathBuf::from("wallet-dir")); + assert_eq!(options.decimals, 9); + } +} diff --git a/kb-pipeline-demo-scenarios/src/environment.rs b/kb-pipeline-demo-scenarios/src/environment.rs index 27bfdd0..5beb3b5 100644 --- a/kb-pipeline-demo-scenarios/src/environment.rs +++ b/kb-pipeline-demo-scenarios/src/environment.rs @@ -1,5 +1,5 @@ // file: kb-pipeline-demo-scenarios/src/environment.rs -// version: 1 +// version: 2 //! Environment initialization for opt-in demonstration scenarios. @@ -9,3 +9,176 @@ pub fn initialize_demo_scenario_environment( ) -> kb_core::Result { return kb_config::load_workspace_environment(workspace_root); } + +/// Resolves one compatible Devnet profile for demo scenarios. +/// +/// An explicit name has priority, followed by `KB_DEVNET_PROFILE`, then the +/// first compatible Devnet profile declared by the configuration. +pub fn resolve_demo_devnet_profile( + config: &kb_config::AppConfig, + requested_profile_name: std::option::Option<&str>, +) -> kb_core::Result { + let explicit = requested_profile_name + .map(str::trim) + .filter(|value| return !value.is_empty()) + .map(std::string::ToString::to_string); + let selected_name = match explicit { + std::option::Option::Some(value) => std::option::Option::Some(value), + std::option::Option::None => std::env::var("KB_DEVNET_PROFILE") + .ok() + .map(|value| return value.trim().to_string()) + .filter(|value| return !value.is_empty()), + }; + for profile in &config.profiles { + let compatible = profile.wallet.cluster == "devnet" + && profile.wallet.temporary_wallet_enabled + && profile.wallet.temporary_wallet_persist; + if !compatible { + continue; + } + if let std::option::Option::Some(name) = selected_name.as_ref() + && profile.name != *name + { + continue; + } + return std::result::Result::Ok(profile.clone()); + } + return match selected_name { + std::option::Option::Some(name) => std::result::Result::Err(kb_core::Error::config( + format!("compatible Devnet profile '{name}' is unavailable"), + )), + std::option::Option::None => std::result::Result::Err(kb_core::Error::config( + "no compatible Devnet profile is configured", + )), + }; +} + +/// Readiness report for one Devnet profile PostgreSQL store. +#[derive(Clone, Debug, serde::Serialize)] +#[serde(rename_all = "camelCase")] +pub struct DevnetProfileStoreReadiness { + /// Selected Devnet profile. + pub profile_name: std::string::String, + /// Whether schema creation was allowed by configuration. + pub auto_initialize_schema: bool, + /// Number of known tables already present before preparation. + pub existing_tables_before: usize, + /// Number of known tables created during preparation. + pub created_tables: usize, + /// Number of known tables present after preparation. + pub existing_tables_after: usize, + /// Total number of known tables expected by the current store. + pub expected_tables: usize, +} + +/// Verifies or initializes the PostgreSQL schema selected by one Devnet profile. +pub async fn prepare_demo_devnet_profile_store( + profile: &kb_config::ProfileConfig, +) -> kb_core::Result { + if profile.wallet.cluster != "devnet" { + return std::result::Result::Err(kb_core::Error::config(format!( + "profile '{}' is not configured for Devnet", + profile.name + ))); + } + if !profile.database.enabled { + return std::result::Result::Err(kb_core::Error::config(format!( + "Devnet profile '{}' has database storage disabled", + profile.name + ))); + } + if profile.database.backend != "postgres" { + return std::result::Result::Err(kb_core::Error::config(format!( + "Devnet profile '{}' must use the PostgreSQL backend", + profile.name + ))); + } + let options = match kb_store::PostgresStoreOptions::new( + profile.database.postgres.url.clone(), + profile.database.postgres.max_connections, + profile.database.postgres.connect_timeout_ms, + false, + ) { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => return std::result::Result::Err(error), + }; + let store = match kb_store::PostgresStore::connect(options).await { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => return std::result::Result::Err(error), + }; + let before = match store.known_table_diagnostics().await { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => return std::result::Result::Err(error), + }; + let existing_tables_before = before.iter().filter(|table| return table.exists).count(); + if profile.database.postgres.auto_initialize_schema + && let std::result::Result::Err(error) = store.initialize_store_schema().await + { + return std::result::Result::Err(error); + } + let after = match store.known_table_diagnostics().await { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => return std::result::Result::Err(error), + }; + let existing_tables_after = after.iter().filter(|table| return table.exists).count(); + if existing_tables_after != after.len() { + let missing = after + .iter() + .filter(|table| return !table.exists) + .map(|table| return table.table_name.clone()) + .collect::>(); + return std::result::Result::Err(kb_core::Error::config(format!( + "Devnet profile '{}' PostgreSQL schema is incomplete and auto initialization is {}: missing {}", + profile.name, + if profile.database.postgres.auto_initialize_schema { + "enabled" + } else { + "disabled" + }, + missing.join(", ") + ))); + } + return std::result::Result::Ok(DevnetProfileStoreReadiness { + profile_name: profile.name.clone(), + auto_initialize_schema: profile.database.postgres.auto_initialize_schema, + existing_tables_before, + created_tables: existing_tables_after.saturating_sub(existing_tables_before), + existing_tables_after, + expected_tables: after.len(), + }); +} + +#[cfg(test)] +mod tests { + fn example_config() -> kb_config::AppConfig { + return match kb_config::parse_config_json(include_str!("../../config/example.config.json")) + { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => panic!("example config parse failed: {error}"), + }; + } + + #[test] + fn resolver_finds_a_compatible_devnet_profile_without_a_fixed_name() { + let config = example_config(); + let profile = match super::resolve_demo_devnet_profile(&config, std::option::Option::None) { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => panic!("Devnet profile resolution failed: {error}"), + }; + assert_eq!(profile.wallet.cluster, "devnet"); + assert!(profile.wallet.temporary_wallet_enabled); + assert!(profile.wallet.temporary_wallet_persist); + } + + #[test] + fn resolver_rejects_an_explicit_non_devnet_profile() { + let config = example_config(); + assert!( + super::resolve_demo_devnet_profile( + &config, + std::option::Option::Some("mainnet_research"), + ) + .is_err() + ); + } +} diff --git a/kb-pipeline-demo-scenarios/src/lib.rs b/kb-pipeline-demo-scenarios/src/lib.rs index 8988895..6694e26 100644 --- a/kb-pipeline-demo-scenarios/src/lib.rs +++ b/kb-pipeline-demo-scenarios/src/lib.rs @@ -1,5 +1,5 @@ // file: kb-pipeline-demo-scenarios/src/lib.rs -// version: 3 +// version: 5 #![forbid(unsafe_code)] #![deny(unreachable_pub)] @@ -17,9 +17,16 @@ mod solana_token_2022_devnet_scenarios; mod solana_token_2022_validation; mod solana_token_execution; mod solana_token_lifecycle; +mod token_2022_fixture; +/// Readiness report for one Devnet profile PostgreSQL store. +pub use self::environment::DevnetProfileStoreReadiness; /// Loads the workspace environment for opt-in demo and Devnet scenarios. pub use self::environment::initialize_demo_scenario_environment; +/// Verifies or initializes the PostgreSQL schema selected by one Devnet profile. +pub use self::environment::prepare_demo_devnet_profile_store; +/// Resolves one configured Devnet profile for UI, CLI and test scenarios. +pub use self::environment::resolve_demo_devnet_profile; /// Complete request for one Devnet Associated Token Account execution. pub use self::solana_ata_execution::DevnetSplAssociatedTokenAccountExecutionRequest; /// Complete result of one Devnet Associated Token Account execution. @@ -128,6 +135,20 @@ pub use self::solana_token_lifecycle::DevnetSplTokenLifecycleSummary; pub use self::solana_token_lifecycle::execute_devnet_spl_token_lifecycle; /// Prepares raw accounts for one controlled Devnet SPL Token lifecycle. pub use self::solana_token_lifecycle::prepare_devnet_spl_token_lifecycle_accounts; +/// Default raw amount delegated by the public ApproveChecked scenario. +pub use self::token_2022_fixture::DEFAULT_TOKEN_2022_APPROVE_AMOUNT_RAW; +/// Default raw amount burned by the public BurnChecked scenario. +pub use self::token_2022_fixture::DEFAULT_TOKEN_2022_BURN_AMOUNT_RAW; +/// Default raw amount minted by the public MintToChecked scenario. +pub use self::token_2022_fixture::DEFAULT_TOKEN_2022_MINT_AMOUNT_RAW; +/// Default raw amount transferred by the public TransferChecked scenario. +pub use self::token_2022_fixture::DEFAULT_TOKEN_2022_TRANSFER_AMOUNT_RAW; +/// Command-line options for one Token-2022 fixture preparation. +pub use self::token_2022_fixture::Token2022FixturePreparationOptions; +/// Public values written to one Token-2022 fixture file. +pub use self::token_2022_fixture::Token2022FixturePreparationSummary; +/// Creates or reuses one complete Token-2022 public scenario fixture. +pub use self::token_2022_fixture::prepare_token_2022_fixture; /// Canonical tracing target for demo pipeline scenarios. pub(crate) use self::constants::TRACING_TARGET; diff --git a/kb-pipeline-demo-scenarios/src/solana_ata_execution.rs b/kb-pipeline-demo-scenarios/src/solana_ata_execution.rs index b14a718..89c589b 100644 --- a/kb-pipeline-demo-scenarios/src/solana_ata_execution.rs +++ b/kb-pipeline-demo-scenarios/src/solana_ata_execution.rs @@ -1,5 +1,5 @@ // file: kb-pipeline-demo-scenarios/src/solana_ata_execution.rs -// version: 7 +// version: 9 //! Devnet ATA execution with stateful and canonical post-validation. @@ -406,7 +406,7 @@ where }; summary.materializations = rows .into_iter() - .filter(|row| return row.source_decoder_name == "spl_associated_token_account") + .filter(|row| return row.source_decoder_name == "spl.associated_token_account") .collect(); diagnostic.materialized = !summary.plan.policy.post_execution_validation.materialization_required @@ -992,18 +992,16 @@ mod tests { }; } - fn local_devnet_profile() -> kb_config::ProfileConfig { + fn example_devnet_profile() -> kb_config::ProfileConfig { let config = match kb_config::parse_config_json(include_str!("../../config/example.config.json")) { std::result::Result::Ok(value) => value, std::result::Result::Err(error) => panic!("example config parse failed: {error}"), }; - for profile in config.profiles { - if profile.name == "local_devnet" { - return profile; - } - } - panic!("local_devnet profile missing"); + return match crate::resolve_demo_devnet_profile(&config, std::option::Option::None) { + std::result::Result::Ok(profile) => profile, + std::result::Result::Err(error) => panic!("Devnet profile resolution failed: {error}"), + }; } fn create_operation(wallet: &str) -> kb_lib::ExSplAssociatedTokenAccountOperation { @@ -1029,7 +1027,7 @@ mod tests { #[test] fn creation_and_recovery_intents_preserve_exact_spend_and_signers() { - let profile = local_devnet_profile(); + let profile = example_devnet_profile(); let fee_payer = kb_lib::MdPubkey(kb_program_ids::SYSTEM_PROGRAM_ID.to_string()); let create = crate::DevnetSplAssociatedTokenAccountExecutionRequest::new( "ata-2", @@ -1090,7 +1088,7 @@ mod tests { }; let submit = std::env::var("KB_DEVNET_SPL_ATA_SUBMIT").ok().as_deref() == std::option::Option::Some("1"); - let profile = local_devnet_profile(); + let profile = example_devnet_profile(); let workspace_root = std::path::PathBuf::from(env!("CARGO_MANIFEST_DIR")) .parent() .map(std::path::Path::to_path_buf) diff --git a/kb-pipeline-demo-scenarios/src/solana_execution.rs b/kb-pipeline-demo-scenarios/src/solana_execution.rs index b8d60af..e9807a9 100644 --- a/kb-pipeline-demo-scenarios/src/solana_execution.rs +++ b/kb-pipeline-demo-scenarios/src/solana_execution.rs @@ -1,5 +1,5 @@ // file: kb-pipeline-demo-scenarios/src/solana_execution.rs -// version: 8 +// version: 9 //! Devnet Solana execution orchestration with canonical post-validation. @@ -1223,18 +1223,16 @@ pub(crate) fn emit( #[cfg(test)] mod tests { - fn local_devnet_profile() -> kb_config::ProfileConfig { + fn example_devnet_profile() -> kb_config::ProfileConfig { let config = match kb_config::parse_config_json(include_str!("../../config/example.config.json")) { std::result::Result::Ok(value) => value, std::result::Result::Err(error) => panic!("example config parse failed: {error}"), }; - for profile in config.profiles { - if profile.name == "local_devnet" { - return profile; - } - } - panic!("local_devnet profile missing from example config"); + return match crate::resolve_demo_devnet_profile(&config, std::option::Option::None) { + std::result::Result::Ok(profile) => profile, + std::result::Result::Err(error) => panic!("Devnet profile resolution failed: {error}"), + }; } fn recipient() -> kb_lib::MdPubkey { @@ -1243,7 +1241,7 @@ mod tests { #[test] fn request_and_profile_validation_are_conservative() { - let profile = local_devnet_profile(); + let profile = example_devnet_profile(); let mut request = crate::DevnetSystemTransferRequest::new("intent-1", recipient(), 1_000); assert!(request.validate().is_ok()); assert!(super::validate_devnet_profile(&profile, &request).is_ok()); @@ -1256,8 +1254,8 @@ mod tests { } #[test] - fn local_devnet_profile_routes_complete_execution_flow() { - let profile = local_devnet_profile(); + fn resolved_devnet_profile_routes_complete_execution_flow() { + let profile = example_devnet_profile(); let pool = match kb_onchain_transport::HttpEndpointPool::from_profile(&profile) { std::result::Result::Ok(value) => value, std::result::Result::Err(error) => panic!("HTTP pool creation failed: {error}"), @@ -1284,7 +1282,7 @@ mod tests { #[test] fn transfer_plan_uses_exact_devnet_policy() { - let profile = local_devnet_profile(); + let profile = example_devnet_profile(); let mut request = crate::DevnetSystemTransferRequest::new("intent-2", recipient(), 5_000); request.submit = true; request.operator_confirmed = true; @@ -1344,7 +1342,7 @@ mod tests { panic!("KB_POSTGRES_TEST_URL is required: {error}"); }, }; - let mut profile = local_devnet_profile(); + let mut profile = example_devnet_profile(); profile.database.backend = "postgres".to_string(); profile.database.postgres.url = database_url; if let std::result::Result::Ok(directory) = std::env::var("KB_DEVNET_WALLET_DIR") { diff --git a/kb-pipeline-demo-scenarios/src/solana_memo_execution.rs b/kb-pipeline-demo-scenarios/src/solana_memo_execution.rs index bc1d730..02d6b09 100644 --- a/kb-pipeline-demo-scenarios/src/solana_memo_execution.rs +++ b/kb-pipeline-demo-scenarios/src/solana_memo_execution.rs @@ -1,5 +1,5 @@ // file: kb-pipeline-demo-scenarios/src/solana_memo_execution.rs -// version: 3 +// version: 5 //! Devnet SPL Memo v4 execution with canonical post-validation. @@ -458,7 +458,7 @@ where diagnostic.decode_replayed = decode_completed(&first_replay); summary.decode_replay = std::option::Option::Some(first_replay); let filter = match kb_store::MaterializedEventFilter::new( - std::option::Option::Some("transaction_annotations".to_string()), + std::option::Option::Some("materializer.transaction.annotations".to_string()), std::option::Option::Some("transaction_annotation".to_string()), std::option::Option::Some(signature.0.clone()), 8, @@ -753,18 +753,16 @@ fn decode_completed(summary: &kb_pipeline::DecodeReplaySummary) -> bool { #[cfg(test)] mod tests { - fn local_devnet_profile() -> kb_config::ProfileConfig { + fn example_devnet_profile() -> kb_config::ProfileConfig { let config = match kb_config::parse_config_json(include_str!("../../config/example.config.json")) { std::result::Result::Ok(value) => value, std::result::Result::Err(error) => panic!("example config parse failed: {error}"), }; - for profile in config.profiles { - if profile.name == "local_devnet" { - return profile; - } - } - panic!("local_devnet profile missing"); + return match crate::resolve_demo_devnet_profile(&config, std::option::Option::None) { + std::result::Result::Ok(profile) => profile, + std::result::Result::Err(error) => panic!("Devnet profile resolution failed: {error}"), + }; } #[test] @@ -779,7 +777,7 @@ mod tests { #[test] fn exact_v4_plan_has_zero_spend_and_wallet_signer() { - let profile = local_devnet_profile(); + let profile = example_devnet_profile(); let fee_payer = kb_lib::MdPubkey(kb_program_ids::SYSTEM_PROGRAM_ID.to_string()); let mut request = crate::DevnetMemoExecutionRequest::new("memo-3", "hello"); request.submit = true; @@ -800,7 +798,7 @@ mod tests { #[test] fn submission_requires_profile_enablement_and_confirmation() { - let profile = local_devnet_profile(); + let profile = example_devnet_profile(); let mut request = crate::DevnetMemoExecutionRequest::new("memo-4", "hello"); assert!(super::validate_profile(&profile, &request).is_ok()); request.submit = true; @@ -822,7 +820,7 @@ mod tests { panic!("KB_POSTGRES_TEST_URL is required: {error}"); }, }; - let mut profile = local_devnet_profile(); + let mut profile = example_devnet_profile(); profile.database.backend = "postgres".to_string(); profile.database.postgres.url = database_url; if let std::result::Result::Ok(directory) = std::env::var("KB_DEVNET_WALLET_DIR") { diff --git a/kb-pipeline-demo-scenarios/src/solana_token_2022_devnet_execution.rs b/kb-pipeline-demo-scenarios/src/solana_token_2022_devnet_execution.rs index eb8deb1..660f975 100644 --- a/kb-pipeline-demo-scenarios/src/solana_token_2022_devnet_execution.rs +++ b/kb-pipeline-demo-scenarios/src/solana_token_2022_devnet_execution.rs @@ -1,5 +1,5 @@ // file: kb-pipeline-demo-scenarios/src/solana_token_2022_devnet_execution.rs -// version: 4 +// version: 5 //! Devnet Token-2022 execution with stateful and canonical post-validation. @@ -372,7 +372,7 @@ where }; summary.materializations = rows .into_iter() - .filter(|row| return row.source_decoder_name == "spl_token_2022") + .filter(|row| return row.source_decoder_name == "spl.token_2022") .collect(); diagnostic.materialized = !summary.plan.policy.post_execution_validation.materialization_required diff --git a/kb-pipeline-demo-scenarios/src/solana_token_2022_devnet_scenarios.rs b/kb-pipeline-demo-scenarios/src/solana_token_2022_devnet_scenarios.rs index 02a9211..745861f 100644 --- a/kb-pipeline-demo-scenarios/src/solana_token_2022_devnet_scenarios.rs +++ b/kb-pipeline-demo-scenarios/src/solana_token_2022_devnet_scenarios.rs @@ -1,5 +1,5 @@ // file: kb-pipeline-demo-scenarios/src/solana_token_2022_devnet_scenarios.rs -// version: 6 +// version: 7 //! Stable Devnet validation scenarios required to close milestone 0.4.6. @@ -61,8 +61,8 @@ pub fn devnet_spl_validation_scenarios() -> std::vec::Vec bo #[cfg(test)] mod tests { - fn local_devnet_profile() -> kb_config::ProfileConfig { + fn example_devnet_profile() -> kb_config::ProfileConfig { let config = match kb_config::parse_config_json(include_str!("../../config/example.config.json")) { std::result::Result::Ok(value) => value, std::result::Result::Err(error) => panic!("example config parse failed: {error}"), }; - for profile in config.profiles { - if profile.name == "local_devnet" { - return profile; - } - } - panic!("local_devnet profile missing"); + return match crate::resolve_demo_devnet_profile(&config, std::option::Option::None) { + std::result::Result::Ok(profile) => profile, + std::result::Result::Err(error) => panic!("Devnet profile resolution failed: {error}"), + }; } fn checked_transfer(fee_authority: &str) -> kb_lib::ExSplClassicTokenOperation { @@ -1018,7 +1016,7 @@ mod tests { #[test] fn checked_transfer_plan_is_simulation_first_and_authorizes_exact_signers() { - let profile = local_devnet_profile(); + let profile = example_devnet_profile(); let fee_payer = kb_lib::MdPubkey(kb_program_ids::SYSTEM_PROGRAM_ID.to_string()); let authority = kb_program_ids::VOTE_PROGRAM_ID; let request = @@ -1036,7 +1034,7 @@ mod tests { #[test] fn conversion_plan_does_not_invent_materialization_requirement() { - let profile = local_devnet_profile(); + let profile = example_devnet_profile(); let request = crate::DevnetSplTokenExecutionRequest::new( "token-3", kb_lib::ExSplClassicTokenOperation::Instruction { @@ -1092,7 +1090,7 @@ mod tests { std::result::Result::Ok(value) => value, std::result::Result::Err(_) => "1".to_string(), }; - let mut profile = local_devnet_profile(); + let mut profile = example_devnet_profile(); if let std::result::Result::Ok(directory) = std::env::var("KB_DEVNET_WALLET_DIR") { profile.wallet.wallet_dir = directory; } @@ -1262,7 +1260,7 @@ mod tests { }, std::result::Result::Err(_) => 9, }; - let mut profile = local_devnet_profile(); + let mut profile = example_devnet_profile(); if let std::result::Result::Ok(directory) = std::env::var("KB_DEVNET_WALLET_DIR") { profile.wallet.wallet_dir = directory; } diff --git a/kb-pipeline-demo-scenarios/src/solana_token_lifecycle.rs b/kb-pipeline-demo-scenarios/src/solana_token_lifecycle.rs index 73ce400..77a495b 100644 --- a/kb-pipeline-demo-scenarios/src/solana_token_lifecycle.rs +++ b/kb-pipeline-demo-scenarios/src/solana_token_lifecycle.rs @@ -1,5 +1,5 @@ // file: kb-pipeline-demo-scenarios/src/solana_token_lifecycle.rs -// version: 6 +// version: 8 //! Controlled Devnet lifecycle for freshly prepared classic SPL Token accounts. @@ -678,7 +678,7 @@ where let recovered_count = rows .iter() .filter(|row| { - return row.source_decoder_name == "spl_token" + return row.source_decoder_name == "spl.token" && row.payload_json.get("operation").and_then(serde_json::Value::as_str) == std::option::Option::Some(expected_operation.as_str()); }) @@ -756,7 +756,7 @@ fn materialized_operation_code(operation: &kb_lib::ExSplClassicTokenOperation) - kb_lib::ExSplClassicTokenOperation::Instruction { value: kb_lib::ExSplClassicTokenSingleOperation::InitializeAccount { .. }, } => "initialize_account3", - _ => match operation.operation_code().strip_prefix("spl_token.") { + _ => match operation.operation_code().strip_prefix("spl.token.") { std::option::Option::Some(value) => value, std::option::Option::None => operation.operation_code(), }, @@ -1396,17 +1396,17 @@ mod tests { assert_eq!( codes, std::vec![ - "spl_token.initialize_mint", - "spl_token.initialize_account", - "spl_token.initialize_account", - "spl_token.mint_to_checked", - "spl_token.transfer_checked", - "spl_token.approve_checked", - "spl_token.revoke", - "spl_token.burn_checked", - "spl_token.burn_checked", - "spl_token.close_account", - "spl_token.close_account", + "spl.token.initialize_mint", + "spl.token.initialize_account", + "spl.token.initialize_account", + "spl.token.mint_to_checked", + "spl.token.transfer_checked", + "spl.token.approve_checked", + "spl.token.revoke", + "spl.token.burn_checked", + "spl.token.burn_checked", + "spl.token.close_account", + "spl.token.close_account", ], ); let source_burn = match &operations[7] { @@ -1445,7 +1445,7 @@ mod tests { #[test] fn account_creation_plan_uses_exact_token_owner_space_spend_and_signers() { - let profile = local_devnet_profile(); + let profile = example_devnet_profile(); let payer = key(kb_program_ids::SYSTEM_PROGRAM_ID); let account = key(kb_program_ids::STAKE_PROGRAM_ID); let plan = match super::build_account_creation_plan( @@ -1459,7 +1459,7 @@ mod tests { std::result::Result::Ok(value) => value, std::result::Result::Err(error) => panic!("account creation plan failed: {error}"), }; - assert_eq!(plan.operation_code, "solana_core.system.create_account"); + assert_eq!(plan.operation_code, "solana.core.system.create_account"); assert_eq!(plan.requested_spend_lamports, 1_461_600); assert_eq!(plan.instructions.len(), 1); assert_eq!(plan.instructions[0].accounts.len(), 2); @@ -1510,7 +1510,7 @@ mod tests { { panic!("controlled lifecycle requires KB_DEVNET_SPL_TOKEN_LIFECYCLE_SUBMIT=1"); } - let mut profile = local_devnet_profile(); + let mut profile = example_devnet_profile(); if let std::result::Result::Ok(directory) = std::env::var("KB_DEVNET_WALLET_DIR") { profile.wallet.wallet_dir = directory; } @@ -1686,18 +1686,16 @@ mod tests { } } - fn local_devnet_profile() -> kb_config::ProfileConfig { + fn example_devnet_profile() -> kb_config::ProfileConfig { let config = match kb_config::parse_config_json(include_str!("../../config/example.config.json")) { std::result::Result::Ok(value) => value, std::result::Result::Err(error) => panic!("example config parse failed: {error}"), }; - for profile in config.profiles { - if profile.name == "local_devnet" { - return profile; - } - } - panic!("local_devnet profile missing"); + return match crate::resolve_demo_devnet_profile(&config, std::option::Option::None) { + std::result::Result::Ok(profile) => profile, + std::result::Result::Err(error) => panic!("Devnet profile resolution failed: {error}"), + }; } fn required_pubkey_env(name: &str) -> kb_lib::MdPubkey { diff --git a/kb-pipeline-demo-scenarios/src/token_2022_fixture.rs b/kb-pipeline-demo-scenarios/src/token_2022_fixture.rs new file mode 100644 index 0000000..8082046 --- /dev/null +++ b/kb-pipeline-demo-scenarios/src/token_2022_fixture.rs @@ -0,0 +1,462 @@ +// file: kb-pipeline-demo-scenarios/src/token_2022_fixture.rs +// version: 2 + +//! Idempotent Token-2022 public scenario fixture preparation. + +/// Default raw amount minted by the public MintToChecked scenario. +pub const DEFAULT_TOKEN_2022_MINT_AMOUNT_RAW: u64 = 10_000_000_000; +/// Default raw amount transferred by the public TransferChecked scenario. +pub const DEFAULT_TOKEN_2022_TRANSFER_AMOUNT_RAW: u64 = 1_000_000_000; +/// Default raw amount delegated by the public ApproveChecked scenario. +pub const DEFAULT_TOKEN_2022_APPROVE_AMOUNT_RAW: u64 = 2_000_000_000; +/// Default raw amount burned by the public BurnChecked scenario. +pub const DEFAULT_TOKEN_2022_BURN_AMOUNT_RAW: u64 = 1_000_000_000; + +macro_rules! kb_try { + ($expression:expr) => { + match $expression { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => return std::result::Result::Err(error), + } + }; +} + +/// Command-line options for one Token-2022 fixture preparation. +#[derive(Clone, Debug, Eq, PartialEq)] +pub struct Token2022FixturePreparationOptions { + /// Devnet RPC URL used by Solana CLI commands. + pub rpc_url: std::string::String, + /// Persistent operator wallet keypair path. + pub wallet_path: std::path::PathBuf, + /// Wallet directory receiving public fixture files and temporary keypairs. + pub wallet_dir: std::path::PathBuf, + /// Mint decimals used by the public scenarios. + pub decimals: u8, +} + +/// Public values written to one Token-2022 fixture file. +#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize)] +pub struct Token2022FixturePreparationSummary { + /// Generated fixture path. + pub fixture_path: std::path::PathBuf, + /// Canonical Token-2022 Program ID. + pub program_id: std::string::String, + /// Token-2022 mint address. + pub mint: std::string::String, + /// Source Token-2022 account address. + pub source: std::string::String, + /// Destination Token-2022 account address. + pub destination: std::string::String, + /// Empty Token-2022 account reserved for CloseAccount. + pub close_account: std::string::String, + /// Delegate public key. + pub delegate: std::string::String, + /// Wallet authority public key. + pub authority: std::string::String, + /// Freeze authority public key. + pub freeze_authority: std::string::String, + /// Mint decimals. + pub decimals: u8, + /// Whether the fixture file was replaced during this invocation. + pub fixture_written: bool, +} + +/// Creates or reuses one complete Token-2022 public scenario fixture. +pub async fn prepare_token_2022_fixture( + options: &crate::Token2022FixturePreparationOptions, +) -> kb_core::Result { + kb_try!(validate_options(options)); + let fixture_dir = options.wallet_dir.join("spl_token_2022_validation"); + if let std::result::Result::Err(error) = tokio::fs::create_dir_all(&fixture_dir).await { + return std::result::Result::Err(kb_core::Error::io(format!( + "unable to create Token-2022 fixture directory {}: {error}", + fixture_dir.display() + ))); + } + let wallet_path = kb_try!(path_text(&options.wallet_path)); + let authority = + kb_try!(command_stdout("solana-keygen", &["pubkey", wallet_path.as_str()]).await); + let mint_keypair = fixture_dir.join("mint.json"); + let source_keypair = fixture_dir.join("source-account.json"); + let destination_keypair = fixture_dir.join("destination-account.json"); + let close_account_keypair = fixture_dir.join("close-account.json"); + let delegate_keypair = fixture_dir.join("delegate.json"); + kb_try!(ensure_keypair(&mint_keypair).await); + kb_try!(ensure_keypair(&source_keypair).await); + kb_try!(ensure_keypair(&destination_keypair).await); + kb_try!(ensure_keypair(&close_account_keypair).await); + kb_try!(ensure_keypair(&delegate_keypair).await); + let mint = kb_try!(keypair_pubkey(&mint_keypair).await); + let source = kb_try!(keypair_pubkey(&source_keypair).await); + let destination = kb_try!(keypair_pubkey(&destination_keypair).await); + let close_account = kb_try!(keypair_pubkey(&close_account_keypair).await); + let delegate = kb_try!(keypair_pubkey(&delegate_keypair).await); + let mint_exists = kb_try!(account_exists(options.rpc_url.as_str(), mint.as_str()).await); + if !mint_exists { + let decimals = options.decimals.to_string(); + let wallet_path = kb_try!(path_text(&options.wallet_path)); + let mint_keypair_path = kb_try!(path_text(&mint_keypair)); + kb_try!( + run_command( + "spl-token", + &[ + "--url", + options.rpc_url.as_str(), + "--program-id", + kb_program_ids::SPL_TOKEN_2022_PROGRAM_ID, + "create-token", + "--enable-freeze", + "--decimals", + decimals.as_str(), + "--fee-payer", + wallet_path.as_str(), + "--mint-authority", + authority.as_str(), + mint_keypair_path.as_str() + ] + ) + .await + ); + } + kb_try!( + ensure_token_account( + options, + mint.as_str(), + authority.as_str(), + &source_keypair, + source.as_str() + ) + .await + ); + kb_try!( + ensure_token_account( + options, + mint.as_str(), + authority.as_str(), + &destination_keypair, + destination.as_str() + ) + .await + ); + kb_try!( + ensure_token_account( + options, + mint.as_str(), + authority.as_str(), + &close_account_keypair, + close_account.as_str() + ) + .await + ); + let fixture_path = fixture_dir.join("fixture.env"); + let summary = crate::Token2022FixturePreparationSummary { + fixture_path: fixture_path.clone(), + program_id: kb_program_ids::SPL_TOKEN_2022_PROGRAM_ID.to_string(), + mint, + source, + destination, + close_account, + delegate, + authority: authority.clone(), + freeze_authority: authority, + decimals: options.decimals, + fixture_written: true, + }; + let contents = render_fixture(&summary); + let fixture_written = + kb_try!(write_fixture_atomically(&fixture_path, contents.as_bytes()).await); + return std::result::Result::Ok(crate::Token2022FixturePreparationSummary { + fixture_path, + program_id: summary.program_id, + mint: summary.mint, + source: summary.source, + destination: summary.destination, + close_account: summary.close_account, + delegate: summary.delegate, + authority: summary.authority, + freeze_authority: summary.freeze_authority, + decimals: summary.decimals, + fixture_written, + }); +} + +fn validate_options(options: &crate::Token2022FixturePreparationOptions) -> kb_core::Result<()> { + if options.rpc_url.trim().is_empty() { + return std::result::Result::Err(kb_core::Error::config( + "Token-2022 fixture RPC URL must not be empty", + )); + } + if !options.wallet_path.is_file() { + return std::result::Result::Err(kb_core::Error::config(format!( + "Token-2022 fixture wallet does not exist: {}", + options.wallet_path.display() + ))); + } + if options.decimals > 18 { + return std::result::Result::Err(kb_core::Error::config( + "Token-2022 fixture decimals must be at most 18", + )); + } + return std::result::Result::Ok(()); +} + +async fn ensure_keypair(path: &std::path::Path) -> kb_core::Result<()> { + if path.is_file() { + return std::result::Result::Ok(()); + } + let keypair_path = kb_try!(path_text(path)); + kb_try!( + run_command( + "solana-keygen", + &[ + "new", + "--no-bip39-passphrase", + "--force", + "--silent", + "--outfile", + keypair_path.as_str() + ] + ) + .await + ); + kb_try!(set_private_permissions(path).await); + return std::result::Result::Ok(()); +} + +async fn set_private_permissions(path: &std::path::Path) -> kb_core::Result<()> { + #[cfg(unix)] + { + let metadata = match tokio::fs::metadata(path).await { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => { + return std::result::Result::Err(kb_core::Error::io(format!( + "unable to read keypair metadata {}: {error}", + path.display() + ))); + }, + }; + let mut permissions = metadata.permissions(); + std::os::unix::fs::PermissionsExt::set_mode(&mut permissions, 0o600); + if let std::result::Result::Err(error) = tokio::fs::set_permissions(path, permissions).await + { + return std::result::Result::Err(kb_core::Error::io(format!( + "unable to protect keypair {}: {error}", + path.display() + ))); + } + } + return std::result::Result::Ok(()); +} + +async fn keypair_pubkey(path: &std::path::Path) -> kb_core::Result { + let keypair_path = kb_try!(path_text(path)); + return command_stdout("solana-keygen", &["pubkey", keypair_path.as_str()]).await; +} + +async fn account_exists(rpc_url: &str, address: &str) -> kb_core::Result { + let output = match tokio::process::Command::new("solana") + .args(["account", address, "--url", rpc_url, "--output", "json"]) + .output() + .await + { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => { + return std::result::Result::Err(kb_core::Error::io(format!( + "unable to execute solana account: {error}" + ))); + }, + }; + return std::result::Result::Ok(output.status.success()); +} + +async fn ensure_token_account( + options: &crate::Token2022FixturePreparationOptions, + mint: &str, + authority: &str, + keypair_path: &std::path::Path, + address: &str, +) -> kb_core::Result<()> { + let exists = kb_try!(account_exists(options.rpc_url.as_str(), address).await); + if exists { + return std::result::Result::Ok(()); + } + let token_account_keypair = kb_try!(path_text(keypair_path)); + let wallet_path = kb_try!(path_text(&options.wallet_path)); + kb_try!( + run_command( + "spl-token", + &[ + "--url", + options.rpc_url.as_str(), + "--program-id", + kb_program_ids::SPL_TOKEN_2022_PROGRAM_ID, + "create-account", + mint, + token_account_keypair.as_str(), + "--owner", + authority, + "--fee-payer", + wallet_path.as_str() + ] + ) + .await + ); + return std::result::Result::Ok(()); +} + +async fn command_stdout(program: &str, arguments: &[&str]) -> kb_core::Result { + let output = match tokio::process::Command::new(program).args(arguments).output().await { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => { + return std::result::Result::Err(kb_core::Error::io(format!( + "unable to execute {program}: {error}" + ))); + }, + }; + if !output.status.success() { + return std::result::Result::Err(command_error(program, arguments, &output)); + } + let value = match std::string::String::from_utf8(output.stdout) { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => { + return std::result::Result::Err(kb_core::Error::invalid_state(format!( + "{program} returned non-UTF-8 output: {error}" + ))); + }, + }; + return std::result::Result::Ok(value.trim().to_string()); +} + +async fn run_command(program: &str, arguments: &[&str]) -> kb_core::Result<()> { + let output = match tokio::process::Command::new(program).args(arguments).output().await { + std::result::Result::Ok(value) => value, + std::result::Result::Err(error) => { + return std::result::Result::Err(kb_core::Error::io(format!( + "unable to execute {program}: {error}" + ))); + }, + }; + if !output.status.success() { + return std::result::Result::Err(command_error(program, arguments, &output)); + } + return std::result::Result::Ok(()); +} + +fn command_error( + program: &str, + arguments: &[&str], + output: &std::process::Output, +) -> kb_core::Error { + let stderr = std::string::String::from_utf8_lossy(output.stderr.as_slice()) + .trim() + .to_string(); + let stdout = std::string::String::from_utf8_lossy(output.stdout.as_slice()) + .trim() + .to_string(); + let detail = if stderr.is_empty() { stdout } else { stderr }; + return kb_core::Error::new( + "token_2022_fixture_command_failed", + format!( + "command {program} {} failed with status {}: {detail}", + arguments.join(" "), + output.status + ), + ); +} + +fn path_text(path: &std::path::Path) -> kb_core::Result { + return match path.to_str() { + std::option::Option::Some(value) => std::result::Result::Ok(value.to_string()), + std::option::Option::None => std::result::Result::Err(kb_core::Error::config(format!( + "path is not valid UTF-8: {}", + path.display() + ))), + }; +} + +fn render_fixture(summary: &crate::Token2022FixturePreparationSummary) -> std::string::String { + return format!( + "export TOKEN_2022_PROGRAM={}\nexport TOKEN_2022_MINT={}\nexport TOKEN_2022_SOURCE={}\nexport TOKEN_2022_DESTINATION={}\nexport TOKEN_2022_CLOSE_ACCOUNT={}\nexport TOKEN_2022_DELEGATE={}\nexport TOKEN_2022_AUTHORITY={}\nexport TOKEN_2022_FREEZE_AUTHORITY={}\nexport TOKEN_2022_DECIMALS={}\nexport TOKEN_2022_MINT_AMOUNT_RAW={}\nexport TOKEN_2022_TRANSFER_AMOUNT_RAW={}\nexport TOKEN_2022_APPROVE_AMOUNT_RAW={}\nexport TOKEN_2022_BURN_AMOUNT_RAW={}\nexport KB_DEVNET_WALLET_ADDRESS={}\n", + summary.program_id, + summary.mint, + summary.source, + summary.destination, + summary.close_account, + summary.delegate, + summary.authority, + summary.freeze_authority, + summary.decimals, + crate::DEFAULT_TOKEN_2022_MINT_AMOUNT_RAW, + crate::DEFAULT_TOKEN_2022_TRANSFER_AMOUNT_RAW, + crate::DEFAULT_TOKEN_2022_APPROVE_AMOUNT_RAW, + crate::DEFAULT_TOKEN_2022_BURN_AMOUNT_RAW, + summary.authority + ); +} + +async fn write_fixture_atomically( + path: &std::path::Path, + contents: &[u8], +) -> kb_core::Result { + if let std::result::Result::Ok(existing) = tokio::fs::read(path).await { + if existing == contents { + return std::result::Result::Ok(false); + } + } + let temporary = path.with_extension("env.tmp"); + if let std::result::Result::Err(error) = tokio::fs::write(&temporary, contents).await { + return std::result::Result::Err(kb_core::Error::io(format!( + "unable to write temporary Token-2022 fixture {}: {error}", + temporary.display() + ))); + } + if let std::result::Result::Err(error) = tokio::fs::rename(&temporary, path).await { + return std::result::Result::Err(kb_core::Error::io(format!( + "unable to replace Token-2022 fixture {}: {error}", + path.display() + ))); + } + return std::result::Result::Ok(true); +} + +#[cfg(test)] +mod tests { + #[test] + fn rendered_fixture_contains_every_public_scenario_variable() { + let summary = super::Token2022FixturePreparationSummary { + fixture_path: std::path::PathBuf::from("fixture.env"), + program_id: kb_program_ids::SPL_TOKEN_2022_PROGRAM_ID.to_string(), + mint: "mint".to_string(), + source: "source".to_string(), + destination: "destination".to_string(), + close_account: "close".to_string(), + delegate: "delegate".to_string(), + authority: "authority".to_string(), + freeze_authority: "authority".to_string(), + decimals: 9, + fixture_written: true, + }; + let fixture = super::render_fixture(&summary); + for scenario in crate::devnet_spl_validation_scenarios().into_iter().filter(|scenario| { + return scenario.family == crate::DevnetSplValidationFamily::Token2022Public; + }) { + for variable in scenario.required_fixture_variables { + assert!(fixture.lines().any(|line| return line.starts_with(format!("export {variable}=").as_str())), "missing {variable}"); + } + } + assert!(fixture.contains("export TOKEN_2022_CLOSE_ACCOUNT=close\n")); + assert!(fixture.contains("export KB_DEVNET_WALLET_ADDRESS=authority\n")); + } + + #[test] + fn options_reject_excessive_decimals() { + let options = super::Token2022FixturePreparationOptions { + rpc_url: "https://api.devnet.solana.com".to_string(), + wallet_path: std::path::PathBuf::from("missing.json"), + wallet_dir: std::path::PathBuf::from("wallets"), + decimals: 19, + }; + let error = super::validate_options(&options); + assert!(error.is_err()); + } +} diff --git a/kb-pipeline/src/solana_token_2022_execution_orchestration.rs b/kb-pipeline/src/solana_token_2022_execution_orchestration.rs index 34d80a3..a273ba8 100644 --- a/kb-pipeline/src/solana_token_2022_execution_orchestration.rs +++ b/kb-pipeline/src/solana_token_2022_execution_orchestration.rs @@ -1,5 +1,5 @@ // file: kb-pipeline/src/solana_token_2022_execution_orchestration.rs -// version: 2 +// version: 3 //! Final Token-2022 execution-readiness and stateful postcondition contracts. @@ -238,7 +238,7 @@ mod tests { executor_name: "kb-lib.executor.spl.token_2022".to_string(), executor_version: "0.4.6".to_string(), intent_id: "intent".to_string(), - operation_code: "spl_token_2022.confidential_transfer".to_string(), + operation_code: "spl.token_2022.confidential_transfer".to_string(), fee_payer: signer.clone(), instructions: vec![], required_signers: vec![kb_lib::ExApiRequiredSigner { @@ -268,7 +268,7 @@ mod tests { proof_contexts: vec![], }, proof_orchestration: crate::Token2022ProofOrchestrationReport { - operation_code: "spl_token_2022.confidential_transfer".to_string(), + operation_code: "spl.token_2022.confidential_transfer".to_string(), instructions_sysvar_required: true, inline_offsets: vec![1], context_requirements: vec![], diff --git a/kb-pipeline/src/solana_token_2022_proof_orchestration.rs b/kb-pipeline/src/solana_token_2022_proof_orchestration.rs index f4a01ee..eee4be7 100644 --- a/kb-pipeline/src/solana_token_2022_proof_orchestration.rs +++ b/kb-pipeline/src/solana_token_2022_proof_orchestration.rs @@ -1,5 +1,5 @@ // file: kb-pipeline/src/solana_token_2022_proof_orchestration.rs -// version: 3 +// version: 4 //! Deterministic orchestration contract for mixed Token-2022 proof locations. @@ -266,7 +266,7 @@ mod tests { fn mixed_proofs_require_sysvar_and_preserve_ordered_contexts() { let context = pubkey(1); let request = crate::Token2022ProofOrchestrationRequest { - operation_code: "spl_token_2022.confidential_transfer".to_string(), + operation_code: "spl.token_2022.confidential_transfer".to_string(), proofs: vec![ kb_lib::ExSplTokenConfidentialProofReference { kind: kb_lib::ExSplTokenConfidentialProofKind::CiphertextCommitmentEquality, @@ -308,7 +308,7 @@ mod tests { fn context_only_proofs_do_not_require_instructions_sysvar() { let context = pubkey(2); let request = crate::Token2022ProofOrchestrationRequest { - operation_code: "spl_token_2022.empty_confidential_account".to_string(), + operation_code: "spl.token_2022.empty_confidential_account".to_string(), proofs: vec![kb_lib::ExSplTokenConfidentialProofReference { kind: kb_lib::ExSplTokenConfidentialProofKind::ZeroCiphertext, location: kb_lib::ExSplTokenConfidentialProofLocation::ContextStateAccount { diff --git a/kb-pipeline/src/solana_token_2022_stateful.rs b/kb-pipeline/src/solana_token_2022_stateful.rs index 5e7adc4..db0de59 100644 --- a/kb-pipeline/src/solana_token_2022_stateful.rs +++ b/kb-pipeline/src/solana_token_2022_stateful.rs @@ -1,5 +1,5 @@ // file: kb-pipeline/src/solana_token_2022_stateful.rs -// version: 6 +// version: 7 //! Contextual Token-2022 account-state validation and materialization routing. @@ -587,7 +587,7 @@ mod tests { .as_ref() .map(|bundle| return bundle.outputs[1].payload_json["provenance"]["processorName"] .clone()), - std::result::Result::Ok(serde_json::json!("fees")) + std::result::Result::Ok(serde_json::json!("materializer.fees")) ); let account_address = account_key(16); let account = kb_lib::DcToken2022State { diff --git a/kb-program-ids/src/constants.rs b/kb-program-ids/src/constants.rs index 13f010d..4d5f021 100644 --- a/kb-program-ids/src/constants.rs +++ b/kb-program-ids/src/constants.rs @@ -3,13 +3,15 @@ //! Canonical Solana program and well-known account identifiers. +/// Reserved `adapter_spl_token_wrap` program identifier. +pub const ADAPTER_SPL_TOKEN_WRAP_PROGRAM_ID: &str = "TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR"; /// Reserved `adapter_saber_decimal_wrapper` program identifier. pub const ADAPTER_SABER_DECIMAL_WRAPPER_PROGRAM_ID: &str = "DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB"; -/// Reserved `admin_jupiter_lock` program identifier. -pub const ADMIN_JUPITER_LOCK_PROGRAM_ID: &str = "LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn"; -/// Reserved `admin_pump_fees` program identifier. -pub const ADMIN_PUMP_FEES_PROGRAM_ID: &str = "pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"; +/// Reserved `vesting_jupiter_lock` program identifier. +pub const VESTING_JUPITER_LOCK_PROGRAM_ID: &str = "LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn"; +/// Reserved `fees_pump_fees` program identifier. +pub const FEES_PUMP_FEES_PROGRAM_ID: &str = "pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"; /// Reserved `amm_aldrin_v1` program identifier. pub const AMM_ALDRIN_V1_PROGRAM_ID: &str = "AMM55ShdkoGRB5jVYPjWziwk8m5MpwyDgsMWHaMSQWH6"; /// Reserved `amm_aldrin_v2` program identifier. @@ -32,9 +34,6 @@ pub const AMM_GOOSEFX_V2_PROGRAM_ID: &str = "GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzA pub const AMM_GUAC_SWAP_PROGRAM_ID: &str = "Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1"; /// Reserved `amm_lifinity_swap_v2` program identifier. pub const AMM_LIFINITY_SWAP_V2_PROGRAM_ID: &str = "2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c"; -/// Reserved `amm_metadao_futarchy_amm` program identifier. -pub const AMM_METADAO_FUTARCHY_AMM_PROGRAM_ID: &str = - "FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq"; /// Reserved `amm_metadao_v0_5` program identifier. pub const AMM_METADAO_V0_5_PROGRAM_ID: &str = "AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ"; /// Reserved `amm_meteora_damm_v1` program identifier. @@ -55,8 +54,8 @@ pub const AMM_SOLFI_PROGRAM_ID: &str = "SoLFiHG9TfgtdUXUjWAxi3LtvYuFyDLVhBWxdMZx pub const AMM_SOLFI_V2_PROGRAM_ID: &str = "SV2EYYJyRz2YhfXwXnhNAevDEui5Q6yrfyo13WtupPF"; /// Reserved `amm_vertigo` program identifier. pub const AMM_VERTIGO_PROGRAM_ID: &str = "vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ"; -/// Reserved `amm_virtuals` program identifier. -pub const AMM_VIRTUALS_PROGRAM_ID: &str = "5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki"; +/// Reserved `launchpad_virtuals` program identifier. +pub const LAUNCHPAD_VIRTUALS_PROGRAM_ID: &str = "5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki"; /// Reserved `amm_woofi` program identifier. pub const AMM_WOOFI_PROGRAM_ID: &str = "WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb"; /// Reserved `amm_zero_fi` program identifier. @@ -98,6 +97,12 @@ pub const FEES_BAGS_FEE_SHARE_V2_PROGRAM_ID: &str = "FEE2tBhCKAt7shrod19QttSVREU /// Reserved `governance_metadao_bid_wall` program identifier. pub const GOVERNANCE_METADAO_BID_WALL_PROGRAM_ID: &str = "WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx"; +/// Reserved `governance_metadao_futarchy` program identifier. +pub const GOVERNANCE_METADAO_FUTARCHY_PROGRAM_ID: &str = + "FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq"; +/// Reserved `governance_squads_multisig` program identifier. +pub const GOVERNANCE_SQUADS_MULTISIG_PROGRAM_ID: &str = + "SQDS4ep65T869zMMBKyuUq6aD6EgTu8psMjkvj52pCf"; /// Reserved `launchpad_boop_fun` program identifier. pub const LAUNCHPAD_BOOP_FUN_PROGRAM_ID: &str = "boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4"; /// Reserved `launchpad_metadao_ico` program identifier. @@ -137,8 +142,16 @@ pub const LENDING_KAMINO_PROGRAM_ID: &str = "KLend2g3cP87fffoy8q1mQqGKjrxjC8boSy pub const LENDING_MARGINFI_V2_PROGRAM_ID: &str = "MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA"; /// Reserved `lock_raydium_lp` program identifier. pub const LOCK_RAYDIUM_LP_PROGRAM_ID: &str = "LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE"; +/// Metaplex Token Metadata program identifier. +pub const METADATA_METAPLEX_TOKEN_METADATA_PROGRAM_ID: &str = + "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"; +/// Reserved `metadata_solana_program_metadata` program identifier. +pub const METADATA_SOLANA_PROGRAM_METADATA_PROGRAM_ID: &str = + "ProgM6JCCvbYkfKqJYHePx4xxSUSqJp7rh8Lyv7nk7S"; /// Reserved `nft_metaplex_bubblegum` program identifier. pub const NFT_METAPLEX_BUBBLEGUM_PROGRAM_ID: &str = "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY"; +/// Reserved `nft_tensor_cnft` program identifier. +pub const NFT_TENSOR_CNFT_PROGRAM_ID: &str = "TCMPhJdwDryooaGtiocG1u3xcYbRpiJzb283XfCZsDp"; /// Reserved `orderbook_jupiter_limit_order` program identifier. pub const ORDERBOOK_JUPITER_LIMIT_ORDER_PROGRAM_ID: &str = "jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu"; @@ -151,6 +164,9 @@ pub const ORDERBOOK_OPENBOOK_V2_PROGRAM_ID: &str = "opnb2LAfJYbRMAHHvqjCwQxanZn7 pub const PERPETUALS_DRIFT_V2_PROGRAM_ID: &str = "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"; /// Reserved `perpetuals_jupiter` program identifier. pub const PERPETUALS_JUPITER_PROGRAM_ID: &str = "PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu"; +/// Reserved `perpetuals_phoenix_eternal` program identifier. +pub const PERPETUALS_PHOENIX_ETERNAL_PROGRAM_ID: &str = + "EtrnLzgbS7nMMy5fbD42kXiUzGg8XQzJ972Xtk1cjWih"; /// Reserved `perpetuals_zeta` program identifier. pub const PERPETUALS_ZETA_PROGRAM_ID: &str = "ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD"; /// Reserved `router_dflow_aggregator_v4` program identifier. @@ -162,8 +178,6 @@ pub const ROUTER_JUPITER_AGGREGATOR_V4_PROGRAM_ID: &str = /// Reserved `router_jupiter_aggregator_v6` program identifier. pub const ROUTER_JUPITER_AGGREGATOR_V6_PROGRAM_ID: &str = "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"; -/// Reserved `router_jupiter_dca` program identifier. -pub const ROUTER_JUPITER_DCA_PROGRAM_ID: &str = "DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M"; /// Reserved `router_okx_labs_v1` program identifier. pub const ROUTER_OKX_LABS_V1_PROGRAM_ID: &str = "6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma"; /// Reserved `router_okx_labs_v2` program identifier. @@ -175,12 +189,25 @@ pub const SPL_ACCOUNT_COMPRESSION_PROGRAM_ID: &str = "cmtDvXumGCrqC1Age74AVPhSRV /// Reserved `metadata_spl_name_service` program identifier. pub const METADATA_SPL_NAME_SERVICE_PROGRAM_ID: &str = "namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX"; +/// Historical SPL Memo v1 program identifier. +pub const SPL_MEMO_V1_PROGRAM_ID: &str = "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo"; +/// Historical SPL Memo v3 program identifier. +pub const SPL_MEMO_V3_PROGRAM_ID: &str = "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"; +/// Current SPL Memo v4 program identifier. +pub const SPL_MEMO_V4_PROGRAM_ID: &str = "Memo4c2pN8afCj432Lb7RMVKi9PbQnnW7ewFFaV3oAH"; /// Reserved `spl_noop` program identifier. pub const SPL_NOOP_PROGRAM_ID: &str = "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV"; /// Reserved `spl_single_pool` program identifier. pub const SPL_SINGLE_POOL_PROGRAM_ID: &str = "SVSPxpvHdN29nkVg9rPapPNDddN5DipNLRUFhyjFThE"; /// Reserved `spl_stake_pool` program identifier. pub const SPL_STAKE_POOL_PROGRAM_ID: &str = "SPoo1Ku8WFXoNDMHPsrGSTSG1Y47rzgn41SLUNakuHy"; +/// Classic SPL Token program identifier. +pub const SPL_TOKEN_PROGRAM_ID: &str = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; +/// SPL Token-2022 program identifier. +pub const SPL_TOKEN_2022_PROGRAM_ID: &str = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"; +/// SPL Token-2022 ElGamal public-key registry program identifier. +pub const SPL_TOKEN_2022_ELGAMAL_REGISTRY_PROGRAM_ID: &str = + "regVYJW7tcT8zipN5YiBvHsvR5jXW1uLFxaHSbugABg"; /// Reserved `stable_swap_hylo_exchange` program identifier. pub const STABLE_SWAP_HYLO_EXCHANGE_PROGRAM_ID: &str = "HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn"; @@ -191,12 +218,19 @@ pub const STABLE_SWAP_JUPITER_STABLE_PROGRAM_ID: &str = pub const STABLE_SWAP_NUMERAIRE_PROGRAM_ID: &str = "NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P"; /// Reserved `stable_swap_stabble` program identifier. pub const STABLE_SWAP_STABBLE_PROGRAM_ID: &str = "swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ"; +/// Reserved `staking_jito_tip_distribution` program identifier. +pub const STAKING_JITO_TIP_DISTRIBUTION_PROGRAM_ID: &str = + "4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7"; /// Reserved `staking_kamino_farm` program identifier. pub const STAKING_KAMINO_FARM_PROGRAM_ID: &str = "FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr"; /// Reserved `staking_marinade_finance` program identifier. pub const STAKING_MARINADE_FINANCE_PROGRAM_ID: &str = "MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD"; /// Reserved `staking_solayer` program identifier. pub const STAKING_SOLAYER_PROGRAM_ID: &str = "sSo1iU21jBrU9VaJ8PJib1MtorefUV4fzC9GURa2KNn"; +/// Reserved `storage_solana_record` program identifier. +pub const STORAGE_SOLANA_RECORD_PROGRAM_ID: &str = "recr1L3PCGKLbckBqMNcJhuuyU1zgo8nBhfLVsJNwr5"; +/// Reserved `strategy_jupiter_dca` program identifier. +pub const STRATEGY_JUPITER_DCA_PROGRAM_ID: &str = "DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M"; /// Reserved `treasury_helium_treasury_management` program identifier. pub const TREASURY_HELIUM_TREASURY_MANAGEMENT_PROGRAM_ID: &str = "treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5"; @@ -244,28 +278,12 @@ pub const INCINERATOR_PROGRAM_ID: &str = "1nc1nerator111111111111111111111111111 pub const LOADER_V4_PROGRAM_ID: &str = "LoaderV411111111111111111111111111111111111"; /// Native Loader program identifier. pub const NATIVE_LOADER_PROGRAM_ID: &str = "NativeLoader1111111111111111111111111111111"; -/// Metaplex Token Metadata program identifier. -pub const METADATA_METAPLEX_TOKEN_METADATA_PROGRAM_ID: &str = - "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"; /// Secp256k1 precompile program identifier. pub const SECP256K1_PROGRAM_ID: &str = "KeccakSecp256k11111111111111111111111111111"; /// Secp256r1 precompile program identifier. pub const SECP256R1_PROGRAM_ID: &str = "Secp256r1SigVerify1111111111111111111111111"; /// Enshrined stateless Slashing program identifier. pub const SLASHING_PROGRAM_ID: &str = "S1ashing11111111111111111111111111111111111"; -/// Historical SPL Memo v1 program identifier. -pub const SPL_MEMO_V1_PROGRAM_ID: &str = "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo"; -/// Historical SPL Memo v3 program identifier. -pub const SPL_MEMO_V3_PROGRAM_ID: &str = "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"; -/// Current SPL Memo v4 program identifier. -pub const SPL_MEMO_V4_PROGRAM_ID: &str = "Memo4c2pN8afCj432Lb7RMVKi9PbQnnW7ewFFaV3oAH"; -/// Classic SPL Token program identifier. -pub const SPL_TOKEN_PROGRAM_ID: &str = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"; -/// SPL Token-2022 program identifier. -pub const SPL_TOKEN_2022_PROGRAM_ID: &str = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"; -/// SPL Token-2022 ElGamal public-key registry program identifier. -pub const SPL_TOKEN_2022_ELGAMAL_REGISTRY_PROGRAM_ID: &str = - "regVYJW7tcT8zipN5YiBvHsvR5jXW1uLFxaHSbugABg"; /// Historical Stake configuration account identifier. pub const STAKE_CONFIG_ACCOUNT_ID: &str = "StakeConfig11111111111111111111111111111111"; /// Compatibility alias for the historical Stake configuration account identifier. @@ -382,18 +400,14 @@ pub(crate) const PROGRAM_ID_ENTRIES: &[crate::ProgramIdEntry] = &[ name: "adapter_saber_decimal_wrapper", address: crate::ADAPTER_SABER_DECIMAL_WRAPPER_PROGRAM_ID, }, + crate::ProgramIdEntry { + name: "adapter_spl_token_wrap", + address: crate::ADAPTER_SPL_TOKEN_WRAP_PROGRAM_ID, + }, crate::ProgramIdEntry { name: "address_lookup_table", address: crate::ADDRESS_LOOKUP_TABLE_PROGRAM_ID, }, - crate::ProgramIdEntry { - name: "admin_jupiter_lock", - address: crate::ADMIN_JUPITER_LOCK_PROGRAM_ID, - }, - crate::ProgramIdEntry { - name: "admin_pump_fees", - address: crate::ADMIN_PUMP_FEES_PROGRAM_ID, - }, crate::ProgramIdEntry { name: "amm_aldrin_v1", address: crate::AMM_ALDRIN_V1_PROGRAM_ID, @@ -438,10 +452,6 @@ pub(crate) const PROGRAM_ID_ENTRIES: &[crate::ProgramIdEntry] = &[ name: "amm_lifinity_swap_v2", address: crate::AMM_LIFINITY_SWAP_V2_PROGRAM_ID, }, - crate::ProgramIdEntry { - name: "amm_metadao_futarchy_amm", - address: crate::AMM_METADAO_FUTARCHY_AMM_PROGRAM_ID, - }, crate::ProgramIdEntry { name: "amm_metadao_v0_5", address: crate::AMM_METADAO_V0_5_PROGRAM_ID, @@ -482,10 +492,6 @@ pub(crate) const PROGRAM_ID_ENTRIES: &[crate::ProgramIdEntry] = &[ name: "amm_vertigo", address: crate::AMM_VERTIGO_PROGRAM_ID, }, - crate::ProgramIdEntry { - name: "amm_virtuals", - address: crate::AMM_VIRTUALS_PROGRAM_ID, - }, crate::ProgramIdEntry { name: "amm_woofi", address: crate::AMM_WOOFI_PROGRAM_ID, @@ -586,10 +592,22 @@ pub(crate) const PROGRAM_ID_ENTRIES: &[crate::ProgramIdEntry] = &[ name: "fees_bags_fee_share_v2", address: crate::FEES_BAGS_FEE_SHARE_V2_PROGRAM_ID, }, + crate::ProgramIdEntry { + name: "fees_pump_fees", + address: crate::FEES_PUMP_FEES_PROGRAM_ID, + }, crate::ProgramIdEntry { name: "governance_metadao_bid_wall", address: crate::GOVERNANCE_METADAO_BID_WALL_PROGRAM_ID, }, + crate::ProgramIdEntry { + name: "governance_metadao_futarchy", + address: crate::GOVERNANCE_METADAO_FUTARCHY_PROGRAM_ID, + }, + crate::ProgramIdEntry { + name: "governance_squads_multisig", + address: crate::GOVERNANCE_SQUADS_MULTISIG_PROGRAM_ID, + }, crate::ProgramIdEntry { name: "incinerator", address: crate::INCINERATOR_PROGRAM_ID, @@ -630,6 +648,10 @@ pub(crate) const PROGRAM_ID_ENTRIES: &[crate::ProgramIdEntry] = &[ name: "launchpad_raydium_launchlab", address: crate::LAUNCHPAD_RAYDIUM_LAUNCHLAB_PROGRAM_ID, }, + crate::ProgramIdEntry { + name: "launchpad_virtuals", + address: crate::LAUNCHPAD_VIRTUALS_PROGRAM_ID, + }, crate::ProgramIdEntry { name: "lending_clone", address: crate::LENDING_CLONE_PROGRAM_ID, @@ -670,6 +692,10 @@ pub(crate) const PROGRAM_ID_ENTRIES: &[crate::ProgramIdEntry] = &[ name: "metadata_metaplex_token_metadata", address: crate::METADATA_METAPLEX_TOKEN_METADATA_PROGRAM_ID, }, + crate::ProgramIdEntry { + name: "metadata_solana_program_metadata", + address: crate::METADATA_SOLANA_PROGRAM_METADATA_PROGRAM_ID, + }, crate::ProgramIdEntry { name: "metadata_spl_name_service", address: crate::METADATA_SPL_NAME_SERVICE_PROGRAM_ID, @@ -682,6 +708,10 @@ pub(crate) const PROGRAM_ID_ENTRIES: &[crate::ProgramIdEntry] = &[ name: "nft_metaplex_bubblegum", address: crate::NFT_METAPLEX_BUBBLEGUM_PROGRAM_ID, }, + crate::ProgramIdEntry { + name: "nft_tensor_cnft", + address: crate::NFT_TENSOR_CNFT_PROGRAM_ID, + }, crate::ProgramIdEntry { name: "orderbook_jupiter_limit_order", address: crate::ORDERBOOK_JUPITER_LIMIT_ORDER_PROGRAM_ID, @@ -702,6 +732,10 @@ pub(crate) const PROGRAM_ID_ENTRIES: &[crate::ProgramIdEntry] = &[ name: "perpetuals_jupiter", address: crate::PERPETUALS_JUPITER_PROGRAM_ID, }, + crate::ProgramIdEntry { + name: "perpetuals_phoenix_eternal", + address: crate::PERPETUALS_PHOENIX_ETERNAL_PROGRAM_ID, + }, crate::ProgramIdEntry { name: "perpetuals_zeta", address: crate::PERPETUALS_ZETA_PROGRAM_ID, @@ -718,10 +752,6 @@ pub(crate) const PROGRAM_ID_ENTRIES: &[crate::ProgramIdEntry] = &[ name: "router_jupiter_aggregator_v6", address: crate::ROUTER_JUPITER_AGGREGATOR_V6_PROGRAM_ID, }, - crate::ProgramIdEntry { - name: "router_jupiter_dca", - address: crate::ROUTER_JUPITER_DCA_PROGRAM_ID, - }, crate::ProgramIdEntry { name: "router_okx_labs_v1", address: crate::ROUTER_OKX_LABS_V1_PROGRAM_ID, @@ -810,6 +840,10 @@ pub(crate) const PROGRAM_ID_ENTRIES: &[crate::ProgramIdEntry] = &[ name: "stake_config", address: crate::STAKE_CONFIG_ACCOUNT_ID, }, + crate::ProgramIdEntry { + name: "staking_jito_tip_distribution", + address: crate::STAKING_JITO_TIP_DISTRIBUTION_PROGRAM_ID, + }, crate::ProgramIdEntry { name: "staking_kamino_farm", address: crate::STAKING_KAMINO_FARM_PROGRAM_ID, @@ -822,6 +856,14 @@ pub(crate) const PROGRAM_ID_ENTRIES: &[crate::ProgramIdEntry] = &[ name: "staking_solayer", address: crate::STAKING_SOLAYER_PROGRAM_ID, }, + crate::ProgramIdEntry { + name: "storage_solana_record", + address: crate::STORAGE_SOLANA_RECORD_PROGRAM_ID, + }, + crate::ProgramIdEntry { + name: "strategy_jupiter_dca", + address: crate::STRATEGY_JUPITER_DCA_PROGRAM_ID, + }, crate::ProgramIdEntry { name: "system", address: crate::SYSTEM_PROGRAM_ID, @@ -874,6 +916,10 @@ pub(crate) const PROGRAM_ID_ENTRIES: &[crate::ProgramIdEntry] = &[ name: "vault_meteora", address: crate::VAULT_METEORA_PROGRAM_ID, }, + crate::ProgramIdEntry { + name: "vesting_jupiter_lock", + address: crate::VESTING_JUPITER_LOCK_PROGRAM_ID, + }, crate::ProgramIdEntry { name: "vesting_streamflow", address: crate::VESTING_STREAMFLOW_PROGRAM_ID, diff --git a/kb-program-ids/src/lib.rs b/kb-program-ids/src/lib.rs index b5a3d6f..0d32935 100644 --- a/kb-program-ids/src/lib.rs +++ b/kb-program-ids/src/lib.rs @@ -12,12 +12,10 @@ mod programs; /// Reserved `adapter_saber_decimal_wrapper` program identifier. pub use self::constants::ADAPTER_SABER_DECIMAL_WRAPPER_PROGRAM_ID; +/// Reserved `adapter_spl_token_wrap` program identifier. +pub use self::constants::ADAPTER_SPL_TOKEN_WRAP_PROGRAM_ID; /// Address Lookup Table program identifier. pub use self::constants::ADDRESS_LOOKUP_TABLE_PROGRAM_ID; -/// Reserved `admin_jupiter_lock` program identifier. -pub use self::constants::ADMIN_JUPITER_LOCK_PROGRAM_ID; -/// Reserved `admin_pump_fees` program identifier. -pub use self::constants::ADMIN_PUMP_FEES_PROGRAM_ID; /// Reserved `amm_aldrin_v1` program identifier. pub use self::constants::AMM_ALDRIN_V1_PROGRAM_ID; /// Reserved `amm_aldrin_v2` program identifier. @@ -40,8 +38,6 @@ pub use self::constants::AMM_GOOSEFX_V2_PROGRAM_ID; pub use self::constants::AMM_GUAC_SWAP_PROGRAM_ID; /// Reserved `amm_lifinity_swap_v2` program identifier. pub use self::constants::AMM_LIFINITY_SWAP_V2_PROGRAM_ID; -/// Reserved `amm_metadao_futarchy_amm` program identifier. -pub use self::constants::AMM_METADAO_FUTARCHY_AMM_PROGRAM_ID; /// Reserved `amm_metadao_v0_5` program identifier. pub use self::constants::AMM_METADAO_V0_5_PROGRAM_ID; /// Reserved `amm_meteora_damm_v1` program identifier. @@ -62,8 +58,6 @@ pub use self::constants::AMM_SOLFI_PROGRAM_ID; pub use self::constants::AMM_SOLFI_V2_PROGRAM_ID; /// Reserved `amm_vertigo` program identifier. pub use self::constants::AMM_VERTIGO_PROGRAM_ID; -/// Reserved `amm_virtuals` program identifier. -pub use self::constants::AMM_VIRTUALS_PROGRAM_ID; /// Reserved `amm_woofi` program identifier. pub use self::constants::AMM_WOOFI_PROGRAM_ID; /// Reserved `amm_zero_fi` program identifier. @@ -114,8 +108,14 @@ pub use self::constants::FEATURE_PROGRAM_ID; pub use self::constants::FEES_BAGS_FEE_SHARE_V1_PROGRAM_ID; /// Reserved `fees_bags_fee_share_v2` program identifier. pub use self::constants::FEES_BAGS_FEE_SHARE_V2_PROGRAM_ID; +/// Reserved `fees_pump_fees` program identifier. +pub use self::constants::FEES_PUMP_FEES_PROGRAM_ID; /// Reserved `governance_metadao_bid_wall` program identifier. pub use self::constants::GOVERNANCE_METADAO_BID_WALL_PROGRAM_ID; +/// Reserved `governance_metadao_futarchy` program identifier. +pub use self::constants::GOVERNANCE_METADAO_FUTARCHY_PROGRAM_ID; +/// Reserved `governance_squads_multisig` program identifier. +pub use self::constants::GOVERNANCE_SQUADS_MULTISIG_PROGRAM_ID; /// Incinerator well-known account identifier. pub use self::constants::INCINERATOR_PROGRAM_ID; /// Reserved `launchpad_boop_fun` program identifier. @@ -136,6 +136,8 @@ pub use self::constants::LAUNCHPAD_PUMP_FUN_PROGRAM_ID; pub use self::constants::LAUNCHPAD_PUMP_PUMPUP_AI_PROGRAM_ID; /// Reserved `launchpad_raydium_launchlab` program identifier. pub use self::constants::LAUNCHPAD_RAYDIUM_LAUNCHLAB_PROGRAM_ID; +/// Reserved `launchpad_virtuals` program identifier. +pub use self::constants::LAUNCHPAD_VIRTUALS_PROGRAM_ID; /// Reserved `lending_clone` program identifier. pub use self::constants::LENDING_CLONE_PROGRAM_ID; /// Reserved `lending_jupiter_lend_borrow` program identifier. @@ -156,12 +158,16 @@ pub use self::constants::LOADER_V4_PROGRAM_ID; pub use self::constants::LOCK_RAYDIUM_LP_PROGRAM_ID; /// Metaplex Token Metadata program identifier. pub use self::constants::METADATA_METAPLEX_TOKEN_METADATA_PROGRAM_ID; +/// Reserved `metadata_solana_program_metadata` program identifier. +pub use self::constants::METADATA_SOLANA_PROGRAM_METADATA_PROGRAM_ID; /// Reserved `metadata_spl_name_service` program identifier. pub use self::constants::METADATA_SPL_NAME_SERVICE_PROGRAM_ID; /// Native Loader program identifier. pub use self::constants::NATIVE_LOADER_PROGRAM_ID; /// Reserved `nft_metaplex_bubblegum` program identifier. pub use self::constants::NFT_METAPLEX_BUBBLEGUM_PROGRAM_ID; +/// Reserved `nft_tensor_cnft` program identifier. +pub use self::constants::NFT_TENSOR_CNFT_PROGRAM_ID; /// Reserved `orderbook_jupiter_limit_order` program identifier. pub use self::constants::ORDERBOOK_JUPITER_LIMIT_ORDER_PROGRAM_ID; /// Reserved `orderbook_jupiter_limit_order_v2` program identifier. @@ -172,6 +178,8 @@ pub use self::constants::ORDERBOOK_OPENBOOK_V2_PROGRAM_ID; pub use self::constants::PERPETUALS_DRIFT_V2_PROGRAM_ID; /// Reserved `perpetuals_jupiter` program identifier. pub use self::constants::PERPETUALS_JUPITER_PROGRAM_ID; +/// Reserved `perpetuals_phoenix_eternal` program identifier. +pub use self::constants::PERPETUALS_PHOENIX_ETERNAL_PROGRAM_ID; /// Reserved `perpetuals_zeta` program identifier. pub use self::constants::PERPETUALS_ZETA_PROGRAM_ID; /// Reserved `router_dflow_aggregator_v4` program identifier. @@ -180,8 +188,6 @@ pub use self::constants::ROUTER_DFLOW_AGGREGATOR_V4_PROGRAM_ID; pub use self::constants::ROUTER_JUPITER_AGGREGATOR_V4_PROGRAM_ID; /// Reserved `router_jupiter_aggregator_v6` program identifier. pub use self::constants::ROUTER_JUPITER_AGGREGATOR_V6_PROGRAM_ID; -/// Reserved `router_jupiter_dca` program identifier. -pub use self::constants::ROUTER_JUPITER_DCA_PROGRAM_ID; /// Reserved `router_okx_labs_v1` program identifier. pub use self::constants::ROUTER_OKX_LABS_V1_PROGRAM_ID; /// Reserved `router_okx_labs_v2` program identifier. @@ -228,12 +234,18 @@ pub use self::constants::STAKE_CONFIG_ACCOUNT_ID; pub use self::constants::STAKE_CONFIG_PROGRAM_ID; /// Stake program identifier. pub use self::constants::STAKE_PROGRAM_ID; +/// Reserved `staking_jito_tip_distribution` program identifier. +pub use self::constants::STAKING_JITO_TIP_DISTRIBUTION_PROGRAM_ID; /// Reserved `staking_kamino_farm` program identifier. pub use self::constants::STAKING_KAMINO_FARM_PROGRAM_ID; /// Reserved `staking_marinade_finance` program identifier. pub use self::constants::STAKING_MARINADE_FINANCE_PROGRAM_ID; /// Reserved `staking_solayer` program identifier. pub use self::constants::STAKING_SOLAYER_PROGRAM_ID; +/// Reserved `storage_solana_record` program identifier. +pub use self::constants::STORAGE_SOLANA_RECORD_PROGRAM_ID; +/// Reserved `strategy_jupiter_dca` program identifier. +pub use self::constants::STRATEGY_JUPITER_DCA_PROGRAM_ID; /// System program identifier. pub use self::constants::SYSTEM_PROGRAM_ID; /// Clock sysvar account identifier. @@ -260,6 +272,8 @@ pub use self::constants::VAULT_KAMINO_V2_PROGRAM_ID; pub use self::constants::VAULT_KAMINO_YVAULTS_PROGRAM_ID; /// Reserved `vault_meteora` program identifier. pub use self::constants::VAULT_METEORA_PROGRAM_ID; +/// Reserved `vesting_jupiter_lock` program identifier. +pub use self::constants::VESTING_JUPITER_LOCK_PROGRAM_ID; /// Reserved `vesting_streamflow` program identifier. pub use self::constants::VESTING_STREAMFLOW_PROGRAM_ID; /// Vote program identifier. diff --git a/kb-program-ids/src/programs.rs b/kb-program-ids/src/programs.rs index b898dda..976f2f8 100644 --- a/kb-program-ids/src/programs.rs +++ b/kb-program-ids/src/programs.rs @@ -68,7 +68,7 @@ mod tests { for window in crate::registered_program_ids().windows(2) { assert!(window[0].code() < window[1].code()); } - assert_eq!(crate::registered_program_ids().len(), 130); + assert_eq!(crate::registered_program_ids().len(), 137); } #[test] diff --git a/kb-store/migrations/0001_canonical_transaction_store.sql b/kb-store/migrations/0001_canonical_transaction_store.sql index dbf49a4..5d1b566 100644 --- a/kb-store/migrations/0001_canonical_transaction_store.sql +++ b/kb-store/migrations/0001_canonical_transaction_store.sql @@ -1,30 +1,94 @@ -WITH failed_transfer AS ( - SELECT - core.signature, - core.slot, - core.instruction_path, - core.accounts_json - FROM kb_sol_ops_processing_ledger AS ledger - JOIN kb_sol_core_instructions AS core - ON ledger.input_key = core.signature || ':' || core.instruction_path - WHERE ledger.stage = 'instruction_decode' - AND ledger.status = 'failed' - AND ledger.processor_name = 'metadata_metaplex_token_metadata' - AND ledger.error_message LIKE 'transfer%' -) -SELECT - failed.signature, - failed.slot, - failed.instruction_path, - account.ordinality - 1 AS position, - account.value ->> 'accountKey' AS account_key, - (account.value ->> 'accountIndex')::INTEGER AS account_index, - keys.signer, - keys.writable -FROM failed_transfer AS failed -CROSS JOIN LATERAL jsonb_array_elements(failed.accounts_json) - WITH ORDINALITY AS account(value, ordinality) -LEFT JOIN kb_sol_core_account_keys AS keys - ON keys.signature = failed.signature - AND keys.account_index = (account.value ->> 'accountIndex')::INTEGER -ORDER BY account.ordinality; \ No newline at end of file +-- file: kb-store/migrations/0001_canonical_transaction_store.sql +-- version: 1 + +-- Current canonical transaction and acquisition observation store. +-- This baseline contains only active tables and uses the current PostgreSQL schema. +-- Historical 0.2.x upgrade logic was validated before this baseline was consolidated. + +CREATE TABLE IF NOT EXISTS kb_sol_raw_transactions ( + id BIGSERIAL, + signature TEXT NOT NULL, + slot BIGINT NOT NULL, + canonical_json JSONB, + canonical_json_hash TEXT, + canonical_format_version INTEGER NOT NULL DEFAULT 1, + retention_state TEXT NOT NULL DEFAULT 'full', + processing_state TEXT NOT NULL DEFAULT 'received', + lifecycle_reason TEXT, + created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), + updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), + CONSTRAINT pk_kb_sol_raw_transactions PRIMARY KEY (id), + CONSTRAINT ck_kb_sol_raw_transactions_signature_not_empty CHECK (length(btrim(signature)) > 0), + CONSTRAINT ck_kb_sol_raw_transactions_slot_non_negative CHECK (slot >= 0), + CONSTRAINT ck_kb_sol_raw_transactions_format_version_positive CHECK (canonical_format_version > 0), + CONSTRAINT ck_kb_sol_raw_transactions_retention_state CHECK (retention_state IN ('full', 'compacted', 'archived', 'purged')), + CONSTRAINT ck_kb_sol_raw_transactions_processing_state CHECK (processing_state IN ('received', 'core_extracted', 'decoded', 'materialized', 'failed')), + CONSTRAINT ck_kb_sol_raw_transactions_full_has_json CHECK (retention_state <> 'full' OR canonical_json IS NOT NULL) + ); + +CREATE UNIQUE INDEX IF NOT EXISTS ux_kb_sol_raw_transactions_signature ON kb_sol_raw_transactions (signature); + +CREATE INDEX IF NOT EXISTS ix_kb_sol_raw_transactions_slot ON kb_sol_raw_transactions (slot); + +CREATE INDEX IF NOT EXISTS ix_kb_sol_raw_transactions_created_at ON kb_sol_raw_transactions (created_at); + +CREATE INDEX IF NOT EXISTS ix_kb_sol_raw_transactions_processing ON kb_sol_raw_transactions (processing_state); + +CREATE INDEX IF NOT EXISTS ix_kb_sol_raw_transactions_canonical_hash ON kb_sol_raw_transactions (canonical_json_hash) WHERE canonical_json_hash IS NOT NULL; + +CREATE TABLE IF NOT EXISTS kb_sol_obs_transaction_observations ( + id BIGSERIAL, + raw_transaction_id BIGINT, + observation_key TEXT NOT NULL, + signature TEXT, + slot BIGINT, + provider TEXT NOT NULL, + endpoint_code TEXT, + protocol TEXT NOT NULL, + acquisition_method TEXT NOT NULL, + origin TEXT NOT NULL, + commitment TEXT, + capture_session_id TEXT, + filter_code TEXT, + detected_at TIMESTAMPTZ, + received_at TIMESTAMPTZ NOT NULL, + normalized_at TIMESTAMPTZ, + persisted_at TIMESTAMPTZ NOT NULL DEFAULT NOW(), + payload_size_bytes BIGINT, + source_payload_hash TEXT, + status TEXT NOT NULL DEFAULT 'received', + error_code TEXT, + error_message TEXT, + CONSTRAINT pk_kb_sol_obs_transaction_observations PRIMARY KEY (id), + CONSTRAINT fk_kb_sol_obs_transaction_observations_raw_transaction FOREIGN KEY (raw_transaction_id) REFERENCES kb_sol_raw_transactions(id) ON DELETE SET NULL, + CONSTRAINT ck_kb_sol_obs_transaction_observations_key_not_empty CHECK (length(btrim(observation_key)) > 0), + CONSTRAINT ck_kb_sol_obs_transaction_observations_signature_not_empty CHECK (signature IS NULL OR length(btrim(signature)) > 0), + CONSTRAINT ck_kb_sol_obs_transaction_observations_slot_non_negative CHECK (slot IS NULL OR slot >= 0), + CONSTRAINT ck_kb_sol_obs_transaction_observations_provider_not_empty CHECK (length(btrim(provider)) > 0), + CONSTRAINT ck_kb_sol_obs_transaction_observations_endpoint_not_empty CHECK (endpoint_code IS NULL OR length(btrim(endpoint_code)) > 0), + CONSTRAINT ck_kb_sol_obs_transaction_observations_protocol_not_empty CHECK (length(btrim(protocol)) > 0), + CONSTRAINT ck_kb_sol_obs_transaction_observations_method_not_empty CHECK (length(btrim(acquisition_method)) > 0), + CONSTRAINT ck_kb_sol_obs_transaction_observations_origin CHECK (origin IN ('live', 'backfill', 'replay', 'repair', 'migration')), + CONSTRAINT ck_kb_sol_obs_transaction_observations_commitment_not_empty CHECK (commitment IS NULL OR length(btrim(commitment)) > 0), + CONSTRAINT ck_kb_sol_obs_transaction_observations_session_not_empty CHECK (capture_session_id IS NULL OR length(btrim(capture_session_id)) > 0), + CONSTRAINT ck_kb_sol_obs_transaction_observations_filter_not_empty CHECK (filter_code IS NULL OR length(btrim(filter_code)) > 0), + CONSTRAINT ck_kb_sol_obs_transaction_observations_payload_size_non_negative CHECK (payload_size_bytes IS NULL OR payload_size_bytes >= 0), + CONSTRAINT ck_kb_sol_obs_transaction_observations_hash_not_empty CHECK (source_payload_hash IS NULL OR length(btrim(source_payload_hash)) > 0), + CONSTRAINT ck_kb_sol_obs_transaction_observations_status CHECK (status IN ('detected', 'received', 'normalized', 'persisted', 'failed', 'missing')), + CONSTRAINT ck_kb_sol_obs_transaction_observations_error_code_not_empty CHECK (error_code IS NULL OR length(btrim(error_code)) > 0), + CONSTRAINT ck_kb_sol_obs_transaction_observations_error_message_not_empty CHECK (error_message IS NULL OR length(btrim(error_message)) > 0) + ); + +CREATE UNIQUE INDEX IF NOT EXISTS ux_kb_sol_obs_transaction_observations_key ON kb_sol_obs_transaction_observations (observation_key); + +CREATE INDEX IF NOT EXISTS ix_kb_sol_obs_transaction_observations_signature ON kb_sol_obs_transaction_observations (signature) WHERE signature IS NOT NULL; + +CREATE INDEX IF NOT EXISTS ix_kb_sol_obs_transaction_observations_slot ON kb_sol_obs_transaction_observations (slot) WHERE slot IS NOT NULL; + +CREATE INDEX IF NOT EXISTS ix_kb_sol_obs_transaction_observations_provider_method ON kb_sol_obs_transaction_observations (provider, acquisition_method); + +CREATE INDEX IF NOT EXISTS ix_kb_sol_obs_transaction_observations_received_at ON kb_sol_obs_transaction_observations (received_at); + +CREATE INDEX IF NOT EXISTS ix_kb_sol_obs_transaction_observations_raw_transaction ON kb_sol_obs_transaction_observations (raw_transaction_id) WHERE raw_transaction_id IS NOT NULL; + +CREATE INDEX IF NOT EXISTS ix_kb_sol_obs_transaction_observations_status ON kb_sol_obs_transaction_observations (status); diff --git a/kb-store/src/contracts/dto/decode.rs b/kb-store/src/contracts/dto/decode.rs index d90b509..f06ad0a 100644 --- a/kb-store/src/contracts/dto/decode.rs +++ b/kb-store/src/contracts/dto/decode.rs @@ -1,5 +1,5 @@ // file: kb-store/src/contracts/dto/decode.rs -// version: 2 +// version: 4 //! Backend-neutral decode, coverage and materialization persistence DTOs. @@ -632,7 +632,7 @@ mod tests { #[test] fn materialized_event_filter_is_bounded_and_trims_optional_text() { let result = crate::MaterializedEventFilter::new( - std::option::Option::Some(" transaction_annotations ".to_string()), + std::option::Option::Some(" materializer.transaction.annotations ".to_string()), std::option::Option::Some(" transaction_annotation ".to_string()), std::option::Option::Some(" signature ".to_string()), crate::MAX_MATERIALIZED_EVENT_QUERY_ROWS, @@ -643,7 +643,7 @@ mod tests { }; assert_eq!( filter.processor_name.as_deref(), - std::option::Option::Some("transaction_annotations") + std::option::Option::Some("materializer.transaction.annotations") ); assert_eq!(filter.signature_contains.as_deref(), std::option::Option::Some("signature")); assert!( diff --git a/kb-store/src/postgres/query/decode_pipeline_queries.rs b/kb-store/src/postgres/query/decode_pipeline_queries.rs index 469cea9..040f15e 100644 --- a/kb-store/src/postgres/query/decode_pipeline_queries.rs +++ b/kb-store/src/postgres/query/decode_pipeline_queries.rs @@ -1,5 +1,5 @@ // file: kb-store/src/postgres/query/decode_pipeline_queries.rs -// version: 2 +// version: 4 //! PostgreSQL queries for contextual decode, coverage and materialization persistence. @@ -1055,7 +1055,7 @@ mod tests { processor_name: processor_name.clone(), processor_version: "1".to_string(), program_id: "11111111111111111111111111111111".to_string(), - surface_code: std::option::Option::Some("solana_native_system".to_string()), + surface_code: std::option::Option::Some("solana.core.system".to_string()), entry_kind: "instruction".to_string(), entry_code: "test".to_string(), discriminator_hex: std::option::Option::None, @@ -1120,7 +1120,7 @@ mod tests { slot: 1, instruction_path: "0".to_string(), program_id: "11111111111111111111111111111111".to_string(), - surface_code: std::option::Option::Some("solana_native_system".to_string()), + surface_code: std::option::Option::Some("solana.core.system".to_string()), entry_code: std::option::Option::Some("unknown".to_string()), discriminator_hex: std::option::Option::None, status: "unsupported".to_string(), @@ -1175,7 +1175,7 @@ mod tests { }; let input_key = unique_processor_name("annotation_query_test"); let insert_result = sqlx::query( - "INSERT INTO kb_sol_mat_events (processor_name, processor_version, input_key, input_hash, output_key, source_event_key, source_decoder_name, source_decoder_version, source_decode_input_key, signature, slot, materialized_family, payload_jsonb) VALUES ('transaction_annotations', '0.4.3', $1, 'hash', 'annotation', 'memo:0', 'spl_memo', '0.4.3', 'decode-input', $2, 42, 'transaction_annotation', $3)", + "INSERT INTO kb_sol_mat_events (processor_name, processor_version, input_key, input_hash, output_key, source_event_key, source_decoder_name, source_decoder_version, source_decode_input_key, signature, slot, materialized_family, payload_jsonb) VALUES ('materializer.transaction.annotations', '0.4.3', $1, 'hash', 'annotation', 'memo:0', 'kb-lib.decoder.spl.memo', '0.4.3', 'decode-input', $2, 42, 'transaction_annotation', $3)", ) .bind(input_key.as_str()) .bind(input_key.as_str()) @@ -1184,7 +1184,7 @@ mod tests { .await; result_or_panic(insert_result); let filter = result_or_panic(crate::MaterializedEventFilter::new( - std::option::Option::Some("transaction_annotations".to_string()), + std::option::Option::Some("materializer.transaction.annotations".to_string()), std::option::Option::Some("transaction_annotation".to_string()), std::option::Option::Some(input_key.clone()), 1, diff --git a/scripts/audit_khadhroony_workspace_rules.py b/scripts/audit_khadhroony_workspace_rules.py index d8ad1fb..a91c23f 100755 --- a/scripts/audit_khadhroony_workspace_rules.py +++ b/scripts/audit_khadhroony_workspace_rules.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # file: scripts/audit_khadhroony_workspace_rules.py -# version: 10 +# version: 11 """Audit mechanically verifiable rules specific to khadhroony-bot3.""" @@ -440,13 +440,13 @@ def audit_reserved_executor_scaffolds(root: pathlib.Path) -> list[Violation]: "reserved executor must build only an explicit zero-instruction plan", ) ) - if reserved_count != 98: + if reserved_count != 105: violations.append( Violation( "KH_EX007", "kb-lib/src/executor", 1, - f"expected 98 reserved executor boundaries, found {reserved_count}", + f"expected 105 reserved executor boundaries, found {reserved_count}", ) ) return violations @@ -458,9 +458,7 @@ def audit_token_2022_naming(root: pathlib.Path) -> list[Violation]: violations: list[Violation] = [] obsolete = ( "kb-lib.decoder.spl.token_2022", - "docs/SPL_TOKEN_2022_", "`core_spl_token_2022", - "`spl_token_2022`", ) candidates = [ root / "README.md", diff --git a/scripts/audit_rust_general_rules.py b/scripts/audit_rust_general_rules.py index f405aa0..b1d8972 100755 --- a/scripts/audit_rust_general_rules.py +++ b/scripts/audit_rust_general_rules.py @@ -46,10 +46,13 @@ def rustfmt_re_export_key(export_path: str) -> tuple[object, ...]: root_priority = 0 if segments[0] == "self" else 1 if segments[0] == "super" else 2 segment_keys: list[tuple[tuple[int, object], ...]] = [] for segment in segments: + raw_tokens = re.findall(r"[A-Za-z]+|[0-9]+", segment) tokens: list[tuple[int, object]] = [] - for token in re.findall(r"[A-Za-z]+|[0-9]+", segment): + for index, token in enumerate(raw_tokens): if token.isdigit(): - tokens.append((1, int(token))) + previous = raw_tokens[index - 1].lower() if index > 0 else "" + priority = -1 if token == "2022" and previous == "token" else 1 + tokens.append((priority, int(token))) else: tokens.append((0, token)) segment_keys.append(tuple(tokens)) diff --git a/test-fixtures/contract-matrices/METAPLEX_TOKEN_METADATA_MATRIX.json b/test-fixtures/contract-matrices/METAPLEX_TOKEN_METADATA_MATRIX.json index b1e9b41..30dfaa0 100644 --- a/test-fixtures/contract-matrices/METAPLEX_TOKEN_METADATA_MATRIX.json +++ b/test-fixtures/contract-matrices/METAPLEX_TOKEN_METADATA_MATRIX.json @@ -1,7 +1,7 @@ { "schema_version": 2, "milestone": "0.1.0-pre.009", - "surface_code": "metadata_metaplex_token_metadata", + "surface_code": "metadata.metaplex_token_metadata", "program_id": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s", "program_family": "independent_metaplex_foundation_program", "decode_status": "instruction_inventory_exhaustive_0_through_57_and_account_key_inventory_exhaustive_0_through_14", @@ -21,7 +21,7 @@ }, { "kind": "idl", - "value": "idls/token_metadata.json", + "value": "idls/metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s.metadata.metaplex_token_metadata.json", "idl_version": "1.14.0", "sha": "5df4a24f62c2743125be096cc174680790c92c18" }, diff --git a/test-fixtures/contract-matrices/NATIVE_SOLANA_DECODER_MATRIX.json b/test-fixtures/contract-matrices/NATIVE_SOLANA_DECODER_MATRIX.json index b34fe57..da9b1e5 100644 --- a/test-fixtures/contract-matrices/NATIVE_SOLANA_DECODER_MATRIX.json +++ b/test-fixtures/contract-matrices/NATIVE_SOLANA_DECODER_MATRIX.json @@ -8,7 +8,7 @@ "completeness_contract": "Each surface has exact declared coverage count plus a dedicated official-enum or audited-wire completeness test", "surfaces": [ { - "surface_code": "solana_native_address_lookup_table", + "surface_code": "solana.core.address_lookup_table", "program_id": "AddressLookupTab1e1111111111111111111111111", "runtime_status": "current", "expected_coverage_entries": 5, @@ -16,7 +16,7 @@ "completeness_test": "address_lookup_table::tests::coverage_uses_official_encoder_discriminants" }, { - "surface_code": "solana_native_bpf_loader_deprecated", + "surface_code": "solana.core.bpf_loader_deprecated", "program_id": "BPFLoader1111111111111111111111111111111111", "runtime_status": "historical", "expected_coverage_entries": 2, @@ -24,7 +24,7 @@ "completeness_test": "loaders::tests::coverage_declares_every_loader_entry" }, { - "surface_code": "solana_native_bpf_loader", + "surface_code": "solana.core.bpf_loader", "program_id": "BPFLoader2111111111111111111111111111111111", "runtime_status": "historical", "expected_coverage_entries": 2, @@ -32,7 +32,7 @@ "completeness_test": "loaders::tests::coverage_declares_every_loader_entry" }, { - "surface_code": "solana_native_bpf_loader_upgradeable", + "surface_code": "solana.core.bpf_loader_upgradeable", "program_id": "BPFLoaderUpgradeab1e11111111111111111111111", "runtime_status": "current_with_historical_variants", "expected_coverage_entries": 8, @@ -40,7 +40,7 @@ "completeness_test": "loaders::tests::coverage_declares_every_loader_entry" }, { - "surface_code": "solana_native_compute_budget", + "surface_code": "solana.core.compute_budget", "program_id": "ComputeBudget111111111111111111111111111111", "runtime_status": "current_with_historical_variants", "expected_coverage_entries": 6, @@ -48,7 +48,7 @@ "completeness_test": "compute_budget::tests::coverage_declares_current_and_historical_entries" }, { - "surface_code": "solana_native_config", + "surface_code": "solana.core.config", "program_id": "Config1111111111111111111111111111111111111", "runtime_status": "current", "expected_coverage_entries": 1, @@ -56,7 +56,7 @@ "completeness_test": "config::tests::coverage_declares_one_generic_store_surface" }, { - "surface_code": "solana_native_ed25519", + "surface_code": "solana.core.ed25519", "program_id": "Ed25519SigVerify111111111111111111111111111", "runtime_status": "current", "expected_coverage_entries": 1, @@ -64,7 +64,7 @@ "completeness_test": "precompiles::tests::coverage_declares_exactly_three_signature_precompile_surfaces" }, { - "surface_code": "solana_native_feature", + "surface_code": "solana.core.feature", "program_id": "Feature111111111111111111111111111111111111", "runtime_status": "current", "expected_coverage_entries": 1, @@ -72,7 +72,7 @@ "completeness_test": "feature::tests::coverage_declares_the_single_official_instruction" }, { - "surface_code": "solana_native_loader_v4", + "surface_code": "solana.core.loader_v4", "program_id": "LoaderV411111111111111111111111111111111111", "runtime_status": "current", "expected_coverage_entries": 7, @@ -80,7 +80,7 @@ "completeness_test": "loaders::tests::coverage_declares_every_loader_entry" }, { - "surface_code": "solana_native_loader", + "surface_code": "solana.core.loader", "program_id": "NativeLoader1111111111111111111111111111111", "runtime_status": "runtime_dispatch", "expected_coverage_entries": 1, @@ -88,7 +88,7 @@ "completeness_test": "loaders::tests::coverage_declares_every_loader_entry" }, { - "surface_code": "solana_native_secp256k1", + "surface_code": "solana.core.secp256k1", "program_id": "KeccakSecp256k11111111111111111111111111111", "runtime_status": "current", "expected_coverage_entries": 1, @@ -96,7 +96,7 @@ "completeness_test": "precompiles::tests::coverage_declares_exactly_three_signature_precompile_surfaces" }, { - "surface_code": "solana_native_secp256r1", + "surface_code": "solana.core.secp256r1", "program_id": "Secp256r1SigVerify1111111111111111111111111", "runtime_status": "current", "expected_coverage_entries": 1, @@ -104,7 +104,7 @@ "completeness_test": "precompiles::tests::coverage_declares_exactly_three_signature_precompile_surfaces" }, { - "surface_code": "solana_native_slashing", + "surface_code": "solana.core.slashing", "program_id": "S1ashing11111111111111111111111111111111111", "runtime_status": "current", "expected_coverage_entries": 2, @@ -112,7 +112,7 @@ "completeness_test": "slashing::tests::coverage_declares_exactly_two_official_instructions" }, { - "surface_code": "solana_native_stake", + "surface_code": "solana.core.stake", "program_id": "Stake11111111111111111111111111111111111111", "runtime_status": "current", "expected_coverage_entries": 18, @@ -120,7 +120,7 @@ "completeness_test": "stake::tests::coverage_declares_every_official_stake_instruction" }, { - "surface_code": "solana_native_system", + "surface_code": "solana.core.system", "program_id": "11111111111111111111111111111111", "runtime_status": "current", "expected_coverage_entries": 14, @@ -128,7 +128,7 @@ "completeness_test": "system::tests::coverage_declares_all_current_system_variants" }, { - "surface_code": "solana_native_vote", + "surface_code": "solana.core.vote", "program_id": "Vote111111111111111111111111111111111111111", "runtime_status": "current", "expected_coverage_entries": 20, @@ -136,7 +136,7 @@ "completeness_test": "vote::tests::coverage_declares_every_official_vote_instruction" }, { - "surface_code": "solana_native_zk_elgamal_proof", + "surface_code": "solana.core.zk_elgamal_proof", "program_id": "ZkE1Gama1Proof11111111111111111111111111111", "runtime_status": "current", "expected_coverage_entries": 13, @@ -144,7 +144,7 @@ "completeness_test": "zk_elgamal::tests::coverage_declares_all_thirteen_official_instructions" }, { - "surface_code": "solana_native_zk_token_proof", + "surface_code": "solana.core.zk_token_proof", "program_id": "ZkTokenProof1111111111111111111111111111111", "runtime_status": "historical_with_current_noop", "expected_coverage_entries": 18, diff --git a/test-fixtures/contract-matrices/NATIVE_SOLANA_EXECUTION_MATRIX.json b/test-fixtures/contract-matrices/NATIVE_SOLANA_EXECUTION_MATRIX.json index 1aabe9f..1b1a25c 100644 --- a/test-fixtures/contract-matrices/NATIVE_SOLANA_EXECUTION_MATRIX.json +++ b/test-fixtures/contract-matrices/NATIVE_SOLANA_EXECUTION_MATRIX.json @@ -14,7 +14,7 @@ "classification": "native_runtime_program_or_precompile", "operations": [ { - "operation_code": "solana_core.system.transfer", + "operation_code": "solana.core.system.transfer", "construction_source": "solana-system-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -24,7 +24,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.system.transfer_many", + "operation_code": "solana.core.system.transfer_many", "construction_source": "solana-system-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -34,7 +34,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.system.create_account", + "operation_code": "solana.core.system.create_account", "construction_source": "solana-system-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -44,7 +44,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.system.create_account_with_seed", + "operation_code": "solana.core.system.create_account_with_seed", "construction_source": "solana-system-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -54,7 +54,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.system.allocate", + "operation_code": "solana.core.system.allocate", "construction_source": "solana-system-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -64,7 +64,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.system.allocate_with_seed", + "operation_code": "solana.core.system.allocate_with_seed", "construction_source": "solana-system-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -74,7 +74,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.system.assign", + "operation_code": "solana.core.system.assign", "construction_source": "solana-system-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -84,7 +84,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.system.assign_with_seed", + "operation_code": "solana.core.system.assign_with_seed", "construction_source": "solana-system-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -94,7 +94,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.system.transfer_with_seed", + "operation_code": "solana.core.system.transfer_with_seed", "construction_source": "solana-system-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -104,7 +104,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.system.create_account_allow_prefund", + "operation_code": "solana.core.system.create_account_allow_prefund", "construction_source": "solana-system-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -114,7 +114,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.system.nonce.create", + "operation_code": "solana.core.system.nonce.create", "construction_source": "solana-system-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -124,7 +124,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.system.nonce.create_with_seed", + "operation_code": "solana.core.system.nonce.create_with_seed", "construction_source": "solana-system-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -134,7 +134,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.system.nonce.initialize", + "operation_code": "solana.core.system.nonce.initialize", "construction_source": "solana-system-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -144,7 +144,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.system.nonce.advance", + "operation_code": "solana.core.system.nonce.advance", "construction_source": "solana-system-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -154,7 +154,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.system.nonce.authorize", + "operation_code": "solana.core.system.nonce.authorize", "construction_source": "solana-system-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -164,7 +164,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.system.nonce.withdraw", + "operation_code": "solana.core.system.nonce.withdraw", "construction_source": "solana-system-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -174,7 +174,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.system.nonce.upgrade", + "operation_code": "solana.core.system.nonce.upgrade", "construction_source": "solana-system-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -194,7 +194,7 @@ "classification": "native_runtime_program_or_precompile", "operations": [ { - "operation_code": "solana_core.compute_budget.request_heap_frame", + "operation_code": "solana.core.compute_budget.request_heap_frame", "construction_source": "solana-compute-budget-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -204,7 +204,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.compute_budget.set_compute_unit_limit", + "operation_code": "solana.core.compute_budget.set_compute_unit_limit", "construction_source": "solana-compute-budget-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -214,7 +214,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.compute_budget.set_compute_unit_price", + "operation_code": "solana.core.compute_budget.set_compute_unit_price", "construction_source": "solana-compute-budget-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -224,7 +224,7 @@ "ui_exposure": "safe_subset" }, { - "operation_code": "solana_core.compute_budget.set_loaded_accounts_data_size_limit", + "operation_code": "solana.core.compute_budget.set_loaded_accounts_data_size_limit", "construction_source": "solana-compute-budget-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "none", @@ -244,7 +244,7 @@ "classification": "native_runtime_program_or_precompile", "operations": [ { - "operation_code": "solana_core.address_lookup_table.create", + "operation_code": "solana.core.address_lookup_table.create", "construction_source": "solana-address-lookup-table-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "required", @@ -254,7 +254,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.address_lookup_table.extend", + "operation_code": "solana.core.address_lookup_table.extend", "construction_source": "solana-address-lookup-table-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "required", @@ -264,7 +264,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.address_lookup_table.freeze", + "operation_code": "solana.core.address_lookup_table.freeze", "construction_source": "solana-address-lookup-table-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "required", @@ -274,7 +274,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.address_lookup_table.deactivate", + "operation_code": "solana.core.address_lookup_table.deactivate", "construction_source": "solana-address-lookup-table-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "required", @@ -284,7 +284,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.address_lookup_table.close", + "operation_code": "solana.core.address_lookup_table.close", "construction_source": "solana-address-lookup-table-interface official builders", "construction_kind": "official_builder", "stateful_preflight": "required", @@ -304,7 +304,7 @@ "classification": "native_runtime_program_or_precompile", "operations": [ { - "operation_code": "solana_core.ed25519.verify_inline", + "operation_code": "solana.core.ed25519.verify_inline", "construction_source": "solana-ed25519-program official layout", "construction_kind": "official_layout", "stateful_preflight": "none", @@ -314,7 +314,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.ed25519.verify_offsets", + "operation_code": "solana.core.ed25519.verify_offsets", "construction_source": "solana-ed25519-program official layout", "construction_kind": "official_layout", "stateful_preflight": "none", @@ -334,7 +334,7 @@ "classification": "native_runtime_program_or_precompile", "operations": [ { - "operation_code": "solana_core.secp256k1.verify_inline", + "operation_code": "solana.core.secp256k1.verify_inline", "construction_source": "solana-secp256k1-program official layout", "construction_kind": "official_layout", "stateful_preflight": "none", @@ -344,7 +344,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.secp256k1.verify_offsets", + "operation_code": "solana.core.secp256k1.verify_offsets", "construction_source": "solana-secp256k1-program official layout", "construction_kind": "official_layout", "stateful_preflight": "none", @@ -364,7 +364,7 @@ "classification": "native_runtime_program_or_precompile", "operations": [ { - "operation_code": "solana_core.secp256r1.verify_inline", + "operation_code": "solana.core.secp256r1.verify_inline", "construction_source": "solana-secp256r1-program official layout", "construction_kind": "official_layout", "stateful_preflight": "none", @@ -374,7 +374,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.secp256r1.verify_offsets", + "operation_code": "solana.core.secp256r1.verify_offsets", "construction_source": "solana-secp256r1-program official layout", "construction_kind": "official_layout", "stateful_preflight": "none", @@ -394,7 +394,7 @@ "classification": "native_runtime_program_or_precompile", "operations": [ { - "operation_code": "solana_core.config.create_account", + "operation_code": "solana.core.config.create_account", "construction_source": "solana-config-interface wire contract", "construction_kind": "official_wire", "stateful_preflight": "required", @@ -404,7 +404,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.config.store", + "operation_code": "solana.core.config.store", "construction_source": "solana-config-interface wire contract", "construction_kind": "official_wire", "stateful_preflight": "required", @@ -424,7 +424,7 @@ "classification": "native_runtime_program_or_precompile", "operations": [ { - "operation_code": "solana_core.feature.activate", + "operation_code": "solana.core.feature.activate", "construction_source": "solana-feature-gate-interface official sequences", "construction_kind": "official_builder", "stateful_preflight": "required", @@ -434,7 +434,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.feature.revoke_pending_activation", + "operation_code": "solana.core.feature.revoke_pending_activation", "construction_source": "solana-feature-gate-interface official sequences", "construction_kind": "official_builder", "stateful_preflight": "required", @@ -454,7 +454,7 @@ "classification": "native_runtime_program_or_precompile", "operations": [ { - "operation_code": "solana_core.slashing.close_violation_report", + "operation_code": "solana.core.slashing.close_violation_report", "construction_source": "solana-slashing-program interface and SIMD-0204", "construction_kind": "official_wire", "stateful_preflight": "required", @@ -464,7 +464,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.slashing.submit_duplicate_block_proof", + "operation_code": "solana.core.slashing.submit_duplicate_block_proof", "construction_source": "solana-slashing-program interface and SIMD-0204", "construction_kind": "official_wire", "stateful_preflight": "required", @@ -484,7 +484,7 @@ "classification": "native_runtime_program_or_precompile", "operations": [ { - "operation_code": "solana_core.zk_elgamal.verify_inline", + "operation_code": "solana.core.zk_elgamal.verify_inline", "construction_source": "solana-zk-elgamal-proof-interface POD contract", "construction_kind": "official_wire", "stateful_preflight": "required", @@ -494,7 +494,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.zk_elgamal.verify_from_account", + "operation_code": "solana.core.zk_elgamal.verify_from_account", "construction_source": "solana-zk-elgamal-proof-interface POD contract", "construction_kind": "official_wire", "stateful_preflight": "required", @@ -504,7 +504,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.zk_elgamal.close_context_state", + "operation_code": "solana.core.zk_elgamal.close_context_state", "construction_source": "solana-zk-elgamal-proof-interface POD contract", "construction_kind": "official_wire", "stateful_preflight": "required", @@ -524,7 +524,7 @@ "classification": "native_runtime_program_or_precompile", "operations": [ { - "operation_code": "solana_core.stake.initialize", + "operation_code": "solana.core.stake.initialize", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -534,7 +534,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.initialize_checked", + "operation_code": "solana.core.stake.initialize_checked", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -544,7 +544,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.create_account", + "operation_code": "solana.core.stake.create_account", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -554,7 +554,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.create_account_with_seed", + "operation_code": "solana.core.stake.create_account_with_seed", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -564,7 +564,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.create_account_checked", + "operation_code": "solana.core.stake.create_account_checked", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -574,7 +574,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.create_account_with_seed_checked", + "operation_code": "solana.core.stake.create_account_with_seed_checked", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -584,7 +584,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.split", + "operation_code": "solana.core.stake.split", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -594,7 +594,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.split_with_seed", + "operation_code": "solana.core.stake.split_with_seed", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -604,7 +604,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.merge", + "operation_code": "solana.core.stake.merge", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -614,7 +614,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.create_account_and_delegate", + "operation_code": "solana.core.stake.create_account_and_delegate", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -624,7 +624,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.create_account_with_seed_and_delegate", + "operation_code": "solana.core.stake.create_account_with_seed_and_delegate", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -634,7 +634,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.authorize", + "operation_code": "solana.core.stake.authorize", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -644,7 +644,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.authorize_checked", + "operation_code": "solana.core.stake.authorize_checked", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -654,7 +654,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.authorize_with_seed", + "operation_code": "solana.core.stake.authorize_with_seed", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -664,7 +664,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.authorize_checked_with_seed", + "operation_code": "solana.core.stake.authorize_checked_with_seed", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -674,7 +674,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.delegate", + "operation_code": "solana.core.stake.delegate", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -684,7 +684,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.withdraw", + "operation_code": "solana.core.stake.withdraw", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -694,7 +694,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.deactivate", + "operation_code": "solana.core.stake.deactivate", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -704,7 +704,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.set_lockup", + "operation_code": "solana.core.stake.set_lockup", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -714,7 +714,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.set_lockup_checked", + "operation_code": "solana.core.stake.set_lockup_checked", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -724,7 +724,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.get_minimum_delegation", + "operation_code": "solana.core.stake.get_minimum_delegation", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -734,7 +734,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.deactivate_delinquent", + "operation_code": "solana.core.stake.deactivate_delinquent", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -744,7 +744,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.move_stake", + "operation_code": "solana.core.stake.move_stake", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -754,7 +754,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.stake.move_lamports", + "operation_code": "solana.core.stake.move_lamports", "construction_source": "solana-stake-interface official helpers and wincode wire", "construction_kind": "official_builder_or_wire", "stateful_preflight": "future", @@ -774,7 +774,7 @@ "classification": "native_runtime_program_or_precompile", "operations": [ { - "operation_code": "solana_core.vote.initialize_account", + "operation_code": "solana.core.vote.initialize_account", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -784,7 +784,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.initialize_account_v2", + "operation_code": "solana.core.vote.initialize_account_v2", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -794,7 +794,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.create_account", + "operation_code": "solana.core.vote.create_account", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -804,7 +804,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.create_account_with_seed", + "operation_code": "solana.core.vote.create_account_with_seed", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -814,7 +814,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.create_account_v2", + "operation_code": "solana.core.vote.create_account_v2", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -824,7 +824,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.create_account_with_seed_v2", + "operation_code": "solana.core.vote.create_account_with_seed_v2", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -834,7 +834,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.authorize", + "operation_code": "solana.core.vote.authorize", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -844,7 +844,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.authorize_checked", + "operation_code": "solana.core.vote.authorize_checked", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -854,7 +854,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.authorize_with_seed", + "operation_code": "solana.core.vote.authorize_with_seed", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -864,7 +864,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.authorize_checked_with_seed", + "operation_code": "solana.core.vote.authorize_checked_with_seed", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -874,7 +874,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.vote", + "operation_code": "solana.core.vote.vote", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -884,7 +884,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.vote_switch", + "operation_code": "solana.core.vote.vote_switch", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -894,7 +894,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.withdraw", + "operation_code": "solana.core.vote.withdraw", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -904,7 +904,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.update_validator_identity", + "operation_code": "solana.core.vote.update_validator_identity", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -914,7 +914,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.update_commission", + "operation_code": "solana.core.vote.update_commission", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -924,7 +924,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.update_vote_state", + "operation_code": "solana.core.vote.update_vote_state", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -934,7 +934,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.update_vote_state_switch", + "operation_code": "solana.core.vote.update_vote_state_switch", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -944,7 +944,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.compact_update_vote_state", + "operation_code": "solana.core.vote.compact_update_vote_state", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -954,7 +954,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.compact_update_vote_state_switch", + "operation_code": "solana.core.vote.compact_update_vote_state_switch", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -964,7 +964,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.tower_sync", + "operation_code": "solana.core.vote.tower_sync", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -974,7 +974,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.tower_sync_switch", + "operation_code": "solana.core.vote.tower_sync_switch", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -984,7 +984,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.update_commission_collector", + "operation_code": "solana.core.vote.update_commission_collector", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -994,7 +994,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.update_commission_bps", + "operation_code": "solana.core.vote.update_commission_bps", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -1004,7 +1004,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.vote.deposit_delegator_rewards", + "operation_code": "solana.core.vote.deposit_delegator_rewards", "construction_source": "solana-vote-interface official wire via wincode", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -1024,7 +1024,7 @@ "classification": "native_runtime_program_or_precompile", "operations": [ { - "operation_code": "solana_core.loader_v3.create_buffer", + "operation_code": "solana.core.loader_v3.create_buffer", "construction_source": "solana-loader-v3-interface official helpers and wincode", "construction_kind": "official_builder", "stateful_preflight": "future", @@ -1034,7 +1034,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v3.write", + "operation_code": "solana.core.loader_v3.write", "construction_source": "solana-loader-v3-interface official helpers and wincode", "construction_kind": "official_builder", "stateful_preflight": "future", @@ -1044,7 +1044,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v3.deploy_with_max_program_len", + "operation_code": "solana.core.loader_v3.deploy_with_max_program_len", "construction_source": "solana-loader-v3-interface official helpers and wincode", "construction_kind": "official_builder", "stateful_preflight": "future", @@ -1054,7 +1054,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v3.upgrade", + "operation_code": "solana.core.loader_v3.upgrade", "construction_source": "solana-loader-v3-interface official helpers and wincode", "construction_kind": "official_builder", "stateful_preflight": "future", @@ -1064,7 +1064,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v3.set_buffer_authority", + "operation_code": "solana.core.loader_v3.set_buffer_authority", "construction_source": "solana-loader-v3-interface official helpers and wincode", "construction_kind": "official_builder", "stateful_preflight": "future", @@ -1074,7 +1074,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v3.set_buffer_authority_checked", + "operation_code": "solana.core.loader_v3.set_buffer_authority_checked", "construction_source": "solana-loader-v3-interface official helpers and wincode", "construction_kind": "official_builder", "stateful_preflight": "future", @@ -1084,7 +1084,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v3.set_upgrade_authority", + "operation_code": "solana.core.loader_v3.set_upgrade_authority", "construction_source": "solana-loader-v3-interface official helpers and wincode", "construction_kind": "official_builder", "stateful_preflight": "future", @@ -1094,7 +1094,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v3.set_upgrade_authority_checked", + "operation_code": "solana.core.loader_v3.set_upgrade_authority_checked", "construction_source": "solana-loader-v3-interface official helpers and wincode", "construction_kind": "official_builder", "stateful_preflight": "future", @@ -1104,7 +1104,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v3.close", + "operation_code": "solana.core.loader_v3.close", "construction_source": "solana-loader-v3-interface official helpers and wincode", "construction_kind": "official_builder", "stateful_preflight": "future", @@ -1114,7 +1114,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v3.close_any", + "operation_code": "solana.core.loader_v3.close_any", "construction_source": "solana-loader-v3-interface official helpers and wincode", "construction_kind": "official_builder", "stateful_preflight": "future", @@ -1124,7 +1124,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v3.extend_program", + "operation_code": "solana.core.loader_v3.extend_program", "construction_source": "solana-loader-v3-interface official helpers and wincode", "construction_kind": "official_builder", "stateful_preflight": "future", @@ -1144,7 +1144,7 @@ "classification": "native_runtime_program_or_precompile", "operations": [ { - "operation_code": "solana_core.loader_v4.create_buffer", + "operation_code": "solana.core.loader_v4.create_buffer", "construction_source": "solana-loader-v4-interface official discriminants and accounts", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -1154,7 +1154,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v4.set_program_length", + "operation_code": "solana.core.loader_v4.set_program_length", "construction_source": "solana-loader-v4-interface official discriminants and accounts", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -1164,7 +1164,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v4.write", + "operation_code": "solana.core.loader_v4.write", "construction_source": "solana-loader-v4-interface official discriminants and accounts", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -1174,7 +1174,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v4.copy", + "operation_code": "solana.core.loader_v4.copy", "construction_source": "solana-loader-v4-interface official discriminants and accounts", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -1184,7 +1184,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v4.deploy", + "operation_code": "solana.core.loader_v4.deploy", "construction_source": "solana-loader-v4-interface official discriminants and accounts", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -1194,7 +1194,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v4.deploy_from_source", + "operation_code": "solana.core.loader_v4.deploy_from_source", "construction_source": "solana-loader-v4-interface official discriminants and accounts", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -1204,7 +1204,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v4.retract", + "operation_code": "solana.core.loader_v4.retract", "construction_source": "solana-loader-v4-interface official discriminants and accounts", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -1214,7 +1214,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v4.transfer_authority", + "operation_code": "solana.core.loader_v4.transfer_authority", "construction_source": "solana-loader-v4-interface official discriminants and accounts", "construction_kind": "official_wire", "stateful_preflight": "future", @@ -1224,7 +1224,7 @@ "ui_exposure": "hidden" }, { - "operation_code": "solana_core.loader_v4.finalize", + "operation_code": "solana.core.loader_v4.finalize", "construction_source": "solana-loader-v4-interface official discriminants and accounts", "construction_kind": "official_wire", "stateful_preflight": "future", diff --git a/test-fixtures/contract-matrices/OPERATION_NAMING_MATRIX.json b/test-fixtures/contract-matrices/OPERATION_NAMING_MATRIX.json new file mode 100644 index 0000000..086adcb --- /dev/null +++ b/test-fixtures/contract-matrices/OPERATION_NAMING_MATRIX.json @@ -0,0 +1,2565 @@ +{ + "schemaVersion": 1, + "conventionDocument": "docs/OPERATION_NAMING_CONVENTION.md", + "rules": { + "runtimeComponent": "kb-lib...[.]", + "processorName": ".[.]", + "surfaceCode": ".[.]", + "operationCode": ".", + "eventCode": "." + }, + "entries": [ + { + "programId": "AddressLookupTab1e1111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.address_lookup_table", + "operationCode": "solana.core.address_lookup_table.close", + "eventCode": "solana.core.address_lookup_table.close", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "AddressLookupTab1e1111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.address_lookup_table", + "operationCode": "solana.core.address_lookup_table.create", + "eventCode": "solana.core.address_lookup_table.create", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "AddressLookupTab1e1111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.address_lookup_table", + "operationCode": "solana.core.address_lookup_table.deactivate", + "eventCode": "solana.core.address_lookup_table.deactivate", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "AddressLookupTab1e1111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.address_lookup_table", + "operationCode": "solana.core.address_lookup_table.extend", + "eventCode": "solana.core.address_lookup_table.extend", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "AddressLookupTab1e1111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.address_lookup_table", + "operationCode": "solana.core.address_lookup_table.freeze", + "eventCode": "solana.core.address_lookup_table.freeze", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "ComputeBudget111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.compute_budget", + "operationCode": "solana.core.compute_budget.request_heap_frame", + "eventCode": "solana.core.compute_budget.request_heap_frame", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "ComputeBudget111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.compute_budget", + "operationCode": "solana.core.compute_budget.set_compute_unit_limit", + "eventCode": "solana.core.compute_budget.set_compute_unit_limit", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "ComputeBudget111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.compute_budget", + "operationCode": "solana.core.compute_budget.set_compute_unit_price", + "eventCode": "solana.core.compute_budget.set_compute_unit_price", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "ComputeBudget111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.compute_budget", + "operationCode": "solana.core.compute_budget.set_loaded_accounts_data_size_limit", + "eventCode": "solana.core.compute_budget.set_loaded_accounts_data_size_limit", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Config1111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.config", + "operationCode": "solana.core.config.create_account", + "eventCode": "solana.core.config.create_account", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Config1111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.config", + "operationCode": "solana.core.config.store", + "eventCode": "solana.core.config.store", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Ed25519SigVerify111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.ed25519", + "operationCode": "solana.core.ed25519.verify_inline", + "eventCode": "solana.core.ed25519.verify_inline", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Ed25519SigVerify111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.ed25519", + "operationCode": "solana.core.ed25519.verify_offsets", + "eventCode": "solana.core.ed25519.verify_offsets", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Feature111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.feature", + "operationCode": "solana.core.feature.activate", + "eventCode": "solana.core.feature.activate", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Feature111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.feature", + "operationCode": "solana.core.feature.revoke_pending_activation", + "eventCode": "solana.core.feature.revoke_pending_activation", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "BPFLoaderUpgradeab1e11111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v3", + "operationCode": "solana.core.loader_v3.close", + "eventCode": "solana.core.loader_v3.close", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "BPFLoaderUpgradeab1e11111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v3", + "operationCode": "solana.core.loader_v3.close_any", + "eventCode": "solana.core.loader_v3.close_any", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "BPFLoaderUpgradeab1e11111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v3", + "operationCode": "solana.core.loader_v3.create_buffer", + "eventCode": "solana.core.loader_v3.create_buffer", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "BPFLoaderUpgradeab1e11111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v3", + "operationCode": "solana.core.loader_v3.deploy_with_max_program_len", + "eventCode": "solana.core.loader_v3.deploy_with_max_program_len", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "BPFLoaderUpgradeab1e11111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v3", + "operationCode": "solana.core.loader_v3.extend_program", + "eventCode": "solana.core.loader_v3.extend_program", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "BPFLoaderUpgradeab1e11111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v3", + "operationCode": "solana.core.loader_v3.set_buffer_authority", + "eventCode": "solana.core.loader_v3.set_buffer_authority", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "BPFLoaderUpgradeab1e11111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v3", + "operationCode": "solana.core.loader_v3.set_buffer_authority_checked", + "eventCode": "solana.core.loader_v3.set_buffer_authority_checked", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "BPFLoaderUpgradeab1e11111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v3", + "operationCode": "solana.core.loader_v3.set_upgrade_authority", + "eventCode": "solana.core.loader_v3.set_upgrade_authority", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "BPFLoaderUpgradeab1e11111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v3", + "operationCode": "solana.core.loader_v3.set_upgrade_authority_checked", + "eventCode": "solana.core.loader_v3.set_upgrade_authority_checked", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "BPFLoaderUpgradeab1e11111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v3", + "operationCode": "solana.core.loader_v3.upgrade", + "eventCode": "solana.core.loader_v3.upgrade", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "BPFLoaderUpgradeab1e11111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v3", + "operationCode": "solana.core.loader_v3.write", + "eventCode": "solana.core.loader_v3.write", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "LoaderV411111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v4", + "operationCode": "solana.core.loader_v4.copy", + "eventCode": "solana.core.loader_v4.copy", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "LoaderV411111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v4", + "operationCode": "solana.core.loader_v4.create_buffer", + "eventCode": "solana.core.loader_v4.create_buffer", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "LoaderV411111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v4", + "operationCode": "solana.core.loader_v4.deploy", + "eventCode": "solana.core.loader_v4.deploy", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "LoaderV411111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v4", + "operationCode": "solana.core.loader_v4.deploy_from_source", + "eventCode": "solana.core.loader_v4.deploy_from_source", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "LoaderV411111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v4", + "operationCode": "solana.core.loader_v4.finalize", + "eventCode": "solana.core.loader_v4.finalize", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "LoaderV411111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v4", + "operationCode": "solana.core.loader_v4.retract", + "eventCode": "solana.core.loader_v4.retract", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "LoaderV411111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v4", + "operationCode": "solana.core.loader_v4.set_program_length", + "eventCode": "solana.core.loader_v4.set_program_length", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "LoaderV411111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v4", + "operationCode": "solana.core.loader_v4.transfer_authority", + "eventCode": "solana.core.loader_v4.transfer_authority", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "LoaderV411111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.loader_v4", + "operationCode": "solana.core.loader_v4.write", + "eventCode": "solana.core.loader_v4.write", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "KeccakSecp256k11111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.secp256k1", + "operationCode": "solana.core.secp256k1.verify_inline", + "eventCode": "solana.core.secp256k1.verify_inline", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "KeccakSecp256k11111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.secp256k1", + "operationCode": "solana.core.secp256k1.verify_offsets", + "eventCode": "solana.core.secp256k1.verify_offsets", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Secp256r1SigVerify1111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.secp256r1", + "operationCode": "solana.core.secp256r1.verify_inline", + "eventCode": "solana.core.secp256r1.verify_inline", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Secp256r1SigVerify1111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.secp256r1", + "operationCode": "solana.core.secp256r1.verify_offsets", + "eventCode": "solana.core.secp256r1.verify_offsets", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "S1ashing11111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.slashing", + "operationCode": "solana.core.slashing.close_violation_report", + "eventCode": "solana.core.slashing.close_violation_report", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "S1ashing11111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.slashing", + "operationCode": "solana.core.slashing.submit_duplicate_block_proof", + "eventCode": "solana.core.slashing.submit_duplicate_block_proof", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.authorize", + "eventCode": "solana.core.stake.authorize", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.authorize_checked", + "eventCode": "solana.core.stake.authorize_checked", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.authorize_checked_with_seed", + "eventCode": "solana.core.stake.authorize_checked_with_seed", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.authorize_with_seed", + "eventCode": "solana.core.stake.authorize_with_seed", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.create_account", + "eventCode": "solana.core.stake.create_account", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.create_account_and_delegate", + "eventCode": "solana.core.stake.create_account_and_delegate", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.create_account_checked", + "eventCode": "solana.core.stake.create_account_checked", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.create_account_with_seed", + "eventCode": "solana.core.stake.create_account_with_seed", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.create_account_with_seed_and_delegate", + "eventCode": "solana.core.stake.create_account_with_seed_and_delegate", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.create_account_with_seed_checked", + "eventCode": "solana.core.stake.create_account_with_seed_checked", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.deactivate", + "eventCode": "solana.core.stake.deactivate", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.deactivate_delinquent", + "eventCode": "solana.core.stake.deactivate_delinquent", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.delegate", + "eventCode": "solana.core.stake.delegate", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.get_minimum_delegation", + "eventCode": "solana.core.stake.get_minimum_delegation", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.initialize", + "eventCode": "solana.core.stake.initialize", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.initialize_checked", + "eventCode": "solana.core.stake.initialize_checked", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.merge", + "eventCode": "solana.core.stake.merge", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.move_lamports", + "eventCode": "solana.core.stake.move_lamports", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.move_stake", + "eventCode": "solana.core.stake.move_stake", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.set_lockup", + "eventCode": "solana.core.stake.set_lockup", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.set_lockup_checked", + "eventCode": "solana.core.stake.set_lockup_checked", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.split", + "eventCode": "solana.core.stake.split", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.split_with_seed", + "eventCode": "solana.core.stake.split_with_seed", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Stake11111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.stake", + "operationCode": "solana.core.stake.withdraw", + "eventCode": "solana.core.stake.withdraw", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "11111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.system", + "operationCode": "solana.core.system.allocate", + "eventCode": "solana.core.system.allocate", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "11111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.system", + "operationCode": "solana.core.system.allocate_with_seed", + "eventCode": "solana.core.system.allocate_with_seed", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "11111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.system", + "operationCode": "solana.core.system.assign", + "eventCode": "solana.core.system.assign", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "11111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.system", + "operationCode": "solana.core.system.assign_with_seed", + "eventCode": "solana.core.system.assign_with_seed", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "11111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.system", + "operationCode": "solana.core.system.create_account", + "eventCode": "solana.core.system.create_account", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "11111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.system", + "operationCode": "solana.core.system.create_account_allow_prefund", + "eventCode": "solana.core.system.create_account_allow_prefund", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "11111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.system", + "operationCode": "solana.core.system.create_account_with_seed", + "eventCode": "solana.core.system.create_account_with_seed", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "11111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.system", + "operationCode": "solana.core.system.nonce.advance", + "eventCode": "solana.core.system.nonce.advance", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "11111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.system", + "operationCode": "solana.core.system.nonce.authorize", + "eventCode": "solana.core.system.nonce.authorize", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "11111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.system", + "operationCode": "solana.core.system.nonce.create", + "eventCode": "solana.core.system.nonce.create", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "11111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.system", + "operationCode": "solana.core.system.nonce.create_with_seed", + "eventCode": "solana.core.system.nonce.create_with_seed", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "11111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.system", + "operationCode": "solana.core.system.nonce.initialize", + "eventCode": "solana.core.system.nonce.initialize", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "11111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.system", + "operationCode": "solana.core.system.nonce.upgrade", + "eventCode": "solana.core.system.nonce.upgrade", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "11111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.system", + "operationCode": "solana.core.system.nonce.withdraw", + "eventCode": "solana.core.system.nonce.withdraw", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "11111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.system", + "operationCode": "solana.core.system.transfer", + "eventCode": "solana.core.system.transfer", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "11111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.system", + "operationCode": "solana.core.system.transfer_many", + "eventCode": "solana.core.system.transfer_many", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "11111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.system", + "operationCode": "solana.core.system.transfer_with_seed", + "eventCode": "solana.core.system.transfer_with_seed", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.authorize", + "eventCode": "solana.core.vote.authorize", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.authorize_checked", + "eventCode": "solana.core.vote.authorize_checked", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.authorize_checked_with_seed", + "eventCode": "solana.core.vote.authorize_checked_with_seed", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.authorize_with_seed", + "eventCode": "solana.core.vote.authorize_with_seed", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.compact_update_vote_state", + "eventCode": "solana.core.vote.compact_update_vote_state", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.compact_update_vote_state_switch", + "eventCode": "solana.core.vote.compact_update_vote_state_switch", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.create_account", + "eventCode": "solana.core.vote.create_account", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.create_account_v2", + "eventCode": "solana.core.vote.create_account_v2", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.create_account_with_seed", + "eventCode": "solana.core.vote.create_account_with_seed", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.create_account_with_seed_v2", + "eventCode": "solana.core.vote.create_account_with_seed_v2", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.deposit_delegator_rewards", + "eventCode": "solana.core.vote.deposit_delegator_rewards", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.initialize_account", + "eventCode": "solana.core.vote.initialize_account", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.initialize_account_v2", + "eventCode": "solana.core.vote.initialize_account_v2", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.tower_sync", + "eventCode": "solana.core.vote.tower_sync", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.tower_sync_switch", + "eventCode": "solana.core.vote.tower_sync_switch", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.update_commission", + "eventCode": "solana.core.vote.update_commission", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.update_commission_bps", + "eventCode": "solana.core.vote.update_commission_bps", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.update_commission_collector", + "eventCode": "solana.core.vote.update_commission_collector", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.update_validator_identity", + "eventCode": "solana.core.vote.update_validator_identity", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.update_vote_state", + "eventCode": "solana.core.vote.update_vote_state", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.update_vote_state_switch", + "eventCode": "solana.core.vote.update_vote_state_switch", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.vote", + "eventCode": "solana.core.vote.vote", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.vote_switch", + "eventCode": "solana.core.vote.vote_switch", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "Vote111111111111111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.vote", + "operationCode": "solana.core.vote.withdraw", + "eventCode": "solana.core.vote.withdraw", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "ZkE1Gama1Proof11111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.zk_elgamal", + "operationCode": "solana.core.zk_elgamal.close_context_state", + "eventCode": "solana.core.zk_elgamal.close_context_state", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "ZkE1Gama1Proof11111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.zk_elgamal", + "operationCode": "solana.core.zk_elgamal.verify_from_account", + "eventCode": "solana.core.zk_elgamal.verify_from_account", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "ZkE1Gama1Proof11111111111111111111111111111", + "processorName": "solana.core", + "surfaceCode": "solana.core.zk_elgamal", + "operationCode": "solana.core.zk_elgamal.verify_inline", + "eventCode": "solana.core.zk_elgamal.verify_inline", + "executorName": "kb-lib.executor.solana.core", + "decoderName": "kb-lib.decoder.solana.core", + "status": "implemented", + "source": "kb-lib/src/executor/solana/core/intent.rs" + }, + { + "programId": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", + "processorName": "spl.associated_token_account", + "surfaceCode": "spl.associated_token_account", + "operationCode": "spl.associated_token_account.create", + "eventCode": "spl.associated_token_account.create", + "executorName": "kb-lib.executor.spl.associated_token_account", + "decoderName": "kb-lib.decoder.spl.associated_token_account", + "status": "implemented", + "source": "kb-lib/src/executor/spl/associated_token_account/intent.rs" + }, + { + "programId": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", + "processorName": "spl.associated_token_account", + "surfaceCode": "spl.associated_token_account", + "operationCode": "spl.associated_token_account.create_idempotent", + "eventCode": "spl.associated_token_account.create_idempotent", + "executorName": "kb-lib.executor.spl.associated_token_account", + "decoderName": "kb-lib.decoder.spl.associated_token_account", + "status": "implemented", + "source": "kb-lib/src/executor/spl/associated_token_account/intent.rs" + }, + { + "programId": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", + "processorName": "spl.associated_token_account", + "surfaceCode": "spl.associated_token_account", + "operationCode": "spl.associated_token_account.recover_nested", + "eventCode": "spl.associated_token_account.recover_nested", + "executorName": "kb-lib.executor.spl.associated_token_account", + "decoderName": "kb-lib.decoder.spl.associated_token_account", + "status": "implemented", + "source": "kb-lib/src/executor/spl/associated_token_account/intent.rs" + }, + { + "programId": "regVYJW7tcT8zipN5YiBvHsvR5jXW1uLFxaHSbugABg", + "processorName": "spl.elgamal_registry", + "surfaceCode": "spl.elgamal_registry", + "operationCode": "spl.elgamal_registry.create_registry", + "eventCode": "spl.elgamal_registry.create_registry", + "executorName": "kb-lib.executor.spl.elgamal_registry", + "decoderName": "kb-lib.decoder.spl.elgamal_registry", + "status": "implemented", + "source": "kb-lib/src/executor/spl/elgamal_registry/intent.rs" + }, + { + "programId": "regVYJW7tcT8zipN5YiBvHsvR5jXW1uLFxaHSbugABg", + "processorName": "spl.elgamal_registry", + "surfaceCode": "spl.elgamal_registry", + "operationCode": "spl.elgamal_registry.update_registry", + "eventCode": "spl.elgamal_registry.update_registry", + "executorName": "kb-lib.executor.spl.elgamal_registry", + "decoderName": "kb-lib.decoder.spl.elgamal_registry", + "status": "implemented", + "source": "kb-lib/src/executor/spl/elgamal_registry/intent.rs" + }, + { + "programId": "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo", + "processorName": "spl.memo", + "surfaceCode": "spl.memo.v1", + "operationCode": null, + "eventCode": "spl.memo.v1.add_memo", + "executorName": null, + "decoderName": "kb-lib.decoder.spl.memo", + "status": "decode_only", + "source": "kb-lib/src/decoder/spl/memo" + }, + { + "programId": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr", + "processorName": "spl.memo", + "surfaceCode": "spl.memo.v3", + "operationCode": null, + "eventCode": "spl.memo.v3.add_memo", + "executorName": null, + "decoderName": "kb-lib.decoder.spl.memo", + "status": "decode_only", + "source": "kb-lib/src/decoder/spl/memo" + }, + { + "programId": "Memo4c2pN8afCj432Lb7RMVKi9PbQnnW7ewFFaV3oAH", + "processorName": "spl.memo", + "surfaceCode": "spl.memo.v4", + "operationCode": "spl.memo.add_memo", + "eventCode": "spl.memo.v4.add_memo", + "executorName": "kb-lib.executor.spl.memo", + "decoderName": "kb-lib.decoder.spl.memo", + "status": "implemented", + "source": "kb-lib/src/executor/spl/memo/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.amount_to_ui_amount", + "eventCode": "spl.token.amount_to_ui_amount", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.approve", + "eventCode": "spl.token.approve", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.approve_checked", + "eventCode": "spl.token.approve_checked", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.batch", + "eventCode": "spl.token.batch", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.burn", + "eventCode": "spl.token.burn", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.burn_checked", + "eventCode": "spl.token.burn_checked", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.close_account", + "eventCode": "spl.token.close_account", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.freeze_account", + "eventCode": "spl.token.freeze_account", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.get_account_data_size", + "eventCode": "spl.token.get_account_data_size", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.initialize_account", + "eventCode": "spl.token.initialize_account", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.initialize_immutable_owner", + "eventCode": "spl.token.initialize_immutable_owner", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.initialize_mint", + "eventCode": "spl.token.initialize_mint", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.initialize_multisig", + "eventCode": "spl.token.initialize_multisig", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.mint_to", + "eventCode": "spl.token.mint_to", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.mint_to_checked", + "eventCode": "spl.token.mint_to_checked", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.revoke", + "eventCode": "spl.token.revoke", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.set_authority", + "eventCode": "spl.token.set_authority", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.sync_native", + "eventCode": "spl.token.sync_native", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.thaw_account", + "eventCode": "spl.token.thaw_account", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.transfer", + "eventCode": "spl.token.transfer", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.transfer_checked", + "eventCode": "spl.token.transfer_checked", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.ui_amount_to_amount", + "eventCode": "spl.token.ui_amount_to_amount", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.unwrap_lamports", + "eventCode": "spl.token.unwrap_lamports", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", + "processorName": "spl.token", + "surfaceCode": "spl.token", + "operationCode": "spl.token.withdraw_excess_lamports", + "eventCode": "spl.token.withdraw_excess_lamports", + "executorName": "kb-lib.executor.spl.token", + "decoderName": "kb-lib.decoder.spl.token", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.amount_to_ui_amount", + "eventCode": "spl.token_2022.amount_to_ui_amount", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.apply_pending_confidential_balance", + "eventCode": "spl.token_2022.apply_pending_confidential_balance", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.apply_pending_confidential_burn", + "eventCode": "spl.token_2022.apply_pending_confidential_burn", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.approve", + "eventCode": "spl.token_2022.approve", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.approve_checked", + "eventCode": "spl.token_2022.approve_checked", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.approve_confidential_transfer_account", + "eventCode": "spl.token_2022.approve_confidential_transfer_account", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.batch", + "eventCode": "spl.token_2022.batch", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.burn", + "eventCode": "spl.token_2022.burn", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.burn_checked", + "eventCode": "spl.token_2022.burn_checked", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.close_account", + "eventCode": "spl.token_2022.close_account", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.confidential_burn", + "eventCode": "spl.token_2022.confidential_burn", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.confidential_mint", + "eventCode": "spl.token_2022.confidential_mint", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.configure_confidential_transfer_account", + "eventCode": "spl.token_2022.configure_confidential_transfer_account", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.configure_confidential_transfer_account_with_registry", + "eventCode": "spl.token_2022.configure_confidential_transfer_account_with_registry", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.deposit_confidential_tokens", + "eventCode": "spl.token_2022.deposit_confidential_tokens", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.disable_confidential_credits", + "eventCode": "spl.token_2022.disable_confidential_credits", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.disable_confidential_transfer_fee_harvest", + "eventCode": "spl.token_2022.disable_confidential_transfer_fee_harvest", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.disable_cpi_guard", + "eventCode": "spl.token_2022.disable_cpi_guard", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.disable_non_confidential_credits", + "eventCode": "spl.token_2022.disable_non_confidential_credits", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.disable_required_transfer_memos", + "eventCode": "spl.token_2022.disable_required_transfer_memos", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.empty_confidential_transfer_account", + "eventCode": "spl.token_2022.empty_confidential_transfer_account", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.enable_confidential_credits", + "eventCode": "spl.token_2022.enable_confidential_credits", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.enable_confidential_transfer_fee_harvest", + "eventCode": "spl.token_2022.enable_confidential_transfer_fee_harvest", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.enable_cpi_guard", + "eventCode": "spl.token_2022.enable_cpi_guard", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.enable_non_confidential_credits", + "eventCode": "spl.token_2022.enable_non_confidential_credits", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.enable_required_transfer_memos", + "eventCode": "spl.token_2022.enable_required_transfer_memos", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.freeze_account", + "eventCode": "spl.token_2022.freeze_account", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.get_account_data_size", + "eventCode": "spl.token_2022.get_account_data_size", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.harvest_confidential_withheld_tokens_to_mint", + "eventCode": "spl.token_2022.harvest_confidential_withheld_tokens_to_mint", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.harvest_withheld_tokens_to_mint", + "eventCode": "spl.token_2022.harvest_withheld_tokens_to_mint", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_account", + "eventCode": "spl.token_2022.initialize_account", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_confidential_mint_burn_mint", + "eventCode": "spl.token_2022.initialize_confidential_mint_burn_mint", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_confidential_transfer_fee_config", + "eventCode": "spl.token_2022.initialize_confidential_transfer_fee_config", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_confidential_transfer_mint", + "eventCode": "spl.token_2022.initialize_confidential_transfer_mint", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_default_account_state", + "eventCode": "spl.token_2022.initialize_default_account_state", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_group_member_pointer", + "eventCode": "spl.token_2022.initialize_group_member_pointer", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_group_pointer", + "eventCode": "spl.token_2022.initialize_group_pointer", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_immutable_owner", + "eventCode": "spl.token_2022.initialize_immutable_owner", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_interest_bearing_mint", + "eventCode": "spl.token_2022.initialize_interest_bearing_mint", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_metadata_pointer", + "eventCode": "spl.token_2022.initialize_metadata_pointer", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_mint", + "eventCode": "spl.token_2022.initialize_mint", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_multisig", + "eventCode": "spl.token_2022.initialize_multisig", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_non_transferable_mint", + "eventCode": "spl.token_2022.initialize_non_transferable_mint", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_pausable_config", + "eventCode": "spl.token_2022.initialize_pausable_config", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_permanent_delegate", + "eventCode": "spl.token_2022.initialize_permanent_delegate", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_permissioned_burn", + "eventCode": "spl.token_2022.initialize_permissioned_burn", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_scaled_ui_amount", + "eventCode": "spl.token_2022.initialize_scaled_ui_amount", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_token_group", + "eventCode": "spl.token_2022.initialize_token_group", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_token_group_member", + "eventCode": "spl.token_2022.initialize_token_group_member", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_token_metadata", + "eventCode": "spl.token_2022.initialize_token_metadata", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_transfer_fee_config", + "eventCode": "spl.token_2022.initialize_transfer_fee_config", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.initialize_transfer_hook", + "eventCode": "spl.token_2022.initialize_transfer_hook", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.mint_to", + "eventCode": "spl.token_2022.mint_to", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.mint_to_checked", + "eventCode": "spl.token_2022.mint_to_checked", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.pause", + "eventCode": "spl.token_2022.pause", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.permissioned_burn", + "eventCode": "spl.token_2022.permissioned_burn", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.permissioned_burn_checked", + "eventCode": "spl.token_2022.permissioned_burn_checked", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.permissioned_confidential_burn", + "eventCode": "spl.token_2022.permissioned_confidential_burn", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.reallocate", + "eventCode": "spl.token_2022.reallocate", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.remove_token_metadata_key", + "eventCode": "spl.token_2022.remove_token_metadata_key", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.resume", + "eventCode": "spl.token_2022.resume", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.revoke", + "eventCode": "spl.token_2022.revoke", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.rotate_confidential_supply_elgamal_pubkey", + "eventCode": "spl.token_2022.rotate_confidential_supply_elgamal_pubkey", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.set_authority", + "eventCode": "spl.token_2022.set_authority", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.set_transfer_fee", + "eventCode": "spl.token_2022.set_transfer_fee", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.sync_native", + "eventCode": "spl.token_2022.sync_native", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.thaw_account", + "eventCode": "spl.token_2022.thaw_account", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.transfer", + "eventCode": "spl.token_2022.transfer", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.transfer_checked", + "eventCode": "spl.token_2022.transfer_checked", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.transfer_checked_with_fee", + "eventCode": "spl.token_2022.transfer_checked_with_fee", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.transfer_confidential_tokens", + "eventCode": "spl.token_2022.transfer_confidential_tokens", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.transfer_confidential_tokens_with_fee", + "eventCode": "spl.token_2022.transfer_confidential_tokens_with_fee", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.ui_amount_to_amount", + "eventCode": "spl.token_2022.ui_amount_to_amount", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.unwrap_lamports", + "eventCode": "spl.token_2022.unwrap_lamports", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.update_confidential_decryptable_supply", + "eventCode": "spl.token_2022.update_confidential_decryptable_supply", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.update_confidential_transfer_mint", + "eventCode": "spl.token_2022.update_confidential_transfer_mint", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.update_default_account_state", + "eventCode": "spl.token_2022.update_default_account_state", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.update_group_member_pointer", + "eventCode": "spl.token_2022.update_group_member_pointer", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.update_group_pointer", + "eventCode": "spl.token_2022.update_group_pointer", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.update_interest_bearing_rate", + "eventCode": "spl.token_2022.update_interest_bearing_rate", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.update_metadata_pointer", + "eventCode": "spl.token_2022.update_metadata_pointer", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.update_scaled_ui_amount_multiplier", + "eventCode": "spl.token_2022.update_scaled_ui_amount_multiplier", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.update_token_group_max_size", + "eventCode": "spl.token_2022.update_token_group_max_size", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.update_token_metadata_field", + "eventCode": "spl.token_2022.update_token_metadata_field", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.update_transfer_hook", + "eventCode": "spl.token_2022.update_transfer_hook", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.withdraw_confidential_tokens", + "eventCode": "spl.token_2022.withdraw_confidential_tokens", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.withdraw_confidential_withheld_tokens_from_accounts", + "eventCode": "spl.token_2022.withdraw_confidential_withheld_tokens_from_accounts", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.withdraw_confidential_withheld_tokens_from_mint", + "eventCode": "spl.token_2022.withdraw_confidential_withheld_tokens_from_mint", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.withdraw_excess_lamports", + "eventCode": "spl.token_2022.withdraw_excess_lamports", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.withdraw_withheld_tokens_from_accounts", + "eventCode": "spl.token_2022.withdraw_withheld_tokens_from_accounts", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + }, + { + "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", + "processorName": "spl.token_2022", + "surfaceCode": "spl.token_2022", + "operationCode": "spl.token_2022.withdraw_withheld_tokens_from_mint", + "eventCode": "spl.token_2022.withdraw_withheld_tokens_from_mint", + "executorName": "kb-lib.executor.spl.token_2022", + "decoderName": "kb-lib.decoder.spl.token_2022", + "status": "implemented", + "source": "kb-lib/src/executor/spl/token_2022/intent.rs" + } + ] +} diff --git a/test-fixtures/contract-matrices/SPL_ASSOCIATED_TOKEN_ACCOUNT_MATRIX.json b/test-fixtures/contract-matrices/SPL_ASSOCIATED_TOKEN_ACCOUNT_MATRIX.json index 359cfef..668869e 100644 --- a/test-fixtures/contract-matrices/SPL_ASSOCIATED_TOKEN_ACCOUNT_MATRIX.json +++ b/test-fixtures/contract-matrices/SPL_ASSOCIATED_TOKEN_ACCOUNT_MATRIX.json @@ -18,8 +18,8 @@ "programId": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL", "systemProgramId": "11111111111111111111111111111111", "supportedTokenPrograms": [ - {"code": "spl_token", "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", "scope": "classic_token_account_lifecycle_only"}, - {"code": "spl_token_2022", "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", "scope": "ata_lifecycle_only_without_general_token_2022_instruction_or_extension_decode"} + {"code": "spl.token", "programId": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA", "scope": "classic_token_account_lifecycle_only"}, + {"code": "spl.token_2022", "programId": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb", "scope": "ata_lifecycle_only_without_general_token_2022_instruction_or_extension_decode"} ], "interface": { "workspaceConstraint": "^2.0", @@ -87,11 +87,11 @@ "addressRules": ["associated_token_account = PDA(wallet_owner, token_program, mint)", "observed associated_token_account is retained on mismatch"], "tokenProgramDifferences": {"classic": "create and initialize a classic token account", "token_2022": "size is obtained from the Token-2022 mint and immutable-owner initialization is performed before account initialization; extensions themselves remain out of decoder scope"}, "runtimeRules": ["fails if the associated account already exists", "funding account pays rent and creation cost", "mint and created account must be coherent with the selected token program"], - "event": "spl_associated_token_account.create", + "event": "spl.associated_token_account.create", "authorizedProjections": ["token_accounts:ata_created"], "forbiddenProjections": ["token_balance_snapshot", "duplicate_spl_token_initialize_account_cpi", "token_2022_extension_fact"], "officialBuilder": {"available": true, "function": "create_associated_token_account", "canonicalWireOnly": true}, - "executorSupport": {"status": "supported", "operationCode": "spl_associated_token_account.create", "builder": "create_associated_token_account", "simulation": "required", "defaultMode": "dry_run"}, + "executorSupport": {"status": "supported", "operationCode": "spl.associated_token_account.create", "builder": "create_associated_token_account", "simulation": "required", "defaultMode": "dry_run"}, "proofs": {"synthetic": ["canonical_00", "legacy_empty", "classic_token_program", "token_2022_program", "wrong_ata", "missing_account", "extra_account", "duplicate_account", "wrong_flags", "unknown_suffix", "outer", "inner_cpi", "committed", "failed_intent"], "localnet": "not_tested", "devnet": "not_tested", "mainnetSignatures": []} }, { @@ -111,11 +111,11 @@ "addressRules": ["associated_token_account = PDA(wallet_owner, token_program, mint)", "existing account must retain the selected token program, wallet owner and mint"], "tokenProgramDifferences": {"classic": "existing classic account is accepted only when owner and mint match", "token_2022": "existing Token-2022 account is accepted only when owner and mint match; no extension semantics are inferred"}, "runtimeRules": ["creates when absent", "succeeds without recreating when an initialized compatible ATA already exists", "fails when an existing account has a different wallet owner, mint or account owner program"], - "event": "spl_associated_token_account.create_idempotent", + "event": "spl.associated_token_account.create_idempotent", "authorizedProjections": ["token_accounts:ata_created_or_reused_idempotently"], "forbiddenProjections": ["token_balance_snapshot", "duplicate_spl_token_initialize_account_cpi", "token_2022_extension_fact"], "officialBuilder": {"available": true, "function": "create_associated_token_account_idempotent", "canonicalWireOnly": true}, - "executorSupport": {"status": "supported", "operationCode": "spl_associated_token_account.create_idempotent", "builder": "create_associated_token_account_idempotent", "simulation": "required", "defaultMode": "dry_run"}, + "executorSupport": {"status": "supported", "operationCode": "spl.associated_token_account.create_idempotent", "builder": "create_associated_token_account_idempotent", "simulation": "required", "defaultMode": "dry_run"}, "proofs": {"synthetic": ["canonical_01", "absent_account", "compatible_existing_account", "conflicting_existing_owner", "conflicting_existing_mint", "conflicting_existing_program", "classic_token_program", "token_2022_program", "wrong_ata", "wrong_flags", "unexpected_suffix", "outer", "inner_cpi", "committed", "failed_intent"], "localnet": "not_tested", "devnet": ["5Vw4QFpMa8oJ8MsLrvDg4RFzxqUh27mTFRFzzwJFoA4uAry8rZQc6GP92aidzWugn3CeZ5NYNxDp7tZ6bh8XyN1P", "2H9VfhDySdXMteazm2P3s2fTttJBQzMJinQtKqsLtkjDg7zbFFgiWG81UxRQF4va3bbR2pUV4QGo2qErisR8CPbP", "3wWTkx45LoDR3UaU8VUfsWxwHuLFyJyhrnDrmijCa7pXPdmJKz3rQ1LdyDvb78dvNRiKqw5ee7HuZ6Gjj1Gpfv6q", "bMMjoHcwbaTvLXerdQ4kbGXGb7wydiTyvSEwwmoKKLQcRWWBzqGUMYHZztonNnER1iWZ7yKp9p3neeMhypX4QAJ", "4RZKA3KwEbSqgU8UnemTgvd3fBgJmoSK2nmaaTNP8nJGTVh6DrFwrHVZYCBvLFvhvzUdi9p1KRFe4hHqYt7JbVSG"], "mainnetSignatures": ["2F9RvuCkevfJN7ju252hAWoCE58wagCXCWHQF9Wsdtsxvp3HcuNJQFCwU7zGqe3z3b8pv3vPp4xY5EH7KLcaHQCY"], "realCorpusStatus": "controlled classic and Token-2022 CreateIdempotent creation then compatible-existing reuse confirmed, materialized once per signature and replayed idempotently; search-discovered Token-2022 outer transaction remains additional corpus"} }, { @@ -136,11 +136,11 @@ "addressRules": ["owner_associated_token_account = PDA(wallet_owner, token_program, owner_mint)", "nested_associated_token_account = PDA(owner_associated_token_account, token_program, nested_mint)", "wallet_nested_mint_associated_token_account = PDA(wallet_owner, token_program, nested_mint)"], "tokenProgramDifferences": {"classic": "transfer the complete nested balance and close the nested classic token account", "token_2022": "same ATA address relationships through Token-2022 CPIs; extension-specific transfer or close restrictions can prevent recovery and are not decoded as ATA facts"}, "runtimeRules": ["all three derived addresses must match their observed accounts", "owner and nested token accounts must be initialized and coherent with their respective mints", "wallet owner must sign", "complete nested token balance is moved to the wallet destination ATA", "nested account is closed and its lamports are returned to the wallet"], - "event": "spl_associated_token_account.recover_nested", + "event": "spl.associated_token_account.recover_nested", "authorizedProjections": ["token_accounts:nested_ata_recovered", "risk:nested_ata_anti_pattern_recovered"], "forbiddenProjections": ["duplicate_spl_token_transfer_cpi", "duplicate_spl_token_close_account_cpi", "token_balance_snapshot", "token_2022_extension_fact"], "officialBuilder": {"available": true, "function": "recover_nested", "canonicalWireOnly": true}, - "executorSupport": {"status": "supported", "operationCode": "spl_associated_token_account.recover_nested", "builder": "recover_nested", "simulation": "required", "defaultMode": "dry_run"}, + "executorSupport": {"status": "supported", "operationCode": "spl.associated_token_account.recover_nested", "builder": "recover_nested", "simulation": "required", "defaultMode": "dry_run"}, "proofs": {"synthetic": ["canonical_02", "classic_token_program", "token_2022_program", "valid_three_pda_relationships", "wrong_nested_ata", "wrong_destination_ata", "wrong_owner_ata", "owner_and_nested_mints_not_inverted", "missing_account", "extra_account", "duplicate_account", "wrong_flags", "unexpected_suffix", "outer", "inner_cpi", "committed", "failed_intent"], "localnet": "not_tested", "devnet": ["37LG6GdMRp5ECG8qf1RSYxmriJk75UtCwqwzXZWpArebkKo6BQvGhYEnbDh2A6KWiUaHK28Zy1gGGZ5zihvrHskM"], "mainnetSignatures": [], "realCorpusStatus": "controlled classic RecoverNested confirmed with positive raw balance transfer, nested ATA closure, owner and destination post-validation, two distinct ATA lifecycle and risk projections, and idempotent second replay", "controlledDevnetFixture": {"walletOwner": "DwuAapPLg6pEJ4QhmxvPg8rzkavmYdg5FW4dfEMcg8B2", "ownerMint": "So11111111111111111111111111111111111111112", "ownerAssociatedTokenAccount": "3tdXq1W7vEbbkxQmT1r2fc349uYti98zpwLKhp7FFbF5", "nestedMint": "3fd5CqP1w4Y1xeMoAe3apA7Jf5SbL3vboxv7ihyXhC9A", "nestedAssociatedTokenAccount": "AAyvGeKpq6i3kxMcScJLcN2u5iyAsspr731LhgXygti5", "walletNestedMintAssociatedTokenAccount": "69TP2QoSx2inueFAEb6npjumH5o3wGJQDSwwAJLLfyWp", "rawAmountTransferred": "1000000000", "nestedAccountClosed": true, "destinationUiBalanceAfter": "1", "materializedOutputCount": 2}} } ], diff --git a/test-fixtures/contract-matrices/SPL_MEMO_MATRIX.json b/test-fixtures/contract-matrices/SPL_MEMO_MATRIX.json index b8c1e0a..82ebbe4 100644 --- a/test-fixtures/contract-matrices/SPL_MEMO_MATRIX.json +++ b/test-fixtures/contract-matrices/SPL_MEMO_MATRIX.json @@ -25,7 +25,7 @@ { "generation": "v1", "programId": "Memo1UhkJRfHyvLMcVucJwxXeuD728EqVDDwQDxFMNo", - "surfaceCode": "spl_memo_v1", + "surfaceCode": "spl.memo.v1", "status": "historique immuable", "instructionData": "octets UTF-8 bruts", "emptyPayload": "accepte", @@ -49,7 +49,7 @@ { "generation": "v3", "programId": "MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr", - "surfaceCode": "spl_memo_v3", + "surfaceCode": "spl.memo.v3", "status": "historique encore largement observe", "instructionData": "octets UTF-8 bruts", "emptyPayload": "accepte", @@ -78,7 +78,7 @@ { "generation": "v4", "programId": "Memo4c2pN8afCj432Lb7RMVKi9PbQnnW7ewFFaV3oAH", - "surfaceCode": "spl_memo_v4", + "surfaceCode": "spl.memo.v4", "status": "generation courante publiee avec implementation Pinocchio", "instructionData": "octets UTF-8 bruts", "emptyPayload": "accepte", @@ -116,7 +116,7 @@ "materializationContract": { "crate": "kb-lib", "component": "materializer.transaction.annotations", - "processorName": "transaction_annotations", + "processorName": "materializer.transaction.annotations", "materializedFamily": "transaction_annotation", "acceptedEntries": ["add_memo", "memo_intent", "invalid_memo_attempt"], "projectedEntry": "add_memo", @@ -142,7 +142,7 @@ }, "executorContract": { "crate": "kb-lib.executor.spl.memo", - "operationCode": "spl_memo.add_memo", + "operationCode": "spl.memo.add_memo", "typedIntent": "SplMemoExecutionIntent", "officialBuilder": "spl_memo_interface::instruction::build_memo", "supportedGenerations": ["v4"], diff --git a/test-fixtures/contract-matrices/SPL_TOKEN_2022_MATRIX.json b/test-fixtures/contract-matrices/SPL_TOKEN_2022_MATRIX.json index 863aa7d..5511ca1 100644 --- a/test-fixtures/contract-matrices/SPL_TOKEN_2022_MATRIX.json +++ b/test-fixtures/contract-matrices/SPL_TOKEN_2022_MATRIX.json @@ -2039,7 +2039,7 @@ "existingOwnersInspected": [ "token_accounts", "admin", - "fees", + "materializer.fees", "compliance_audit", "risk", "lifecycle" @@ -2052,7 +2052,7 @@ "admin": [ "committed_authority_and_configuration_changes" ], - "fees": [ + "materializer.fees": [ "instruction_proven_transfer_fee_parameters_and_withheld_movements_only" ], "compliance_audit": [ diff --git a/test-fixtures/contract-matrices/SPL_TOKEN_MATRIX.json b/test-fixtures/contract-matrices/SPL_TOKEN_MATRIX.json index 0cc4dad..e877414 100644 --- a/test-fixtures/contract-matrices/SPL_TOKEN_MATRIX.json +++ b/test-fixtures/contract-matrices/SPL_TOKEN_MATRIX.json @@ -123,7 +123,7 @@ "freeze_authority" ], "limits": [], - "event": "spl_token.initialize_mint", + "event": "spl.token.initialize_mint", "projections": [ "token_accounts" ], @@ -167,7 +167,7 @@ "authorityForm": "not_applicable", "decodedFields": [], "limits": [], - "event": "spl_token.initialize_account", + "event": "spl.token.initialize_account", "projections": [ "token_accounts" ], @@ -215,7 +215,7 @@ "limits": [ "1 <= M <= N <= 11" ], - "event": "spl_token.initialize_multisig", + "event": "spl.token.initialize_multisig", "projections": [ "token_accounts", "admin", @@ -263,7 +263,7 @@ "amount_raw" ], "limits": [], - "event": "spl_token.transfer", + "event": "spl.token.transfer", "projections": [ "token_accounts" ], @@ -273,7 +273,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.transfer", + "operationCode": "spl.token.transfer", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -312,7 +312,7 @@ "amount_raw" ], "limits": [], - "event": "spl_token.approve", + "event": "spl.token.approve", "projections": [ "token_accounts", "risk" @@ -323,7 +323,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.approve", + "operationCode": "spl.token.approve", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -359,7 +359,7 @@ "authorityForm": "single_or_multisig", "decodedFields": [], "limits": [], - "event": "spl_token.revoke", + "event": "spl.token.revoke", "projections": [ "token_accounts", "risk" @@ -370,7 +370,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.revoke", + "operationCode": "spl.token.revoke", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -412,7 +412,7 @@ "new_authority" ], "limits": [], - "event": "spl_token.set_authority", + "event": "spl.token.set_authority", "projections": [ "admin", "risk" @@ -423,7 +423,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.set_authority", + "operationCode": "spl.token.set_authority", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -460,7 +460,7 @@ "amount_raw" ], "limits": [], - "event": "spl_token.mint_to", + "event": "spl.token.mint_to", "projections": [ "token_accounts" ], @@ -470,7 +470,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.mint_to", + "operationCode": "spl.token.mint_to", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -507,7 +507,7 @@ "amount_raw" ], "limits": [], - "event": "spl_token.burn", + "event": "spl.token.burn", "projections": [ "token_accounts" ], @@ -517,7 +517,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.burn", + "operationCode": "spl.token.burn", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -552,7 +552,7 @@ "authorityForm": "single_or_multisig", "decodedFields": [], "limits": [], - "event": "spl_token.close_account", + "event": "spl.token.close_account", "projections": [ "token_accounts" ], @@ -562,7 +562,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.close_account", + "operationCode": "spl.token.close_account", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -601,7 +601,7 @@ "authorityForm": "single_or_multisig", "decodedFields": [], "limits": [], - "event": "spl_token.freeze_account", + "event": "spl.token.freeze_account", "projections": [ "token_accounts", "risk" @@ -612,7 +612,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.freeze_account", + "operationCode": "spl.token.freeze_account", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -647,7 +647,7 @@ "authorityForm": "single_or_multisig", "decodedFields": [], "limits": [], - "event": "spl_token.thaw_account", + "event": "spl.token.thaw_account", "projections": [ "token_accounts", "risk" @@ -658,7 +658,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.thaw_account", + "operationCode": "spl.token.thaw_account", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -697,7 +697,7 @@ "decimals" ], "limits": [], - "event": "spl_token.transfer_checked", + "event": "spl.token.transfer_checked", "projections": [ "token_accounts" ], @@ -707,7 +707,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.transfer_checked", + "operationCode": "spl.token.transfer_checked", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -750,7 +750,7 @@ "decimals" ], "limits": [], - "event": "spl_token.approve_checked", + "event": "spl.token.approve_checked", "projections": [ "token_accounts", "risk" @@ -761,7 +761,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.approve_checked", + "operationCode": "spl.token.approve_checked", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -801,7 +801,7 @@ "decimals" ], "limits": [], - "event": "spl_token.mint_to_checked", + "event": "spl.token.mint_to_checked", "projections": [ "token_accounts" ], @@ -811,7 +811,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.mint_to_checked", + "operationCode": "spl.token.mint_to_checked", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -851,7 +851,7 @@ "decimals" ], "limits": [], - "event": "spl_token.burn_checked", + "event": "spl.token.burn_checked", "projections": [ "token_accounts" ], @@ -861,7 +861,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.burn_checked", + "operationCode": "spl.token.burn_checked", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -901,7 +901,7 @@ "owner" ], "limits": [], - "event": "spl_token.initialize_account2", + "event": "spl.token.initialize_account2", "projections": [ "token_accounts" ], @@ -943,7 +943,7 @@ "authorityForm": "not_applicable", "decodedFields": [], "limits": [], - "event": "spl_token.sync_native", + "event": "spl.token.sync_native", "projections": [ "token_accounts" ], @@ -953,7 +953,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.sync_native", + "operationCode": "spl.token.sync_native", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -990,7 +990,7 @@ "owner" ], "limits": [], - "event": "spl_token.initialize_account3", + "event": "spl.token.initialize_account3", "projections": [ "token_accounts" ], @@ -1000,7 +1000,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.initialize_account", + "operationCode": "spl.token.initialize_account", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -1040,7 +1040,7 @@ "limits": [ "1 <= M <= N <= 11" ], - "event": "spl_token.initialize_multisig2", + "event": "spl.token.initialize_multisig2", "projections": [ "token_accounts", "admin", @@ -1052,7 +1052,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.initialize_multisig", + "operationCode": "spl.token.initialize_multisig", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -1091,7 +1091,7 @@ "freeze_authority" ], "limits": [], - "event": "spl_token.initialize_mint2", + "event": "spl.token.initialize_mint2", "projections": [ "token_accounts" ], @@ -1101,7 +1101,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.initialize_mint", + "operationCode": "spl.token.initialize_mint", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -1133,7 +1133,7 @@ "authorityForm": "not_applicable", "decodedFields": [], "limits": [], - "event": "spl_token.get_account_data_size", + "event": "spl.token.get_account_data_size", "projections": [], "officialBuilder": { "available": true, @@ -1141,7 +1141,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.get_account_data_size", + "operationCode": "spl.token.get_account_data_size", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -1174,7 +1174,7 @@ "authorityForm": "not_applicable", "decodedFields": [], "limits": [], - "event": "spl_token.initialize_immutable_owner", + "event": "spl.token.initialize_immutable_owner", "projections": [], "officialBuilder": { "available": true, @@ -1182,7 +1182,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.initialize_immutable_owner", + "operationCode": "spl.token.initialize_immutable_owner", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -1218,7 +1218,7 @@ "amount_raw" ], "limits": [], - "event": "spl_token.amount_to_ui_amount", + "event": "spl.token.amount_to_ui_amount", "projections": [], "officialBuilder": { "available": true, @@ -1226,7 +1226,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.amount_to_ui_amount", + "operationCode": "spl.token.amount_to_ui_amount", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -1261,7 +1261,7 @@ "ui_amount_utf8" ], "limits": [], - "event": "spl_token.ui_amount_to_amount", + "event": "spl.token.ui_amount_to_amount", "projections": [], "officialBuilder": { "available": true, @@ -1269,7 +1269,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.ui_amount_to_amount", + "operationCode": "spl.token.ui_amount_to_amount", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -1305,7 +1305,7 @@ "authorityForm": "single_or_multisig", "decodedFields": [], "limits": [], - "event": "spl_token.withdraw_excess_lamports", + "event": "spl.token.withdraw_excess_lamports", "projections": [ "token_accounts" ], @@ -1315,7 +1315,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.withdraw_excess_lamports", + "operationCode": "spl.token.withdraw_excess_lamports", "constructibility": "official_builder_proven", "clusterDeployment": "separate_from_library_support" }, @@ -1355,7 +1355,7 @@ "optional_amount_lamports" ], "limits": [], - "event": "spl_token.unwrap_lamports", + "event": "spl.token.unwrap_lamports", "projections": [ "token_accounts" ], @@ -1365,7 +1365,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.unwrap_lamports", + "operationCode": "spl.token.unwrap_lamports", "constructibility": "official_builder_proven", "clusterDeployment": "devnet_simulation_succeeded_2026-07-16" }, @@ -1408,7 +1408,7 @@ "255 bytes per child", "no nested Batch" ], - "event": "spl_token.batch", + "event": "spl.token.batch", "projections": [ "child_dependent" ], @@ -1418,7 +1418,7 @@ }, "executorSupport": { "status": "supported", - "operationCode": "spl_token.batch", + "operationCode": "spl.token.batch", "constructibility": "official_builder_proven", "clusterDeployment": "devnet_simulation_succeeded_2026-07-16" },