From 9fd240b622500f644732da24f984f55fad0636e3 Mon Sep 17 00:00:00 2001 From: Orex Date: Thu, 27 Jun 2024 09:52:56 +0200 Subject: [PATCH 1/4] Add 1st instruction --- hooks/useGovernanceAssets.ts | 16 ++++++++++++++++ package.json | 2 +- pages/dao/[symbol]/proposal/new.tsx | 2 ++ utils/uiTypes/proposalCreationTypes.ts | 2 ++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/hooks/useGovernanceAssets.ts b/hooks/useGovernanceAssets.ts index 668da62f9..f16122219 100644 --- a/hooks/useGovernanceAssets.ts +++ b/hooks/useGovernanceAssets.ts @@ -140,6 +140,10 @@ export default function useGovernanceAssets() { // // Packages are visible by default const packages: Packages = { + [PackageEnum.Adrena]: { + name: 'Adrena', + image: '/img/adrena.svg', + }, [PackageEnum.Common]: { name: 'Common', }, @@ -213,6 +217,18 @@ export default function useGovernanceAssets() { // // If isVisible is not set, it is equal to canUseAnyInstruction const instructionsMap: InstructionsMap = { + /* + █████ ██████ ██████ ███████ ███ ██ █████ + ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██ + ███████ ██ ██ ██████ █████ ██ ██ ██ ███████ + ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ + ██ ██ ██████ ██ ██ ███████ ██ ████ ██ ██ + */ + [Instructions.AdrenaSetPoolAllowSwap]: { + name: 'Set Pool Allow Swap', + packageId: PackageEnum.Adrena, + }, + /* ██████ ██████ ███ ███ ███ ███ ██████ ███ ██ ██ ██ ██ ████ ████ ████ ████ ██ ██ ████ ██ diff --git a/package.json b/package.json index 9fb7a2fdc..e90592bd7 100644 --- a/package.json +++ b/package.json @@ -172,7 +172,7 @@ "ts-node": "10.9.1", "tsconfig-paths": "3.14.1", "urql": "3.0.3", - "yup": "0.32.11", + "yup": "1.4.0", "zustand": "3.7.2" }, "devDependencies": { diff --git a/pages/dao/[symbol]/proposal/new.tsx b/pages/dao/[symbol]/proposal/new.tsx index 06b669f77..818b8a5bd 100644 --- a/pages/dao/[symbol]/proposal/new.tsx +++ b/pages/dao/[symbol]/proposal/new.tsx @@ -58,6 +58,7 @@ import SwitchboardFundOracle from './components/instructions/Switchboard/FundOra import WithdrawFromOracle from './components/instructions/Switchboard/WithdrawFromOracle' import StakeValidator from './components/instructions/Validators/StakeValidator' import SanctumSplDepositStake from './components/instructions/Validators/SanctumSplDepositStake' +import SetPoolAllowSwap from './components/instructions/Adrena/SetPoolAllowSwap' import DeactivateValidatorStake from './components/instructions/Validators/DeactivateStake' import WithdrawValidatorStake from './components/instructions/Validators/WithdrawStake' import DelegateStake from './components/instructions/Validators/DelegateStake' @@ -463,6 +464,7 @@ const New = () => { | null } = useMemo( () => ({ + [Instructions.AdrenaSetPoolAllowSwap]: SetPoolAllowSwap, [Instructions.Burn]: BurnTokens, [Instructions.Transfer]: SplTokenTransfer, [Instructions.ProgramUpgrade]: ProgramUpgrade, diff --git a/utils/uiTypes/proposalCreationTypes.ts b/utils/uiTypes/proposalCreationTypes.ts index 897268c8b..3d9c06700 100644 --- a/utils/uiTypes/proposalCreationTypes.ts +++ b/utils/uiTypes/proposalCreationTypes.ts @@ -12,6 +12,7 @@ import * as PaymentStreaming from '@mean-dao/payment-streaming' // Alphabetical order export enum PackageEnum { + Adrena, Common, Distribution, Dual, @@ -291,6 +292,7 @@ export interface JoinDAOForm { } export enum Instructions { + AdrenaSetPoolAllowSwap, Base64, Burn, ChangeMakeDonation, From 4cf08a24ec751c60c10520114f0d99573a2e6cf3 Mon Sep 17 00:00:00 2001 From: Orex Date: Wed, 3 Jul 2024 16:24:09 +0400 Subject: [PATCH 2/4] save --- hooks/useAdrenaProgram.ts | 33 + hooks/useGovernanceAssets.ts | 40 + idls/adrena.json | 9398 +++++++ idls/adrena.ts | 22335 ++++++++++++++++ .../instructions/Adrena/AddVest.tsx | 148 + .../Adrena/MintLmTokensFromBucket.tsx | 125 + .../Adrena/SetCustodyAllowSwap.tsx | 125 + .../Adrena/SetCustodyAllowTrade.tsx | 125 + .../instructions/Adrena/SetCustodyConfig.tsx | 125 + .../SetCustodyMaxCumulativeShortSizeUsd.tsx | 125 + .../instructions/Adrena/SetPoolAllowSwap.tsx | 125 + .../instructions/Adrena/SetPoolAllowTrade.tsx | 125 + .../Adrena/SetPoolAumSoftCapUsd.tsx | 125 + .../Adrena/SetPoolLiquidityState.tsx | 125 + .../SetStakingLmEmissionPotentiometers.tsx | 125 + pages/dao/[symbol]/proposal/new.tsx | 26 +- public/img/adrena.svg | 11 + tools/sdk/adrena/utils.ts | 17 + utils/uiTypes/proposalCreationTypes.ts | 10 + 19 files changed, 33266 insertions(+), 2 deletions(-) create mode 100644 hooks/useAdrenaProgram.ts create mode 100644 idls/adrena.json create mode 100644 idls/adrena.ts create mode 100644 pages/dao/[symbol]/proposal/components/instructions/Adrena/AddVest.tsx create mode 100644 pages/dao/[symbol]/proposal/components/instructions/Adrena/MintLmTokensFromBucket.tsx create mode 100644 pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowSwap.tsx create mode 100644 pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowTrade.tsx create mode 100644 pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyConfig.tsx create mode 100644 pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyMaxCumulativeShortSizeUsd.tsx create mode 100644 pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowSwap.tsx create mode 100644 pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowTrade.tsx create mode 100644 pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAumSoftCapUsd.tsx create mode 100644 pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolLiquidityState.tsx create mode 100644 pages/dao/[symbol]/proposal/components/instructions/Adrena/SetStakingLmEmissionPotentiometers.tsx create mode 100644 public/img/adrena.svg create mode 100644 tools/sdk/adrena/utils.ts diff --git a/hooks/useAdrenaProgram.ts b/hooks/useAdrenaProgram.ts new file mode 100644 index 000000000..a473f6427 --- /dev/null +++ b/hooks/useAdrenaProgram.ts @@ -0,0 +1,33 @@ +import { useEffect, useState } from 'react' +import { PublicKey } from '@solana/web3.js' + +import { Adrena, IDL as ADRENA_IDL } from '../idls/adrena' +import AdrenaJson from '../idls/adrena.json' + +import { useConnection } from '@solana/wallet-adapter-react' +import { AnchorProvider, Program, Wallet } from '@coral-xyz/anchor' +import useWalletOnePointOh from './useWalletOnePointOh' + +export default function useAdrenaProgram(): Program | null { + const { connection } = useConnection() + const wallet = useWalletOnePointOh() + const [adrenaProgram, setAdrenaProgram] = useState | null>( + null + ) + + useEffect(() => { + setAdrenaProgram( + new Program( + ADRENA_IDL, + new PublicKey(AdrenaJson.metadata.address), + // The wallet type is compatible with the anchor provider, force typing + new AnchorProvider(connection, (wallet as unknown) as Wallet, { + commitment: 'processed', + skipPreflight: true, + }) + ) + ) + }, [connection, wallet]) + + return adrenaProgram +} diff --git a/hooks/useGovernanceAssets.ts b/hooks/useGovernanceAssets.ts index f16122219..34660ba91 100644 --- a/hooks/useGovernanceAssets.ts +++ b/hooks/useGovernanceAssets.ts @@ -224,10 +224,50 @@ export default function useGovernanceAssets() { ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██████ ██ ██ ███████ ██ ████ ██ ██ */ + [Instructions.AdrenaAddVest]: { + name: 'Add Vest', + packageId: PackageEnum.Adrena, + }, + [Instructions.AdrenaMintLmTokensFromBucket]: { + name: 'Mint LM Tokens from Bucket', + packageId: PackageEnum.Adrena, + }, + [Instructions.AdrenaSetCustodyAllowSwap]: { + name: 'Set Custody Allow Swap', + packageId: PackageEnum.Adrena, + }, + [Instructions.AdrenaSetCustodyAllowTrade]: { + name: 'Set Custody Allow Trade', + packageId: PackageEnum.Adrena, + }, + [Instructions.AdrenaSetCustodyConfig]: { + name: 'Set Custody Config', + packageId: PackageEnum.Adrena, + }, + [Instructions.AdrenaSetCustodyMaxCumulativeShortSizeUsd]: { + name: 'Set Custody Max Cumulative Short Size Usd', + packageId: PackageEnum.Adrena, + }, [Instructions.AdrenaSetPoolAllowSwap]: { name: 'Set Pool Allow Swap', packageId: PackageEnum.Adrena, }, + [Instructions.AdrenaSetPoolAllowTrade]: { + name: 'Set Pool Allow Trade', + packageId: PackageEnum.Adrena, + }, + [Instructions.AdrenaSetPoolAumSoftCapUsd]: { + name: 'Set Pool Aum Soft Cap Usd', + packageId: PackageEnum.Adrena, + }, + [Instructions.AdrenaSetPoolLiquidityState]: { + name: 'Set Pool Liquidity State', + packageId: PackageEnum.Adrena, + }, + [Instructions.AdrenaSetStakingLmEmissionPotentiometers]: { + name: 'Set Staking LM Emission Potentiometers', + packageId: PackageEnum.Adrena, + }, /* ██████ ██████ ███ ███ ███ ███ ██████ ███ ██ diff --git a/idls/adrena.json b/idls/adrena.json new file mode 100644 index 000000000..0aec6393b --- /dev/null +++ b/idls/adrena.json @@ -0,0 +1,9398 @@ +{ + "version": "1.0.0", + "name": "adrena", + "instructions": [ + { + "name": "initOneCore", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "protocolFeeRecipient", + "isMut": false, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitOneParams" + } + } + ] + }, + { + "name": "initTwoLmTokenMetadata", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "lmTokenMintMetadata", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "mplTokenMetadataProgram", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": ["#11"] + } + ], + "args": [] + }, + { + "name": "initThreeGovernance", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#6", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + } + ], + "args": [] + }, + { + "name": "initFourVesting", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "vestRegistry", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + } + ], + "args": [] + }, + { + "name": "addVest", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "owner", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#3"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "vestRegistry", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "vest", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#10", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#12", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#13", + "Account owned by governance storing user information" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": ["#17"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddVestParams" + } + } + ], + "returns": "u8" + }, + { + "name": "claimVest", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "vestRegistry", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "vest", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#9", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#11", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#12", + "Account owned by governance storing user information" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": ["#17"] + } + ], + "args": [], + "returns": "u64" + }, + { + "name": "addPoolPartOne", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "lpTokenMintMetadata", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "mplTokenMetadataProgram", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": ["#12"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddPoolPartOneParams" + } + } + ], + "returns": "u8" + }, + { + "name": "addPoolPartTwo", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "lpTokenMint", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "finalizeGenesisLockCampaignThread", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": ["#13"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddPoolPartTwoParams" + } + } + ], + "returns": "u8" + }, + { + "name": "removePool", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + } + ], + "args": [], + "returns": "u8" + }, + { + "name": "addCustody", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "custodyTokenMint", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": ["#11"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddCustodyParams" + } + } + ], + "returns": "u8" + }, + { + "name": "removeCustody", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#9"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveCustodyParams" + } + } + ], + "returns": "u8" + }, + { + "name": "setCustodyConfig", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetCustodyConfigParams" + } + } + ], + "returns": "u8" + }, + { + "name": "setCustodyAllowSwap", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetCustodyAllowSwapParams" + } + } + ] + }, + { + "name": "setCustodyAllowTrade", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetCustodyAllowTradeParams" + } + } + ] + }, + { + "name": "setPoolAllowSwap", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetPoolAllowSwapParams" + } + } + ] + }, + { + "name": "setPoolAllowTrade", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetPoolAllowTradeParams" + } + } + ] + }, + { + "name": "setPoolAumSoftCapUsd", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetPoolAumSoftCapUsdParams" + } + } + ] + }, + { + "name": "setTestOraclePrice", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "oracleAccount", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#7"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetTestOraclePriceParams" + } + } + ], + "returns": "u8" + }, + { + "name": "testAdminRemoveCollateral", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "owner", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#14"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "TestAdminRemoveCollateralParams" + } + } + ] + }, + { + "name": "swap", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "receivingCustody", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "receivingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "dispensingCustody", + "isMut": true, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "dispensingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "dispensingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#18"] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#19"] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#20"] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": ["#21"] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": ["#22"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#23"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#24"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SwapParams" + } + } + ] + }, + { + "name": "addLiquidity", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "lpTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#18"] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": ["#19"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#20"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#21"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddLiquidityParams" + } + } + ] + }, + { + "name": "addGenesisLiquidity", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "lpTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lpUserStaking", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "lpStakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#16", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#18", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#19", + "Account owned by governance storing user information" + ] + }, + { + "name": "lpStakeResolutionThread", + "isMut": true, + "isSigner": false, + "docs": ["#20"] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": ["#21"] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": ["#23"] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": ["#24"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#25"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#26"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#27"] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddGenesisLiquidityParams" + } + } + ] + }, + { + "name": "removeLiquidity", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "lpTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": ["#18"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#19"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#20"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveLiquidityParams" + } + } + ] + }, + { + "name": "openPositionLong", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#18"] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": ["#19"] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": ["#20"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#21"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#22"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#23"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "OpenPositionLongParams" + } + } + ] + }, + { + "name": "openPositionShort", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#18"] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#19"] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#20"] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": ["#21"] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": ["#22"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#23"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#24"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#25"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "OpenPositionShortParams" + } + } + ] + }, + { + "name": "openOrIncreasePositionWithSwapLong", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "collateralAccount", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "receivingCustody", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "receivingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "principalCustody", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "principalCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "principalCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#18"] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#19"] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#20"] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#21"] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#22"] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": ["#23"] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": ["#24"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#25"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#26"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#27"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "OpenPositionWithSwapParams" + } + } + ] + }, + { + "name": "openOrIncreasePositionWithSwapShort", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "collateralAccount", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "receivingCustody", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "receivingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "principalCustody", + "isMut": true, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "principalCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "principalCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#18"] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": ["#19"] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": ["#20"] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#21"] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#22"] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#23"] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#24"] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#25"] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": ["#26"] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": ["#27"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#28"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#29"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#30"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "OpenPositionWithSwapParams" + } + } + ] + }, + { + "name": "addCollateralLong", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#11"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddCollateralLongParams" + } + } + ] + }, + { + "name": "addCollateralShort", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#13"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddCollateralShortParams" + } + } + ] + }, + { + "name": "removeCollateralLong", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#11"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveCollateralLongParams" + } + } + ] + }, + { + "name": "removeCollateralShort", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#13"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveCollateralShortParams" + } + } + ] + }, + { + "name": "closePositionLong", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": ["#18"] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": ["#19"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#20"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#21"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "ClosePositionLongParams" + } + } + ] + }, + { + "name": "closePositionShort", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#18"] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#19"] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": ["#20"] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": ["#21"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#22"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#23"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "ClosePositionShortParams" + } + } + ] + }, + { + "name": "liquidateLong", + "accounts": [ + { + "name": "signer", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": ["#18"] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": ["#19"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#20"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#21"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "LiquidateLongParams" + } + } + ] + }, + { + "name": "liquidateShort", + "accounts": [ + { + "name": "signer", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#18"] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#19"] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": ["#20"] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": ["#21"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#22"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#23"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "LiquidateShortParams" + } + } + ] + }, + { + "name": "updatePoolAum", + "accounts": [ + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + } + ], + "args": [], + "returns": "u128" + }, + { + "name": "getAddLiquidityAmountAndFee", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#1"] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lpTokenMint", + "isMut": false, + "isSigner": false, + "docs": ["#5"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetAddLiquidityAmountAndFeeParams" + } + } + ], + "returns": { + "defined": "AmountAndFee" + } + }, + { + "name": "getRemoveLiquidityAmountAndFee", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#1"] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lpTokenMint", + "isMut": false, + "isSigner": false, + "docs": ["#5"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetRemoveLiquidityAmountAndFeeParams" + } + } + ], + "returns": { + "defined": "AmountAndFee" + } + }, + { + "name": "getEntryPriceAndFee", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#1"] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetEntryPriceAndFeeParams" + } + } + ], + "returns": { + "defined": "NewPositionPricesAndFee" + } + }, + { + "name": "getOpenPositionWithSwapAmountAndFees", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#1"] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "receivingCustody", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "receivingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "principalCustody", + "isMut": false, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "principalCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#9"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetOpenPositionWithSwapAmountAndFeesParams" + } + } + ], + "returns": { + "defined": "OpenPositionWithSwapAmountAndFees" + } + }, + { + "name": "getExitPriceAndFee", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#1"] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "position", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#7"] + } + ], + "args": [], + "returns": { + "defined": "ExitPriceAndFee" + } + }, + { + "name": "getPnl", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#1"] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "position", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#7"] + } + ], + "args": [], + "returns": { + "defined": "ProfitAndLoss" + } + }, + { + "name": "getLiquidationPrice", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#1"] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "position", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#7"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetLiquidationPriceParams" + } + } + ], + "returns": "u64" + }, + { + "name": "getLiquidationState", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#1"] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "position", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#7"] + } + ], + "args": [], + "returns": "u8" + }, + { + "name": "getOraclePrice", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#1"] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + } + ], + "args": [], + "returns": "u64" + }, + { + "name": "getSwapAmountAndFees", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#1"] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "receivingCustody", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "receivingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "dispensingCustody", + "isMut": false, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "dispensingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetSwapAmountAndFeesParams" + } + } + ], + "returns": { + "defined": "SwapAmountAndFees" + } + }, + { + "name": "getAssetsUnderManagement", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#1"] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + } + ], + "args": [], + "returns": "u128" + }, + { + "name": "initUserStaking", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "lmTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "stakesClaimPayer", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "staking", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "lmTokenMint", + "isMut": false, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#17"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitUserStakingParams" + } + } + ] + }, + { + "name": "initUserProfile", + "accounts": [ + { + "name": "user", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitUserProfileParams" + } + } + ] + }, + { + "name": "editUserProfile", + "accounts": [ + { + "name": "user", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#5"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "EditUserProfileParams" + } + } + ] + }, + { + "name": "deleteUserProfile", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "user", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#3"] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#7"] + } + ], + "args": [] + }, + { + "name": "initStakingOne", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "stakingStakedTokenMint", + "isMut": false, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": ["#13"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitStakingOneParams" + } + } + ], + "returns": "u8" + }, + { + "name": "initStakingTwo", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + } + ], + "args": [], + "returns": "u8" + }, + { + "name": "initStakingThree", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + } + ], + "args": [], + "returns": "u8" + }, + { + "name": "initStakingFour", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "stakingStakedTokenMint", + "isMut": false, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "resolveRoundCronThread", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "resolveRoundPayer", + "isMut": true, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": ["#18"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitStakingFourParams" + } + } + ], + "returns": "u8" + }, + { + "name": "addLiquidStake", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "lmTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#15", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#17", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#18", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": ["#19"] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": ["#20"] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": ["#21"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#22"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#23"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#24"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddLiquidStakeParams" + } + } + ] + }, + { + "name": "addLockedStake", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#13", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#15", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#16", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakeResolutionThread", + "isMut": true, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": ["#18"] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": ["#19"] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": ["#20"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#21"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#22"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#23"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddLockedStakeParams" + } + } + ] + }, + { + "name": "removeLiquidStake", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "stakedTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "lmTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#15", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#17", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#18", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": ["#19"] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": ["#20"] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": ["#21"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#22"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#23"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#24"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveLiquidStakeParams" + } + } + ] + }, + { + "name": "removeLockedStake", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "lmTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "stakedTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "stakedTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#16", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#18", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#19", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": ["#20"] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": ["#21"] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": ["#22"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#23"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#24"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#25"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveLockedStakeParams" + } + } + ] + }, + { + "name": "claimStakes", + "accounts": [ + { + "name": "caller", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "owner", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lmTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#16"] + } + ], + "args": [] + }, + { + "name": "finalizeGenesisLockCampaign", + "accounts": [ + { + "name": "caller", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#7"] + } + ], + "args": [] + }, + { + "name": "setPoolLiquidityState", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetPoolLiquidityStateParams" + } + } + ] + }, + { + "name": "finalizeLockedStake", + "accounts": [ + { + "name": "caller", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "owner", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#9", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#11", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#12", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakeResolutionThread", + "isMut": true, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#18"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "FinalizeLockedStakeParams" + } + } + ] + }, + { + "name": "updateStakingThread", + "accounts": [ + { + "name": "admin", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lmResolveRoundCronThread", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "lpResolveRoundCronThread", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + } + ], + "args": [] + }, + { + "name": "resolveStakingRound", + "accounts": [ + { + "name": "caller", + "isMut": true, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#13"] + } + ], + "args": [] + }, + { + "name": "getLpTokenPrice", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#1"] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "lpTokenMint", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + } + ], + "args": [], + "returns": "u64" + }, + { + "name": "mintLmTokensFromBucket", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#6"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "MintLmTokensFromBucketParams" + } + } + ], + "returns": "u8" + }, + { + "name": "increasePositionLong", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#18"] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": ["#19"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#20"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#21"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#22"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "IncreasePositionLongParams" + } + } + ] + }, + { + "name": "increasePositionShort", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": ["#2"] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": ["#4"] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": ["#5"] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": ["#6"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#7"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#8"] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": ["#9"] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": ["#10"] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#11"] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#12"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#13"] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#14"] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": ["#15"] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": ["#16"] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": ["#17"] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#18"] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": ["#19"] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": ["#20"] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": ["#21"] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": ["#22"] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": ["#23"] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": ["#24"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "IncreasePositionShortParams" + } + } + ] + }, + { + "name": "setStakingLmEmissionPotentiometers", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetStakingLmEmissionPotentiometersParams" + } + } + ] + }, + { + "name": "setAdmin", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetAdminParams" + } + } + ] + }, + { + "name": "setCustodyMaxCumulativeShortPositionSizeUsd", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": ["#1"] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": ["#2"] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": ["#3"] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": ["#4"] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetCustodyMaxCumulativeShortPositionSizeUsdParams" + } + } + ] + } + ], + "accounts": [ + { + "name": "Cortex", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "transferAuthorityBump", + "type": "u8" + }, + { + "name": "lmTokenBump", + "type": "u8" + }, + { + "name": "governanceTokenBump", + "type": "u8" + }, + { + "name": "initialized", + "type": "u8" + }, + { + "name": "feeConversionDecimals", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": ["u8", 2] + } + }, + { + "name": "inceptionTime", + "type": "i64" + }, + { + "name": "admin", + "type": "publicKey" + }, + { + "name": "feeRedistributionMint", + "type": "publicKey" + }, + { + "name": "protocolFeeRecipient", + "type": "publicKey" + }, + { + "name": "pools", + "type": { + "array": ["publicKey", 4] + } + }, + { + "name": "userProfilesCount", + "type": "u64" + }, + { + "name": "governanceProgram", + "type": "publicKey" + }, + { + "name": "governanceRealm", + "type": "publicKey" + }, + { + "name": "coreContributorBucketAllocation", + "type": "u64" + }, + { + "name": "daoTreasuryBucketAllocation", + "type": "u64" + }, + { + "name": "polBucketAllocation", + "type": "u64" + }, + { + "name": "ecosystemBucketAllocation", + "type": "u64" + }, + { + "name": "coreContributorBucketVestedAmount", + "type": "u64" + }, + { + "name": "coreContributorBucketMintedAmount", + "type": "u64" + }, + { + "name": "daoTreasuryBucketVestedAmount", + "type": "u64" + }, + { + "name": "daoTreasuryBucketMintedAmount", + "type": "u64" + }, + { + "name": "polBucketVestedAmount", + "type": "u64" + }, + { + "name": "polBucketMintedAmount", + "type": "u64" + }, + { + "name": "ecosystemBucketVestedAmount", + "type": "u64" + }, + { + "name": "ecosystemBucketMintedAmount", + "type": "u64" + }, + { + "name": "genesisLiquidityAlpAmount", + "type": "u64" + } + ] + } + }, + { + "name": "Custody", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "tokenAccountBump", + "type": "u8" + }, + { + "name": "allowTrade", + "type": "u8" + }, + { + "name": "allowSwap", + "type": "u8" + }, + { + "name": "decimals", + "type": "u8" + }, + { + "name": "isStable", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": ["u8", 2] + } + }, + { + "name": "pool", + "type": "publicKey" + }, + { + "name": "mint", + "type": "publicKey" + }, + { + "name": "tokenAccount", + "type": "publicKey" + }, + { + "name": "oracle", + "type": { + "defined": "OracleParams" + } + }, + { + "name": "pricing", + "type": { + "defined": "PricingParams" + } + }, + { + "name": "fees", + "type": { + "defined": "Fees" + } + }, + { + "name": "borrowRate", + "type": { + "defined": "BorrowRateParams" + } + }, + { + "name": "collectedFees", + "type": { + "defined": "FeesStats" + } + }, + { + "name": "volumeStats", + "type": { + "defined": "VolumeStats" + } + }, + { + "name": "tradeStats", + "type": { + "defined": "TradeStats" + } + }, + { + "name": "assets", + "type": { + "defined": "Assets" + } + }, + { + "name": "longPositions", + "type": { + "defined": "PositionsAccounting" + } + }, + { + "name": "shortPositions", + "type": { + "defined": "PositionsAccounting" + } + }, + { + "name": "borrowRateState", + "type": { + "defined": "BorrowRateState" + } + } + ] + } + }, + { + "name": "GenesisLock", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "hasTransitionedToFullyPublic", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": ["u8", 6] + } + }, + { + "name": "campaignDuration", + "type": "i64" + }, + { + "name": "reservedGrantDuration", + "type": "i64" + }, + { + "name": "campaignStartDate", + "type": "i64" + }, + { + "name": "publicAmount", + "type": "u64" + }, + { + "name": "reservedAmount", + "type": "u64" + }, + { + "name": "publicAmountClaimed", + "type": "u64" + }, + { + "name": "reservedAmountClaimed", + "type": "u64" + }, + { + "name": "reservedGrantOwners", + "type": { + "array": ["publicKey", 17] + } + }, + { + "name": "reservedGrantAmounts", + "type": { + "array": ["u64", 17] + } + }, + { + "name": "finalizeGenesisLockCampaignThreadId", + "type": "u64" + } + ] + } + }, + { + "name": "CustomOracle", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "expo", + "type": "i32" + }, + { + "name": "conf", + "type": "u64" + }, + { + "name": "publishTime", + "type": "i64" + } + ] + } + }, + { + "name": "Pool", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "lpTokenBump", + "type": "u8" + }, + { + "name": "nbStableCustody", + "type": "u8" + }, + { + "name": "initialized", + "type": "u8" + }, + { + "name": "allowTrade", + "type": "u8" + }, + { + "name": "allowSwap", + "type": "u8" + }, + { + "name": "liquidityState", + "type": "u8" + }, + { + "name": "registeredCustodyCount", + "type": "u8" + }, + { + "name": "name", + "type": { + "defined": "LimitedString" + } + }, + { + "name": "custodies", + "type": { + "array": ["publicKey", 10] + } + }, + { + "name": "ratios", + "type": { + "array": [ + { + "defined": "TokenRatios" + }, + 10 + ] + } + }, + { + "name": "aumUsd", + "type": { + "defined": "U128Split" + } + }, + { + "name": "inceptionTime", + "type": "i64" + }, + { + "name": "aumSoftCapUsd", + "type": "u64" + } + ] + } + }, + { + "name": "Position", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "side", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": ["u8", 6] + } + }, + { + "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": "price", + "type": "u64" + }, + { + "name": "sizeUsd", + "type": "u64" + }, + { + "name": "borrowSizeUsd", + "type": "u64" + }, + { + "name": "collateralUsd", + "type": "u64" + }, + { + "name": "unrealizedLossUsd", + "type": "u64" + }, + { + "name": "cumulativeInterestSnapshot", + "type": { + "defined": "U128Split" + } + }, + { + "name": "lockedAmount", + "type": "u64" + }, + { + "name": "collateralAmount", + "type": "u64" + }, + { + "name": "entryFeeUsd", + "type": "u64" + }, + { + "name": "exitFeeUsd", + "type": "u64" + }, + { + "name": "liquidationFeeUsd", + "type": "u64" + } + ] + } + }, + { + "name": "Staking", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stakingType", + "type": "u8" + }, + { + "name": "bump", + "type": "u8" + }, + { + "name": "stakedTokenVaultBump", + "type": "u8" + }, + { + "name": "rewardTokenVaultBump", + "type": "u8" + }, + { + "name": "lmRewardTokenVaultBump", + "type": "u8" + }, + { + "name": "rewardTokenDecimals", + "type": "u8" + }, + { + "name": "stakedTokenDecimals", + "type": "u8" + }, + { + "name": "initialized", + "type": "u8" + }, + { + "name": "nbLockedTokens", + "type": "u64" + }, + { + "name": "nbLiquidTokens", + "type": "u64" + }, + { + "name": "stakedTokenMint", + "type": "publicKey" + }, + { + "name": "resolvedRewardTokenAmount", + "type": "u64" + }, + { + "name": "resolvedStakedTokenAmount", + "type": "u64" + }, + { + "name": "resolvedLmRewardTokenAmount", + "type": "u64" + }, + { + "name": "resolvedLmStakedTokenAmount", + "type": "u64" + }, + { + "name": "currentStakingRound", + "type": { + "defined": "StakingRound" + } + }, + { + "name": "nextStakingRound", + "type": { + "defined": "StakingRound" + } + }, + { + "name": "resolvedStakingRounds", + "type": { + "array": [ + { + "defined": "StakingRound" + }, + 32 + ] + } + }, + { + "name": "registeredResolvedStakingRoundCount", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": ["u8", 3] + } + }, + { + "name": "lmEmissionPotentiometerBps", + "type": "u16" + }, + { + "name": "monthsElapsedSinceInception", + "type": "u16" + }, + { + "name": "resolveRoundCronThreadId", + "type": "u64" + }, + { + "name": "emissionAmountPerRoundLastUpdate", + "type": "i64" + }, + { + "name": "currentMonthEmissionAmountPerRound", + "type": "u64" + } + ] + } + }, + { + "name": "UserProfile", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": ["u8", 7] + } + }, + { + "name": "nickname", + "type": { + "defined": "LimitedString" + } + }, + { + "name": "createdAt", + "type": "i64" + }, + { + "name": "owner", + "type": "publicKey" + }, + { + "name": "swapCount", + "type": "u64" + }, + { + "name": "swapVolumeUsd", + "type": "u64" + }, + { + "name": "swapFeePaidUsd", + "type": "u64" + }, + { + "name": "shortStats", + "type": { + "defined": "TradingStats" + } + }, + { + "name": "longStats", + "type": { + "defined": "TradingStats" + } + } + ] + } + }, + { + "name": "UserStaking", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "threadAuthorityBump", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": ["u8", 6] + } + }, + { + "name": "stakesClaimCronThreadId", + "type": "u64" + }, + { + "name": "liquidStake", + "type": { + "defined": "LiquidStake" + } + }, + { + "name": "lockedStakes", + "type": { + "array": [ + { + "defined": "LockedStake" + }, + 32 + ] + } + } + ] + } + }, + { + "name": "VestRegistry", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "vests", + "type": { + "vec": "publicKey" + } + }, + { + "name": "vestingTokenAmount", + "type": "u64" + }, + { + "name": "vestedTokenAmount", + "type": "u64" + } + ] + } + }, + { + "name": "Vest", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "originBucket", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": ["u8", 6] + } + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "unlockStartTimestamp", + "type": "i64" + }, + { + "name": "unlockEndTimestamp", + "type": "i64" + }, + { + "name": "claimedAmount", + "type": "u64" + }, + { + "name": "lastClaimTimestamp", + "type": "i64" + }, + { + "name": "owner", + "type": "publicKey" + } + ] + } + } + ], + "types": [ + { + "name": "MintLmTokensFromBucketParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bucketName", + "type": "u8" + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "reason", + "type": "string" + } + ] + } + }, + { + "name": "SetAdminParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "newAdmin", + "type": "publicKey" + } + ] + } + }, + { + "name": "AddCustodyParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "isStable", + "type": "bool" + }, + { + "name": "oracle", + "type": { + "defined": "OracleParams" + } + }, + { + "name": "pricing", + "type": { + "defined": "PricingParams" + } + }, + { + "name": "allowSwap", + "type": "bool" + }, + { + "name": "allowTrade", + "type": "bool" + }, + { + "name": "fees", + "type": { + "defined": "Fees" + } + }, + { + "name": "borrowRate", + "type": { + "defined": "BorrowRateParams" + } + }, + { + "name": "ratios", + "type": { + "array": [ + { + "defined": "TokenRatios" + }, + 10 + ] + } + } + ] + } + }, + { + "name": "RemoveCustodyParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "ratios", + "type": { + "array": [ + { + "defined": "TokenRatios" + }, + 10 + ] + } + } + ] + } + }, + { + "name": "SetCustodyAllowSwapParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "allowSwap", + "type": "bool" + } + ] + } + }, + { + "name": "SetCustodyAllowTradeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "allowTrade", + "type": "bool" + } + ] + } + }, + { + "name": "SetCustodyConfigParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "isStable", + "type": "bool" + }, + { + "name": "oracle", + "type": { + "defined": "OracleParams" + } + }, + { + "name": "pricing", + "type": { + "defined": "PricingParams" + } + }, + { + "name": "fees", + "type": { + "defined": "Fees" + } + }, + { + "name": "borrowRate", + "type": { + "defined": "BorrowRateParams" + } + }, + { + "name": "ratios", + "type": { + "array": [ + { + "defined": "TokenRatios" + }, + 10 + ] + } + } + ] + } + }, + { + "name": "SetCustodyMaxCumulativeShortPositionSizeUsdParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxCumulativeShortPositionSizeUsd", + "type": "u64" + } + ] + } + }, + { + "name": "InitOneParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "ecosystemBucketAllocation", + "type": "u64" + }, + { + "name": "coreContributorBucketAllocation", + "type": "u64" + }, + { + "name": "daoTreasuryBucketAllocation", + "type": "u64" + }, + { + "name": "polBucketAllocation", + "type": "u64" + } + ] + } + }, + { + "name": "AddPoolPartOneParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "name", + "type": "string" + }, + { + "name": "aumSoftCapUsd", + "type": "u64" + }, + { + "name": "lpTokenName", + "type": "string" + }, + { + "name": "lpTokenSymbol", + "type": "string" + }, + { + "name": "lpTokenUri", + "type": "string" + } + ] + } + }, + { + "name": "AddPoolPartTwoParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "genesisLockCampaignDuration", + "type": "i64" + }, + { + "name": "genesisReservedGrantDuration", + "type": "i64" + }, + { + "name": "genesisLockCampaignStartDate", + "type": "i64" + }, + { + "name": "finalizeGenesisLockCampaignThreadId", + "type": "u64" + } + ] + } + }, + { + "name": "SetPoolAllowSwapParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "allowSwap", + "type": "bool" + } + ] + } + }, + { + "name": "SetPoolAllowTradeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "allowTrade", + "type": "bool" + } + ] + } + }, + { + "name": "SetPoolAumSoftCapUsdParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "aumSoftCapUsd", + "type": "u64" + } + ] + } + }, + { + "name": "SetPoolLiquidityStateParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "liquidityState", + "type": "u8" + } + ] + } + }, + { + "name": "SetTestOraclePriceParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "expo", + "type": "i32" + }, + { + "name": "conf", + "type": "u64" + }, + { + "name": "publishTime", + "type": "i64" + } + ] + } + }, + { + "name": "InitStakingFourParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "resolveRoundCronThreadId", + "type": "u64" + } + ] + } + }, + { + "name": "InitStakingOneParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stakingType", + "type": "u8" + } + ] + } + }, + { + "name": "SetStakingLmEmissionPotentiometersParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "lmEmissionPotentiometerBps", + "type": "u16" + } + ] + } + }, + { + "name": "TestAdminRemoveCollateralParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateralUsd", + "type": "u64" + } + ] + } + }, + { + "name": "AddGenesisLiquidityParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "lpStakeResolutionThreadId", + "type": "u64" + }, + { + "name": "amountIn", + "type": "u64" + }, + { + "name": "minLpAmountOut", + "type": "u64" + } + ] + } + }, + { + "name": "AddLiquidityParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amountIn", + "type": "u64" + }, + { + "name": "minLpAmountOut", + "type": "u64" + } + ] + } + }, + { + "name": "RemoveLiquidityParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "lpAmountIn", + "type": "u64" + }, + { + "name": "minAmountOut", + "type": "u64" + } + ] + } + }, + { + "name": "SwapParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amountIn", + "type": "u64" + }, + { + "name": "minAmountOut", + "type": "u64" + } + ] + } + }, + { + "name": "AddCollateralLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateral", + "type": "u64" + } + ] + } + }, + { + "name": "AddCollateralShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateral", + "type": "u64" + } + ] + } + }, + { + "name": "ClosePositionLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + } + ] + } + }, + { + "name": "ClosePositionShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + } + ] + } + }, + { + "name": "IncreasePositionLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "IncreasePositionShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "LiquidateLongParams", + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "LiquidateShortParams", + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "OpenPositionWithSwapParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "OpenPositionLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "OpenPositionShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "RemoveCollateralLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateralUsd", + "type": "u64" + } + ] + } + }, + { + "name": "RemoveCollateralShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateralUsd", + "type": "u64" + } + ] + } + }, + { + "name": "AddLiquidStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + } + ] + } + }, + { + "name": "AddLockedStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stakeResolutionThreadId", + "type": "u64" + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "lockedDays", + "type": "u32" + } + ] + } + }, + { + "name": "FinalizeLockedStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "threadId", + "type": "u64" + }, + { + "name": "earlyExit", + "type": "bool" + } + ] + } + }, + { + "name": "InitUserStakingParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stakesClaimCronThreadId", + "type": "u64" + } + ] + } + }, + { + "name": "RemoveLiquidStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + } + ] + } + }, + { + "name": "RemoveLockedStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "lockedStakeIndex", + "type": "u64" + } + ] + } + }, + { + "name": "EditUserProfileParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "nickname", + "type": "string" + } + ] + } + }, + { + "name": "InitUserProfileParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "nickname", + "type": "string" + } + ] + } + }, + { + "name": "AddVestParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "originBucket", + "type": "u8" + }, + { + "name": "unlockStartTimestamp", + "type": "i64" + }, + { + "name": "unlockEndTimestamp", + "type": "i64" + } + ] + } + }, + { + "name": "GetAddLiquidityAmountAndFeeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amountIn", + "type": "u64" + } + ] + } + }, + { + "name": "GetEntryPriceAndFeeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + }, + { + "name": "side", + "type": "u8" + } + ] + } + }, + { + "name": "GetLiquidationPriceParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "addCollateral", + "type": "u64" + }, + { + "name": "removeCollateral", + "type": "u64" + } + ] + } + }, + { + "name": "GetOpenPositionWithSwapAmountAndFeesParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateralAmount", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + }, + { + "name": "side", + "type": "u8" + } + ] + } + }, + { + "name": "GetRemoveLiquidityAmountAndFeeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "lpAmountIn", + "type": "u64" + } + ] + } + }, + { + "name": "GetSwapAmountAndFeesParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amountIn", + "type": "u64" + } + ] + } + }, + { + "name": "ExitPriceAndFee", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "fee", + "type": "u64" + }, + { + "name": "amountOut", + "type": "u64" + }, + { + "name": "profitUsd", + "type": "u64" + }, + { + "name": "lossUsd", + "type": "u64" + } + ] + } + }, + { + "name": "AmountAndFee", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "fee", + "type": "u64" + } + ] + } + }, + { + "name": "NewPositionPricesAndFee", + "type": { + "kind": "struct", + "fields": [ + { + "name": "entryPrice", + "type": "u64" + }, + { + "name": "liquidationPrice", + "type": "u64" + }, + { + "name": "entryFee", + "type": "u64" + }, + { + "name": "exitFee", + "type": "u64" + }, + { + "name": "liquidationFee", + "type": "u64" + }, + { + "name": "size", + "type": "u64" + } + ] + } + }, + { + "name": "OpenPositionWithSwapAmountAndFees", + "type": { + "kind": "struct", + "fields": [ + { + "name": "entryPrice", + "type": "u64" + }, + { + "name": "liquidationPrice", + "type": "u64" + }, + { + "name": "swapFeeIn", + "type": "u64" + }, + { + "name": "swapFeeOut", + "type": "u64" + }, + { + "name": "openPositionFee", + "type": "u64" + }, + { + "name": "exitFee", + "type": "u64" + }, + { + "name": "liquidationFee", + "type": "u64" + }, + { + "name": "size", + "type": "u64" + } + ] + } + }, + { + "name": "SwapAmountAndFees", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amountOut", + "type": "u64" + }, + { + "name": "feeIn", + "type": "u64" + }, + { + "name": "feeOut", + "type": "u64" + } + ] + } + }, + { + "name": "ProfitAndLoss", + "docs": [ + "Specific to the codebase, this struct is used to store the profit and loss of a position.", + "Specific because entry fees are paid right away at position opening and on top of the requested size/leverage (to match it exactly).", + "As such, the profit and loss are calculated with the entry fees already paid (and out of these two numbers).", + "To get the \"real overall\" profit and loss, one must add the entry fees back to the profit and loss.", + "And to get the \"pure\" profit and loss, one must subtract the exit and paid_interests (borrow interests) from the profit and loss." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "profitUsd", + "type": "u64" + }, + { + "name": "lossUsd", + "type": "u64" + }, + { + "name": "entryFeeUsd", + "type": "u64" + }, + { + "name": "exitFee", + "type": "u64" + }, + { + "name": "exitFeeUsd", + "type": "u64" + }, + { + "name": "borrowFeeUsd", + "type": "u64" + } + ] + } + }, + { + "name": "Fees", + "type": { + "kind": "struct", + "fields": [ + { + "name": "swapIn", + "type": "u16" + }, + { + "name": "swapOut", + "type": "u16" + }, + { + "name": "stableSwapIn", + "type": "u16" + }, + { + "name": "stableSwapOut", + "type": "u16" + }, + { + "name": "addLiquidity", + "type": "u16" + }, + { + "name": "removeLiquidity", + "type": "u16" + }, + { + "name": "openPosition", + "type": "u16" + }, + { + "name": "closePosition", + "type": "u16" + }, + { + "name": "liquidation", + "type": "u16" + }, + { + "name": "feeMax", + "type": "u16" + }, + { + "name": "protocolShare", + "type": "u16" + }, + { + "name": "padding", + "type": { + "array": ["u8", 2] + } + }, + { + "name": "padding2", + "type": "u64" + } + ] + } + }, + { + "name": "FeesStats", + "type": { + "kind": "struct", + "fields": [ + { + "name": "swapUsd", + "type": "u64" + }, + { + "name": "addLiquidityUsd", + "type": "u64" + }, + { + "name": "removeLiquidityUsd", + "type": "u64" + }, + { + "name": "openPositionUsd", + "type": "u64" + }, + { + "name": "closePositionUsd", + "type": "u64" + }, + { + "name": "liquidationUsd", + "type": "u64" + }, + { + "name": "borrowUsd", + "type": "u64" + } + ] + } + }, + { + "name": "VolumeStats", + "type": { + "kind": "struct", + "fields": [ + { + "name": "swapUsd", + "type": "u64" + }, + { + "name": "addLiquidityUsd", + "type": "u64" + }, + { + "name": "removeLiquidityUsd", + "type": "u64" + }, + { + "name": "openPositionUsd", + "type": "u64" + }, + { + "name": "closePositionUsd", + "type": "u64" + }, + { + "name": "liquidationUsd", + "type": "u64" + } + ] + } + }, + { + "name": "TradeStats", + "type": { + "kind": "struct", + "fields": [ + { + "name": "profitUsd", + "type": "u64" + }, + { + "name": "lossUsd", + "type": "u64" + }, + { + "name": "oiLongUsd", + "type": "u64" + }, + { + "name": "oiShortUsd", + "type": "u64" + } + ] + } + }, + { + "name": "Assets", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateral", + "type": "u64" + }, + { + "name": "owned", + "type": "u64" + }, + { + "name": "locked", + "type": "u64" + } + ] + } + }, + { + "name": "PricingParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxInitialLeverage", + "type": "u32" + }, + { + "name": "maxLeverage", + "type": "u32" + }, + { + "name": "maxPositionLockedUsd", + "type": "u64" + }, + { + "name": "maxCumulativeShortPositionSizeUsd", + "type": "u64" + } + ] + } + }, + { + "name": "BorrowRateParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxHourlyBorrowInterestRate", + "type": "u64" + } + ] + } + }, + { + "name": "BorrowRateState", + "type": { + "kind": "struct", + "fields": [ + { + "name": "currentRate", + "type": "u64" + }, + { + "name": "lastUpdate", + "type": "i64" + }, + { + "name": "cumulativeInterest", + "type": { + "defined": "U128Split" + } + } + ] + } + }, + { + "name": "PositionsAccounting", + "type": { + "kind": "struct", + "fields": [ + { + "name": "openPositions", + "type": "u64" + }, + { + "name": "sizeUsd", + "type": "u64" + }, + { + "name": "borrowSizeUsd", + "type": "u64" + }, + { + "name": "lockedAmount", + "type": "u64" + }, + { + "name": "weightedPrice", + "type": { + "defined": "U128Split" + } + }, + { + "name": "totalQuantity", + "type": { + "defined": "U128Split" + } + }, + { + "name": "cumulativeInterestUsd", + "type": "u64" + }, + { + "name": "padding", + "type": { + "array": ["u8", 8] + } + }, + { + "name": "cumulativeInterestSnapshot", + "type": { + "defined": "U128Split" + } + }, + { + "name": "exitFeeUsd", + "type": "u64" + }, + { + "name": "stableLockedAmount", + "type": { + "array": [ + { + "defined": "StableLockedAmountStat" + }, + 2 + ] + } + } + ] + } + }, + { + "name": "StableLockedAmountStat", + "type": { + "kind": "struct", + "fields": [ + { + "name": "custody", + "type": "publicKey" + }, + { + "name": "lockedAmount", + "type": "u64" + }, + { + "name": "padding", + "type": { + "array": ["u8", 8] + } + } + ] + } + }, + { + "name": "OraclePrice", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "exponent", + "type": "i32" + }, + { + "name": "conf", + "type": "u64" + } + ] + } + }, + { + "name": "OracleParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "oracleAccount", + "type": "publicKey" + }, + { + "name": "oracleType", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": ["u8", 15] + } + } + ] + } + }, + { + "name": "TokenRatios", + "type": { + "kind": "struct", + "fields": [ + { + "name": "target", + "type": "u16" + }, + { + "name": "min", + "type": "u16" + }, + { + "name": "max", + "type": "u16" + }, + { + "name": "padding", + "type": { + "array": ["u8", 2] + } + } + ] + } + }, + { + "name": "StakingRound", + "type": { + "kind": "struct", + "fields": [ + { + "name": "startTime", + "type": "i64" + }, + { + "name": "rate", + "type": "u64" + }, + { + "name": "totalStake", + "type": "u64" + }, + { + "name": "totalClaim", + "type": "u64" + }, + { + "name": "lmRate", + "type": "u64" + }, + { + "name": "lmTotalStake", + "type": "u64" + }, + { + "name": "lmTotalClaim", + "type": "u64" + } + ] + } + }, + { + "name": "TradingStats", + "type": { + "kind": "struct", + "fields": [ + { + "name": "openedPositionCount", + "type": "u64" + }, + { + "name": "liquidatedPositionCount", + "type": "u64" + }, + { + "name": "openingAverageLeverage", + "type": "u64" + }, + { + "name": "openingSizeUsd", + "type": "u64" + }, + { + "name": "profitsUsd", + "type": "u64" + }, + { + "name": "lossesUsd", + "type": "u64" + }, + { + "name": "feePaidUsd", + "type": "u64" + } + ] + } + }, + { + "name": "LiquidStake", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "stakeTime", + "type": "i64" + }, + { + "name": "claimTime", + "type": "i64" + }, + { + "name": "overlapTime", + "type": "i64" + }, + { + "name": "overlapAmount", + "type": "u64" + } + ] + } + }, + { + "name": "LockedStake", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "stakeTime", + "type": "i64" + }, + { + "name": "claimTime", + "type": "i64" + }, + { + "name": "lockDuration", + "type": "u64" + }, + { + "name": "rewardMultiplier", + "type": "u32" + }, + { + "name": "lmRewardMultiplier", + "type": "u32" + }, + { + "name": "voteMultiplier", + "type": "u32" + }, + { + "name": "padding", + "type": { + "array": ["u8", 4] + } + }, + { + "name": "amountWithRewardMultiplier", + "type": "u64" + }, + { + "name": "amountWithLmRewardMultiplier", + "type": "u64" + }, + { + "name": "resolved", + "type": "u8" + }, + { + "name": "padding2", + "type": { + "array": ["u8", 7] + } + }, + { + "name": "stakeResolutionThreadId", + "type": "u64" + }, + { + "name": "earlyExit", + "type": "u8" + }, + { + "name": "padding3", + "type": { + "array": ["u8", 7] + } + }, + { + "name": "earlyExitFee", + "type": "u64" + }, + { + "name": "isGenesis", + "type": "u8" + }, + { + "name": "padding4", + "type": { + "array": ["u8", 7] + } + }, + { + "name": "genesisClaimTime", + "type": "i64" + } + ] + } + }, + { + "name": "LimitedString", + "type": { + "kind": "struct", + "fields": [ + { + "name": "value", + "type": { + "array": ["u8", 31] + } + }, + { + "name": "length", + "type": "u8" + } + ] + } + }, + { + "name": "U128Split", + "type": { + "kind": "struct", + "fields": [ + { + "name": "high", + "type": "u64" + }, + { + "name": "low", + "type": "u64" + } + ] + } + }, + { + "name": "BucketName", + "type": { + "kind": "enum", + "variants": [ + { + "name": "CoreContributor" + }, + { + "name": "DaoTreasury" + }, + { + "name": "PoL" + }, + { + "name": "Ecosystem" + } + ] + } + }, + { + "name": "CortexInitializationStep", + "type": { + "kind": "enum", + "variants": [ + { + "name": "NotCreated" + }, + { + "name": "Step1" + }, + { + "name": "Step2" + }, + { + "name": "Step3" + }, + { + "name": "Initialized" + } + ] + } + }, + { + "name": "OracleType", + "type": { + "kind": "enum", + "variants": [ + { + "name": "None" + }, + { + "name": "Custom" + }, + { + "name": "Pyth" + } + ] + } + }, + { + "name": "PoolLiquidityState", + "type": { + "kind": "enum", + "variants": [ + { + "name": "GenesisLiquidity" + }, + { + "name": "Idle" + }, + { + "name": "Active" + } + ] + } + }, + { + "name": "Side", + "type": { + "kind": "enum", + "variants": [ + { + "name": "None" + }, + { + "name": "Long" + }, + { + "name": "Short" + } + ] + } + }, + { + "name": "StakingType", + "type": { + "kind": "enum", + "variants": [ + { + "name": "LM" + }, + { + "name": "LP" + } + ] + } + }, + { + "name": "StakingInitializationStep", + "type": { + "kind": "enum", + "variants": [ + { + "name": "NotCreated" + }, + { + "name": "Step1" + }, + { + "name": "Step2" + }, + { + "name": "Step3" + }, + { + "name": "Initialized" + } + ] + } + } + ], + "events": [ + { + "name": "OpenPositionEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "sizeUsd", + "type": "u64", + "index": false + }, + { + "name": "price", + "type": "u64", + "index": false + }, + { + "name": "collateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "leverage", + "type": "u32", + "index": false + }, + { + "name": "feeUsd", + "type": "u64", + "index": false + } + ] + }, + { + "name": "IncreasePositionEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "sizeUsd", + "type": "u64", + "index": false + }, + { + "name": "price", + "type": "u64", + "index": false + }, + { + "name": "collateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "leverage", + "type": "u32", + "index": false + }, + { + "name": "feeUsd", + "type": "u64", + "index": false + } + ] + }, + { + "name": "ClosePositionEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "sizeUsd", + "type": "u64", + "index": false + }, + { + "name": "price", + "type": "u64", + "index": false + }, + { + "name": "collateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "profitUsd", + "type": "u64", + "index": false + }, + { + "name": "lossUsd", + "type": "u64", + "index": false + }, + { + "name": "borrowFeeUsd", + "type": "u64", + "index": false + }, + { + "name": "exitFeeUsd", + "type": "u64", + "index": false + } + ] + }, + { + "name": "AddCollateralEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "addAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "newCollateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "leverage", + "type": "u32", + "index": false + } + ] + }, + { + "name": "RemoveCollateralEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "removeAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "newCollateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "leverage", + "type": "u32", + "index": false + } + ] + }, + { + "name": "LiquidateEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "sizeUsd", + "type": "u64", + "index": false + }, + { + "name": "price", + "type": "u64", + "index": false + }, + { + "name": "collateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "lossUsd", + "type": "u64", + "index": false + }, + { + "name": "borrowFeeUsd", + "type": "u64", + "index": false + }, + { + "name": "exitFeeUsd", + "type": "u64", + "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": "InvalidOracleState", + "msg": "Invalid oracle state" + }, + { + "code": 6004, + "name": "StaleOraclePrice", + "msg": "Stale oracle price" + }, + { + "code": 6005, + "name": "InvalidOraclePrice", + "msg": "Invalid oracle price" + }, + { + "code": 6006, + "name": "InvalidEnvironment", + "msg": "Instruction is not allowed in production" + }, + { + "code": 6007, + "name": "InvalidPoolLiquidityState", + "msg": "Invalid pool liquidity state" + }, + { + "code": 6008, + "name": "InvalidCortexState", + "msg": "Invalid cortex state" + }, + { + "code": 6009, + "name": "InvalidStakingState", + "msg": "Invalid staking state" + }, + { + "code": 6010, + "name": "InvalidPoolState", + "msg": "Invalid pool state" + }, + { + "code": 6011, + "name": "InvalidVestState", + "msg": "Invalid vest state" + }, + { + "code": 6012, + "name": "InvalidStakeState", + "msg": "Invalid stake state" + }, + { + "code": 6013, + "name": "InvalidCustody", + "msg": "Invalid custody" + }, + { + "code": 6014, + "name": "InvalidCustodyAccount", + "msg": "Invalid custody account" + }, + { + "code": 6015, + "name": "InvalidCustodyState", + "msg": "Invalid custody state" + }, + { + "code": 6016, + "name": "InvalidCollateralCustody", + "msg": "Invalid collateral custody" + }, + { + "code": 6017, + "name": "InvalidPositionState", + "msg": "Invalid position state" + }, + { + "code": 6018, + "name": "PositionNotInLiquidationRange", + "msg": "The position is not in liquidation range" + }, + { + "code": 6019, + "name": "InvalidStakingRoundState", + "msg": "Invalid staking round state" + }, + { + "code": 6020, + "name": "InvalidAdrenaConfig", + "msg": "Invalid adrena config" + }, + { + "code": 6021, + "name": "InvalidPoolConfig", + "msg": "Invalid pool config" + }, + { + "code": 6022, + "name": "InvalidCustodyConfig", + "msg": "Invalid custody config" + }, + { + "code": 6023, + "name": "InsufficientAmountReturned", + "msg": "Insufficient token amount returned" + }, + { + "code": 6024, + "name": "MaxPriceSlippage", + "msg": "Price slippage limit exceeded" + }, + { + "code": 6025, + "name": "MaxLeverage", + "msg": "Position leverage limit exceeded" + }, + { + "code": 6026, + "name": "MinLeverage", + "msg": "Position leverage under minimum" + }, + { + "code": 6027, + "name": "CustodyAmountLimit", + "msg": "Custody amount limit exceeded" + }, + { + "code": 6028, + "name": "PositionAmountLimit", + "msg": "Position amount limit exceeded" + }, + { + "code": 6029, + "name": "TokenRatioOutOfRange", + "msg": "Token ratio out of range" + }, + { + "code": 6030, + "name": "UnsupportedToken", + "msg": "Token is not supported" + }, + { + "code": 6031, + "name": "InstructionNotAllowed", + "msg": "Instruction is not allowed at this time" + }, + { + "code": 6032, + "name": "MaxUtilization", + "msg": "Token utilization limit exceeded" + }, + { + "code": 6033, + "name": "MaxRegisteredResolvedStakingRoundReached", + "msg": "Max registered resolved staking round reached" + }, + { + "code": 6034, + "name": "InvalidGovernanceProgram", + "msg": "Governance program do not match Cortex's one" + }, + { + "code": 6035, + "name": "InvalidGovernanceRealm", + "msg": "Governance realm do not match Cortex's one" + }, + { + "code": 6036, + "name": "InvalidVestingUnlockTime", + "msg": "Vesting unlock time is too close or passed" + }, + { + "code": 6037, + "name": "InvalidStakingLockingTime", + "msg": "Invalid staking locking time" + }, + { + "code": 6038, + "name": "UserStakeNotFound", + "msg": "The user stake account specified could not be found" + }, + { + "code": 6039, + "name": "InvalidAccountData", + "msg": "Invalid account data" + }, + { + "code": 6040, + "name": "UnresolvedStake", + "msg": "Stake is not resolved" + }, + { + "code": 6041, + "name": "BucketMintLimit", + "msg": "Reached bucket mint limit" + }, + { + "code": 6042, + "name": "GenesisAlpLimitReached", + "msg": "Genesis ALP add liquidity limit reached" + }, + { + "code": 6043, + "name": "PermissionlessOracleMissingSignature", + "msg": "Permissionless oracle update must be preceded by Ed25519 signature verification instruction" + }, + { + "code": 6044, + "name": "PermissionlessOracleMalformedEd25519Data", + "msg": "Ed25519 signature verification data does not match expected format" + }, + { + "code": 6045, + "name": "PermissionlessOracleSignerMismatch", + "msg": "Ed25519 signature was not signed by the oracle authority" + }, + { + "code": 6046, + "name": "PermissionlessOracleMessageMismatch", + "msg": "Signed message does not match instruction params" + }, + { + "code": 6047, + "name": "CustodyStableLockedAmountNotFound", + "msg": "Cannot find custody stable locked amount" + }, + { + "code": 6048, + "name": "CustodyNotFound", + "msg": "Cannot find custody" + }, + { + "code": 6049, + "name": "InsufficientBucketReserve", + "msg": "The bucket does not contain enough token for reserving this allocation" + }, + { + "code": 6050, + "name": "UserNicknameTooLong", + "msg": "User nickname exceed 24 characters" + }, + { + "code": 6051, + "name": "UserNicknameTooShort", + "msg": "User nickname is less than 3 characters" + }, + { + "code": 6052, + "name": "InvalidGenesisLockState", + "msg": "Invalid genesis lock state" + }, + { + "code": 6053, + "name": "GenesisLockCampaignFullySubscribed", + "msg": "The campaign is fully subscribed" + }, + { + "code": 6054, + "name": "PoolAumSoftCapUsdReached", + "msg": "The pool is fully subscribed" + }, + { + "code": 6055, + "name": "MaxRegisteredPool", + "msg": "The number of registered pool reached max amount" + }, + { + "code": 6056, + "name": "MaxRegisteredCustodies", + "msg": "The number of registered custody reached max amount" + }, + { + "code": 6057, + "name": "MaxCumulativeShortPositionSizeLimit", + "msg": "The short limit for this asset has been reached" + }, + { + "code": 6058, + "name": "LockedStakeArrayFull", + "msg": "The max number of LockedStaking has been reached" + }, + { + "code": 6059, + "name": "IndexOutOfBounds", + "msg": "Requested index is out of bounds" + }, + { + "code": 6060, + "name": "InvalidCaller", + "msg": "The instruction must be call with a specific account as caller" + }, + { + "code": 6061, + "name": "InvalidBucketName", + "msg": "Invalid bucket name" + } + ], + "metadata": { + "address": "9abyuDsJ7zYFGHe6BjjW7xDCB59FrnhfeWLFLuqWEUtY" + } +} diff --git a/idls/adrena.ts b/idls/adrena.ts new file mode 100644 index 000000000..4e2d18420 --- /dev/null +++ b/idls/adrena.ts @@ -0,0 +1,22335 @@ +export type Adrena = { + "version": "1.0.0", + "name": "adrena", + "instructions": [ + { + "name": "initOneCore", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitOneParams" + } + } + ] + }, + { + "name": "initTwoLmTokenMetadata", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "lmTokenMintMetadata", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "mplTokenMetadataProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + } + ], + "args": [] + }, + { + "name": "initThreeGovernance", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#6", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + } + ], + "args": [] + }, + { + "name": "initFourVesting", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "vestRegistry", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + } + ], + "args": [] + }, + { + "name": "addVest", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "owner", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "vestRegistry", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "vest", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#10", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#12", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#13", + "Account owned by governance storing user information" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddVestParams" + } + } + ], + "returns": "u8" + }, + { + "name": "claimVest", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "vestRegistry", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "vest", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#9", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#11", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#12", + "Account owned by governance storing user information" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + } + ], + "args": [], + "returns": "u64" + }, + { + "name": "addPoolPartOne", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "lpTokenMintMetadata", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "mplTokenMetadataProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddPoolPartOneParams" + } + } + ], + "returns": "u8" + }, + { + "name": "addPoolPartTwo", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "finalizeGenesisLockCampaignThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddPoolPartTwoParams" + } + } + ], + "returns": "u8" + }, + { + "name": "removePool", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + } + ], + "args": [], + "returns": "u8" + }, + { + "name": "addCustody", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "custodyTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddCustodyParams" + } + } + ], + "returns": "u8" + }, + { + "name": "removeCustody", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveCustodyParams" + } + } + ], + "returns": "u8" + }, + { + "name": "setCustodyConfig", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetCustodyConfigParams" + } + } + ], + "returns": "u8" + }, + { + "name": "setCustodyAllowSwap", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetCustodyAllowSwapParams" + } + } + ] + }, + { + "name": "setCustodyAllowTrade", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetCustodyAllowTradeParams" + } + } + ] + }, + { + "name": "setPoolAllowSwap", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetPoolAllowSwapParams" + } + } + ] + }, + { + "name": "setPoolAllowTrade", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetPoolAllowTradeParams" + } + } + ] + }, + { + "name": "setPoolAumSoftCapUsd", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetPoolAumSoftCapUsdParams" + } + } + ] + }, + { + "name": "setTestOraclePrice", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "oracleAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetTestOraclePriceParams" + } + } + ], + "returns": "u8" + }, + { + "name": "testAdminRemoveCollateral", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "owner", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "TestAdminRemoveCollateralParams" + } + } + ] + }, + { + "name": "swap", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "receivingCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "receivingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "dispensingCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "dispensingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "dispensingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#22" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SwapParams" + } + } + ] + }, + { + "name": "addLiquidity", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "lpTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddLiquidityParams" + } + } + ] + }, + { + "name": "addGenesisLiquidity", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "lpTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpUserStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "lpStakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#16", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#18", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#19", + "Account owned by governance storing user information" + ] + }, + { + "name": "lpStakeResolutionThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddGenesisLiquidityParams" + } + } + ] + }, + { + "name": "removeLiquidity", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "lpTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#20" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveLiquidityParams" + } + } + ] + }, + { + "name": "openPositionLong", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#20" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "OpenPositionLongParams" + } + } + ] + }, + { + "name": "openPositionShort", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#22" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "OpenPositionShortParams" + } + } + ] + }, + { + "name": "openOrIncreasePositionWithSwapLong", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "collateralAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "receivingCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "receivingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "principalCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "principalCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "principalCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#24" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "OpenPositionWithSwapParams" + } + } + ] + }, + { + "name": "openOrIncreasePositionWithSwapShort", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "collateralAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "receivingCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "receivingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "principalCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "principalCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "principalCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#27" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#28" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#29" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#30" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "OpenPositionWithSwapParams" + } + } + ] + }, + { + "name": "addCollateralLong", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddCollateralLongParams" + } + } + ] + }, + { + "name": "addCollateralShort", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddCollateralShortParams" + } + } + ] + }, + { + "name": "removeCollateralLong", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveCollateralLongParams" + } + } + ] + }, + { + "name": "removeCollateralShort", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveCollateralShortParams" + } + } + ] + }, + { + "name": "closePositionLong", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#19" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "ClosePositionLongParams" + } + } + ] + }, + { + "name": "closePositionShort", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#21" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "ClosePositionShortParams" + } + } + ] + }, + { + "name": "liquidateLong", + "accounts": [ + { + "name": "signer", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#19" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "LiquidateLongParams" + } + } + ] + }, + { + "name": "liquidateShort", + "accounts": [ + { + "name": "signer", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#21" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "LiquidateShortParams" + } + } + ] + }, + { + "name": "updatePoolAum", + "accounts": [ + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + } + ], + "args": [], + "returns": "u128" + }, + { + "name": "getAddLiquidityAmountAndFee", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetAddLiquidityAmountAndFeeParams" + } + } + ], + "returns": { + "defined": "AmountAndFee" + } + }, + { + "name": "getRemoveLiquidityAmountAndFee", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetRemoveLiquidityAmountAndFeeParams" + } + } + ], + "returns": { + "defined": "AmountAndFee" + } + }, + { + "name": "getEntryPriceAndFee", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetEntryPriceAndFeeParams" + } + } + ], + "returns": { + "defined": "NewPositionPricesAndFee" + } + }, + { + "name": "getOpenPositionWithSwapAmountAndFees", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "receivingCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "receivingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "principalCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "principalCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetOpenPositionWithSwapAmountAndFeesParams" + } + } + ], + "returns": { + "defined": "OpenPositionWithSwapAmountAndFees" + } + }, + { + "name": "getExitPriceAndFee", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "position", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + } + ], + "args": [], + "returns": { + "defined": "ExitPriceAndFee" + } + }, + { + "name": "getPnl", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "position", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + } + ], + "args": [], + "returns": { + "defined": "ProfitAndLoss" + } + }, + { + "name": "getLiquidationPrice", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "position", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetLiquidationPriceParams" + } + } + ], + "returns": "u64" + }, + { + "name": "getLiquidationState", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "position", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + } + ], + "args": [], + "returns": "u8" + }, + { + "name": "getOraclePrice", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + } + ], + "args": [], + "returns": "u64" + }, + { + "name": "getSwapAmountAndFees", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "receivingCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "receivingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "dispensingCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "dispensingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetSwapAmountAndFeesParams" + } + } + ], + "returns": { + "defined": "SwapAmountAndFees" + } + }, + { + "name": "getAssetsUnderManagement", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + } + ], + "args": [], + "returns": "u128" + }, + { + "name": "initUserStaking", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "lmTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakesClaimPayer", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "staking", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "lmTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitUserStakingParams" + } + } + ] + }, + { + "name": "initUserProfile", + "accounts": [ + { + "name": "user", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitUserProfileParams" + } + } + ] + }, + { + "name": "editUserProfile", + "accounts": [ + { + "name": "user", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "EditUserProfileParams" + } + } + ] + }, + { + "name": "deleteUserProfile", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "user", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#3" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + } + ], + "args": [] + }, + { + "name": "initStakingOne", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingStakedTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitStakingOneParams" + } + } + ], + "returns": "u8" + }, + { + "name": "initStakingTwo", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + } + ], + "args": [], + "returns": "u8" + }, + { + "name": "initStakingThree", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + } + ], + "args": [], + "returns": "u8" + }, + { + "name": "initStakingFour", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingStakedTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "resolveRoundCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "resolveRoundPayer", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#18" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitStakingFourParams" + } + } + ], + "returns": "u8" + }, + { + "name": "addLiquidStake", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lmTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#15", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#17", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#18", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddLiquidStakeParams" + } + } + ] + }, + { + "name": "addLockedStake", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#13", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#15", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#16", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakeResolutionThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddLockedStakeParams" + } + } + ] + }, + { + "name": "removeLiquidStake", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "stakedTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "lmTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#15", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#17", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#18", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveLiquidStakeParams" + } + } + ] + }, + { + "name": "removeLockedStake", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "lmTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "stakedTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "stakedTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#16", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#18", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#19", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveLockedStakeParams" + } + } + ] + }, + { + "name": "claimStakes", + "accounts": [ + { + "name": "caller", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + } + ], + "args": [] + }, + { + "name": "finalizeGenesisLockCampaign", + "accounts": [ + { + "name": "caller", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + } + ], + "args": [] + }, + { + "name": "setPoolLiquidityState", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetPoolLiquidityStateParams" + } + } + ] + }, + { + "name": "finalizeLockedStake", + "accounts": [ + { + "name": "caller", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#9", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#11", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#12", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakeResolutionThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#18" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "FinalizeLockedStakeParams" + } + } + ] + }, + { + "name": "updateStakingThread", + "accounts": [ + { + "name": "admin", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmResolveRoundCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpResolveRoundCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + } + ], + "args": [] + }, + { + "name": "resolveStakingRound", + "accounts": [ + { + "name": "caller", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + } + ], + "args": [] + }, + { + "name": "getLpTokenPrice", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "lpTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + } + ], + "args": [], + "returns": "u64" + }, + { + "name": "mintLmTokensFromBucket", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "MintLmTokensFromBucketParams" + } + } + ], + "returns": "u8" + }, + { + "name": "increasePositionLong", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "IncreasePositionLongParams" + } + } + ] + }, + { + "name": "increasePositionShort", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "IncreasePositionShortParams" + } + } + ] + }, + { + "name": "setStakingLmEmissionPotentiometers", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetStakingLmEmissionPotentiometersParams" + } + } + ] + }, + { + "name": "setAdmin", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetAdminParams" + } + } + ] + }, + { + "name": "setCustodyMaxCumulativeShortPositionSizeUsd", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetCustodyMaxCumulativeShortPositionSizeUsdParams" + } + } + ] + } + ], + "accounts": [ + { + "name": "cortex", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "transferAuthorityBump", + "type": "u8" + }, + { + "name": "lmTokenBump", + "type": "u8" + }, + { + "name": "governanceTokenBump", + "type": "u8" + }, + { + "name": "initialized", + "type": "u8" + }, + { + "name": "feeConversionDecimals", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 2 + ] + } + }, + { + "name": "inceptionTime", + "type": "i64" + }, + { + "name": "admin", + "type": "publicKey" + }, + { + "name": "feeRedistributionMint", + "type": "publicKey" + }, + { + "name": "protocolFeeRecipient", + "type": "publicKey" + }, + { + "name": "pools", + "type": { + "array": [ + "publicKey", + 4 + ] + } + }, + { + "name": "userProfilesCount", + "type": "u64" + }, + { + "name": "governanceProgram", + "type": "publicKey" + }, + { + "name": "governanceRealm", + "type": "publicKey" + }, + { + "name": "coreContributorBucketAllocation", + "type": "u64" + }, + { + "name": "daoTreasuryBucketAllocation", + "type": "u64" + }, + { + "name": "polBucketAllocation", + "type": "u64" + }, + { + "name": "ecosystemBucketAllocation", + "type": "u64" + }, + { + "name": "coreContributorBucketVestedAmount", + "type": "u64" + }, + { + "name": "coreContributorBucketMintedAmount", + "type": "u64" + }, + { + "name": "daoTreasuryBucketVestedAmount", + "type": "u64" + }, + { + "name": "daoTreasuryBucketMintedAmount", + "type": "u64" + }, + { + "name": "polBucketVestedAmount", + "type": "u64" + }, + { + "name": "polBucketMintedAmount", + "type": "u64" + }, + { + "name": "ecosystemBucketVestedAmount", + "type": "u64" + }, + { + "name": "ecosystemBucketMintedAmount", + "type": "u64" + }, + { + "name": "genesisLiquidityAlpAmount", + "type": "u64" + } + ] + } + }, + { + "name": "custody", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "tokenAccountBump", + "type": "u8" + }, + { + "name": "allowTrade", + "type": "u8" + }, + { + "name": "allowSwap", + "type": "u8" + }, + { + "name": "decimals", + "type": "u8" + }, + { + "name": "isStable", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 2 + ] + } + }, + { + "name": "pool", + "type": "publicKey" + }, + { + "name": "mint", + "type": "publicKey" + }, + { + "name": "tokenAccount", + "type": "publicKey" + }, + { + "name": "oracle", + "type": { + "defined": "OracleParams" + } + }, + { + "name": "pricing", + "type": { + "defined": "PricingParams" + } + }, + { + "name": "fees", + "type": { + "defined": "Fees" + } + }, + { + "name": "borrowRate", + "type": { + "defined": "BorrowRateParams" + } + }, + { + "name": "collectedFees", + "type": { + "defined": "FeesStats" + } + }, + { + "name": "volumeStats", + "type": { + "defined": "VolumeStats" + } + }, + { + "name": "tradeStats", + "type": { + "defined": "TradeStats" + } + }, + { + "name": "assets", + "type": { + "defined": "Assets" + } + }, + { + "name": "longPositions", + "type": { + "defined": "PositionsAccounting" + } + }, + { + "name": "shortPositions", + "type": { + "defined": "PositionsAccounting" + } + }, + { + "name": "borrowRateState", + "type": { + "defined": "BorrowRateState" + } + } + ] + } + }, + { + "name": "genesisLock", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "hasTransitionedToFullyPublic", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 6 + ] + } + }, + { + "name": "campaignDuration", + "type": "i64" + }, + { + "name": "reservedGrantDuration", + "type": "i64" + }, + { + "name": "campaignStartDate", + "type": "i64" + }, + { + "name": "publicAmount", + "type": "u64" + }, + { + "name": "reservedAmount", + "type": "u64" + }, + { + "name": "publicAmountClaimed", + "type": "u64" + }, + { + "name": "reservedAmountClaimed", + "type": "u64" + }, + { + "name": "reservedGrantOwners", + "type": { + "array": [ + "publicKey", + 17 + ] + } + }, + { + "name": "reservedGrantAmounts", + "type": { + "array": [ + "u64", + 17 + ] + } + }, + { + "name": "finalizeGenesisLockCampaignThreadId", + "type": "u64" + } + ] + } + }, + { + "name": "customOracle", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "expo", + "type": "i32" + }, + { + "name": "conf", + "type": "u64" + }, + { + "name": "publishTime", + "type": "i64" + } + ] + } + }, + { + "name": "pool", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "lpTokenBump", + "type": "u8" + }, + { + "name": "nbStableCustody", + "type": "u8" + }, + { + "name": "initialized", + "type": "u8" + }, + { + "name": "allowTrade", + "type": "u8" + }, + { + "name": "allowSwap", + "type": "u8" + }, + { + "name": "liquidityState", + "type": "u8" + }, + { + "name": "registeredCustodyCount", + "type": "u8" + }, + { + "name": "name", + "type": { + "defined": "LimitedString" + } + }, + { + "name": "custodies", + "type": { + "array": [ + "publicKey", + 10 + ] + } + }, + { + "name": "ratios", + "type": { + "array": [ + { + "defined": "TokenRatios" + }, + 10 + ] + } + }, + { + "name": "aumUsd", + "type": { + "defined": "U128Split" + } + }, + { + "name": "inceptionTime", + "type": "i64" + }, + { + "name": "aumSoftCapUsd", + "type": "u64" + } + ] + } + }, + { + "name": "position", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "side", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 6 + ] + } + }, + { + "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": "price", + "type": "u64" + }, + { + "name": "sizeUsd", + "type": "u64" + }, + { + "name": "borrowSizeUsd", + "type": "u64" + }, + { + "name": "collateralUsd", + "type": "u64" + }, + { + "name": "unrealizedLossUsd", + "type": "u64" + }, + { + "name": "cumulativeInterestSnapshot", + "type": { + "defined": "U128Split" + } + }, + { + "name": "lockedAmount", + "type": "u64" + }, + { + "name": "collateralAmount", + "type": "u64" + }, + { + "name": "entryFeeUsd", + "type": "u64" + }, + { + "name": "exitFeeUsd", + "type": "u64" + }, + { + "name": "liquidationFeeUsd", + "type": "u64" + } + ] + } + }, + { + "name": "staking", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stakingType", + "type": "u8" + }, + { + "name": "bump", + "type": "u8" + }, + { + "name": "stakedTokenVaultBump", + "type": "u8" + }, + { + "name": "rewardTokenVaultBump", + "type": "u8" + }, + { + "name": "lmRewardTokenVaultBump", + "type": "u8" + }, + { + "name": "rewardTokenDecimals", + "type": "u8" + }, + { + "name": "stakedTokenDecimals", + "type": "u8" + }, + { + "name": "initialized", + "type": "u8" + }, + { + "name": "nbLockedTokens", + "type": "u64" + }, + { + "name": "nbLiquidTokens", + "type": "u64" + }, + { + "name": "stakedTokenMint", + "type": "publicKey" + }, + { + "name": "resolvedRewardTokenAmount", + "type": "u64" + }, + { + "name": "resolvedStakedTokenAmount", + "type": "u64" + }, + { + "name": "resolvedLmRewardTokenAmount", + "type": "u64" + }, + { + "name": "resolvedLmStakedTokenAmount", + "type": "u64" + }, + { + "name": "currentStakingRound", + "type": { + "defined": "StakingRound" + } + }, + { + "name": "nextStakingRound", + "type": { + "defined": "StakingRound" + } + }, + { + "name": "resolvedStakingRounds", + "type": { + "array": [ + { + "defined": "StakingRound" + }, + 32 + ] + } + }, + { + "name": "registeredResolvedStakingRoundCount", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 3 + ] + } + }, + { + "name": "lmEmissionPotentiometerBps", + "type": "u16" + }, + { + "name": "monthsElapsedSinceInception", + "type": "u16" + }, + { + "name": "resolveRoundCronThreadId", + "type": "u64" + }, + { + "name": "emissionAmountPerRoundLastUpdate", + "type": "i64" + }, + { + "name": "currentMonthEmissionAmountPerRound", + "type": "u64" + } + ] + } + }, + { + "name": "userProfile", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 7 + ] + } + }, + { + "name": "nickname", + "type": { + "defined": "LimitedString" + } + }, + { + "name": "createdAt", + "type": "i64" + }, + { + "name": "owner", + "type": "publicKey" + }, + { + "name": "swapCount", + "type": "u64" + }, + { + "name": "swapVolumeUsd", + "type": "u64" + }, + { + "name": "swapFeePaidUsd", + "type": "u64" + }, + { + "name": "shortStats", + "type": { + "defined": "TradingStats" + } + }, + { + "name": "longStats", + "type": { + "defined": "TradingStats" + } + } + ] + } + }, + { + "name": "userStaking", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "threadAuthorityBump", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 6 + ] + } + }, + { + "name": "stakesClaimCronThreadId", + "type": "u64" + }, + { + "name": "liquidStake", + "type": { + "defined": "LiquidStake" + } + }, + { + "name": "lockedStakes", + "type": { + "array": [ + { + "defined": "LockedStake" + }, + 32 + ] + } + } + ] + } + }, + { + "name": "vestRegistry", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "vests", + "type": { + "vec": "publicKey" + } + }, + { + "name": "vestingTokenAmount", + "type": "u64" + }, + { + "name": "vestedTokenAmount", + "type": "u64" + } + ] + } + }, + { + "name": "vest", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "originBucket", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 6 + ] + } + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "unlockStartTimestamp", + "type": "i64" + }, + { + "name": "unlockEndTimestamp", + "type": "i64" + }, + { + "name": "claimedAmount", + "type": "u64" + }, + { + "name": "lastClaimTimestamp", + "type": "i64" + }, + { + "name": "owner", + "type": "publicKey" + } + ] + } + } + ], + "types": [ + { + "name": "MintLmTokensFromBucketParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bucketName", + "type": "u8" + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "reason", + "type": "string" + } + ] + } + }, + { + "name": "SetAdminParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "newAdmin", + "type": "publicKey" + } + ] + } + }, + { + "name": "AddCustodyParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "isStable", + "type": "bool" + }, + { + "name": "oracle", + "type": { + "defined": "OracleParams" + } + }, + { + "name": "pricing", + "type": { + "defined": "PricingParams" + } + }, + { + "name": "allowSwap", + "type": "bool" + }, + { + "name": "allowTrade", + "type": "bool" + }, + { + "name": "fees", + "type": { + "defined": "Fees" + } + }, + { + "name": "borrowRate", + "type": { + "defined": "BorrowRateParams" + } + }, + { + "name": "ratios", + "type": { + "array": [ + { + "defined": "TokenRatios" + }, + 10 + ] + } + } + ] + } + }, + { + "name": "RemoveCustodyParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "ratios", + "type": { + "array": [ + { + "defined": "TokenRatios" + }, + 10 + ] + } + } + ] + } + }, + { + "name": "SetCustodyAllowSwapParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "allowSwap", + "type": "bool" + } + ] + } + }, + { + "name": "SetCustodyAllowTradeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "allowTrade", + "type": "bool" + } + ] + } + }, + { + "name": "SetCustodyConfigParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "isStable", + "type": "bool" + }, + { + "name": "oracle", + "type": { + "defined": "OracleParams" + } + }, + { + "name": "pricing", + "type": { + "defined": "PricingParams" + } + }, + { + "name": "fees", + "type": { + "defined": "Fees" + } + }, + { + "name": "borrowRate", + "type": { + "defined": "BorrowRateParams" + } + }, + { + "name": "ratios", + "type": { + "array": [ + { + "defined": "TokenRatios" + }, + 10 + ] + } + } + ] + } + }, + { + "name": "SetCustodyMaxCumulativeShortPositionSizeUsdParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxCumulativeShortPositionSizeUsd", + "type": "u64" + } + ] + } + }, + { + "name": "InitOneParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "ecosystemBucketAllocation", + "type": "u64" + }, + { + "name": "coreContributorBucketAllocation", + "type": "u64" + }, + { + "name": "daoTreasuryBucketAllocation", + "type": "u64" + }, + { + "name": "polBucketAllocation", + "type": "u64" + } + ] + } + }, + { + "name": "AddPoolPartOneParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "name", + "type": "string" + }, + { + "name": "aumSoftCapUsd", + "type": "u64" + }, + { + "name": "lpTokenName", + "type": "string" + }, + { + "name": "lpTokenSymbol", + "type": "string" + }, + { + "name": "lpTokenUri", + "type": "string" + } + ] + } + }, + { + "name": "AddPoolPartTwoParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "genesisLockCampaignDuration", + "type": "i64" + }, + { + "name": "genesisReservedGrantDuration", + "type": "i64" + }, + { + "name": "genesisLockCampaignStartDate", + "type": "i64" + }, + { + "name": "finalizeGenesisLockCampaignThreadId", + "type": "u64" + } + ] + } + }, + { + "name": "SetPoolAllowSwapParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "allowSwap", + "type": "bool" + } + ] + } + }, + { + "name": "SetPoolAllowTradeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "allowTrade", + "type": "bool" + } + ] + } + }, + { + "name": "SetPoolAumSoftCapUsdParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "aumSoftCapUsd", + "type": "u64" + } + ] + } + }, + { + "name": "SetPoolLiquidityStateParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "liquidityState", + "type": "u8" + } + ] + } + }, + { + "name": "SetTestOraclePriceParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "expo", + "type": "i32" + }, + { + "name": "conf", + "type": "u64" + }, + { + "name": "publishTime", + "type": "i64" + } + ] + } + }, + { + "name": "InitStakingFourParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "resolveRoundCronThreadId", + "type": "u64" + } + ] + } + }, + { + "name": "InitStakingOneParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stakingType", + "type": "u8" + } + ] + } + }, + { + "name": "SetStakingLmEmissionPotentiometersParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "lmEmissionPotentiometerBps", + "type": "u16" + } + ] + } + }, + { + "name": "TestAdminRemoveCollateralParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateralUsd", + "type": "u64" + } + ] + } + }, + { + "name": "AddGenesisLiquidityParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "lpStakeResolutionThreadId", + "type": "u64" + }, + { + "name": "amountIn", + "type": "u64" + }, + { + "name": "minLpAmountOut", + "type": "u64" + } + ] + } + }, + { + "name": "AddLiquidityParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amountIn", + "type": "u64" + }, + { + "name": "minLpAmountOut", + "type": "u64" + } + ] + } + }, + { + "name": "RemoveLiquidityParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "lpAmountIn", + "type": "u64" + }, + { + "name": "minAmountOut", + "type": "u64" + } + ] + } + }, + { + "name": "SwapParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amountIn", + "type": "u64" + }, + { + "name": "minAmountOut", + "type": "u64" + } + ] + } + }, + { + "name": "AddCollateralLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateral", + "type": "u64" + } + ] + } + }, + { + "name": "AddCollateralShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateral", + "type": "u64" + } + ] + } + }, + { + "name": "ClosePositionLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + } + ] + } + }, + { + "name": "ClosePositionShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + } + ] + } + }, + { + "name": "IncreasePositionLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "IncreasePositionShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "LiquidateLongParams", + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "LiquidateShortParams", + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "OpenPositionWithSwapParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "OpenPositionLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "OpenPositionShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "RemoveCollateralLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateralUsd", + "type": "u64" + } + ] + } + }, + { + "name": "RemoveCollateralShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateralUsd", + "type": "u64" + } + ] + } + }, + { + "name": "AddLiquidStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + } + ] + } + }, + { + "name": "AddLockedStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stakeResolutionThreadId", + "type": "u64" + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "lockedDays", + "type": "u32" + } + ] + } + }, + { + "name": "FinalizeLockedStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "threadId", + "type": "u64" + }, + { + "name": "earlyExit", + "type": "bool" + } + ] + } + }, + { + "name": "InitUserStakingParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stakesClaimCronThreadId", + "type": "u64" + } + ] + } + }, + { + "name": "RemoveLiquidStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + } + ] + } + }, + { + "name": "RemoveLockedStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "lockedStakeIndex", + "type": "u64" + } + ] + } + }, + { + "name": "EditUserProfileParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "nickname", + "type": "string" + } + ] + } + }, + { + "name": "InitUserProfileParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "nickname", + "type": "string" + } + ] + } + }, + { + "name": "AddVestParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "originBucket", + "type": "u8" + }, + { + "name": "unlockStartTimestamp", + "type": "i64" + }, + { + "name": "unlockEndTimestamp", + "type": "i64" + } + ] + } + }, + { + "name": "GetAddLiquidityAmountAndFeeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amountIn", + "type": "u64" + } + ] + } + }, + { + "name": "GetEntryPriceAndFeeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + }, + { + "name": "side", + "type": "u8" + } + ] + } + }, + { + "name": "GetLiquidationPriceParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "addCollateral", + "type": "u64" + }, + { + "name": "removeCollateral", + "type": "u64" + } + ] + } + }, + { + "name": "GetOpenPositionWithSwapAmountAndFeesParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateralAmount", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + }, + { + "name": "side", + "type": "u8" + } + ] + } + }, + { + "name": "GetRemoveLiquidityAmountAndFeeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "lpAmountIn", + "type": "u64" + } + ] + } + }, + { + "name": "GetSwapAmountAndFeesParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amountIn", + "type": "u64" + } + ] + } + }, + { + "name": "ExitPriceAndFee", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "fee", + "type": "u64" + }, + { + "name": "amountOut", + "type": "u64" + }, + { + "name": "profitUsd", + "type": "u64" + }, + { + "name": "lossUsd", + "type": "u64" + } + ] + } + }, + { + "name": "AmountAndFee", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "fee", + "type": "u64" + } + ] + } + }, + { + "name": "NewPositionPricesAndFee", + "type": { + "kind": "struct", + "fields": [ + { + "name": "entryPrice", + "type": "u64" + }, + { + "name": "liquidationPrice", + "type": "u64" + }, + { + "name": "entryFee", + "type": "u64" + }, + { + "name": "exitFee", + "type": "u64" + }, + { + "name": "liquidationFee", + "type": "u64" + }, + { + "name": "size", + "type": "u64" + } + ] + } + }, + { + "name": "OpenPositionWithSwapAmountAndFees", + "type": { + "kind": "struct", + "fields": [ + { + "name": "entryPrice", + "type": "u64" + }, + { + "name": "liquidationPrice", + "type": "u64" + }, + { + "name": "swapFeeIn", + "type": "u64" + }, + { + "name": "swapFeeOut", + "type": "u64" + }, + { + "name": "openPositionFee", + "type": "u64" + }, + { + "name": "exitFee", + "type": "u64" + }, + { + "name": "liquidationFee", + "type": "u64" + }, + { + "name": "size", + "type": "u64" + } + ] + } + }, + { + "name": "SwapAmountAndFees", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amountOut", + "type": "u64" + }, + { + "name": "feeIn", + "type": "u64" + }, + { + "name": "feeOut", + "type": "u64" + } + ] + } + }, + { + "name": "ProfitAndLoss", + "docs": [ + "Specific to the codebase, this struct is used to store the profit and loss of a position.", + "Specific because entry fees are paid right away at position opening and on top of the requested size/leverage (to match it exactly).", + "As such, the profit and loss are calculated with the entry fees already paid (and out of these two numbers).", + "To get the \"real overall\" profit and loss, one must add the entry fees back to the profit and loss.", + "And to get the \"pure\" profit and loss, one must subtract the exit and paid_interests (borrow interests) from the profit and loss." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "profitUsd", + "type": "u64" + }, + { + "name": "lossUsd", + "type": "u64" + }, + { + "name": "entryFeeUsd", + "type": "u64" + }, + { + "name": "exitFee", + "type": "u64" + }, + { + "name": "exitFeeUsd", + "type": "u64" + }, + { + "name": "borrowFeeUsd", + "type": "u64" + } + ] + } + }, + { + "name": "Fees", + "type": { + "kind": "struct", + "fields": [ + { + "name": "swapIn", + "type": "u16" + }, + { + "name": "swapOut", + "type": "u16" + }, + { + "name": "stableSwapIn", + "type": "u16" + }, + { + "name": "stableSwapOut", + "type": "u16" + }, + { + "name": "addLiquidity", + "type": "u16" + }, + { + "name": "removeLiquidity", + "type": "u16" + }, + { + "name": "openPosition", + "type": "u16" + }, + { + "name": "closePosition", + "type": "u16" + }, + { + "name": "liquidation", + "type": "u16" + }, + { + "name": "feeMax", + "type": "u16" + }, + { + "name": "protocolShare", + "type": "u16" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 2 + ] + } + }, + { + "name": "padding2", + "type": "u64" + } + ] + } + }, + { + "name": "FeesStats", + "type": { + "kind": "struct", + "fields": [ + { + "name": "swapUsd", + "type": "u64" + }, + { + "name": "addLiquidityUsd", + "type": "u64" + }, + { + "name": "removeLiquidityUsd", + "type": "u64" + }, + { + "name": "openPositionUsd", + "type": "u64" + }, + { + "name": "closePositionUsd", + "type": "u64" + }, + { + "name": "liquidationUsd", + "type": "u64" + }, + { + "name": "borrowUsd", + "type": "u64" + } + ] + } + }, + { + "name": "VolumeStats", + "type": { + "kind": "struct", + "fields": [ + { + "name": "swapUsd", + "type": "u64" + }, + { + "name": "addLiquidityUsd", + "type": "u64" + }, + { + "name": "removeLiquidityUsd", + "type": "u64" + }, + { + "name": "openPositionUsd", + "type": "u64" + }, + { + "name": "closePositionUsd", + "type": "u64" + }, + { + "name": "liquidationUsd", + "type": "u64" + } + ] + } + }, + { + "name": "TradeStats", + "type": { + "kind": "struct", + "fields": [ + { + "name": "profitUsd", + "type": "u64" + }, + { + "name": "lossUsd", + "type": "u64" + }, + { + "name": "oiLongUsd", + "type": "u64" + }, + { + "name": "oiShortUsd", + "type": "u64" + } + ] + } + }, + { + "name": "Assets", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateral", + "type": "u64" + }, + { + "name": "owned", + "type": "u64" + }, + { + "name": "locked", + "type": "u64" + } + ] + } + }, + { + "name": "PricingParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxInitialLeverage", + "type": "u32" + }, + { + "name": "maxLeverage", + "type": "u32" + }, + { + "name": "maxPositionLockedUsd", + "type": "u64" + }, + { + "name": "maxCumulativeShortPositionSizeUsd", + "type": "u64" + } + ] + } + }, + { + "name": "BorrowRateParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxHourlyBorrowInterestRate", + "type": "u64" + } + ] + } + }, + { + "name": "BorrowRateState", + "type": { + "kind": "struct", + "fields": [ + { + "name": "currentRate", + "type": "u64" + }, + { + "name": "lastUpdate", + "type": "i64" + }, + { + "name": "cumulativeInterest", + "type": { + "defined": "U128Split" + } + } + ] + } + }, + { + "name": "PositionsAccounting", + "type": { + "kind": "struct", + "fields": [ + { + "name": "openPositions", + "type": "u64" + }, + { + "name": "sizeUsd", + "type": "u64" + }, + { + "name": "borrowSizeUsd", + "type": "u64" + }, + { + "name": "lockedAmount", + "type": "u64" + }, + { + "name": "weightedPrice", + "type": { + "defined": "U128Split" + } + }, + { + "name": "totalQuantity", + "type": { + "defined": "U128Split" + } + }, + { + "name": "cumulativeInterestUsd", + "type": "u64" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "cumulativeInterestSnapshot", + "type": { + "defined": "U128Split" + } + }, + { + "name": "exitFeeUsd", + "type": "u64" + }, + { + "name": "stableLockedAmount", + "type": { + "array": [ + { + "defined": "StableLockedAmountStat" + }, + 2 + ] + } + } + ] + } + }, + { + "name": "StableLockedAmountStat", + "type": { + "kind": "struct", + "fields": [ + { + "name": "custody", + "type": "publicKey" + }, + { + "name": "lockedAmount", + "type": "u64" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 8 + ] + } + } + ] + } + }, + { + "name": "OraclePrice", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "exponent", + "type": "i32" + }, + { + "name": "conf", + "type": "u64" + } + ] + } + }, + { + "name": "OracleParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "oracleAccount", + "type": "publicKey" + }, + { + "name": "oracleType", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 15 + ] + } + } + ] + } + }, + { + "name": "TokenRatios", + "type": { + "kind": "struct", + "fields": [ + { + "name": "target", + "type": "u16" + }, + { + "name": "min", + "type": "u16" + }, + { + "name": "max", + "type": "u16" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 2 + ] + } + } + ] + } + }, + { + "name": "StakingRound", + "type": { + "kind": "struct", + "fields": [ + { + "name": "startTime", + "type": "i64" + }, + { + "name": "rate", + "type": "u64" + }, + { + "name": "totalStake", + "type": "u64" + }, + { + "name": "totalClaim", + "type": "u64" + }, + { + "name": "lmRate", + "type": "u64" + }, + { + "name": "lmTotalStake", + "type": "u64" + }, + { + "name": "lmTotalClaim", + "type": "u64" + } + ] + } + }, + { + "name": "TradingStats", + "type": { + "kind": "struct", + "fields": [ + { + "name": "openedPositionCount", + "type": "u64" + }, + { + "name": "liquidatedPositionCount", + "type": "u64" + }, + { + "name": "openingAverageLeverage", + "type": "u64" + }, + { + "name": "openingSizeUsd", + "type": "u64" + }, + { + "name": "profitsUsd", + "type": "u64" + }, + { + "name": "lossesUsd", + "type": "u64" + }, + { + "name": "feePaidUsd", + "type": "u64" + } + ] + } + }, + { + "name": "LiquidStake", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "stakeTime", + "type": "i64" + }, + { + "name": "claimTime", + "type": "i64" + }, + { + "name": "overlapTime", + "type": "i64" + }, + { + "name": "overlapAmount", + "type": "u64" + } + ] + } + }, + { + "name": "LockedStake", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "stakeTime", + "type": "i64" + }, + { + "name": "claimTime", + "type": "i64" + }, + { + "name": "lockDuration", + "type": "u64" + }, + { + "name": "rewardMultiplier", + "type": "u32" + }, + { + "name": "lmRewardMultiplier", + "type": "u32" + }, + { + "name": "voteMultiplier", + "type": "u32" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 4 + ] + } + }, + { + "name": "amountWithRewardMultiplier", + "type": "u64" + }, + { + "name": "amountWithLmRewardMultiplier", + "type": "u64" + }, + { + "name": "resolved", + "type": "u8" + }, + { + "name": "padding2", + "type": { + "array": [ + "u8", + 7 + ] + } + }, + { + "name": "stakeResolutionThreadId", + "type": "u64" + }, + { + "name": "earlyExit", + "type": "u8" + }, + { + "name": "padding3", + "type": { + "array": [ + "u8", + 7 + ] + } + }, + { + "name": "earlyExitFee", + "type": "u64" + }, + { + "name": "isGenesis", + "type": "u8" + }, + { + "name": "padding4", + "type": { + "array": [ + "u8", + 7 + ] + } + }, + { + "name": "genesisClaimTime", + "type": "i64" + } + ] + } + }, + { + "name": "LimitedString", + "type": { + "kind": "struct", + "fields": [ + { + "name": "value", + "type": { + "array": [ + "u8", + 31 + ] + } + }, + { + "name": "length", + "type": "u8" + } + ] + } + }, + { + "name": "U128Split", + "type": { + "kind": "struct", + "fields": [ + { + "name": "high", + "type": "u64" + }, + { + "name": "low", + "type": "u64" + } + ] + } + }, + { + "name": "BucketName", + "type": { + "kind": "enum", + "variants": [ + { + "name": "CoreContributor" + }, + { + "name": "DaoTreasury" + }, + { + "name": "PoL" + }, + { + "name": "Ecosystem" + } + ] + } + }, + { + "name": "CortexInitializationStep", + "type": { + "kind": "enum", + "variants": [ + { + "name": "NotCreated" + }, + { + "name": "Step1" + }, + { + "name": "Step2" + }, + { + "name": "Step3" + }, + { + "name": "Initialized" + } + ] + } + }, + { + "name": "OracleType", + "type": { + "kind": "enum", + "variants": [ + { + "name": "None" + }, + { + "name": "Custom" + }, + { + "name": "Pyth" + } + ] + } + }, + { + "name": "PoolLiquidityState", + "type": { + "kind": "enum", + "variants": [ + { + "name": "GenesisLiquidity" + }, + { + "name": "Idle" + }, + { + "name": "Active" + } + ] + } + }, + { + "name": "Side", + "type": { + "kind": "enum", + "variants": [ + { + "name": "None" + }, + { + "name": "Long" + }, + { + "name": "Short" + } + ] + } + }, + { + "name": "StakingType", + "type": { + "kind": "enum", + "variants": [ + { + "name": "LM" + }, + { + "name": "LP" + } + ] + } + }, + { + "name": "StakingInitializationStep", + "type": { + "kind": "enum", + "variants": [ + { + "name": "NotCreated" + }, + { + "name": "Step1" + }, + { + "name": "Step2" + }, + { + "name": "Step3" + }, + { + "name": "Initialized" + } + ] + } + } + ], + "events": [ + { + "name": "OpenPositionEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "sizeUsd", + "type": "u64", + "index": false + }, + { + "name": "price", + "type": "u64", + "index": false + }, + { + "name": "collateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "leverage", + "type": "u32", + "index": false + }, + { + "name": "feeUsd", + "type": "u64", + "index": false + } + ] + }, + { + "name": "IncreasePositionEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "sizeUsd", + "type": "u64", + "index": false + }, + { + "name": "price", + "type": "u64", + "index": false + }, + { + "name": "collateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "leverage", + "type": "u32", + "index": false + }, + { + "name": "feeUsd", + "type": "u64", + "index": false + } + ] + }, + { + "name": "ClosePositionEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "sizeUsd", + "type": "u64", + "index": false + }, + { + "name": "price", + "type": "u64", + "index": false + }, + { + "name": "collateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "profitUsd", + "type": "u64", + "index": false + }, + { + "name": "lossUsd", + "type": "u64", + "index": false + }, + { + "name": "borrowFeeUsd", + "type": "u64", + "index": false + }, + { + "name": "exitFeeUsd", + "type": "u64", + "index": false + } + ] + }, + { + "name": "AddCollateralEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "addAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "newCollateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "leverage", + "type": "u32", + "index": false + } + ] + }, + { + "name": "RemoveCollateralEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "removeAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "newCollateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "leverage", + "type": "u32", + "index": false + } + ] + }, + { + "name": "LiquidateEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "sizeUsd", + "type": "u64", + "index": false + }, + { + "name": "price", + "type": "u64", + "index": false + }, + { + "name": "collateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "lossUsd", + "type": "u64", + "index": false + }, + { + "name": "borrowFeeUsd", + "type": "u64", + "index": false + }, + { + "name": "exitFeeUsd", + "type": "u64", + "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": "InvalidOracleState", + "msg": "Invalid oracle state" + }, + { + "code": 6004, + "name": "StaleOraclePrice", + "msg": "Stale oracle price" + }, + { + "code": 6005, + "name": "InvalidOraclePrice", + "msg": "Invalid oracle price" + }, + { + "code": 6006, + "name": "InvalidEnvironment", + "msg": "Instruction is not allowed in production" + }, + { + "code": 6007, + "name": "InvalidPoolLiquidityState", + "msg": "Invalid pool liquidity state" + }, + { + "code": 6008, + "name": "InvalidCortexState", + "msg": "Invalid cortex state" + }, + { + "code": 6009, + "name": "InvalidStakingState", + "msg": "Invalid staking state" + }, + { + "code": 6010, + "name": "InvalidPoolState", + "msg": "Invalid pool state" + }, + { + "code": 6011, + "name": "InvalidVestState", + "msg": "Invalid vest state" + }, + { + "code": 6012, + "name": "InvalidStakeState", + "msg": "Invalid stake state" + }, + { + "code": 6013, + "name": "InvalidCustody", + "msg": "Invalid custody" + }, + { + "code": 6014, + "name": "InvalidCustodyAccount", + "msg": "Invalid custody account" + }, + { + "code": 6015, + "name": "InvalidCustodyState", + "msg": "Invalid custody state" + }, + { + "code": 6016, + "name": "InvalidCollateralCustody", + "msg": "Invalid collateral custody" + }, + { + "code": 6017, + "name": "InvalidPositionState", + "msg": "Invalid position state" + }, + { + "code": 6018, + "name": "PositionNotInLiquidationRange", + "msg": "The position is not in liquidation range" + }, + { + "code": 6019, + "name": "InvalidStakingRoundState", + "msg": "Invalid staking round state" + }, + { + "code": 6020, + "name": "InvalidAdrenaConfig", + "msg": "Invalid adrena config" + }, + { + "code": 6021, + "name": "InvalidPoolConfig", + "msg": "Invalid pool config" + }, + { + "code": 6022, + "name": "InvalidCustodyConfig", + "msg": "Invalid custody config" + }, + { + "code": 6023, + "name": "InsufficientAmountReturned", + "msg": "Insufficient token amount returned" + }, + { + "code": 6024, + "name": "MaxPriceSlippage", + "msg": "Price slippage limit exceeded" + }, + { + "code": 6025, + "name": "MaxLeverage", + "msg": "Position leverage limit exceeded" + }, + { + "code": 6026, + "name": "MinLeverage", + "msg": "Position leverage under minimum" + }, + { + "code": 6027, + "name": "CustodyAmountLimit", + "msg": "Custody amount limit exceeded" + }, + { + "code": 6028, + "name": "PositionAmountLimit", + "msg": "Position amount limit exceeded" + }, + { + "code": 6029, + "name": "TokenRatioOutOfRange", + "msg": "Token ratio out of range" + }, + { + "code": 6030, + "name": "UnsupportedToken", + "msg": "Token is not supported" + }, + { + "code": 6031, + "name": "InstructionNotAllowed", + "msg": "Instruction is not allowed at this time" + }, + { + "code": 6032, + "name": "MaxUtilization", + "msg": "Token utilization limit exceeded" + }, + { + "code": 6033, + "name": "MaxRegisteredResolvedStakingRoundReached", + "msg": "Max registered resolved staking round reached" + }, + { + "code": 6034, + "name": "InvalidGovernanceProgram", + "msg": "Governance program do not match Cortex's one" + }, + { + "code": 6035, + "name": "InvalidGovernanceRealm", + "msg": "Governance realm do not match Cortex's one" + }, + { + "code": 6036, + "name": "InvalidVestingUnlockTime", + "msg": "Vesting unlock time is too close or passed" + }, + { + "code": 6037, + "name": "InvalidStakingLockingTime", + "msg": "Invalid staking locking time" + }, + { + "code": 6038, + "name": "UserStakeNotFound", + "msg": "The user stake account specified could not be found" + }, + { + "code": 6039, + "name": "InvalidAccountData", + "msg": "Invalid account data" + }, + { + "code": 6040, + "name": "UnresolvedStake", + "msg": "Stake is not resolved" + }, + { + "code": 6041, + "name": "BucketMintLimit", + "msg": "Reached bucket mint limit" + }, + { + "code": 6042, + "name": "GenesisAlpLimitReached", + "msg": "Genesis ALP add liquidity limit reached" + }, + { + "code": 6043, + "name": "PermissionlessOracleMissingSignature", + "msg": "Permissionless oracle update must be preceded by Ed25519 signature verification instruction" + }, + { + "code": 6044, + "name": "PermissionlessOracleMalformedEd25519Data", + "msg": "Ed25519 signature verification data does not match expected format" + }, + { + "code": 6045, + "name": "PermissionlessOracleSignerMismatch", + "msg": "Ed25519 signature was not signed by the oracle authority" + }, + { + "code": 6046, + "name": "PermissionlessOracleMessageMismatch", + "msg": "Signed message does not match instruction params" + }, + { + "code": 6047, + "name": "CustodyStableLockedAmountNotFound", + "msg": "Cannot find custody stable locked amount" + }, + { + "code": 6048, + "name": "CustodyNotFound", + "msg": "Cannot find custody" + }, + { + "code": 6049, + "name": "InsufficientBucketReserve", + "msg": "The bucket does not contain enough token for reserving this allocation" + }, + { + "code": 6050, + "name": "UserNicknameTooLong", + "msg": "User nickname exceed 24 characters" + }, + { + "code": 6051, + "name": "UserNicknameTooShort", + "msg": "User nickname is less than 3 characters" + }, + { + "code": 6052, + "name": "InvalidGenesisLockState", + "msg": "Invalid genesis lock state" + }, + { + "code": 6053, + "name": "GenesisLockCampaignFullySubscribed", + "msg": "The campaign is fully subscribed" + }, + { + "code": 6054, + "name": "PoolAumSoftCapUsdReached", + "msg": "The pool is fully subscribed" + }, + { + "code": 6055, + "name": "MaxRegisteredPool", + "msg": "The number of registered pool reached max amount" + }, + { + "code": 6056, + "name": "MaxRegisteredCustodies", + "msg": "The number of registered custody reached max amount" + }, + { + "code": 6057, + "name": "MaxCumulativeShortPositionSizeLimit", + "msg": "The short limit for this asset has been reached" + }, + { + "code": 6058, + "name": "LockedStakeArrayFull", + "msg": "The max number of LockedStaking has been reached" + }, + { + "code": 6059, + "name": "IndexOutOfBounds", + "msg": "Requested index is out of bounds" + }, + { + "code": 6060, + "name": "InvalidCaller", + "msg": "The instruction must be call with a specific account as caller" + }, + { + "code": 6061, + "name": "InvalidBucketName", + "msg": "Invalid bucket name" + } + ] +}; + +export const IDL: Adrena = { + "version": "1.0.0", + "name": "adrena", + "instructions": [ + { + "name": "initOneCore", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitOneParams" + } + } + ] + }, + { + "name": "initTwoLmTokenMetadata", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "lmTokenMintMetadata", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "mplTokenMetadataProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + } + ], + "args": [] + }, + { + "name": "initThreeGovernance", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#6", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + } + ], + "args": [] + }, + { + "name": "initFourVesting", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "vestRegistry", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + } + ], + "args": [] + }, + { + "name": "addVest", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "owner", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "vestRegistry", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "vest", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#10", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#12", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#13", + "Account owned by governance storing user information" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddVestParams" + } + } + ], + "returns": "u8" + }, + { + "name": "claimVest", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "vestRegistry", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "vest", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#9", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#11", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#12", + "Account owned by governance storing user information" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + } + ], + "args": [], + "returns": "u64" + }, + { + "name": "addPoolPartOne", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "lpTokenMintMetadata", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "mplTokenMetadataProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddPoolPartOneParams" + } + } + ], + "returns": "u8" + }, + { + "name": "addPoolPartTwo", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "finalizeGenesisLockCampaignThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddPoolPartTwoParams" + } + } + ], + "returns": "u8" + }, + { + "name": "removePool", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + } + ], + "args": [], + "returns": "u8" + }, + { + "name": "addCustody", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "custodyTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddCustodyParams" + } + } + ], + "returns": "u8" + }, + { + "name": "removeCustody", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveCustodyParams" + } + } + ], + "returns": "u8" + }, + { + "name": "setCustodyConfig", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetCustodyConfigParams" + } + } + ], + "returns": "u8" + }, + { + "name": "setCustodyAllowSwap", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetCustodyAllowSwapParams" + } + } + ] + }, + { + "name": "setCustodyAllowTrade", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetCustodyAllowTradeParams" + } + } + ] + }, + { + "name": "setPoolAllowSwap", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetPoolAllowSwapParams" + } + } + ] + }, + { + "name": "setPoolAllowTrade", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetPoolAllowTradeParams" + } + } + ] + }, + { + "name": "setPoolAumSoftCapUsd", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetPoolAumSoftCapUsdParams" + } + } + ] + }, + { + "name": "setTestOraclePrice", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "oracleAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetTestOraclePriceParams" + } + } + ], + "returns": "u8" + }, + { + "name": "testAdminRemoveCollateral", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "owner", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "TestAdminRemoveCollateralParams" + } + } + ] + }, + { + "name": "swap", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "receivingCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "receivingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "dispensingCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "dispensingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "dispensingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#22" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SwapParams" + } + } + ] + }, + { + "name": "addLiquidity", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "lpTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddLiquidityParams" + } + } + ] + }, + { + "name": "addGenesisLiquidity", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "lpTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpUserStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "lpStakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#16", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#18", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#19", + "Account owned by governance storing user information" + ] + }, + { + "name": "lpStakeResolutionThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddGenesisLiquidityParams" + } + } + ] + }, + { + "name": "removeLiquidity", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "lpTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#20" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveLiquidityParams" + } + } + ] + }, + { + "name": "openPositionLong", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#20" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "OpenPositionLongParams" + } + } + ] + }, + { + "name": "openPositionShort", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#22" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "OpenPositionShortParams" + } + } + ] + }, + { + "name": "openOrIncreasePositionWithSwapLong", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "collateralAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "receivingCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "receivingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "principalCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "principalCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "principalCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#24" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "OpenPositionWithSwapParams" + } + } + ] + }, + { + "name": "openOrIncreasePositionWithSwapShort", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "collateralAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "receivingCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "receivingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "principalCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "principalCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "principalCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#27" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#28" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#29" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#30" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "OpenPositionWithSwapParams" + } + } + ] + }, + { + "name": "addCollateralLong", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddCollateralLongParams" + } + } + ] + }, + { + "name": "addCollateralShort", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddCollateralShortParams" + } + } + ] + }, + { + "name": "removeCollateralLong", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveCollateralLongParams" + } + } + ] + }, + { + "name": "removeCollateralShort", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveCollateralShortParams" + } + } + ] + }, + { + "name": "closePositionLong", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#19" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "ClosePositionLongParams" + } + } + ] + }, + { + "name": "closePositionShort", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#21" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "ClosePositionShortParams" + } + } + ] + }, + { + "name": "liquidateLong", + "accounts": [ + { + "name": "signer", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#19" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "LiquidateLongParams" + } + } + ] + }, + { + "name": "liquidateShort", + "accounts": [ + { + "name": "signer", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#21" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "LiquidateShortParams" + } + } + ] + }, + { + "name": "updatePoolAum", + "accounts": [ + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + } + ], + "args": [], + "returns": "u128" + }, + { + "name": "getAddLiquidityAmountAndFee", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetAddLiquidityAmountAndFeeParams" + } + } + ], + "returns": { + "defined": "AmountAndFee" + } + }, + { + "name": "getRemoveLiquidityAmountAndFee", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetRemoveLiquidityAmountAndFeeParams" + } + } + ], + "returns": { + "defined": "AmountAndFee" + } + }, + { + "name": "getEntryPriceAndFee", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetEntryPriceAndFeeParams" + } + } + ], + "returns": { + "defined": "NewPositionPricesAndFee" + } + }, + { + "name": "getOpenPositionWithSwapAmountAndFees", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "receivingCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "receivingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "principalCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "principalCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetOpenPositionWithSwapAmountAndFeesParams" + } + } + ], + "returns": { + "defined": "OpenPositionWithSwapAmountAndFees" + } + }, + { + "name": "getExitPriceAndFee", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "position", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + } + ], + "args": [], + "returns": { + "defined": "ExitPriceAndFee" + } + }, + { + "name": "getPnl", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "position", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + } + ], + "args": [], + "returns": { + "defined": "ProfitAndLoss" + } + }, + { + "name": "getLiquidationPrice", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "position", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetLiquidationPriceParams" + } + } + ], + "returns": "u64" + }, + { + "name": "getLiquidationState", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "position", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + } + ], + "args": [], + "returns": "u8" + }, + { + "name": "getOraclePrice", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "custody", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + } + ], + "args": [], + "returns": "u64" + }, + { + "name": "getSwapAmountAndFees", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "receivingCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "receivingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "dispensingCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "dispensingCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetSwapAmountAndFeesParams" + } + } + ], + "returns": { + "defined": "SwapAmountAndFees" + } + }, + { + "name": "getAssetsUnderManagement", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + } + ], + "args": [], + "returns": "u128" + }, + { + "name": "initUserStaking", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "lmTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakesClaimPayer", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "staking", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "lmTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitUserStakingParams" + } + } + ] + }, + { + "name": "initUserProfile", + "accounts": [ + { + "name": "user", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitUserProfileParams" + } + } + ] + }, + { + "name": "editUserProfile", + "accounts": [ + { + "name": "user", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "EditUserProfileParams" + } + } + ] + }, + { + "name": "deleteUserProfile", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "user", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#3" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + } + ], + "args": [] + }, + { + "name": "initStakingOne", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingStakedTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitStakingOneParams" + } + } + ], + "returns": "u8" + }, + { + "name": "initStakingTwo", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + } + ], + "args": [], + "returns": "u8" + }, + { + "name": "initStakingThree", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + } + ], + "args": [], + "returns": "u8" + }, + { + "name": "initStakingFour", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingStakedTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "resolveRoundCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "resolveRoundPayer", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#18" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitStakingFourParams" + } + } + ], + "returns": "u8" + }, + { + "name": "addLiquidStake", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lmTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#15", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#17", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#18", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddLiquidStakeParams" + } + } + ] + }, + { + "name": "addLockedStake", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#13", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#15", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#16", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakeResolutionThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddLockedStakeParams" + } + } + ] + }, + { + "name": "removeLiquidStake", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "stakedTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "lmTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#15", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#17", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#18", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveLiquidStakeParams" + } + } + ] + }, + { + "name": "removeLockedStake", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "lmTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "stakedTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "stakedTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#16", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#18", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#19", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveLockedStakeParams" + } + } + ] + }, + { + "name": "claimStakes", + "accounts": [ + { + "name": "caller", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "rewardTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + } + ], + "args": [] + }, + { + "name": "finalizeGenesisLockCampaign", + "accounts": [ + { + "name": "caller", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + } + ], + "args": [] + }, + { + "name": "setPoolLiquidityState", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetPoolLiquidityStateParams" + } + } + ] + }, + { + "name": "finalizeLockedStake", + "accounts": [ + { + "name": "caller", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "userStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#9", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#11", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#12", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakeResolutionThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#18" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "FinalizeLockedStakeParams" + } + } + ] + }, + { + "name": "updateStakingThread", + "accounts": [ + { + "name": "admin", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmResolveRoundCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpResolveRoundCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + } + ], + "args": [] + }, + { + "name": "resolveStakingRound", + "accounts": [ + { + "name": "caller", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + } + ], + "args": [] + }, + { + "name": "getLpTokenPrice", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "lpTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + } + ], + "args": [], + "returns": "u64" + }, + { + "name": "mintLmTokensFromBucket", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "MintLmTokensFromBucketParams" + } + } + ], + "returns": "u8" + }, + { + "name": "increasePositionLong", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "IncreasePositionLongParams" + } + } + ] + }, + { + "name": "increasePositionShort", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "collateralCustodyOracleAccount", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "IncreasePositionShortParams" + } + } + ] + }, + { + "name": "setStakingLmEmissionPotentiometers", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetStakingLmEmissionPotentiometersParams" + } + } + ] + }, + { + "name": "setAdmin", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetAdminParams" + } + } + ] + }, + { + "name": "setCustodyMaxCumulativeShortPositionSizeUsd", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetCustodyMaxCumulativeShortPositionSizeUsdParams" + } + } + ] + } + ], + "accounts": [ + { + "name": "cortex", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "transferAuthorityBump", + "type": "u8" + }, + { + "name": "lmTokenBump", + "type": "u8" + }, + { + "name": "governanceTokenBump", + "type": "u8" + }, + { + "name": "initialized", + "type": "u8" + }, + { + "name": "feeConversionDecimals", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 2 + ] + } + }, + { + "name": "inceptionTime", + "type": "i64" + }, + { + "name": "admin", + "type": "publicKey" + }, + { + "name": "feeRedistributionMint", + "type": "publicKey" + }, + { + "name": "protocolFeeRecipient", + "type": "publicKey" + }, + { + "name": "pools", + "type": { + "array": [ + "publicKey", + 4 + ] + } + }, + { + "name": "userProfilesCount", + "type": "u64" + }, + { + "name": "governanceProgram", + "type": "publicKey" + }, + { + "name": "governanceRealm", + "type": "publicKey" + }, + { + "name": "coreContributorBucketAllocation", + "type": "u64" + }, + { + "name": "daoTreasuryBucketAllocation", + "type": "u64" + }, + { + "name": "polBucketAllocation", + "type": "u64" + }, + { + "name": "ecosystemBucketAllocation", + "type": "u64" + }, + { + "name": "coreContributorBucketVestedAmount", + "type": "u64" + }, + { + "name": "coreContributorBucketMintedAmount", + "type": "u64" + }, + { + "name": "daoTreasuryBucketVestedAmount", + "type": "u64" + }, + { + "name": "daoTreasuryBucketMintedAmount", + "type": "u64" + }, + { + "name": "polBucketVestedAmount", + "type": "u64" + }, + { + "name": "polBucketMintedAmount", + "type": "u64" + }, + { + "name": "ecosystemBucketVestedAmount", + "type": "u64" + }, + { + "name": "ecosystemBucketMintedAmount", + "type": "u64" + }, + { + "name": "genesisLiquidityAlpAmount", + "type": "u64" + } + ] + } + }, + { + "name": "custody", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "tokenAccountBump", + "type": "u8" + }, + { + "name": "allowTrade", + "type": "u8" + }, + { + "name": "allowSwap", + "type": "u8" + }, + { + "name": "decimals", + "type": "u8" + }, + { + "name": "isStable", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 2 + ] + } + }, + { + "name": "pool", + "type": "publicKey" + }, + { + "name": "mint", + "type": "publicKey" + }, + { + "name": "tokenAccount", + "type": "publicKey" + }, + { + "name": "oracle", + "type": { + "defined": "OracleParams" + } + }, + { + "name": "pricing", + "type": { + "defined": "PricingParams" + } + }, + { + "name": "fees", + "type": { + "defined": "Fees" + } + }, + { + "name": "borrowRate", + "type": { + "defined": "BorrowRateParams" + } + }, + { + "name": "collectedFees", + "type": { + "defined": "FeesStats" + } + }, + { + "name": "volumeStats", + "type": { + "defined": "VolumeStats" + } + }, + { + "name": "tradeStats", + "type": { + "defined": "TradeStats" + } + }, + { + "name": "assets", + "type": { + "defined": "Assets" + } + }, + { + "name": "longPositions", + "type": { + "defined": "PositionsAccounting" + } + }, + { + "name": "shortPositions", + "type": { + "defined": "PositionsAccounting" + } + }, + { + "name": "borrowRateState", + "type": { + "defined": "BorrowRateState" + } + } + ] + } + }, + { + "name": "genesisLock", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "hasTransitionedToFullyPublic", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 6 + ] + } + }, + { + "name": "campaignDuration", + "type": "i64" + }, + { + "name": "reservedGrantDuration", + "type": "i64" + }, + { + "name": "campaignStartDate", + "type": "i64" + }, + { + "name": "publicAmount", + "type": "u64" + }, + { + "name": "reservedAmount", + "type": "u64" + }, + { + "name": "publicAmountClaimed", + "type": "u64" + }, + { + "name": "reservedAmountClaimed", + "type": "u64" + }, + { + "name": "reservedGrantOwners", + "type": { + "array": [ + "publicKey", + 17 + ] + } + }, + { + "name": "reservedGrantAmounts", + "type": { + "array": [ + "u64", + 17 + ] + } + }, + { + "name": "finalizeGenesisLockCampaignThreadId", + "type": "u64" + } + ] + } + }, + { + "name": "customOracle", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "expo", + "type": "i32" + }, + { + "name": "conf", + "type": "u64" + }, + { + "name": "publishTime", + "type": "i64" + } + ] + } + }, + { + "name": "pool", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "lpTokenBump", + "type": "u8" + }, + { + "name": "nbStableCustody", + "type": "u8" + }, + { + "name": "initialized", + "type": "u8" + }, + { + "name": "allowTrade", + "type": "u8" + }, + { + "name": "allowSwap", + "type": "u8" + }, + { + "name": "liquidityState", + "type": "u8" + }, + { + "name": "registeredCustodyCount", + "type": "u8" + }, + { + "name": "name", + "type": { + "defined": "LimitedString" + } + }, + { + "name": "custodies", + "type": { + "array": [ + "publicKey", + 10 + ] + } + }, + { + "name": "ratios", + "type": { + "array": [ + { + "defined": "TokenRatios" + }, + 10 + ] + } + }, + { + "name": "aumUsd", + "type": { + "defined": "U128Split" + } + }, + { + "name": "inceptionTime", + "type": "i64" + }, + { + "name": "aumSoftCapUsd", + "type": "u64" + } + ] + } + }, + { + "name": "position", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "side", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 6 + ] + } + }, + { + "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": "price", + "type": "u64" + }, + { + "name": "sizeUsd", + "type": "u64" + }, + { + "name": "borrowSizeUsd", + "type": "u64" + }, + { + "name": "collateralUsd", + "type": "u64" + }, + { + "name": "unrealizedLossUsd", + "type": "u64" + }, + { + "name": "cumulativeInterestSnapshot", + "type": { + "defined": "U128Split" + } + }, + { + "name": "lockedAmount", + "type": "u64" + }, + { + "name": "collateralAmount", + "type": "u64" + }, + { + "name": "entryFeeUsd", + "type": "u64" + }, + { + "name": "exitFeeUsd", + "type": "u64" + }, + { + "name": "liquidationFeeUsd", + "type": "u64" + } + ] + } + }, + { + "name": "staking", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stakingType", + "type": "u8" + }, + { + "name": "bump", + "type": "u8" + }, + { + "name": "stakedTokenVaultBump", + "type": "u8" + }, + { + "name": "rewardTokenVaultBump", + "type": "u8" + }, + { + "name": "lmRewardTokenVaultBump", + "type": "u8" + }, + { + "name": "rewardTokenDecimals", + "type": "u8" + }, + { + "name": "stakedTokenDecimals", + "type": "u8" + }, + { + "name": "initialized", + "type": "u8" + }, + { + "name": "nbLockedTokens", + "type": "u64" + }, + { + "name": "nbLiquidTokens", + "type": "u64" + }, + { + "name": "stakedTokenMint", + "type": "publicKey" + }, + { + "name": "resolvedRewardTokenAmount", + "type": "u64" + }, + { + "name": "resolvedStakedTokenAmount", + "type": "u64" + }, + { + "name": "resolvedLmRewardTokenAmount", + "type": "u64" + }, + { + "name": "resolvedLmStakedTokenAmount", + "type": "u64" + }, + { + "name": "currentStakingRound", + "type": { + "defined": "StakingRound" + } + }, + { + "name": "nextStakingRound", + "type": { + "defined": "StakingRound" + } + }, + { + "name": "resolvedStakingRounds", + "type": { + "array": [ + { + "defined": "StakingRound" + }, + 32 + ] + } + }, + { + "name": "registeredResolvedStakingRoundCount", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 3 + ] + } + }, + { + "name": "lmEmissionPotentiometerBps", + "type": "u16" + }, + { + "name": "monthsElapsedSinceInception", + "type": "u16" + }, + { + "name": "resolveRoundCronThreadId", + "type": "u64" + }, + { + "name": "emissionAmountPerRoundLastUpdate", + "type": "i64" + }, + { + "name": "currentMonthEmissionAmountPerRound", + "type": "u64" + } + ] + } + }, + { + "name": "userProfile", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 7 + ] + } + }, + { + "name": "nickname", + "type": { + "defined": "LimitedString" + } + }, + { + "name": "createdAt", + "type": "i64" + }, + { + "name": "owner", + "type": "publicKey" + }, + { + "name": "swapCount", + "type": "u64" + }, + { + "name": "swapVolumeUsd", + "type": "u64" + }, + { + "name": "swapFeePaidUsd", + "type": "u64" + }, + { + "name": "shortStats", + "type": { + "defined": "TradingStats" + } + }, + { + "name": "longStats", + "type": { + "defined": "TradingStats" + } + } + ] + } + }, + { + "name": "userStaking", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "threadAuthorityBump", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 6 + ] + } + }, + { + "name": "stakesClaimCronThreadId", + "type": "u64" + }, + { + "name": "liquidStake", + "type": { + "defined": "LiquidStake" + } + }, + { + "name": "lockedStakes", + "type": { + "array": [ + { + "defined": "LockedStake" + }, + 32 + ] + } + } + ] + } + }, + { + "name": "vestRegistry", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "vests", + "type": { + "vec": "publicKey" + } + }, + { + "name": "vestingTokenAmount", + "type": "u64" + }, + { + "name": "vestedTokenAmount", + "type": "u64" + } + ] + } + }, + { + "name": "vest", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", + "type": "u8" + }, + { + "name": "originBucket", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 6 + ] + } + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "unlockStartTimestamp", + "type": "i64" + }, + { + "name": "unlockEndTimestamp", + "type": "i64" + }, + { + "name": "claimedAmount", + "type": "u64" + }, + { + "name": "lastClaimTimestamp", + "type": "i64" + }, + { + "name": "owner", + "type": "publicKey" + } + ] + } + } + ], + "types": [ + { + "name": "MintLmTokensFromBucketParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bucketName", + "type": "u8" + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "reason", + "type": "string" + } + ] + } + }, + { + "name": "SetAdminParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "newAdmin", + "type": "publicKey" + } + ] + } + }, + { + "name": "AddCustodyParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "isStable", + "type": "bool" + }, + { + "name": "oracle", + "type": { + "defined": "OracleParams" + } + }, + { + "name": "pricing", + "type": { + "defined": "PricingParams" + } + }, + { + "name": "allowSwap", + "type": "bool" + }, + { + "name": "allowTrade", + "type": "bool" + }, + { + "name": "fees", + "type": { + "defined": "Fees" + } + }, + { + "name": "borrowRate", + "type": { + "defined": "BorrowRateParams" + } + }, + { + "name": "ratios", + "type": { + "array": [ + { + "defined": "TokenRatios" + }, + 10 + ] + } + } + ] + } + }, + { + "name": "RemoveCustodyParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "ratios", + "type": { + "array": [ + { + "defined": "TokenRatios" + }, + 10 + ] + } + } + ] + } + }, + { + "name": "SetCustodyAllowSwapParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "allowSwap", + "type": "bool" + } + ] + } + }, + { + "name": "SetCustodyAllowTradeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "allowTrade", + "type": "bool" + } + ] + } + }, + { + "name": "SetCustodyConfigParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "isStable", + "type": "bool" + }, + { + "name": "oracle", + "type": { + "defined": "OracleParams" + } + }, + { + "name": "pricing", + "type": { + "defined": "PricingParams" + } + }, + { + "name": "fees", + "type": { + "defined": "Fees" + } + }, + { + "name": "borrowRate", + "type": { + "defined": "BorrowRateParams" + } + }, + { + "name": "ratios", + "type": { + "array": [ + { + "defined": "TokenRatios" + }, + 10 + ] + } + } + ] + } + }, + { + "name": "SetCustodyMaxCumulativeShortPositionSizeUsdParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxCumulativeShortPositionSizeUsd", + "type": "u64" + } + ] + } + }, + { + "name": "InitOneParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "ecosystemBucketAllocation", + "type": "u64" + }, + { + "name": "coreContributorBucketAllocation", + "type": "u64" + }, + { + "name": "daoTreasuryBucketAllocation", + "type": "u64" + }, + { + "name": "polBucketAllocation", + "type": "u64" + } + ] + } + }, + { + "name": "AddPoolPartOneParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "name", + "type": "string" + }, + { + "name": "aumSoftCapUsd", + "type": "u64" + }, + { + "name": "lpTokenName", + "type": "string" + }, + { + "name": "lpTokenSymbol", + "type": "string" + }, + { + "name": "lpTokenUri", + "type": "string" + } + ] + } + }, + { + "name": "AddPoolPartTwoParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "genesisLockCampaignDuration", + "type": "i64" + }, + { + "name": "genesisReservedGrantDuration", + "type": "i64" + }, + { + "name": "genesisLockCampaignStartDate", + "type": "i64" + }, + { + "name": "finalizeGenesisLockCampaignThreadId", + "type": "u64" + } + ] + } + }, + { + "name": "SetPoolAllowSwapParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "allowSwap", + "type": "bool" + } + ] + } + }, + { + "name": "SetPoolAllowTradeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "allowTrade", + "type": "bool" + } + ] + } + }, + { + "name": "SetPoolAumSoftCapUsdParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "aumSoftCapUsd", + "type": "u64" + } + ] + } + }, + { + "name": "SetPoolLiquidityStateParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "liquidityState", + "type": "u8" + } + ] + } + }, + { + "name": "SetTestOraclePriceParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "expo", + "type": "i32" + }, + { + "name": "conf", + "type": "u64" + }, + { + "name": "publishTime", + "type": "i64" + } + ] + } + }, + { + "name": "InitStakingFourParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "resolveRoundCronThreadId", + "type": "u64" + } + ] + } + }, + { + "name": "InitStakingOneParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stakingType", + "type": "u8" + } + ] + } + }, + { + "name": "SetStakingLmEmissionPotentiometersParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "lmEmissionPotentiometerBps", + "type": "u16" + } + ] + } + }, + { + "name": "TestAdminRemoveCollateralParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateralUsd", + "type": "u64" + } + ] + } + }, + { + "name": "AddGenesisLiquidityParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "lpStakeResolutionThreadId", + "type": "u64" + }, + { + "name": "amountIn", + "type": "u64" + }, + { + "name": "minLpAmountOut", + "type": "u64" + } + ] + } + }, + { + "name": "AddLiquidityParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amountIn", + "type": "u64" + }, + { + "name": "minLpAmountOut", + "type": "u64" + } + ] + } + }, + { + "name": "RemoveLiquidityParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "lpAmountIn", + "type": "u64" + }, + { + "name": "minAmountOut", + "type": "u64" + } + ] + } + }, + { + "name": "SwapParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amountIn", + "type": "u64" + }, + { + "name": "minAmountOut", + "type": "u64" + } + ] + } + }, + { + "name": "AddCollateralLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateral", + "type": "u64" + } + ] + } + }, + { + "name": "AddCollateralShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateral", + "type": "u64" + } + ] + } + }, + { + "name": "ClosePositionLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + } + ] + } + }, + { + "name": "ClosePositionShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + } + ] + } + }, + { + "name": "IncreasePositionLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "IncreasePositionShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "LiquidateLongParams", + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "LiquidateShortParams", + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "OpenPositionWithSwapParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "OpenPositionLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "OpenPositionShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "RemoveCollateralLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateralUsd", + "type": "u64" + } + ] + } + }, + { + "name": "RemoveCollateralShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateralUsd", + "type": "u64" + } + ] + } + }, + { + "name": "AddLiquidStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + } + ] + } + }, + { + "name": "AddLockedStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stakeResolutionThreadId", + "type": "u64" + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "lockedDays", + "type": "u32" + } + ] + } + }, + { + "name": "FinalizeLockedStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "threadId", + "type": "u64" + }, + { + "name": "earlyExit", + "type": "bool" + } + ] + } + }, + { + "name": "InitUserStakingParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stakesClaimCronThreadId", + "type": "u64" + } + ] + } + }, + { + "name": "RemoveLiquidStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + } + ] + } + }, + { + "name": "RemoveLockedStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "lockedStakeIndex", + "type": "u64" + } + ] + } + }, + { + "name": "EditUserProfileParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "nickname", + "type": "string" + } + ] + } + }, + { + "name": "InitUserProfileParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "nickname", + "type": "string" + } + ] + } + }, + { + "name": "AddVestParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "originBucket", + "type": "u8" + }, + { + "name": "unlockStartTimestamp", + "type": "i64" + }, + { + "name": "unlockEndTimestamp", + "type": "i64" + } + ] + } + }, + { + "name": "GetAddLiquidityAmountAndFeeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amountIn", + "type": "u64" + } + ] + } + }, + { + "name": "GetEntryPriceAndFeeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + }, + { + "name": "side", + "type": "u8" + } + ] + } + }, + { + "name": "GetLiquidationPriceParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "addCollateral", + "type": "u64" + }, + { + "name": "removeCollateral", + "type": "u64" + } + ] + } + }, + { + "name": "GetOpenPositionWithSwapAmountAndFeesParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateralAmount", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + }, + { + "name": "side", + "type": "u8" + } + ] + } + }, + { + "name": "GetRemoveLiquidityAmountAndFeeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "lpAmountIn", + "type": "u64" + } + ] + } + }, + { + "name": "GetSwapAmountAndFeesParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amountIn", + "type": "u64" + } + ] + } + }, + { + "name": "ExitPriceAndFee", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "fee", + "type": "u64" + }, + { + "name": "amountOut", + "type": "u64" + }, + { + "name": "profitUsd", + "type": "u64" + }, + { + "name": "lossUsd", + "type": "u64" + } + ] + } + }, + { + "name": "AmountAndFee", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "fee", + "type": "u64" + } + ] + } + }, + { + "name": "NewPositionPricesAndFee", + "type": { + "kind": "struct", + "fields": [ + { + "name": "entryPrice", + "type": "u64" + }, + { + "name": "liquidationPrice", + "type": "u64" + }, + { + "name": "entryFee", + "type": "u64" + }, + { + "name": "exitFee", + "type": "u64" + }, + { + "name": "liquidationFee", + "type": "u64" + }, + { + "name": "size", + "type": "u64" + } + ] + } + }, + { + "name": "OpenPositionWithSwapAmountAndFees", + "type": { + "kind": "struct", + "fields": [ + { + "name": "entryPrice", + "type": "u64" + }, + { + "name": "liquidationPrice", + "type": "u64" + }, + { + "name": "swapFeeIn", + "type": "u64" + }, + { + "name": "swapFeeOut", + "type": "u64" + }, + { + "name": "openPositionFee", + "type": "u64" + }, + { + "name": "exitFee", + "type": "u64" + }, + { + "name": "liquidationFee", + "type": "u64" + }, + { + "name": "size", + "type": "u64" + } + ] + } + }, + { + "name": "SwapAmountAndFees", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amountOut", + "type": "u64" + }, + { + "name": "feeIn", + "type": "u64" + }, + { + "name": "feeOut", + "type": "u64" + } + ] + } + }, + { + "name": "ProfitAndLoss", + "docs": [ + "Specific to the codebase, this struct is used to store the profit and loss of a position.", + "Specific because entry fees are paid right away at position opening and on top of the requested size/leverage (to match it exactly).", + "As such, the profit and loss are calculated with the entry fees already paid (and out of these two numbers).", + "To get the \"real overall\" profit and loss, one must add the entry fees back to the profit and loss.", + "And to get the \"pure\" profit and loss, one must subtract the exit and paid_interests (borrow interests) from the profit and loss." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "profitUsd", + "type": "u64" + }, + { + "name": "lossUsd", + "type": "u64" + }, + { + "name": "entryFeeUsd", + "type": "u64" + }, + { + "name": "exitFee", + "type": "u64" + }, + { + "name": "exitFeeUsd", + "type": "u64" + }, + { + "name": "borrowFeeUsd", + "type": "u64" + } + ] + } + }, + { + "name": "Fees", + "type": { + "kind": "struct", + "fields": [ + { + "name": "swapIn", + "type": "u16" + }, + { + "name": "swapOut", + "type": "u16" + }, + { + "name": "stableSwapIn", + "type": "u16" + }, + { + "name": "stableSwapOut", + "type": "u16" + }, + { + "name": "addLiquidity", + "type": "u16" + }, + { + "name": "removeLiquidity", + "type": "u16" + }, + { + "name": "openPosition", + "type": "u16" + }, + { + "name": "closePosition", + "type": "u16" + }, + { + "name": "liquidation", + "type": "u16" + }, + { + "name": "feeMax", + "type": "u16" + }, + { + "name": "protocolShare", + "type": "u16" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 2 + ] + } + }, + { + "name": "padding2", + "type": "u64" + } + ] + } + }, + { + "name": "FeesStats", + "type": { + "kind": "struct", + "fields": [ + { + "name": "swapUsd", + "type": "u64" + }, + { + "name": "addLiquidityUsd", + "type": "u64" + }, + { + "name": "removeLiquidityUsd", + "type": "u64" + }, + { + "name": "openPositionUsd", + "type": "u64" + }, + { + "name": "closePositionUsd", + "type": "u64" + }, + { + "name": "liquidationUsd", + "type": "u64" + }, + { + "name": "borrowUsd", + "type": "u64" + } + ] + } + }, + { + "name": "VolumeStats", + "type": { + "kind": "struct", + "fields": [ + { + "name": "swapUsd", + "type": "u64" + }, + { + "name": "addLiquidityUsd", + "type": "u64" + }, + { + "name": "removeLiquidityUsd", + "type": "u64" + }, + { + "name": "openPositionUsd", + "type": "u64" + }, + { + "name": "closePositionUsd", + "type": "u64" + }, + { + "name": "liquidationUsd", + "type": "u64" + } + ] + } + }, + { + "name": "TradeStats", + "type": { + "kind": "struct", + "fields": [ + { + "name": "profitUsd", + "type": "u64" + }, + { + "name": "lossUsd", + "type": "u64" + }, + { + "name": "oiLongUsd", + "type": "u64" + }, + { + "name": "oiShortUsd", + "type": "u64" + } + ] + } + }, + { + "name": "Assets", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateral", + "type": "u64" + }, + { + "name": "owned", + "type": "u64" + }, + { + "name": "locked", + "type": "u64" + } + ] + } + }, + { + "name": "PricingParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxInitialLeverage", + "type": "u32" + }, + { + "name": "maxLeverage", + "type": "u32" + }, + { + "name": "maxPositionLockedUsd", + "type": "u64" + }, + { + "name": "maxCumulativeShortPositionSizeUsd", + "type": "u64" + } + ] + } + }, + { + "name": "BorrowRateParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "maxHourlyBorrowInterestRate", + "type": "u64" + } + ] + } + }, + { + "name": "BorrowRateState", + "type": { + "kind": "struct", + "fields": [ + { + "name": "currentRate", + "type": "u64" + }, + { + "name": "lastUpdate", + "type": "i64" + }, + { + "name": "cumulativeInterest", + "type": { + "defined": "U128Split" + } + } + ] + } + }, + { + "name": "PositionsAccounting", + "type": { + "kind": "struct", + "fields": [ + { + "name": "openPositions", + "type": "u64" + }, + { + "name": "sizeUsd", + "type": "u64" + }, + { + "name": "borrowSizeUsd", + "type": "u64" + }, + { + "name": "lockedAmount", + "type": "u64" + }, + { + "name": "weightedPrice", + "type": { + "defined": "U128Split" + } + }, + { + "name": "totalQuantity", + "type": { + "defined": "U128Split" + } + }, + { + "name": "cumulativeInterestUsd", + "type": "u64" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 8 + ] + } + }, + { + "name": "cumulativeInterestSnapshot", + "type": { + "defined": "U128Split" + } + }, + { + "name": "exitFeeUsd", + "type": "u64" + }, + { + "name": "stableLockedAmount", + "type": { + "array": [ + { + "defined": "StableLockedAmountStat" + }, + 2 + ] + } + } + ] + } + }, + { + "name": "StableLockedAmountStat", + "type": { + "kind": "struct", + "fields": [ + { + "name": "custody", + "type": "publicKey" + }, + { + "name": "lockedAmount", + "type": "u64" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 8 + ] + } + } + ] + } + }, + { + "name": "OraclePrice", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "exponent", + "type": "i32" + }, + { + "name": "conf", + "type": "u64" + } + ] + } + }, + { + "name": "OracleParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "oracleAccount", + "type": "publicKey" + }, + { + "name": "oracleType", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 15 + ] + } + } + ] + } + }, + { + "name": "TokenRatios", + "type": { + "kind": "struct", + "fields": [ + { + "name": "target", + "type": "u16" + }, + { + "name": "min", + "type": "u16" + }, + { + "name": "max", + "type": "u16" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 2 + ] + } + } + ] + } + }, + { + "name": "StakingRound", + "type": { + "kind": "struct", + "fields": [ + { + "name": "startTime", + "type": "i64" + }, + { + "name": "rate", + "type": "u64" + }, + { + "name": "totalStake", + "type": "u64" + }, + { + "name": "totalClaim", + "type": "u64" + }, + { + "name": "lmRate", + "type": "u64" + }, + { + "name": "lmTotalStake", + "type": "u64" + }, + { + "name": "lmTotalClaim", + "type": "u64" + } + ] + } + }, + { + "name": "TradingStats", + "type": { + "kind": "struct", + "fields": [ + { + "name": "openedPositionCount", + "type": "u64" + }, + { + "name": "liquidatedPositionCount", + "type": "u64" + }, + { + "name": "openingAverageLeverage", + "type": "u64" + }, + { + "name": "openingSizeUsd", + "type": "u64" + }, + { + "name": "profitsUsd", + "type": "u64" + }, + { + "name": "lossesUsd", + "type": "u64" + }, + { + "name": "feePaidUsd", + "type": "u64" + } + ] + } + }, + { + "name": "LiquidStake", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "stakeTime", + "type": "i64" + }, + { + "name": "claimTime", + "type": "i64" + }, + { + "name": "overlapTime", + "type": "i64" + }, + { + "name": "overlapAmount", + "type": "u64" + } + ] + } + }, + { + "name": "LockedStake", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "stakeTime", + "type": "i64" + }, + { + "name": "claimTime", + "type": "i64" + }, + { + "name": "lockDuration", + "type": "u64" + }, + { + "name": "rewardMultiplier", + "type": "u32" + }, + { + "name": "lmRewardMultiplier", + "type": "u32" + }, + { + "name": "voteMultiplier", + "type": "u32" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 4 + ] + } + }, + { + "name": "amountWithRewardMultiplier", + "type": "u64" + }, + { + "name": "amountWithLmRewardMultiplier", + "type": "u64" + }, + { + "name": "resolved", + "type": "u8" + }, + { + "name": "padding2", + "type": { + "array": [ + "u8", + 7 + ] + } + }, + { + "name": "stakeResolutionThreadId", + "type": "u64" + }, + { + "name": "earlyExit", + "type": "u8" + }, + { + "name": "padding3", + "type": { + "array": [ + "u8", + 7 + ] + } + }, + { + "name": "earlyExitFee", + "type": "u64" + }, + { + "name": "isGenesis", + "type": "u8" + }, + { + "name": "padding4", + "type": { + "array": [ + "u8", + 7 + ] + } + }, + { + "name": "genesisClaimTime", + "type": "i64" + } + ] + } + }, + { + "name": "LimitedString", + "type": { + "kind": "struct", + "fields": [ + { + "name": "value", + "type": { + "array": [ + "u8", + 31 + ] + } + }, + { + "name": "length", + "type": "u8" + } + ] + } + }, + { + "name": "U128Split", + "type": { + "kind": "struct", + "fields": [ + { + "name": "high", + "type": "u64" + }, + { + "name": "low", + "type": "u64" + } + ] + } + }, + { + "name": "BucketName", + "type": { + "kind": "enum", + "variants": [ + { + "name": "CoreContributor" + }, + { + "name": "DaoTreasury" + }, + { + "name": "PoL" + }, + { + "name": "Ecosystem" + } + ] + } + }, + { + "name": "CortexInitializationStep", + "type": { + "kind": "enum", + "variants": [ + { + "name": "NotCreated" + }, + { + "name": "Step1" + }, + { + "name": "Step2" + }, + { + "name": "Step3" + }, + { + "name": "Initialized" + } + ] + } + }, + { + "name": "OracleType", + "type": { + "kind": "enum", + "variants": [ + { + "name": "None" + }, + { + "name": "Custom" + }, + { + "name": "Pyth" + } + ] + } + }, + { + "name": "PoolLiquidityState", + "type": { + "kind": "enum", + "variants": [ + { + "name": "GenesisLiquidity" + }, + { + "name": "Idle" + }, + { + "name": "Active" + } + ] + } + }, + { + "name": "Side", + "type": { + "kind": "enum", + "variants": [ + { + "name": "None" + }, + { + "name": "Long" + }, + { + "name": "Short" + } + ] + } + }, + { + "name": "StakingType", + "type": { + "kind": "enum", + "variants": [ + { + "name": "LM" + }, + { + "name": "LP" + } + ] + } + }, + { + "name": "StakingInitializationStep", + "type": { + "kind": "enum", + "variants": [ + { + "name": "NotCreated" + }, + { + "name": "Step1" + }, + { + "name": "Step2" + }, + { + "name": "Step3" + }, + { + "name": "Initialized" + } + ] + } + } + ], + "events": [ + { + "name": "OpenPositionEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "sizeUsd", + "type": "u64", + "index": false + }, + { + "name": "price", + "type": "u64", + "index": false + }, + { + "name": "collateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "leverage", + "type": "u32", + "index": false + }, + { + "name": "feeUsd", + "type": "u64", + "index": false + } + ] + }, + { + "name": "IncreasePositionEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "sizeUsd", + "type": "u64", + "index": false + }, + { + "name": "price", + "type": "u64", + "index": false + }, + { + "name": "collateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "leverage", + "type": "u32", + "index": false + }, + { + "name": "feeUsd", + "type": "u64", + "index": false + } + ] + }, + { + "name": "ClosePositionEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "sizeUsd", + "type": "u64", + "index": false + }, + { + "name": "price", + "type": "u64", + "index": false + }, + { + "name": "collateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "profitUsd", + "type": "u64", + "index": false + }, + { + "name": "lossUsd", + "type": "u64", + "index": false + }, + { + "name": "borrowFeeUsd", + "type": "u64", + "index": false + }, + { + "name": "exitFeeUsd", + "type": "u64", + "index": false + } + ] + }, + { + "name": "AddCollateralEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "addAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "newCollateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "leverage", + "type": "u32", + "index": false + } + ] + }, + { + "name": "RemoveCollateralEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "removeAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "newCollateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "leverage", + "type": "u32", + "index": false + } + ] + }, + { + "name": "LiquidateEvent", + "fields": [ + { + "name": "owner", + "type": "publicKey", + "index": false + }, + { + "name": "position", + "type": "publicKey", + "index": false + }, + { + "name": "custodyMint", + "type": "publicKey", + "index": false + }, + { + "name": "side", + "type": "u8", + "index": false + }, + { + "name": "sizeUsd", + "type": "u64", + "index": false + }, + { + "name": "price", + "type": "u64", + "index": false + }, + { + "name": "collateralAmountUsd", + "type": "u64", + "index": false + }, + { + "name": "lossUsd", + "type": "u64", + "index": false + }, + { + "name": "borrowFeeUsd", + "type": "u64", + "index": false + }, + { + "name": "exitFeeUsd", + "type": "u64", + "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": "InvalidOracleState", + "msg": "Invalid oracle state" + }, + { + "code": 6004, + "name": "StaleOraclePrice", + "msg": "Stale oracle price" + }, + { + "code": 6005, + "name": "InvalidOraclePrice", + "msg": "Invalid oracle price" + }, + { + "code": 6006, + "name": "InvalidEnvironment", + "msg": "Instruction is not allowed in production" + }, + { + "code": 6007, + "name": "InvalidPoolLiquidityState", + "msg": "Invalid pool liquidity state" + }, + { + "code": 6008, + "name": "InvalidCortexState", + "msg": "Invalid cortex state" + }, + { + "code": 6009, + "name": "InvalidStakingState", + "msg": "Invalid staking state" + }, + { + "code": 6010, + "name": "InvalidPoolState", + "msg": "Invalid pool state" + }, + { + "code": 6011, + "name": "InvalidVestState", + "msg": "Invalid vest state" + }, + { + "code": 6012, + "name": "InvalidStakeState", + "msg": "Invalid stake state" + }, + { + "code": 6013, + "name": "InvalidCustody", + "msg": "Invalid custody" + }, + { + "code": 6014, + "name": "InvalidCustodyAccount", + "msg": "Invalid custody account" + }, + { + "code": 6015, + "name": "InvalidCustodyState", + "msg": "Invalid custody state" + }, + { + "code": 6016, + "name": "InvalidCollateralCustody", + "msg": "Invalid collateral custody" + }, + { + "code": 6017, + "name": "InvalidPositionState", + "msg": "Invalid position state" + }, + { + "code": 6018, + "name": "PositionNotInLiquidationRange", + "msg": "The position is not in liquidation range" + }, + { + "code": 6019, + "name": "InvalidStakingRoundState", + "msg": "Invalid staking round state" + }, + { + "code": 6020, + "name": "InvalidAdrenaConfig", + "msg": "Invalid adrena config" + }, + { + "code": 6021, + "name": "InvalidPoolConfig", + "msg": "Invalid pool config" + }, + { + "code": 6022, + "name": "InvalidCustodyConfig", + "msg": "Invalid custody config" + }, + { + "code": 6023, + "name": "InsufficientAmountReturned", + "msg": "Insufficient token amount returned" + }, + { + "code": 6024, + "name": "MaxPriceSlippage", + "msg": "Price slippage limit exceeded" + }, + { + "code": 6025, + "name": "MaxLeverage", + "msg": "Position leverage limit exceeded" + }, + { + "code": 6026, + "name": "MinLeverage", + "msg": "Position leverage under minimum" + }, + { + "code": 6027, + "name": "CustodyAmountLimit", + "msg": "Custody amount limit exceeded" + }, + { + "code": 6028, + "name": "PositionAmountLimit", + "msg": "Position amount limit exceeded" + }, + { + "code": 6029, + "name": "TokenRatioOutOfRange", + "msg": "Token ratio out of range" + }, + { + "code": 6030, + "name": "UnsupportedToken", + "msg": "Token is not supported" + }, + { + "code": 6031, + "name": "InstructionNotAllowed", + "msg": "Instruction is not allowed at this time" + }, + { + "code": 6032, + "name": "MaxUtilization", + "msg": "Token utilization limit exceeded" + }, + { + "code": 6033, + "name": "MaxRegisteredResolvedStakingRoundReached", + "msg": "Max registered resolved staking round reached" + }, + { + "code": 6034, + "name": "InvalidGovernanceProgram", + "msg": "Governance program do not match Cortex's one" + }, + { + "code": 6035, + "name": "InvalidGovernanceRealm", + "msg": "Governance realm do not match Cortex's one" + }, + { + "code": 6036, + "name": "InvalidVestingUnlockTime", + "msg": "Vesting unlock time is too close or passed" + }, + { + "code": 6037, + "name": "InvalidStakingLockingTime", + "msg": "Invalid staking locking time" + }, + { + "code": 6038, + "name": "UserStakeNotFound", + "msg": "The user stake account specified could not be found" + }, + { + "code": 6039, + "name": "InvalidAccountData", + "msg": "Invalid account data" + }, + { + "code": 6040, + "name": "UnresolvedStake", + "msg": "Stake is not resolved" + }, + { + "code": 6041, + "name": "BucketMintLimit", + "msg": "Reached bucket mint limit" + }, + { + "code": 6042, + "name": "GenesisAlpLimitReached", + "msg": "Genesis ALP add liquidity limit reached" + }, + { + "code": 6043, + "name": "PermissionlessOracleMissingSignature", + "msg": "Permissionless oracle update must be preceded by Ed25519 signature verification instruction" + }, + { + "code": 6044, + "name": "PermissionlessOracleMalformedEd25519Data", + "msg": "Ed25519 signature verification data does not match expected format" + }, + { + "code": 6045, + "name": "PermissionlessOracleSignerMismatch", + "msg": "Ed25519 signature was not signed by the oracle authority" + }, + { + "code": 6046, + "name": "PermissionlessOracleMessageMismatch", + "msg": "Signed message does not match instruction params" + }, + { + "code": 6047, + "name": "CustodyStableLockedAmountNotFound", + "msg": "Cannot find custody stable locked amount" + }, + { + "code": 6048, + "name": "CustodyNotFound", + "msg": "Cannot find custody" + }, + { + "code": 6049, + "name": "InsufficientBucketReserve", + "msg": "The bucket does not contain enough token for reserving this allocation" + }, + { + "code": 6050, + "name": "UserNicknameTooLong", + "msg": "User nickname exceed 24 characters" + }, + { + "code": 6051, + "name": "UserNicknameTooShort", + "msg": "User nickname is less than 3 characters" + }, + { + "code": 6052, + "name": "InvalidGenesisLockState", + "msg": "Invalid genesis lock state" + }, + { + "code": 6053, + "name": "GenesisLockCampaignFullySubscribed", + "msg": "The campaign is fully subscribed" + }, + { + "code": 6054, + "name": "PoolAumSoftCapUsdReached", + "msg": "The pool is fully subscribed" + }, + { + "code": 6055, + "name": "MaxRegisteredPool", + "msg": "The number of registered pool reached max amount" + }, + { + "code": 6056, + "name": "MaxRegisteredCustodies", + "msg": "The number of registered custody reached max amount" + }, + { + "code": 6057, + "name": "MaxCumulativeShortPositionSizeLimit", + "msg": "The short limit for this asset has been reached" + }, + { + "code": 6058, + "name": "LockedStakeArrayFull", + "msg": "The max number of LockedStaking has been reached" + }, + { + "code": 6059, + "name": "IndexOutOfBounds", + "msg": "Requested index is out of bounds" + }, + { + "code": 6060, + "name": "InvalidCaller", + "msg": "The instruction must be call with a specific account as caller" + }, + { + "code": 6061, + "name": "InvalidBucketName", + "msg": "Invalid bucket name" + } + ] +}; diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/AddVest.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/AddVest.tsx new file mode 100644 index 000000000..85044215d --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/AddVest.tsx @@ -0,0 +1,148 @@ +import { useContext, useEffect, useState } from 'react' +import * as yup from 'yup' +import { isFormValid } from '@utils/formValidation' +import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' +import useGovernanceAssets from '@hooks/useGovernanceAssets' +import { Governance } from '@solana/spl-governance' +import { ProgramAccount } from '@solana/spl-governance' +import { serializeInstructionToBase64 } from '@solana/spl-governance' +import InstructionForm, { InstructionInput } from '../FormCreator' +import { InstructionInputType } from '../inputInstructionType' +import { NewProposalContext } from '../../../new' +import { AssetAccount } from '@utils/uiTypes/assets' +import useAdrenaProgram from '@hooks/useAdrenaProgram' +import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' +import { BN } from '@coral-xyz/anchor' +import { SYSVAR_RENT_PUBKEY, SystemProgram } from '@solana/web3.js' +import { TOKEN_PROGRAM_ID } from '@solana/spl-token' +import { DEFAULT_GOVERNANCE_PROGRAM_ID } from '@components/instructions/tools' +import useWalletOnePointOh from '@hooks/useWalletOnePointOh' + +export interface AddVestForm { + governedAccount: AssetAccount | null + owner: string +} + +export default function AddVest({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + const adrenaProgram = useAdrenaProgram() + const wallet = useWalletOnePointOh() + const { assetAccounts } = useGovernanceAssets() + const shouldBeGoverned = !!(index !== 0 && governance) + + const [form, setForm] = useState({ + governedAccount: null, + allow: false, + }) + const [formErrors, setFormErrors] = useState({}) + + const { handleSetInstructions } = useContext(NewProposalContext) + + const validateInstruction = async (): Promise => { + const { isValid, validationErrors } = await isFormValid(schema, form) + + setFormErrors(validationErrors) + + return isValid + } + + async function getInstruction(): Promise { + const isValid = await validateInstruction() + const governance = form.governedAccount?.governance + + if (!isValid || !governance || !adrenaProgram || !wallet?.publicKey) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaProgram.methods + .addVest({ + amount: new BN(0), + originBucket: 0, + unlockStartTimestamp: new BN(0), + unlockEndTimestamp: new BN(0), + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: AdrenaPdaUtils.getCortexPda(), + owner: '', + payer: wallet.publicKey, + transferAuthority: '', + vestRegistry: '', + vest: '', + lmTokenMint: '', + governanceTokenMint: '', + governanceRealm: '', + governanceRealmConfig: '', + governanceGoverningTokenHolding: '', + governanceGoverningTokenOwnerRecord: '', + governanceProgram: DEFAULT_GOVERNANCE_PROGRAM_ID, + systemProgram: SystemProgram.programId, + tokenProgram: TOKEN_PROGRAM_ID, + rent: SYSVAR_RENT_PUBKEY, + }) + .instruction() + + return { + serializedInstruction: serializeInstructionToBase64(instruction), + isValid, + governance, + chunkBy: 1, + } + } + + useEffect(() => { + handleSetInstructions( + { governedAccount: form.governedAccount?.governance, getInstruction }, + index + ) + // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO please fix, it can cause difficult bugs. You might wanna check out https://bobbyhadz.com/blog/react-hooks-exhaustive-deps for info. -@asktree + }, [form]) + + const schema = yup.object().shape({ + governedAccount: yup + .object() + .nullable() + .required('Program governed account is required'), + allow: yup.boolean().required('Allow is required'), + }) + + const inputs: InstructionInput[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + governance, + options: assetAccounts, + }, + { + label: 'Allow Swap', + initialValue: form.allow, + type: InstructionInputType.SWITCH, + name: 'allow', + }, + ] + + if (!form) return <> + + return ( + + ) +} diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/MintLmTokensFromBucket.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/MintLmTokensFromBucket.tsx new file mode 100644 index 000000000..48fc3c4ac --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/MintLmTokensFromBucket.tsx @@ -0,0 +1,125 @@ +import { useContext, useEffect, useState } from 'react' +import * as yup from 'yup' +import { isFormValid } from '@utils/formValidation' +import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' +import useGovernanceAssets from '@hooks/useGovernanceAssets' +import { Governance } from '@solana/spl-governance' +import { ProgramAccount } from '@solana/spl-governance' +import { serializeInstructionToBase64 } from '@solana/spl-governance' +import InstructionForm, { InstructionInput } from '../FormCreator' +import { InstructionInputType } from '../inputInstructionType' +import { NewProposalContext } from '../../../new' +import { AssetAccount } from '@utils/uiTypes/assets' +import useAdrenaProgram from '@hooks/useAdrenaProgram' +import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' + +export interface MintLmTokensFromBucketForm { + governedAccount: AssetAccount | null + allow: boolean +} + +export default function MintLmTokensFromBucket({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + const adrenaProgram = useAdrenaProgram() + const { assetAccounts } = useGovernanceAssets() + const shouldBeGoverned = !!(index !== 0 && governance) + + const [form, setForm] = useState({ + governedAccount: null, + allow: false, + }) + const [formErrors, setFormErrors] = useState({}) + + const { handleSetInstructions } = useContext(NewProposalContext) + + const validateInstruction = async (): Promise => { + const { isValid, validationErrors } = await isFormValid(schema, form) + + setFormErrors(validationErrors) + + return isValid + } + + async function getInstruction(): Promise { + const isValid = await validateInstruction() + const governance = form.governedAccount?.governance + + if (!isValid || !governance || !adrenaProgram) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaProgram.methods + .setPoolAllowSwap({ + allowSwap: form.allow, + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: AdrenaPdaUtils.getCortexPda(), + pool: AdrenaPdaUtils.getMainPoolPda(), + }) + .instruction() + + return { + serializedInstruction: serializeInstructionToBase64(instruction), + isValid, + governance, + chunkBy: 1, + } + } + + useEffect(() => { + handleSetInstructions( + { governedAccount: form.governedAccount?.governance, getInstruction }, + index + ) + // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO please fix, it can cause difficult bugs. You might wanna check out https://bobbyhadz.com/blog/react-hooks-exhaustive-deps for info. -@asktree + }, [form]) + + const schema = yup.object().shape({ + governedAccount: yup + .object() + .nullable() + .required('Program governed account is required'), + allow: yup.boolean().required('Allow is required'), + }) + + const inputs: InstructionInput[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + governance, + options: assetAccounts, + }, + { + label: 'Allow Swap', + initialValue: form.allow, + type: InstructionInputType.SWITCH, + name: 'allow', + }, + ] + + if (!form) return <> + + return ( + + ) +} diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowSwap.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowSwap.tsx new file mode 100644 index 000000000..8245e762f --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowSwap.tsx @@ -0,0 +1,125 @@ +import { useContext, useEffect, useState } from 'react' +import * as yup from 'yup' +import { isFormValid } from '@utils/formValidation' +import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' +import useGovernanceAssets from '@hooks/useGovernanceAssets' +import { Governance } from '@solana/spl-governance' +import { ProgramAccount } from '@solana/spl-governance' +import { serializeInstructionToBase64 } from '@solana/spl-governance' +import InstructionForm, { InstructionInput } from '../FormCreator' +import { InstructionInputType } from '../inputInstructionType' +import { NewProposalContext } from '../../../new' +import { AssetAccount } from '@utils/uiTypes/assets' +import useAdrenaProgram from '@hooks/useAdrenaProgram' +import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' + +export interface SetCustodyAllowSwapForm { + governedAccount: AssetAccount | null + allow: boolean +} + +export default function SetCustodyAllowSwap({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + const adrenaProgram = useAdrenaProgram() + const { assetAccounts } = useGovernanceAssets() + const shouldBeGoverned = !!(index !== 0 && governance) + + const [form, setForm] = useState({ + governedAccount: null, + allow: false, + }) + const [formErrors, setFormErrors] = useState({}) + + const { handleSetInstructions } = useContext(NewProposalContext) + + const validateInstruction = async (): Promise => { + const { isValid, validationErrors } = await isFormValid(schema, form) + + setFormErrors(validationErrors) + + return isValid + } + + async function getInstruction(): Promise { + const isValid = await validateInstruction() + const governance = form.governedAccount?.governance + + if (!isValid || !governance || !adrenaProgram) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaProgram.methods + .setPoolAllowSwap({ + allowSwap: form.allow, + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: AdrenaPdaUtils.getCortexPda(), + pool: AdrenaPdaUtils.getMainPoolPda(), + }) + .instruction() + + return { + serializedInstruction: serializeInstructionToBase64(instruction), + isValid, + governance, + chunkBy: 1, + } + } + + useEffect(() => { + handleSetInstructions( + { governedAccount: form.governedAccount?.governance, getInstruction }, + index + ) + // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO please fix, it can cause difficult bugs. You might wanna check out https://bobbyhadz.com/blog/react-hooks-exhaustive-deps for info. -@asktree + }, [form]) + + const schema = yup.object().shape({ + governedAccount: yup + .object() + .nullable() + .required('Program governed account is required'), + allow: yup.boolean().required('Allow is required'), + }) + + const inputs: InstructionInput[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + governance, + options: assetAccounts, + }, + { + label: 'Allow Swap', + initialValue: form.allow, + type: InstructionInputType.SWITCH, + name: 'allow', + }, + ] + + if (!form) return <> + + return ( + + ) +} diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowTrade.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowTrade.tsx new file mode 100644 index 000000000..c7b4a2817 --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowTrade.tsx @@ -0,0 +1,125 @@ +import { useContext, useEffect, useState } from 'react' +import * as yup from 'yup' +import { isFormValid } from '@utils/formValidation' +import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' +import useGovernanceAssets from '@hooks/useGovernanceAssets' +import { Governance } from '@solana/spl-governance' +import { ProgramAccount } from '@solana/spl-governance' +import { serializeInstructionToBase64 } from '@solana/spl-governance' +import InstructionForm, { InstructionInput } from '../FormCreator' +import { InstructionInputType } from '../inputInstructionType' +import { NewProposalContext } from '../../../new' +import { AssetAccount } from '@utils/uiTypes/assets' +import useAdrenaProgram from '@hooks/useAdrenaProgram' +import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' + +export interface SetCustodyAllowTradeForm { + governedAccount: AssetAccount | null + allow: boolean +} + +export default function SetCustodyAllowTrade({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + const adrenaProgram = useAdrenaProgram() + const { assetAccounts } = useGovernanceAssets() + const shouldBeGoverned = !!(index !== 0 && governance) + + const [form, setForm] = useState({ + governedAccount: null, + allow: false, + }) + const [formErrors, setFormErrors] = useState({}) + + const { handleSetInstructions } = useContext(NewProposalContext) + + const validateInstruction = async (): Promise => { + const { isValid, validationErrors } = await isFormValid(schema, form) + + setFormErrors(validationErrors) + + return isValid + } + + async function getInstruction(): Promise { + const isValid = await validateInstruction() + const governance = form.governedAccount?.governance + + if (!isValid || !governance || !adrenaProgram) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaProgram.methods + .setPoolAllowSwap({ + allowSwap: form.allow, + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: AdrenaPdaUtils.getCortexPda(), + pool: AdrenaPdaUtils.getMainPoolPda(), + }) + .instruction() + + return { + serializedInstruction: serializeInstructionToBase64(instruction), + isValid, + governance, + chunkBy: 1, + } + } + + useEffect(() => { + handleSetInstructions( + { governedAccount: form.governedAccount?.governance, getInstruction }, + index + ) + // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO please fix, it can cause difficult bugs. You might wanna check out https://bobbyhadz.com/blog/react-hooks-exhaustive-deps for info. -@asktree + }, [form]) + + const schema = yup.object().shape({ + governedAccount: yup + .object() + .nullable() + .required('Program governed account is required'), + allow: yup.boolean().required('Allow is required'), + }) + + const inputs: InstructionInput[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + governance, + options: assetAccounts, + }, + { + label: 'Allow Swap', + initialValue: form.allow, + type: InstructionInputType.SWITCH, + name: 'allow', + }, + ] + + if (!form) return <> + + return ( + + ) +} diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyConfig.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyConfig.tsx new file mode 100644 index 000000000..a83d07b7c --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyConfig.tsx @@ -0,0 +1,125 @@ +import { useContext, useEffect, useState } from 'react' +import * as yup from 'yup' +import { isFormValid } from '@utils/formValidation' +import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' +import useGovernanceAssets from '@hooks/useGovernanceAssets' +import { Governance } from '@solana/spl-governance' +import { ProgramAccount } from '@solana/spl-governance' +import { serializeInstructionToBase64 } from '@solana/spl-governance' +import InstructionForm, { InstructionInput } from '../FormCreator' +import { InstructionInputType } from '../inputInstructionType' +import { NewProposalContext } from '../../../new' +import { AssetAccount } from '@utils/uiTypes/assets' +import useAdrenaProgram from '@hooks/useAdrenaProgram' +import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' + +export interface SetCustodyConfigForm { + governedAccount: AssetAccount | null + allow: boolean +} + +export default function SetCustodyConfig({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + const adrenaProgram = useAdrenaProgram() + const { assetAccounts } = useGovernanceAssets() + const shouldBeGoverned = !!(index !== 0 && governance) + + const [form, setForm] = useState({ + governedAccount: null, + allow: false, + }) + const [formErrors, setFormErrors] = useState({}) + + const { handleSetInstructions } = useContext(NewProposalContext) + + const validateInstruction = async (): Promise => { + const { isValid, validationErrors } = await isFormValid(schema, form) + + setFormErrors(validationErrors) + + return isValid + } + + async function getInstruction(): Promise { + const isValid = await validateInstruction() + const governance = form.governedAccount?.governance + + if (!isValid || !governance || !adrenaProgram) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaProgram.methods + .setPoolAllowSwap({ + allowSwap: form.allow, + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: AdrenaPdaUtils.getCortexPda(), + pool: AdrenaPdaUtils.getMainPoolPda(), + }) + .instruction() + + return { + serializedInstruction: serializeInstructionToBase64(instruction), + isValid, + governance, + chunkBy: 1, + } + } + + useEffect(() => { + handleSetInstructions( + { governedAccount: form.governedAccount?.governance, getInstruction }, + index + ) + // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO please fix, it can cause difficult bugs. You might wanna check out https://bobbyhadz.com/blog/react-hooks-exhaustive-deps for info. -@asktree + }, [form]) + + const schema = yup.object().shape({ + governedAccount: yup + .object() + .nullable() + .required('Program governed account is required'), + allow: yup.boolean().required('Allow is required'), + }) + + const inputs: InstructionInput[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + governance, + options: assetAccounts, + }, + { + label: 'Allow Swap', + initialValue: form.allow, + type: InstructionInputType.SWITCH, + name: 'allow', + }, + ] + + if (!form) return <> + + return ( + + ) +} diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyMaxCumulativeShortSizeUsd.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyMaxCumulativeShortSizeUsd.tsx new file mode 100644 index 000000000..b0037307f --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyMaxCumulativeShortSizeUsd.tsx @@ -0,0 +1,125 @@ +import { useContext, useEffect, useState } from 'react' +import * as yup from 'yup' +import { isFormValid } from '@utils/formValidation' +import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' +import useGovernanceAssets from '@hooks/useGovernanceAssets' +import { Governance } from '@solana/spl-governance' +import { ProgramAccount } from '@solana/spl-governance' +import { serializeInstructionToBase64 } from '@solana/spl-governance' +import InstructionForm, { InstructionInput } from '../FormCreator' +import { InstructionInputType } from '../inputInstructionType' +import { NewProposalContext } from '../../../new' +import { AssetAccount } from '@utils/uiTypes/assets' +import useAdrenaProgram from '@hooks/useAdrenaProgram' +import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' + +export interface SetCustodyMaxCumulativeShortSizeUsdForm { + governedAccount: AssetAccount | null + allow: boolean +} + +export default function SetCustodyMaxCumulativeShortSizeUsd({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + const adrenaProgram = useAdrenaProgram() + const { assetAccounts } = useGovernanceAssets() + const shouldBeGoverned = !!(index !== 0 && governance) + + const [form, setForm] = useState({ + governedAccount: null, + allow: false, + }) + const [formErrors, setFormErrors] = useState({}) + + const { handleSetInstructions } = useContext(NewProposalContext) + + const validateInstruction = async (): Promise => { + const { isValid, validationErrors } = await isFormValid(schema, form) + + setFormErrors(validationErrors) + + return isValid + } + + async function getInstruction(): Promise { + const isValid = await validateInstruction() + const governance = form.governedAccount?.governance + + if (!isValid || !governance || !adrenaProgram) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaProgram.methods + .setPoolAllowSwap({ + allowSwap: form.allow, + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: AdrenaPdaUtils.getCortexPda(), + pool: AdrenaPdaUtils.getMainPoolPda(), + }) + .instruction() + + return { + serializedInstruction: serializeInstructionToBase64(instruction), + isValid, + governance, + chunkBy: 1, + } + } + + useEffect(() => { + handleSetInstructions( + { governedAccount: form.governedAccount?.governance, getInstruction }, + index + ) + // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO please fix, it can cause difficult bugs. You might wanna check out https://bobbyhadz.com/blog/react-hooks-exhaustive-deps for info. -@asktree + }, [form]) + + const schema = yup.object().shape({ + governedAccount: yup + .object() + .nullable() + .required('Program governed account is required'), + allow: yup.boolean().required('Allow is required'), + }) + + const inputs: InstructionInput[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + governance, + options: assetAccounts, + }, + { + label: 'Allow Swap', + initialValue: form.allow, + type: InstructionInputType.SWITCH, + name: 'allow', + }, + ] + + if (!form) return <> + + return ( + + ) +} diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowSwap.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowSwap.tsx new file mode 100644 index 000000000..48bf4a254 --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowSwap.tsx @@ -0,0 +1,125 @@ +import { useContext, useEffect, useState } from 'react' +import * as yup from 'yup' +import { isFormValid } from '@utils/formValidation' +import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' +import useGovernanceAssets from '@hooks/useGovernanceAssets' +import { Governance } from '@solana/spl-governance' +import { ProgramAccount } from '@solana/spl-governance' +import { serializeInstructionToBase64 } from '@solana/spl-governance' +import InstructionForm, { InstructionInput } from '../FormCreator' +import { InstructionInputType } from '../inputInstructionType' +import { NewProposalContext } from '../../../new' +import { AssetAccount } from '@utils/uiTypes/assets' +import useAdrenaProgram from '@hooks/useAdrenaProgram' +import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' + +export interface SetPoolAllowSwapForm { + governedAccount: AssetAccount | null + allow: boolean +} + +export default function SetPoolAllowSwap({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + const adrenaProgram = useAdrenaProgram() + const { assetAccounts } = useGovernanceAssets() + const shouldBeGoverned = !!(index !== 0 && governance) + + const [form, setForm] = useState({ + governedAccount: null, + allow: false, + }) + const [formErrors, setFormErrors] = useState({}) + + const { handleSetInstructions } = useContext(NewProposalContext) + + const validateInstruction = async (): Promise => { + const { isValid, validationErrors } = await isFormValid(schema, form) + + setFormErrors(validationErrors) + + return isValid + } + + async function getInstruction(): Promise { + const isValid = await validateInstruction() + const governance = form.governedAccount?.governance + + if (!isValid || !governance || !adrenaProgram) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaProgram.methods + .setPoolAllowSwap({ + allowSwap: form.allow, + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: AdrenaPdaUtils.getCortexPda(), + pool: AdrenaPdaUtils.getMainPoolPda(), + }) + .instruction() + + return { + serializedInstruction: serializeInstructionToBase64(instruction), + isValid, + governance, + chunkBy: 1, + } + } + + useEffect(() => { + handleSetInstructions( + { governedAccount: form.governedAccount?.governance, getInstruction }, + index + ) + // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO please fix, it can cause difficult bugs. You might wanna check out https://bobbyhadz.com/blog/react-hooks-exhaustive-deps for info. -@asktree + }, [form]) + + const schema = yup.object().shape({ + governedAccount: yup + .object() + .nullable() + .required('Program governed account is required'), + allow: yup.boolean().required('Allow is required'), + }) + + const inputs: InstructionInput[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + governance, + options: assetAccounts, + }, + { + label: 'Allow Swap', + initialValue: form.allow, + type: InstructionInputType.SWITCH, + name: 'allow', + }, + ] + + if (!form) return <> + + return ( + + ) +} diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowTrade.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowTrade.tsx new file mode 100644 index 000000000..7773bdaf0 --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowTrade.tsx @@ -0,0 +1,125 @@ +import { useContext, useEffect, useState } from 'react' +import * as yup from 'yup' +import { isFormValid } from '@utils/formValidation' +import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' +import useGovernanceAssets from '@hooks/useGovernanceAssets' +import { Governance } from '@solana/spl-governance' +import { ProgramAccount } from '@solana/spl-governance' +import { serializeInstructionToBase64 } from '@solana/spl-governance' +import InstructionForm, { InstructionInput } from '../FormCreator' +import { InstructionInputType } from '../inputInstructionType' +import { NewProposalContext } from '../../../new' +import { AssetAccount } from '@utils/uiTypes/assets' +import useAdrenaProgram from '@hooks/useAdrenaProgram' +import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' + +export interface SetPoolAllowTradeForm { + governedAccount: AssetAccount | null + allow: boolean +} + +export default function SetPoolAllowTrade({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + const adrenaProgram = useAdrenaProgram() + const { assetAccounts } = useGovernanceAssets() + const shouldBeGoverned = !!(index !== 0 && governance) + + const [form, setForm] = useState({ + governedAccount: null, + allow: false, + }) + const [formErrors, setFormErrors] = useState({}) + + const { handleSetInstructions } = useContext(NewProposalContext) + + const validateInstruction = async (): Promise => { + const { isValid, validationErrors } = await isFormValid(schema, form) + + setFormErrors(validationErrors) + + return isValid + } + + async function getInstruction(): Promise { + const isValid = await validateInstruction() + const governance = form.governedAccount?.governance + + if (!isValid || !governance || !adrenaProgram) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaProgram.methods + .setPoolAllowSwap({ + allowSwap: form.allow, + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: AdrenaPdaUtils.getCortexPda(), + pool: AdrenaPdaUtils.getMainPoolPda(), + }) + .instruction() + + return { + serializedInstruction: serializeInstructionToBase64(instruction), + isValid, + governance, + chunkBy: 1, + } + } + + useEffect(() => { + handleSetInstructions( + { governedAccount: form.governedAccount?.governance, getInstruction }, + index + ) + // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO please fix, it can cause difficult bugs. You might wanna check out https://bobbyhadz.com/blog/react-hooks-exhaustive-deps for info. -@asktree + }, [form]) + + const schema = yup.object().shape({ + governedAccount: yup + .object() + .nullable() + .required('Program governed account is required'), + allow: yup.boolean().required('Allow is required'), + }) + + const inputs: InstructionInput[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + governance, + options: assetAccounts, + }, + { + label: 'Allow Swap', + initialValue: form.allow, + type: InstructionInputType.SWITCH, + name: 'allow', + }, + ] + + if (!form) return <> + + return ( + + ) +} diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAumSoftCapUsd.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAumSoftCapUsd.tsx new file mode 100644 index 000000000..f234d292e --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAumSoftCapUsd.tsx @@ -0,0 +1,125 @@ +import { useContext, useEffect, useState } from 'react' +import * as yup from 'yup' +import { isFormValid } from '@utils/formValidation' +import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' +import useGovernanceAssets from '@hooks/useGovernanceAssets' +import { Governance } from '@solana/spl-governance' +import { ProgramAccount } from '@solana/spl-governance' +import { serializeInstructionToBase64 } from '@solana/spl-governance' +import InstructionForm, { InstructionInput } from '../FormCreator' +import { InstructionInputType } from '../inputInstructionType' +import { NewProposalContext } from '../../../new' +import { AssetAccount } from '@utils/uiTypes/assets' +import useAdrenaProgram from '@hooks/useAdrenaProgram' +import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' + +export interface SetPoolAumSoftCapUsdForm { + governedAccount: AssetAccount | null + allow: boolean +} + +export default function SetPoolAumSoftCapUsd({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + const adrenaProgram = useAdrenaProgram() + const { assetAccounts } = useGovernanceAssets() + const shouldBeGoverned = !!(index !== 0 && governance) + + const [form, setForm] = useState({ + governedAccount: null, + allow: false, + }) + const [formErrors, setFormErrors] = useState({}) + + const { handleSetInstructions } = useContext(NewProposalContext) + + const validateInstruction = async (): Promise => { + const { isValid, validationErrors } = await isFormValid(schema, form) + + setFormErrors(validationErrors) + + return isValid + } + + async function getInstruction(): Promise { + const isValid = await validateInstruction() + const governance = form.governedAccount?.governance + + if (!isValid || !governance || !adrenaProgram) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaProgram.methods + .setPoolAllowSwap({ + allowSwap: form.allow, + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: AdrenaPdaUtils.getCortexPda(), + pool: AdrenaPdaUtils.getMainPoolPda(), + }) + .instruction() + + return { + serializedInstruction: serializeInstructionToBase64(instruction), + isValid, + governance, + chunkBy: 1, + } + } + + useEffect(() => { + handleSetInstructions( + { governedAccount: form.governedAccount?.governance, getInstruction }, + index + ) + // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO please fix, it can cause difficult bugs. You might wanna check out https://bobbyhadz.com/blog/react-hooks-exhaustive-deps for info. -@asktree + }, [form]) + + const schema = yup.object().shape({ + governedAccount: yup + .object() + .nullable() + .required('Program governed account is required'), + allow: yup.boolean().required('Allow is required'), + }) + + const inputs: InstructionInput[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + governance, + options: assetAccounts, + }, + { + label: 'Allow Swap', + initialValue: form.allow, + type: InstructionInputType.SWITCH, + name: 'allow', + }, + ] + + if (!form) return <> + + return ( + + ) +} diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolLiquidityState.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolLiquidityState.tsx new file mode 100644 index 000000000..4ea27ed8b --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolLiquidityState.tsx @@ -0,0 +1,125 @@ +import { useContext, useEffect, useState } from 'react' +import * as yup from 'yup' +import { isFormValid } from '@utils/formValidation' +import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' +import useGovernanceAssets from '@hooks/useGovernanceAssets' +import { Governance } from '@solana/spl-governance' +import { ProgramAccount } from '@solana/spl-governance' +import { serializeInstructionToBase64 } from '@solana/spl-governance' +import InstructionForm, { InstructionInput } from '../FormCreator' +import { InstructionInputType } from '../inputInstructionType' +import { NewProposalContext } from '../../../new' +import { AssetAccount } from '@utils/uiTypes/assets' +import useAdrenaProgram from '@hooks/useAdrenaProgram' +import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' + +export interface SetPoolLiquidityStateForm { + governedAccount: AssetAccount | null + allow: boolean +} + +export default function SetPoolLiquidityState({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + const adrenaProgram = useAdrenaProgram() + const { assetAccounts } = useGovernanceAssets() + const shouldBeGoverned = !!(index !== 0 && governance) + + const [form, setForm] = useState({ + governedAccount: null, + allow: false, + }) + const [formErrors, setFormErrors] = useState({}) + + const { handleSetInstructions } = useContext(NewProposalContext) + + const validateInstruction = async (): Promise => { + const { isValid, validationErrors } = await isFormValid(schema, form) + + setFormErrors(validationErrors) + + return isValid + } + + async function getInstruction(): Promise { + const isValid = await validateInstruction() + const governance = form.governedAccount?.governance + + if (!isValid || !governance || !adrenaProgram) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaProgram.methods + .setPoolAllowSwap({ + allowSwap: form.allow, + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: AdrenaPdaUtils.getCortexPda(), + pool: AdrenaPdaUtils.getMainPoolPda(), + }) + .instruction() + + return { + serializedInstruction: serializeInstructionToBase64(instruction), + isValid, + governance, + chunkBy: 1, + } + } + + useEffect(() => { + handleSetInstructions( + { governedAccount: form.governedAccount?.governance, getInstruction }, + index + ) + // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO please fix, it can cause difficult bugs. You might wanna check out https://bobbyhadz.com/blog/react-hooks-exhaustive-deps for info. -@asktree + }, [form]) + + const schema = yup.object().shape({ + governedAccount: yup + .object() + .nullable() + .required('Program governed account is required'), + allow: yup.boolean().required('Allow is required'), + }) + + const inputs: InstructionInput[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + governance, + options: assetAccounts, + }, + { + label: 'Allow Swap', + initialValue: form.allow, + type: InstructionInputType.SWITCH, + name: 'allow', + }, + ] + + if (!form) return <> + + return ( + + ) +} diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetStakingLmEmissionPotentiometers.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetStakingLmEmissionPotentiometers.tsx new file mode 100644 index 000000000..224d6e9f6 --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetStakingLmEmissionPotentiometers.tsx @@ -0,0 +1,125 @@ +import { useContext, useEffect, useState } from 'react' +import * as yup from 'yup' +import { isFormValid } from '@utils/formValidation' +import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' +import useGovernanceAssets from '@hooks/useGovernanceAssets' +import { Governance } from '@solana/spl-governance' +import { ProgramAccount } from '@solana/spl-governance' +import { serializeInstructionToBase64 } from '@solana/spl-governance' +import InstructionForm, { InstructionInput } from '../FormCreator' +import { InstructionInputType } from '../inputInstructionType' +import { NewProposalContext } from '../../../new' +import { AssetAccount } from '@utils/uiTypes/assets' +import useAdrenaProgram from '@hooks/useAdrenaProgram' +import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' + +export interface SetStakingLmEmissionPotentiometersForm { + governedAccount: AssetAccount | null + allow: boolean +} + +export default function SetStakingLmEmissionPotentiometers({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + const adrenaProgram = useAdrenaProgram() + const { assetAccounts } = useGovernanceAssets() + const shouldBeGoverned = !!(index !== 0 && governance) + + const [form, setForm] = useState({ + governedAccount: null, + allow: false, + }) + const [formErrors, setFormErrors] = useState({}) + + const { handleSetInstructions } = useContext(NewProposalContext) + + const validateInstruction = async (): Promise => { + const { isValid, validationErrors } = await isFormValid(schema, form) + + setFormErrors(validationErrors) + + return isValid + } + + async function getInstruction(): Promise { + const isValid = await validateInstruction() + const governance = form.governedAccount?.governance + + if (!isValid || !governance || !adrenaProgram) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaProgram.methods + .setPoolAllowSwap({ + allowSwap: form.allow, + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: AdrenaPdaUtils.getCortexPda(), + pool: AdrenaPdaUtils.getMainPoolPda(), + }) + .instruction() + + return { + serializedInstruction: serializeInstructionToBase64(instruction), + isValid, + governance, + chunkBy: 1, + } + } + + useEffect(() => { + handleSetInstructions( + { governedAccount: form.governedAccount?.governance, getInstruction }, + index + ) + // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO please fix, it can cause difficult bugs. You might wanna check out https://bobbyhadz.com/blog/react-hooks-exhaustive-deps for info. -@asktree + }, [form]) + + const schema = yup.object().shape({ + governedAccount: yup + .object() + .nullable() + .required('Program governed account is required'), + allow: yup.boolean().required('Allow is required'), + }) + + const inputs: InstructionInput[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + governance, + options: assetAccounts, + }, + { + label: 'Allow Swap', + initialValue: form.allow, + type: InstructionInputType.SWITCH, + name: 'allow', + }, + ] + + if (!form) return <> + + return ( + + ) +} diff --git a/pages/dao/[symbol]/proposal/new.tsx b/pages/dao/[symbol]/proposal/new.tsx index 818b8a5bd..78af12aae 100644 --- a/pages/dao/[symbol]/proposal/new.tsx +++ b/pages/dao/[symbol]/proposal/new.tsx @@ -58,7 +58,19 @@ import SwitchboardFundOracle from './components/instructions/Switchboard/FundOra import WithdrawFromOracle from './components/instructions/Switchboard/WithdrawFromOracle' import StakeValidator from './components/instructions/Validators/StakeValidator' import SanctumSplDepositStake from './components/instructions/Validators/SanctumSplDepositStake' -import SetPoolAllowSwap from './components/instructions/Adrena/SetPoolAllowSwap' + +import AdrenaAddVest from './components/instructions/Adrena/AddVest' +import AdrenaMintLmTokensFromBucket from './components/instructions/Adrena/MintLmTokensFromBucket' +import AdrenaSetCustodyAllowSwap from './components/instructions/Adrena/SetCustodyAllowSwap' +import AdrenaSetCustodyAllowTrade from './components/instructions/Adrena/SetCustodyAllowTrade' +import AdrenaSetCustodyConfig from './components/instructions/Adrena/SetCustodyConfig' +import AdrenaSetCustodyMaxCumulativeShortSizeUsd from './components/instructions/Adrena/SetCustodyMaxCumulativeShortSizeUsd' +import AdrenaSetPoolAllowSwap from './components/instructions/Adrena/SetPoolAllowSwap' +import AdrenaSetPoolAllowTrade from './components/instructions/Adrena/SetPoolAllowTrade' +import AdrenaSetPoolAumSoftCapUsd from './components/instructions/Adrena/SetPoolAumSoftCapUsd' +import AdrenaSetPoolLiquidityState from './components/instructions/Adrena/SetPoolLiquidityState' +import AdrenaSetStakingLmEmissionPotentiometers from './components/instructions/Adrena/SetStakingLmEmissionPotentiometers' + import DeactivateValidatorStake from './components/instructions/Validators/DeactivateStake' import WithdrawValidatorStake from './components/instructions/Validators/WithdrawStake' import DelegateStake from './components/instructions/Validators/DelegateStake' @@ -464,7 +476,17 @@ const New = () => { | null } = useMemo( () => ({ - [Instructions.AdrenaSetPoolAllowSwap]: SetPoolAllowSwap, + [Instructions.AdrenaAddVest]: AdrenaAddVest, + [Instructions.AdrenaMintLmTokensFromBucket]: AdrenaMintLmTokensFromBucket, + [Instructions.AdrenaSetCustodyAllowSwap]: AdrenaSetCustodyAllowSwap, + [Instructions.AdrenaSetCustodyAllowTrade]: AdrenaSetCustodyAllowTrade, + [Instructions.AdrenaSetCustodyConfig]: AdrenaSetCustodyConfig, + [Instructions.AdrenaSetCustodyMaxCumulativeShortSizeUsd]: AdrenaSetCustodyMaxCumulativeShortSizeUsd, + [Instructions.AdrenaSetPoolAllowSwap]: AdrenaSetPoolAllowSwap, + [Instructions.AdrenaSetPoolAllowTrade]: AdrenaSetPoolAllowTrade, + [Instructions.AdrenaSetPoolAumSoftCapUsd]: AdrenaSetPoolAumSoftCapUsd, + [Instructions.AdrenaSetPoolLiquidityState]: AdrenaSetPoolLiquidityState, + [Instructions.AdrenaSetStakingLmEmissionPotentiometers]: AdrenaSetStakingLmEmissionPotentiometers, [Instructions.Burn]: BurnTokens, [Instructions.Transfer]: SplTokenTransfer, [Instructions.ProgramUpgrade]: ProgramUpgrade, diff --git a/public/img/adrena.svg b/public/img/adrena.svg new file mode 100644 index 000000000..44666465b --- /dev/null +++ b/public/img/adrena.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/tools/sdk/adrena/utils.ts b/tools/sdk/adrena/utils.ts new file mode 100644 index 000000000..e6aa3f4e3 --- /dev/null +++ b/tools/sdk/adrena/utils.ts @@ -0,0 +1,17 @@ +import { PublicKey } from '@solana/web3.js' + +import AdrenaJson from '../../../idls/adrena.json' + +export function getCortexPda(): PublicKey { + return PublicKey.findProgramAddressSync( + [Buffer.from('cortex')], + new PublicKey(AdrenaJson.metadata.address) + )[0] +} + +export function getMainPoolPda(): PublicKey { + return PublicKey.findProgramAddressSync( + [Buffer.from('pool'), Buffer.from('main-pool')], + new PublicKey(AdrenaJson.metadata.address) + )[0] +} diff --git a/utils/uiTypes/proposalCreationTypes.ts b/utils/uiTypes/proposalCreationTypes.ts index 3d9c06700..86a149d61 100644 --- a/utils/uiTypes/proposalCreationTypes.ts +++ b/utils/uiTypes/proposalCreationTypes.ts @@ -292,7 +292,17 @@ export interface JoinDAOForm { } export enum Instructions { + AdrenaAddVest, + AdrenaMintLmTokensFromBucket, + AdrenaSetCustodyAllowSwap, + AdrenaSetCustodyAllowTrade, + AdrenaSetCustodyConfig, + AdrenaSetCustodyMaxCumulativeShortSizeUsd, AdrenaSetPoolAllowSwap, + AdrenaSetPoolAllowTrade, + AdrenaSetPoolAumSoftCapUsd, + AdrenaSetPoolLiquidityState, + AdrenaSetStakingLmEmissionPotentiometers, Base64, Burn, ChangeMakeDonation, From adf03fd66232be047f99c64c106cbdb7180d02d6 Mon Sep 17 00:00:00 2001 From: Orex Date: Tue, 9 Jul 2024 15:38:19 +0400 Subject: [PATCH 3/4] Better ix --- ...useAdrenaProgram.ts => useAdrenaClient.ts} | 29 ++-- hooks/useAdrenaCustodies.ts | 23 +++ hooks/useAdrenaPools.ts | 17 ++ hooks/useAdrenaStakings.ts | 17 ++ hooks/useGovernanceAssets.ts | 4 - .../instructions/Adrena/AddVest.tsx | 122 ++++++++++--- .../Adrena/MintLmTokensFromBucket.tsx | 87 ++++++++-- .../Adrena/SetCustodyAllowSwap.tsx | 59 ++++++- .../Adrena/SetCustodyAllowTrade.tsx | 63 +++++-- .../instructions/Adrena/SetCustodyConfig.tsx | 125 -------------- .../SetCustodyMaxCumulativeShortSizeUsd.tsx | 81 +++++++-- .../instructions/Adrena/SetPoolAllowSwap.tsx | 35 +++- .../instructions/Adrena/SetPoolAllowTrade.tsx | 43 +++-- .../Adrena/SetPoolAumSoftCapUsd.tsx | 57 +++++-- .../Adrena/SetPoolLiquidityState.tsx | 64 +++++-- .../SetStakingLmEmissionPotentiometers.tsx | 56 ++++-- pages/dao/[symbol]/proposal/new.tsx | 2 - tools/sdk/adrena/Adrena.ts | 160 ++++++++++++++++++ tools/sdk/adrena/utils.ts | 17 -- utils/uiTypes/proposalCreationTypes.ts | 1 - 20 files changed, 752 insertions(+), 310 deletions(-) rename hooks/{useAdrenaProgram.ts => useAdrenaClient.ts} (51%) create mode 100644 hooks/useAdrenaCustodies.ts create mode 100644 hooks/useAdrenaPools.ts create mode 100644 hooks/useAdrenaStakings.ts delete mode 100644 pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyConfig.tsx create mode 100644 tools/sdk/adrena/Adrena.ts delete mode 100644 tools/sdk/adrena/utils.ts diff --git a/hooks/useAdrenaProgram.ts b/hooks/useAdrenaClient.ts similarity index 51% rename from hooks/useAdrenaProgram.ts rename to hooks/useAdrenaClient.ts index a473f6427..2ae5c8b6d 100644 --- a/hooks/useAdrenaProgram.ts +++ b/hooks/useAdrenaClient.ts @@ -1,33 +1,32 @@ import { useEffect, useState } from 'react' import { PublicKey } from '@solana/web3.js' -import { Adrena, IDL as ADRENA_IDL } from '../idls/adrena' -import AdrenaJson from '../idls/adrena.json' - import { useConnection } from '@solana/wallet-adapter-react' -import { AnchorProvider, Program, Wallet } from '@coral-xyz/anchor' +import { AnchorProvider, Wallet } from '@coral-xyz/anchor' import useWalletOnePointOh from './useWalletOnePointOh' +import AdrenaClient from '@tools/sdk/adrena/Adrena' -export default function useAdrenaProgram(): Program | null { +export default function useAdrenaClient( + programId: PublicKey | null +): AdrenaClient | null { const { connection } = useConnection() const wallet = useWalletOnePointOh() - const [adrenaProgram, setAdrenaProgram] = useState | null>( - null - ) + const [adrenaClient, setAdrenaClient] = useState(null) useEffect(() => { - setAdrenaProgram( - new Program( - ADRENA_IDL, - new PublicKey(AdrenaJson.metadata.address), + if (!programId) return setAdrenaClient(null) + + setAdrenaClient( + new AdrenaClient( // The wallet type is compatible with the anchor provider, force typing new AnchorProvider(connection, (wallet as unknown) as Wallet, { commitment: 'processed', skipPreflight: true, - }) + }), + programId ) ) - }, [connection, wallet]) + }, [connection, wallet, programId]) - return adrenaProgram + return adrenaClient } diff --git a/hooks/useAdrenaCustodies.ts b/hooks/useAdrenaCustodies.ts new file mode 100644 index 000000000..01f840d1c --- /dev/null +++ b/hooks/useAdrenaCustodies.ts @@ -0,0 +1,23 @@ +import { useEffect, useState } from 'react' + +import AdrenaClient, { + CustodyWithPubkey, + PoolWithPubkey, +} from '@tools/sdk/adrena/Adrena' + +export default function useAdrenaCustodies( + adrenaClient: AdrenaClient | null, + pool: PoolWithPubkey | null +) { + const [custodies, setCustodies] = useState(null) + + useEffect(() => { + ;(async () => { + if (adrenaClient === null || pool === null) return setCustodies(null) + + setCustodies(await adrenaClient.getCustodies(pool)) + })() + }, [adrenaClient, pool]) + + return custodies +} diff --git a/hooks/useAdrenaPools.ts b/hooks/useAdrenaPools.ts new file mode 100644 index 000000000..2c091134d --- /dev/null +++ b/hooks/useAdrenaPools.ts @@ -0,0 +1,17 @@ +import { useEffect, useState } from 'react' + +import AdrenaClient, { PoolWithPubkey } from '@tools/sdk/adrena/Adrena' + +export default function useAdrenaPools(adrenaClient: AdrenaClient | null) { + const [pools, setPools] = useState(null) + + useEffect(() => { + ;(async () => { + if (!adrenaClient) return setPools(null) + + setPools(await adrenaClient.getPools()) + })() + }, [adrenaClient]) + + return pools +} diff --git a/hooks/useAdrenaStakings.ts b/hooks/useAdrenaStakings.ts new file mode 100644 index 000000000..965b41fc8 --- /dev/null +++ b/hooks/useAdrenaStakings.ts @@ -0,0 +1,17 @@ +import { useEffect, useState } from 'react' + +import AdrenaClient, { StakingWithPubkey } from '@tools/sdk/adrena/Adrena' + +export default function useAdrenaStakings(adrenaClient: AdrenaClient | null) { + const [stakings, setStakings] = useState(null) + + useEffect(() => { + ;(async () => { + if (!adrenaClient) return setStakings(null) + + setStakings(await adrenaClient.getStakings()) + })() + }, [adrenaClient]) + + return stakings +} diff --git a/hooks/useGovernanceAssets.ts b/hooks/useGovernanceAssets.ts index 34660ba91..aae59d10c 100644 --- a/hooks/useGovernanceAssets.ts +++ b/hooks/useGovernanceAssets.ts @@ -240,10 +240,6 @@ export default function useGovernanceAssets() { name: 'Set Custody Allow Trade', packageId: PackageEnum.Adrena, }, - [Instructions.AdrenaSetCustodyConfig]: { - name: 'Set Custody Config', - packageId: PackageEnum.Adrena, - }, [Instructions.AdrenaSetCustodyMaxCumulativeShortSizeUsd]: { name: 'Set Custody Max Cumulative Short Size Usd', packageId: PackageEnum.Adrena, diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/AddVest.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/AddVest.tsx index 85044215d..2c2021348 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/AddVest.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/AddVest.tsx @@ -10,17 +10,29 @@ import InstructionForm, { InstructionInput } from '../FormCreator' import { InstructionInputType } from '../inputInstructionType' import { NewProposalContext } from '../../../new' import { AssetAccount } from '@utils/uiTypes/assets' -import useAdrenaProgram from '@hooks/useAdrenaProgram' -import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' import { BN } from '@coral-xyz/anchor' -import { SYSVAR_RENT_PUBKEY, SystemProgram } from '@solana/web3.js' +import { PublicKey, SYSVAR_RENT_PUBKEY, SystemProgram } from '@solana/web3.js' import { TOKEN_PROGRAM_ID } from '@solana/spl-token' import { DEFAULT_GOVERNANCE_PROGRAM_ID } from '@components/instructions/tools' import useWalletOnePointOh from '@hooks/useWalletOnePointOh' +import { getMintNaturalAmountFromDecimalAsBN } from '@tools/sdk/units' +import AdrenaClient, { OriginBucket } from '@tools/sdk/adrena/Adrena' +import useAdrenaClient from '@hooks/useAdrenaClient' + +export const ORIGIN_BUCKET_VALUES = [ + { name: 'Core Contributor', value: OriginBucket.CoreContributor }, + { name: 'Dao Treasury', value: OriginBucket.DaoTreasury }, + { name: 'PoL', value: OriginBucket.PoL }, + { name: 'Ecosystem', value: OriginBucket.Ecosystem }, +] export interface AddVestForm { governedAccount: AssetAccount | null owner: string + amount: number + originBucket: number + unlockStartTimestamp: number + unlockEndTimestamp: number } export default function AddVest({ @@ -30,19 +42,28 @@ export default function AddVest({ index: number governance: ProgramAccount | null }) { - const adrenaProgram = useAdrenaProgram() const wallet = useWalletOnePointOh() const { assetAccounts } = useGovernanceAssets() const shouldBeGoverned = !!(index !== 0 && governance) const [form, setForm] = useState({ governedAccount: null, - allow: false, + owner: '', + amount: 0, + originBucket: ORIGIN_BUCKET_VALUES[3].value, // Ecosystem as default + unlockStartTimestamp: 0, + unlockEndTimestamp: 0, }) + const [formErrors, setFormErrors] = useState({}) const { handleSetInstructions } = useContext(NewProposalContext) + // TODO: load the program owned by the selected governance: form.governedAccount?.governance + const adrenaClient = useAdrenaClient( + new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + ) + const validateInstruction = async (): Promise => { const { isValid, validationErrors } = await isFormValid(schema, form) @@ -55,7 +76,7 @@ export default function AddVest({ const isValid = await validateInstruction() const governance = form.governedAccount?.governance - if (!isValid || !governance || !adrenaProgram || !wallet?.publicKey) { + if (!isValid || !governance || !adrenaClient || !wallet?.publicKey) { return { serializedInstruction: '', isValid, @@ -64,27 +85,37 @@ export default function AddVest({ } } - const instruction = await adrenaProgram.methods + const owner = new PublicKey(form.owner) + const cortex = await adrenaClient.getCortex() + + const instruction = await adrenaClient.program.methods .addVest({ - amount: new BN(0), - originBucket: 0, - unlockStartTimestamp: new BN(0), - unlockEndTimestamp: new BN(0), + amount: getMintNaturalAmountFromDecimalAsBN(form.amount, 9), + originBucket: form.originBucket, + unlockStartTimestamp: new BN(form.unlockStartTimestamp), + unlockEndTimestamp: new BN(form.unlockEndTimestamp), }) .accountsStrict({ admin: governance.nativeTreasuryAddress, - cortex: AdrenaPdaUtils.getCortexPda(), - owner: '', + cortex: adrenaClient.cortexPda, + owner, payer: wallet.publicKey, - transferAuthority: '', - vestRegistry: '', - vest: '', - lmTokenMint: '', - governanceTokenMint: '', - governanceRealm: '', - governanceRealmConfig: '', - governanceGoverningTokenHolding: '', - governanceGoverningTokenOwnerRecord: '', + transferAuthority: adrenaClient.transferAuthorityPda, + vestRegistry: adrenaClient.vestRegistryPda, + vest: adrenaClient.getUserVestPda(owner), + lmTokenMint: adrenaClient.lmTokenMint, + governanceTokenMint: adrenaClient.governanceTokenMint, + governanceRealm: cortex.governanceRealm, + governanceRealmConfig: AdrenaClient.getGovernanceRealmConfigPda( + cortex.governanceRealm + ), + governanceGoverningTokenHolding: adrenaClient.getGovernanceGoverningTokenHoldingPda( + cortex.governanceRealm + ), + governanceGoverningTokenOwnerRecord: adrenaClient.getGovernanceGoverningTokenOwnerRecordPda( + owner, + cortex.governanceRealm + ), governanceProgram: DEFAULT_GOVERNANCE_PROGRAM_ID, systemProgram: SystemProgram.programId, tokenProgram: TOKEN_PROGRAM_ID, @@ -113,7 +144,15 @@ export default function AddVest({ .object() .nullable() .required('Program governed account is required'), - allow: yup.boolean().required('Allow is required'), + owner: yup.string().required('Owner is required'), + originBucket: yup.number().required('Origin bucket is required'), + amount: yup.number().required('Token amount is required'), + unlockStartTimestamp: yup + .number() + .required('Unlock start timestamp is required'), + unlockEndTimestamp: yup + .number() + .required('Unlock end timestamp is required'), }) const inputs: InstructionInput[] = [ @@ -127,10 +166,39 @@ export default function AddVest({ options: assetAccounts, }, { - label: 'Allow Swap', - initialValue: form.allow, - type: InstructionInputType.SWITCH, - name: 'allow', + label: 'Owner', + initialValue: form.owner, + type: InstructionInputType.INPUT, + inputType: 'text', + name: 'owner', + }, + { + label: 'Origin Bucket', + initialValue: form.originBucket, + type: InstructionInputType.SELECT, + name: 'originBucket', + options: ORIGIN_BUCKET_VALUES, + }, + { + label: 'Token Amount', + initialValue: form.amount, + type: InstructionInputType.INPUT, + inputType: 'number', + name: 'amount', + }, + { + label: 'Unlock Start Timestamp', + initialValue: form.unlockStartTimestamp, + type: InstructionInputType.INPUT, + inputType: 'number', + name: 'unlockStartTimestamp', + }, + { + label: 'Unlock End Timestamp', + initialValue: form.unlockEndTimestamp, + type: InstructionInputType.INPUT, + inputType: 'number', + name: 'unlockEndTimestamp', }, ] diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/MintLmTokensFromBucket.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/MintLmTokensFromBucket.tsx index 48fc3c4ac..96e039a83 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/MintLmTokensFromBucket.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/MintLmTokensFromBucket.tsx @@ -10,14 +10,28 @@ import InstructionForm, { InstructionInput } from '../FormCreator' import { InstructionInputType } from '../inputInstructionType' import { NewProposalContext } from '../../../new' import { AssetAccount } from '@utils/uiTypes/assets' -import useAdrenaProgram from '@hooks/useAdrenaProgram' -import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' +import { getMintNaturalAmountFromDecimalAsBN } from '@tools/sdk/units' +import { OriginBucket } from '@tools/sdk/adrena/Adrena' +import { TOKEN_PROGRAM_ID } from '@solana/spl-token' +import { findATAAddrSync } from '@utils/ataTools' +import { PublicKey } from '@solana/web3.js' +import useAdrenaClient from '@hooks/useAdrenaClient' export interface MintLmTokensFromBucketForm { governedAccount: AssetAccount | null - allow: boolean + owner: string + originBucket: number + amount: number + reason: string } +export const ORIGIN_BUCKET_VALUES = [ + { name: 'Core Contributor', value: OriginBucket.CoreContributor }, + { name: 'Dao Treasury', value: OriginBucket.DaoTreasury }, + { name: 'PoL', value: OriginBucket.PoL }, + { name: 'Ecosystem', value: OriginBucket.Ecosystem }, +] + export default function MintLmTokensFromBucket({ index, governance, @@ -25,18 +39,25 @@ export default function MintLmTokensFromBucket({ index: number governance: ProgramAccount | null }) { - const adrenaProgram = useAdrenaProgram() const { assetAccounts } = useGovernanceAssets() const shouldBeGoverned = !!(index !== 0 && governance) const [form, setForm] = useState({ governedAccount: null, - allow: false, + owner: '', + originBucket: ORIGIN_BUCKET_VALUES[3].value, // Ecosystem as default + amount: 0, + reason: '', }) const [formErrors, setFormErrors] = useState({}) const { handleSetInstructions } = useContext(NewProposalContext) + // TODO: load the program owned by the selected governance: form.governedAccount?.governance + const adrenaClient = useAdrenaClient( + new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + ) + const validateInstruction = async (): Promise => { const { isValid, validationErrors } = await isFormValid(schema, form) @@ -49,7 +70,7 @@ export default function MintLmTokensFromBucket({ const isValid = await validateInstruction() const governance = form.governedAccount?.governance - if (!isValid || !governance || !adrenaProgram) { + if (!isValid || !governance || !adrenaClient) { return { serializedInstruction: '', isValid, @@ -58,14 +79,23 @@ export default function MintLmTokensFromBucket({ } } - const instruction = await adrenaProgram.methods - .setPoolAllowSwap({ - allowSwap: form.allow, + const owner = new PublicKey(form.owner) + + const receivingAccount = findATAAddrSync(owner, adrenaClient.lmTokenMint)[0] + + const instruction = await adrenaClient.program.methods + .mintLmTokensFromBucket({ + bucketName: form.originBucket, + amount: getMintNaturalAmountFromDecimalAsBN(form.amount, 9), + reason: form.reason, }) .accountsStrict({ admin: governance.nativeTreasuryAddress, - cortex: AdrenaPdaUtils.getCortexPda(), - pool: AdrenaPdaUtils.getMainPoolPda(), + receivingAccount, + transferAuthority: adrenaClient.transferAuthorityPda, + cortex: adrenaClient.cortexPda, + lmTokenMint: adrenaClient.lmTokenMint, + tokenProgram: TOKEN_PROGRAM_ID, }) .instruction() @@ -90,7 +120,10 @@ export default function MintLmTokensFromBucket({ .object() .nullable() .required('Program governed account is required'), - allow: yup.boolean().required('Allow is required'), + owner: yup.string().required('Owner is required'), + originBucket: yup.number().required('Origin bucket is required'), + amount: yup.number().required('Token amount is required'), + reason: yup.string().required('Reason is required'), }) const inputs: InstructionInput[] = [ @@ -104,10 +137,32 @@ export default function MintLmTokensFromBucket({ options: assetAccounts, }, { - label: 'Allow Swap', - initialValue: form.allow, - type: InstructionInputType.SWITCH, - name: 'allow', + label: 'Owner', + initialValue: form.owner, + type: InstructionInputType.INPUT, + inputType: 'text', + name: 'owner', + }, + { + label: 'Origin Bucket', + initialValue: form.originBucket, + type: InstructionInputType.SELECT, + name: 'originBucket', + options: ORIGIN_BUCKET_VALUES, + }, + { + label: 'Token Amount', + initialValue: form.amount, + type: InstructionInputType.INPUT, + inputType: 'number', + name: 'amount', + }, + { + label: 'Reason', + initialValue: form.reason, + type: InstructionInputType.INPUT, + inputType: 'text', + name: 'reason', }, ] diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowSwap.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowSwap.tsx index 8245e762f..c8a042ff9 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowSwap.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowSwap.tsx @@ -10,12 +10,17 @@ import InstructionForm, { InstructionInput } from '../FormCreator' import { InstructionInputType } from '../inputInstructionType' import { NewProposalContext } from '../../../new' import { AssetAccount } from '@utils/uiTypes/assets' -import useAdrenaProgram from '@hooks/useAdrenaProgram' -import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' +import { CustodyWithPubkey, PoolWithPubkey } from '@tools/sdk/adrena/Adrena' +import useAdrenaClient from '@hooks/useAdrenaClient' +import { PublicKey } from '@solana/web3.js' +import useAdrenaPools from '@hooks/useAdrenaPools' +import useAdrenaCustodies from '@hooks/useAdrenaCustodies' export interface SetCustodyAllowSwapForm { governedAccount: AssetAccount | null allow: boolean + pool: PoolWithPubkey | null + custody: CustodyWithPubkey | null } export default function SetCustodyAllowSwap({ @@ -25,18 +30,27 @@ export default function SetCustodyAllowSwap({ index: number governance: ProgramAccount | null }) { - const adrenaProgram = useAdrenaProgram() const { assetAccounts } = useGovernanceAssets() const shouldBeGoverned = !!(index !== 0 && governance) const [form, setForm] = useState({ governedAccount: null, allow: false, + pool: null, + custody: null, }) const [formErrors, setFormErrors] = useState({}) const { handleSetInstructions } = useContext(NewProposalContext) + // TODO: load the program owned by the selected governance: form.governedAccount?.governance + const adrenaClient = useAdrenaClient( + new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + ) + + const pools = useAdrenaPools(adrenaClient) + const custodies = useAdrenaCustodies(adrenaClient, form.pool) + const validateInstruction = async (): Promise => { const { isValid, validationErrors } = await isFormValid(schema, form) @@ -49,7 +63,13 @@ export default function SetCustodyAllowSwap({ const isValid = await validateInstruction() const governance = form.governedAccount?.governance - if (!isValid || !governance || !adrenaProgram) { + if ( + !isValid || + !governance || + !adrenaClient || + !form.pool || + !form.custody + ) { return { serializedInstruction: '', isValid, @@ -58,14 +78,15 @@ export default function SetCustodyAllowSwap({ } } - const instruction = await adrenaProgram.methods - .setPoolAllowSwap({ + const instruction = await adrenaClient.program.methods + .setCustodyAllowSwap({ allowSwap: form.allow, }) .accountsStrict({ admin: governance.nativeTreasuryAddress, - cortex: AdrenaPdaUtils.getCortexPda(), - pool: AdrenaPdaUtils.getMainPoolPda(), + cortex: adrenaClient.cortexPda, + pool: form.pool.pubkey, + custody: form.custody.pubkey, }) .instruction() @@ -103,6 +124,28 @@ export default function SetCustodyAllowSwap({ governance, options: assetAccounts, }, + { + label: 'Pool', + initialValue: form.pool, + type: InstructionInputType.SELECT, + name: 'pool', + options: + pools?.map((p) => ({ + name: String.fromCharCode(...p.name.value), + value: p, + })) ?? [], + }, + { + label: 'Custody', + initialValue: form.custody, + type: InstructionInputType.SELECT, + name: 'custody', + options: + custodies?.map((c) => ({ + name: c.pubkey.toBase58(), + value: c, + })) ?? [], + }, { label: 'Allow Swap', initialValue: form.allow, diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowTrade.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowTrade.tsx index c7b4a2817..7489f1b4e 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowTrade.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowTrade.tsx @@ -10,12 +10,17 @@ import InstructionForm, { InstructionInput } from '../FormCreator' import { InstructionInputType } from '../inputInstructionType' import { NewProposalContext } from '../../../new' import { AssetAccount } from '@utils/uiTypes/assets' -import useAdrenaProgram from '@hooks/useAdrenaProgram' -import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' +import { CustodyWithPubkey, PoolWithPubkey } from '@tools/sdk/adrena/Adrena' +import useAdrenaClient from '@hooks/useAdrenaClient' +import { PublicKey } from '@solana/web3.js' +import useAdrenaPools from '@hooks/useAdrenaPools' +import useAdrenaCustodies from '@hooks/useAdrenaCustodies' export interface SetCustodyAllowTradeForm { governedAccount: AssetAccount | null allow: boolean + pool: PoolWithPubkey | null + custody: CustodyWithPubkey | null } export default function SetCustodyAllowTrade({ @@ -25,18 +30,27 @@ export default function SetCustodyAllowTrade({ index: number governance: ProgramAccount | null }) { - const adrenaProgram = useAdrenaProgram() const { assetAccounts } = useGovernanceAssets() const shouldBeGoverned = !!(index !== 0 && governance) const [form, setForm] = useState({ governedAccount: null, allow: false, + pool: null, + custody: null, }) const [formErrors, setFormErrors] = useState({}) const { handleSetInstructions } = useContext(NewProposalContext) + // TODO: load the program owned by the selected governance: form.governedAccount?.governance + const adrenaClient = useAdrenaClient( + new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + ) + + const pools = useAdrenaPools(adrenaClient) + const custodies = useAdrenaCustodies(adrenaClient, form.pool) + const validateInstruction = async (): Promise => { const { isValid, validationErrors } = await isFormValid(schema, form) @@ -49,7 +63,13 @@ export default function SetCustodyAllowTrade({ const isValid = await validateInstruction() const governance = form.governedAccount?.governance - if (!isValid || !governance || !adrenaProgram) { + if ( + !isValid || + !governance || + !adrenaClient || + !form.pool || + !form.custody + ) { return { serializedInstruction: '', isValid, @@ -58,14 +78,15 @@ export default function SetCustodyAllowTrade({ } } - const instruction = await adrenaProgram.methods - .setPoolAllowSwap({ - allowSwap: form.allow, + const instruction = await adrenaClient.program.methods + .setCustodyAllowTrade({ + allowTrade: form.allow, }) .accountsStrict({ admin: governance.nativeTreasuryAddress, - cortex: AdrenaPdaUtils.getCortexPda(), - pool: AdrenaPdaUtils.getMainPoolPda(), + cortex: adrenaClient.cortexPda, + pool: form.pool.pubkey, + custody: form.custody.pubkey, }) .instruction() @@ -104,7 +125,29 @@ export default function SetCustodyAllowTrade({ options: assetAccounts, }, { - label: 'Allow Swap', + label: 'Pool', + initialValue: form.pool, + type: InstructionInputType.SELECT, + name: 'pool', + options: + pools?.map((p) => ({ + name: p.name.value.toString(), + value: p, + })) ?? [], + }, + { + label: 'Custody', + initialValue: form.custody, + type: InstructionInputType.SELECT, + name: 'custody', + options: + custodies?.map((c) => ({ + name: c.pubkey.toBase58(), + value: c, + })) ?? [], + }, + { + label: 'Allow Trade', initialValue: form.allow, type: InstructionInputType.SWITCH, name: 'allow', diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyConfig.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyConfig.tsx deleted file mode 100644 index a83d07b7c..000000000 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyConfig.tsx +++ /dev/null @@ -1,125 +0,0 @@ -import { useContext, useEffect, useState } from 'react' -import * as yup from 'yup' -import { isFormValid } from '@utils/formValidation' -import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' -import useGovernanceAssets from '@hooks/useGovernanceAssets' -import { Governance } from '@solana/spl-governance' -import { ProgramAccount } from '@solana/spl-governance' -import { serializeInstructionToBase64 } from '@solana/spl-governance' -import InstructionForm, { InstructionInput } from '../FormCreator' -import { InstructionInputType } from '../inputInstructionType' -import { NewProposalContext } from '../../../new' -import { AssetAccount } from '@utils/uiTypes/assets' -import useAdrenaProgram from '@hooks/useAdrenaProgram' -import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' - -export interface SetCustodyConfigForm { - governedAccount: AssetAccount | null - allow: boolean -} - -export default function SetCustodyConfig({ - index, - governance, -}: { - index: number - governance: ProgramAccount | null -}) { - const adrenaProgram = useAdrenaProgram() - const { assetAccounts } = useGovernanceAssets() - const shouldBeGoverned = !!(index !== 0 && governance) - - const [form, setForm] = useState({ - governedAccount: null, - allow: false, - }) - const [formErrors, setFormErrors] = useState({}) - - const { handleSetInstructions } = useContext(NewProposalContext) - - const validateInstruction = async (): Promise => { - const { isValid, validationErrors } = await isFormValid(schema, form) - - setFormErrors(validationErrors) - - return isValid - } - - async function getInstruction(): Promise { - const isValid = await validateInstruction() - const governance = form.governedAccount?.governance - - if (!isValid || !governance || !adrenaProgram) { - return { - serializedInstruction: '', - isValid, - governance, - chunkBy: 1, - } - } - - const instruction = await adrenaProgram.methods - .setPoolAllowSwap({ - allowSwap: form.allow, - }) - .accountsStrict({ - admin: governance.nativeTreasuryAddress, - cortex: AdrenaPdaUtils.getCortexPda(), - pool: AdrenaPdaUtils.getMainPoolPda(), - }) - .instruction() - - return { - serializedInstruction: serializeInstructionToBase64(instruction), - isValid, - governance, - chunkBy: 1, - } - } - - useEffect(() => { - handleSetInstructions( - { governedAccount: form.governedAccount?.governance, getInstruction }, - index - ) - // eslint-disable-next-line react-hooks/exhaustive-deps -- TODO please fix, it can cause difficult bugs. You might wanna check out https://bobbyhadz.com/blog/react-hooks-exhaustive-deps for info. -@asktree - }, [form]) - - const schema = yup.object().shape({ - governedAccount: yup - .object() - .nullable() - .required('Program governed account is required'), - allow: yup.boolean().required('Allow is required'), - }) - - const inputs: InstructionInput[] = [ - { - label: 'Governance', - initialValue: form.governedAccount, - name: 'governedAccount', - type: InstructionInputType.GOVERNED_ACCOUNT, - shouldBeGoverned: shouldBeGoverned as any, - governance, - options: assetAccounts, - }, - { - label: 'Allow Swap', - initialValue: form.allow, - type: InstructionInputType.SWITCH, - name: 'allow', - }, - ] - - if (!form) return <> - - return ( - - ) -} diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyMaxCumulativeShortSizeUsd.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyMaxCumulativeShortSizeUsd.tsx index b0037307f..df467c97e 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyMaxCumulativeShortSizeUsd.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyMaxCumulativeShortSizeUsd.tsx @@ -10,12 +10,18 @@ import InstructionForm, { InstructionInput } from '../FormCreator' import { InstructionInputType } from '../inputInstructionType' import { NewProposalContext } from '../../../new' import { AssetAccount } from '@utils/uiTypes/assets' -import useAdrenaProgram from '@hooks/useAdrenaProgram' -import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' +import { CustodyWithPubkey, PoolWithPubkey } from '@tools/sdk/adrena/Adrena' +import useAdrenaClient from '@hooks/useAdrenaClient' +import { PublicKey } from '@solana/web3.js' +import useAdrenaPools from '@hooks/useAdrenaPools' +import useAdrenaCustodies from '@hooks/useAdrenaCustodies' +import { BN } from '@coral-xyz/anchor' export interface SetCustodyMaxCumulativeShortSizeUsdForm { governedAccount: AssetAccount | null - allow: boolean + maxCumulativeShortSizeUsd: number + pool: PoolWithPubkey | null + custody: CustodyWithPubkey | null } export default function SetCustodyMaxCumulativeShortSizeUsd({ @@ -25,18 +31,27 @@ export default function SetCustodyMaxCumulativeShortSizeUsd({ index: number governance: ProgramAccount | null }) { - const adrenaProgram = useAdrenaProgram() const { assetAccounts } = useGovernanceAssets() const shouldBeGoverned = !!(index !== 0 && governance) const [form, setForm] = useState({ governedAccount: null, - allow: false, + maxCumulativeShortSizeUsd: 0, + pool: null, + custody: null, }) const [formErrors, setFormErrors] = useState({}) const { handleSetInstructions } = useContext(NewProposalContext) + // TODO: load the program owned by the selected governance: form.governedAccount?.governance + const adrenaClient = useAdrenaClient( + new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + ) + + const pools = useAdrenaPools(adrenaClient) + const custodies = useAdrenaCustodies(adrenaClient, form.pool) + const validateInstruction = async (): Promise => { const { isValid, validationErrors } = await isFormValid(schema, form) @@ -49,7 +64,13 @@ export default function SetCustodyMaxCumulativeShortSizeUsd({ const isValid = await validateInstruction() const governance = form.governedAccount?.governance - if (!isValid || !governance || !adrenaProgram) { + if ( + !isValid || + !governance || + !adrenaClient || + !form.pool || + !form.custody + ) { return { serializedInstruction: '', isValid, @@ -58,14 +79,17 @@ export default function SetCustodyMaxCumulativeShortSizeUsd({ } } - const instruction = await adrenaProgram.methods - .setPoolAllowSwap({ - allowSwap: form.allow, + const instruction = await adrenaClient.program.methods + .setCustodyMaxCumulativeShortPositionSizeUsd({ + maxCumulativeShortPositionSizeUsd: new BN( + form.maxCumulativeShortSizeUsd * 10 ** 6 + ), }) .accountsStrict({ admin: governance.nativeTreasuryAddress, - cortex: AdrenaPdaUtils.getCortexPda(), - pool: AdrenaPdaUtils.getMainPoolPda(), + cortex: adrenaClient.cortexPda, + pool: form.pool.pubkey, + custody: form.custody.pubkey, }) .instruction() @@ -90,7 +114,9 @@ export default function SetCustodyMaxCumulativeShortSizeUsd({ .object() .nullable() .required('Program governed account is required'), - allow: yup.boolean().required('Allow is required'), + maxCumulativeShortSizeUsd: yup + .number() + .required('Max Cumulative Short Size Usd'), }) const inputs: InstructionInput[] = [ @@ -104,10 +130,33 @@ export default function SetCustodyMaxCumulativeShortSizeUsd({ options: assetAccounts, }, { - label: 'Allow Swap', - initialValue: form.allow, - type: InstructionInputType.SWITCH, - name: 'allow', + label: 'Pool', + initialValue: form.pool, + type: InstructionInputType.SELECT, + name: 'pool', + options: + pools?.map((p) => ({ + name: p.name.value.toString(), + value: p, + })) ?? [], + }, + { + label: 'Custody', + initialValue: form.custody, + type: InstructionInputType.SELECT, + name: 'custody', + options: + custodies?.map((c) => ({ + name: c.pubkey.toBase58(), + value: c, + })) ?? [], + }, + { + label: 'Max Cumulative Short Size Usd', + initialValue: form.maxCumulativeShortSizeUsd, + type: InstructionInputType.INPUT, + name: 'maxCumulativeShortSizeUsd', + inputType: 'number', }, ] diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowSwap.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowSwap.tsx index 48bf4a254..9d4f5fff7 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowSwap.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowSwap.tsx @@ -10,12 +10,15 @@ import InstructionForm, { InstructionInput } from '../FormCreator' import { InstructionInputType } from '../inputInstructionType' import { NewProposalContext } from '../../../new' import { AssetAccount } from '@utils/uiTypes/assets' -import useAdrenaProgram from '@hooks/useAdrenaProgram' -import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' +import { PoolWithPubkey } from '@tools/sdk/adrena/Adrena' +import useAdrenaClient from '@hooks/useAdrenaClient' +import { PublicKey } from '@solana/web3.js' +import useAdrenaPools from '@hooks/useAdrenaPools' export interface SetPoolAllowSwapForm { governedAccount: AssetAccount | null allow: boolean + pool: PoolWithPubkey | null } export default function SetPoolAllowSwap({ @@ -25,18 +28,25 @@ export default function SetPoolAllowSwap({ index: number governance: ProgramAccount | null }) { - const adrenaProgram = useAdrenaProgram() const { assetAccounts } = useGovernanceAssets() const shouldBeGoverned = !!(index !== 0 && governance) const [form, setForm] = useState({ governedAccount: null, allow: false, + pool: null, }) const [formErrors, setFormErrors] = useState({}) const { handleSetInstructions } = useContext(NewProposalContext) + // TODO: load the program owned by the selected governance: form.governedAccount?.governance + const adrenaClient = useAdrenaClient( + new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + ) + + const pools = useAdrenaPools(adrenaClient) + const validateInstruction = async (): Promise => { const { isValid, validationErrors } = await isFormValid(schema, form) @@ -49,7 +59,7 @@ export default function SetPoolAllowSwap({ const isValid = await validateInstruction() const governance = form.governedAccount?.governance - if (!isValid || !governance || !adrenaProgram) { + if (!isValid || !governance || !adrenaClient || !form.pool) { return { serializedInstruction: '', isValid, @@ -58,14 +68,14 @@ export default function SetPoolAllowSwap({ } } - const instruction = await adrenaProgram.methods + const instruction = await adrenaClient.program.methods .setPoolAllowSwap({ allowSwap: form.allow, }) .accountsStrict({ admin: governance.nativeTreasuryAddress, - cortex: AdrenaPdaUtils.getCortexPda(), - pool: AdrenaPdaUtils.getMainPoolPda(), + cortex: adrenaClient.cortexPda, + pool: form.pool.pubkey, }) .instruction() @@ -103,6 +113,17 @@ export default function SetPoolAllowSwap({ governance, options: assetAccounts, }, + { + label: 'Pool', + initialValue: form.pool, + type: InstructionInputType.SELECT, + name: 'pool', + options: + pools?.map((p) => ({ + name: p.name.value.toString(), + value: p, + })) ?? [], + }, { label: 'Allow Swap', initialValue: form.allow, diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowTrade.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowTrade.tsx index 7773bdaf0..d1c02f5a6 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowTrade.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowTrade.tsx @@ -10,33 +10,43 @@ import InstructionForm, { InstructionInput } from '../FormCreator' import { InstructionInputType } from '../inputInstructionType' import { NewProposalContext } from '../../../new' import { AssetAccount } from '@utils/uiTypes/assets' -import useAdrenaProgram from '@hooks/useAdrenaProgram' -import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' +import { PoolWithPubkey } from '@tools/sdk/adrena/Adrena' +import useAdrenaClient from '@hooks/useAdrenaClient' +import { PublicKey } from '@solana/web3.js' +import useAdrenaPools from '@hooks/useAdrenaPools' export interface SetPoolAllowTradeForm { governedAccount: AssetAccount | null allow: boolean + pool: PoolWithPubkey | null } -export default function SetPoolAllowTrade({ +export default function SetPoolAllowSwap({ index, governance, }: { index: number governance: ProgramAccount | null }) { - const adrenaProgram = useAdrenaProgram() const { assetAccounts } = useGovernanceAssets() const shouldBeGoverned = !!(index !== 0 && governance) const [form, setForm] = useState({ governedAccount: null, allow: false, + pool: null, }) const [formErrors, setFormErrors] = useState({}) const { handleSetInstructions } = useContext(NewProposalContext) + // TODO: load the program owned by the selected governance: form.governedAccount?.governance + const adrenaClient = useAdrenaClient( + new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + ) + + const pools = useAdrenaPools(adrenaClient) + const validateInstruction = async (): Promise => { const { isValid, validationErrors } = await isFormValid(schema, form) @@ -49,7 +59,7 @@ export default function SetPoolAllowTrade({ const isValid = await validateInstruction() const governance = form.governedAccount?.governance - if (!isValid || !governance || !adrenaProgram) { + if (!isValid || !governance || !adrenaClient || !form.pool) { return { serializedInstruction: '', isValid, @@ -58,14 +68,14 @@ export default function SetPoolAllowTrade({ } } - const instruction = await adrenaProgram.methods - .setPoolAllowSwap({ - allowSwap: form.allow, + const instruction = await adrenaClient.program.methods + .setPoolAllowTrade({ + allowTrade: form.allow, }) .accountsStrict({ admin: governance.nativeTreasuryAddress, - cortex: AdrenaPdaUtils.getCortexPda(), - pool: AdrenaPdaUtils.getMainPoolPda(), + cortex: adrenaClient.cortexPda, + pool: form.pool.pubkey, }) .instruction() @@ -104,7 +114,18 @@ export default function SetPoolAllowTrade({ options: assetAccounts, }, { - label: 'Allow Swap', + label: 'Pool', + initialValue: form.pool, + type: InstructionInputType.SELECT, + name: 'pool', + options: + pools?.map((p) => ({ + name: p.name.value.toString(), + value: p, + })) ?? [], + }, + { + label: 'Allow Trade', initialValue: form.allow, type: InstructionInputType.SWITCH, name: 'allow', diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAumSoftCapUsd.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAumSoftCapUsd.tsx index f234d292e..f2abe1aef 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAumSoftCapUsd.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAumSoftCapUsd.tsx @@ -10,33 +10,44 @@ import InstructionForm, { InstructionInput } from '../FormCreator' import { InstructionInputType } from '../inputInstructionType' import { NewProposalContext } from '../../../new' import { AssetAccount } from '@utils/uiTypes/assets' -import useAdrenaProgram from '@hooks/useAdrenaProgram' -import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' +import { PoolWithPubkey } from '@tools/sdk/adrena/Adrena' +import useAdrenaClient from '@hooks/useAdrenaClient' +import { PublicKey } from '@solana/web3.js' +import useAdrenaPools from '@hooks/useAdrenaPools' +import { BN } from '@coral-xyz/anchor' export interface SetPoolAumSoftCapUsdForm { governedAccount: AssetAccount | null - allow: boolean + aumSoftCapUsd: number + pool: PoolWithPubkey | null } -export default function SetPoolAumSoftCapUsd({ +export default function SetPoolAllowSwap({ index, governance, }: { index: number governance: ProgramAccount | null }) { - const adrenaProgram = useAdrenaProgram() const { assetAccounts } = useGovernanceAssets() const shouldBeGoverned = !!(index !== 0 && governance) const [form, setForm] = useState({ governedAccount: null, - allow: false, + aumSoftCapUsd: 0, + pool: null, }) const [formErrors, setFormErrors] = useState({}) const { handleSetInstructions } = useContext(NewProposalContext) + // TODO: load the program owned by the selected governance: form.governedAccount?.governance + const adrenaClient = useAdrenaClient( + new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + ) + + const pools = useAdrenaPools(adrenaClient) + const validateInstruction = async (): Promise => { const { isValid, validationErrors } = await isFormValid(schema, form) @@ -49,7 +60,7 @@ export default function SetPoolAumSoftCapUsd({ const isValid = await validateInstruction() const governance = form.governedAccount?.governance - if (!isValid || !governance || !adrenaProgram) { + if (!isValid || !governance || !adrenaClient || !form.pool) { return { serializedInstruction: '', isValid, @@ -58,14 +69,14 @@ export default function SetPoolAumSoftCapUsd({ } } - const instruction = await adrenaProgram.methods - .setPoolAllowSwap({ - allowSwap: form.allow, + const instruction = await adrenaClient.program.methods + .setPoolAumSoftCapUsd({ + aumSoftCapUsd: new BN(form.aumSoftCapUsd * 10 ** 6), }) .accountsStrict({ admin: governance.nativeTreasuryAddress, - cortex: AdrenaPdaUtils.getCortexPda(), - pool: AdrenaPdaUtils.getMainPoolPda(), + cortex: adrenaClient.cortexPda, + pool: form.pool.pubkey, }) .instruction() @@ -90,7 +101,7 @@ export default function SetPoolAumSoftCapUsd({ .object() .nullable() .required('Program governed account is required'), - allow: yup.boolean().required('Allow is required'), + aumSoftCapUsd: yup.number().required('Aum soft cap usd is required'), }) const inputs: InstructionInput[] = [ @@ -104,10 +115,22 @@ export default function SetPoolAumSoftCapUsd({ options: assetAccounts, }, { - label: 'Allow Swap', - initialValue: form.allow, - type: InstructionInputType.SWITCH, - name: 'allow', + label: 'Pool', + initialValue: form.pool, + type: InstructionInputType.SELECT, + name: 'pool', + options: + pools?.map((p) => ({ + name: p.name.value.toString(), + value: p, + })) ?? [], + }, + { + label: 'Aum Soft Cap Usd', + initialValue: form.aumSoftCapUsd, + type: InstructionInputType.INPUT, + name: 'aumSoftCapUsd', + inputType: 'number', }, ] diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolLiquidityState.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolLiquidityState.tsx index 4ea27ed8b..e30d09d1f 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolLiquidityState.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolLiquidityState.tsx @@ -10,14 +10,23 @@ import InstructionForm, { InstructionInput } from '../FormCreator' import { InstructionInputType } from '../inputInstructionType' import { NewProposalContext } from '../../../new' import { AssetAccount } from '@utils/uiTypes/assets' -import useAdrenaProgram from '@hooks/useAdrenaProgram' -import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' +import { LiquidityState, PoolWithPubkey } from '@tools/sdk/adrena/Adrena' +import useAdrenaClient from '@hooks/useAdrenaClient' +import { PublicKey } from '@solana/web3.js' +import useAdrenaPools from '@hooks/useAdrenaPools' -export interface SetPoolLiquidityStateForm { +export interface SetPoolAumSoftCapUsdForm { governedAccount: AssetAccount | null - allow: boolean + liquidityState: number + pool: PoolWithPubkey | null } +export const LIQUIDITY_STATE_VALUES = [ + { name: 'Genesis Liquidity', value: LiquidityState.GenesisLiquidity }, + { name: 'Idle', value: LiquidityState.Idle }, + { name: 'Active', value: LiquidityState.Active }, +] + export default function SetPoolLiquidityState({ index, governance, @@ -25,18 +34,25 @@ export default function SetPoolLiquidityState({ index: number governance: ProgramAccount | null }) { - const adrenaProgram = useAdrenaProgram() const { assetAccounts } = useGovernanceAssets() const shouldBeGoverned = !!(index !== 0 && governance) - const [form, setForm] = useState({ + const [form, setForm] = useState({ governedAccount: null, - allow: false, + liquidityState: LIQUIDITY_STATE_VALUES[2].value, // Default is Active + pool: null, }) const [formErrors, setFormErrors] = useState({}) const { handleSetInstructions } = useContext(NewProposalContext) + // TODO: load the program owned by the selected governance: form.governedAccount?.governance + const adrenaClient = useAdrenaClient( + new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + ) + + const pools = useAdrenaPools(adrenaClient) + const validateInstruction = async (): Promise => { const { isValid, validationErrors } = await isFormValid(schema, form) @@ -49,7 +65,7 @@ export default function SetPoolLiquidityState({ const isValid = await validateInstruction() const governance = form.governedAccount?.governance - if (!isValid || !governance || !adrenaProgram) { + if (!isValid || !governance || !adrenaClient || !form.pool) { return { serializedInstruction: '', isValid, @@ -58,14 +74,14 @@ export default function SetPoolLiquidityState({ } } - const instruction = await adrenaProgram.methods - .setPoolAllowSwap({ - allowSwap: form.allow, + const instruction = await adrenaClient.program.methods + .setPoolLiquidityState({ + liquidityState: form.liquidityState, }) .accountsStrict({ admin: governance.nativeTreasuryAddress, - cortex: AdrenaPdaUtils.getCortexPda(), - pool: AdrenaPdaUtils.getMainPoolPda(), + cortex: adrenaClient.cortexPda, + pool: form.pool.pubkey, }) .instruction() @@ -90,7 +106,7 @@ export default function SetPoolLiquidityState({ .object() .nullable() .required('Program governed account is required'), - allow: yup.boolean().required('Allow is required'), + liquidityState: yup.number().required('Liquidity state is required'), }) const inputs: InstructionInput[] = [ @@ -104,10 +120,22 @@ export default function SetPoolLiquidityState({ options: assetAccounts, }, { - label: 'Allow Swap', - initialValue: form.allow, - type: InstructionInputType.SWITCH, - name: 'allow', + label: 'Pool', + initialValue: form.pool, + type: InstructionInputType.SELECT, + name: 'pool', + options: + pools?.map((p) => ({ + name: p.name.value.toString(), + value: p, + })) ?? [], + }, + { + label: 'Liquidity State', + initialValue: form.liquidityState, + type: InstructionInputType.SELECT, + name: 'liquidityState', + options: LIQUIDITY_STATE_VALUES, }, ] diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetStakingLmEmissionPotentiometers.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetStakingLmEmissionPotentiometers.tsx index 224d6e9f6..3adf01747 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetStakingLmEmissionPotentiometers.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetStakingLmEmissionPotentiometers.tsx @@ -10,12 +10,15 @@ import InstructionForm, { InstructionInput } from '../FormCreator' import { InstructionInputType } from '../inputInstructionType' import { NewProposalContext } from '../../../new' import { AssetAccount } from '@utils/uiTypes/assets' -import useAdrenaProgram from '@hooks/useAdrenaProgram' -import * as AdrenaPdaUtils from '@tools/sdk/adrena/utils' +import useAdrenaClient from '@hooks/useAdrenaClient' +import { PublicKey } from '@solana/web3.js' +import useAdrenaStakings from '@hooks/useAdrenaStakings' +import { StakingWithPubkey } from '@tools/sdk/adrena/Adrena' export interface SetStakingLmEmissionPotentiometersForm { governedAccount: AssetAccount | null - allow: boolean + lmEmissionPotentiometerBps: number + staking: StakingWithPubkey | null } export default function SetStakingLmEmissionPotentiometers({ @@ -25,18 +28,25 @@ export default function SetStakingLmEmissionPotentiometers({ index: number governance: ProgramAccount | null }) { - const adrenaProgram = useAdrenaProgram() const { assetAccounts } = useGovernanceAssets() const shouldBeGoverned = !!(index !== 0 && governance) const [form, setForm] = useState({ governedAccount: null, - allow: false, + lmEmissionPotentiometerBps: 0, + staking: null, }) const [formErrors, setFormErrors] = useState({}) const { handleSetInstructions } = useContext(NewProposalContext) + // TODO: load the program owned by the selected governance: form.governedAccount?.governance + const adrenaClient = useAdrenaClient( + new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + ) + + const stakings = useAdrenaStakings(adrenaClient) + const validateInstruction = async (): Promise => { const { isValid, validationErrors } = await isFormValid(schema, form) @@ -49,7 +59,7 @@ export default function SetStakingLmEmissionPotentiometers({ const isValid = await validateInstruction() const governance = form.governedAccount?.governance - if (!isValid || !governance || !adrenaProgram) { + if (!isValid || !governance || !adrenaClient || !form.staking) { return { serializedInstruction: '', isValid, @@ -58,14 +68,14 @@ export default function SetStakingLmEmissionPotentiometers({ } } - const instruction = await adrenaProgram.methods - .setPoolAllowSwap({ - allowSwap: form.allow, + const instruction = await adrenaClient.program.methods + .setStakingLmEmissionPotentiometers({ + lmEmissionPotentiometerBps: form.lmEmissionPotentiometerBps, }) .accountsStrict({ admin: governance.nativeTreasuryAddress, - cortex: AdrenaPdaUtils.getCortexPda(), - pool: AdrenaPdaUtils.getMainPoolPda(), + cortex: adrenaClient.cortexPda, + staking: form.staking.pubkey, }) .instruction() @@ -90,7 +100,9 @@ export default function SetStakingLmEmissionPotentiometers({ .object() .nullable() .required('Program governed account is required'), - allow: yup.boolean().required('Allow is required'), + lmEmissionPotentiometerBps: yup + .number() + .required('LM emission potentiometer BPS is required'), }) const inputs: InstructionInput[] = [ @@ -104,10 +116,22 @@ export default function SetStakingLmEmissionPotentiometers({ options: assetAccounts, }, { - label: 'Allow Swap', - initialValue: form.allow, - type: InstructionInputType.SWITCH, - name: 'allow', + label: 'LM Emission Potentiometer BPS', + initialValue: form.lmEmissionPotentiometerBps, + type: InstructionInputType.INPUT, + inputType: 'number', + name: 'lmEmissionPotentiometerBps', + }, + { + label: 'Staking', + initialValue: form.staking, + type: InstructionInputType.SELECT, + name: 'staking', + options: + stakings?.map((p) => ({ + name: p.pubkey.toBase58(), + value: p, + })) ?? [], }, ] diff --git a/pages/dao/[symbol]/proposal/new.tsx b/pages/dao/[symbol]/proposal/new.tsx index 78af12aae..e6e521712 100644 --- a/pages/dao/[symbol]/proposal/new.tsx +++ b/pages/dao/[symbol]/proposal/new.tsx @@ -63,7 +63,6 @@ import AdrenaAddVest from './components/instructions/Adrena/AddVest' import AdrenaMintLmTokensFromBucket from './components/instructions/Adrena/MintLmTokensFromBucket' import AdrenaSetCustodyAllowSwap from './components/instructions/Adrena/SetCustodyAllowSwap' import AdrenaSetCustodyAllowTrade from './components/instructions/Adrena/SetCustodyAllowTrade' -import AdrenaSetCustodyConfig from './components/instructions/Adrena/SetCustodyConfig' import AdrenaSetCustodyMaxCumulativeShortSizeUsd from './components/instructions/Adrena/SetCustodyMaxCumulativeShortSizeUsd' import AdrenaSetPoolAllowSwap from './components/instructions/Adrena/SetPoolAllowSwap' import AdrenaSetPoolAllowTrade from './components/instructions/Adrena/SetPoolAllowTrade' @@ -480,7 +479,6 @@ const New = () => { [Instructions.AdrenaMintLmTokensFromBucket]: AdrenaMintLmTokensFromBucket, [Instructions.AdrenaSetCustodyAllowSwap]: AdrenaSetCustodyAllowSwap, [Instructions.AdrenaSetCustodyAllowTrade]: AdrenaSetCustodyAllowTrade, - [Instructions.AdrenaSetCustodyConfig]: AdrenaSetCustodyConfig, [Instructions.AdrenaSetCustodyMaxCumulativeShortSizeUsd]: AdrenaSetCustodyMaxCumulativeShortSizeUsd, [Instructions.AdrenaSetPoolAllowSwap]: AdrenaSetPoolAllowSwap, [Instructions.AdrenaSetPoolAllowTrade]: AdrenaSetPoolAllowTrade, diff --git a/tools/sdk/adrena/Adrena.ts b/tools/sdk/adrena/Adrena.ts new file mode 100644 index 000000000..eb5eaebcf --- /dev/null +++ b/tools/sdk/adrena/Adrena.ts @@ -0,0 +1,160 @@ +import { PublicKey } from '@solana/web3.js' +import { IDL, Adrena } from '../../../idls/adrena' +import { AnchorProvider, IdlAccounts, Program } from '@coral-xyz/anchor' + +export enum OriginBucket { + CoreContributor = 0, + DaoTreasury = 1, + PoL = 2, + Ecosystem = 3, +} + +export enum LiquidityState { + GenesisLiquidity = 0, + Idle = 1, + Active = 2, +} + +type Accounts = IdlAccounts + +export type Cortex = Accounts['cortex'] +export type VestRegistry = Accounts['vestRegistry'] +export type Custody = Accounts['custody'] +export type Pool = Accounts['pool'] +export type Position = Accounts['position'] +export type UserStaking = Accounts['userStaking'] +export type Staking = Accounts['staking'] +export type Vest = Accounts['vest'] +export type UserProfile = Accounts['userProfile'] + +export type WithPubkey = T & { pubkey: PublicKey } + +export type PoolWithPubkey = WithPubkey +export type CustodyWithPubkey = WithPubkey +export type StakingWithPubkey = WithPubkey + +export default class AdrenaClient { + public readonly program: Program + + constructor(provider: AnchorProvider, public readonly programId: PublicKey) { + this.program = new Program(IDL, programId, provider) + } + + public static readonly governanceProgram = new PublicKey( + 'GovER5Lthms3bLBqWub97yVrMmEogzX7xNjdXpPPCVZw' + ) + + public readonly cortexPda: PublicKey = PublicKey.findProgramAddressSync( + [Buffer.from('cortex')], + this.programId + )[0] + + public readonly transferAuthorityPda = PublicKey.findProgramAddressSync( + [Buffer.from('transfer_authority')], + this.programId + )[0] + + public getPoolPda(poolName: string): PublicKey { + return PublicKey.findProgramAddressSync( + [Buffer.from('pool'), Buffer.from(poolName)], + this.programId + )[0] + } + + public getLpTokenMint(poolPda: PublicKey): PublicKey { + return PublicKey.findProgramAddressSync( + [Buffer.from('lp_token_mint'), poolPda.toBuffer()], + this.programId + )[0] + } + + public readonly lmTokenMint = PublicKey.findProgramAddressSync( + [Buffer.from('lm_token_mint')], + this.programId + )[0] + + public readonly vestRegistryPda = PublicKey.findProgramAddressSync( + [Buffer.from('vest_registry')], + this.programId + )[0] + + public getUserVestPda(owner: PublicKey): PublicKey { + return PublicKey.findProgramAddressSync( + [Buffer.from('vest'), owner.toBuffer()], + this.programId + )[0] + } + + public readonly governanceTokenMint = PublicKey.findProgramAddressSync( + [Buffer.from('governance_token_mint')], + this.programId + )[0] + + public static getGovernanceRealmConfigPda(governanceRealmPda: PublicKey) { + return PublicKey.findProgramAddressSync( + [Buffer.from('realm-config'), governanceRealmPda.toBuffer()], + AdrenaClient.governanceProgram + )[0] + } + + public getGovernanceGoverningTokenHoldingPda(governanceRealmPda: PublicKey) { + return PublicKey.findProgramAddressSync( + [ + Buffer.from('governance'), + governanceRealmPda.toBuffer(), + this.governanceTokenMint.toBuffer(), + ], + AdrenaClient.governanceProgram + )[0] + } + + public getGovernanceGoverningTokenOwnerRecordPda( + owner: PublicKey, + governanceRealm: PublicKey + ) { + return PublicKey.findProgramAddressSync( + [ + Buffer.from('governance'), + governanceRealm.toBuffer(), + this.governanceTokenMint.toBuffer(), + owner.toBuffer(), + ], + AdrenaClient.governanceProgram + )[0] + } + + public getCortex(): Promise { + return this.program.account.cortex.fetch(this.cortexPda) + } + + public async getPools(): Promise { + const pools = await this.program.account.pool.all() + + return pools.map((pool) => ({ + ...pool.account, + pubkey: pool.publicKey, + })) + } + + public async getCustodies( + pool: PoolWithPubkey + ): Promise { + const custodies = await this.program.account.custody.fetchMultiple( + pool.custodies + ) + + return custodies.map((custody, index) => ({ + ...custody, + pubkey: pool.custodies[index], + })) as CustodyWithPubkey[] + } + + public async getStakings(): Promise { + const stakings = await this.program.account.staking.all() + + return stakings.map((staking) => ({ + ...staking.account, + pubkey: staking.publicKey, + })) + } +} diff --git a/tools/sdk/adrena/utils.ts b/tools/sdk/adrena/utils.ts deleted file mode 100644 index e6aa3f4e3..000000000 --- a/tools/sdk/adrena/utils.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { PublicKey } from '@solana/web3.js' - -import AdrenaJson from '../../../idls/adrena.json' - -export function getCortexPda(): PublicKey { - return PublicKey.findProgramAddressSync( - [Buffer.from('cortex')], - new PublicKey(AdrenaJson.metadata.address) - )[0] -} - -export function getMainPoolPda(): PublicKey { - return PublicKey.findProgramAddressSync( - [Buffer.from('pool'), Buffer.from('main-pool')], - new PublicKey(AdrenaJson.metadata.address) - )[0] -} diff --git a/utils/uiTypes/proposalCreationTypes.ts b/utils/uiTypes/proposalCreationTypes.ts index 86a149d61..394a4f104 100644 --- a/utils/uiTypes/proposalCreationTypes.ts +++ b/utils/uiTypes/proposalCreationTypes.ts @@ -296,7 +296,6 @@ export enum Instructions { AdrenaMintLmTokensFromBucket, AdrenaSetCustodyAllowSwap, AdrenaSetCustodyAllowTrade, - AdrenaSetCustodyConfig, AdrenaSetCustodyMaxCumulativeShortSizeUsd, AdrenaSetPoolAllowSwap, AdrenaSetPoolAllowTrade, From 972605802682430a1734f0be76988d66578746a1 Mon Sep 17 00:00:00 2001 From: Orex Date: Fri, 13 Sep 2024 12:04:20 +0400 Subject: [PATCH 4/4] Implements firsts ix --- components/instructions/programs/adrena.tsx | 119 + idls/adrena.json | 5671 ++++++--- idls/adrena.ts | 10552 +++++++++------- .../instructions/Adrena/AddVest.tsx | 13 +- .../Adrena/MintLmTokensFromBucket.tsx | 2 +- .../Adrena/SetCustodyAllowSwap.tsx | 2 +- .../Adrena/SetCustodyAllowTrade.tsx | 2 +- .../SetCustodyMaxCumulativeShortSizeUsd.tsx | 2 +- .../instructions/Adrena/SetPoolAllowSwap.tsx | 2 +- .../instructions/Adrena/SetPoolAllowTrade.tsx | 2 +- .../Adrena/SetPoolAumSoftCapUsd.tsx | 2 +- .../Adrena/SetPoolLiquidityState.tsx | 2 +- .../SetStakingLmEmissionPotentiometers.tsx | 2 +- utils/uiTypes/proposalCreationTypes.ts | 3 +- 14 files changed, 10665 insertions(+), 5711 deletions(-) create mode 100644 components/instructions/programs/adrena.tsx diff --git a/components/instructions/programs/adrena.tsx b/components/instructions/programs/adrena.tsx new file mode 100644 index 000000000..8e97b567f --- /dev/null +++ b/components/instructions/programs/adrena.tsx @@ -0,0 +1,119 @@ +import { Connection } from '@solana/web3.js' + +const INSTRUCTIONS = { + 100: { + name: 'Add Vest', + accounts: [], + getDataUI: async (_connection: Connection, data: Uint8Array) => { + return ( + <> +
{JSON.stringify(data)}
+ + ) + }, + }, + 101: { + name: 'Mint Lm Tokens From Bucket', + accounts: [], + getDataUI: async (_connection: Connection, data: Uint8Array) => { + return ( + <> +
{JSON.stringify(data)}
+ + ) + }, + }, + 102: { + name: 'Set Custody Allow Swap', + accounts: [], + getDataUI: async (_connection: Connection, data: Uint8Array) => { + return ( + <> +
{JSON.stringify(data)}
+ + ) + }, + }, + 103: { + name: 'Set Custody Allow Trade', + accounts: [], + getDataUI: async (_connection: Connection, data: Uint8Array) => { + return ( + <> +
{JSON.stringify(data)}
+ + ) + }, + }, + 104: { + name: 'Set Custody Max Cumulative Short Size USD', + accounts: [], + getDataUI: async (_connection: Connection, data: Uint8Array) => { + return ( + <> +
{JSON.stringify(data)}
+ + ) + }, + }, + 105: { + name: 'Set Pool Allow Swap', + accounts: [], + getDataUI: async (_connection: Connection, data: Uint8Array) => { + return ( + <> +
{JSON.stringify(data)}
+ + ) + }, + }, + 106: { + name: 'Set Pool Allow Trade', + accounts: [], + getDataUI: async (_connection: Connection, data: Uint8Array) => { + return ( + <> +
{JSON.stringify(data)}
+ + ) + }, + }, + 107: { + name: 'Set Pool Aum Soft Cap USD', + accounts: [], + getDataUI: async (_connection: Connection, data: Uint8Array) => { + return ( + <> +
{JSON.stringify(data)}
+ + ) + }, + }, + 108: { + name: 'Set Pool Liquidity State', + accounts: [], + getDataUI: async (_connection: Connection, data: Uint8Array) => { + return ( + <> +
{JSON.stringify(data)}
+ + ) + }, + }, + 109: { + name: 'Set Staking Lm Emission Potentiometers', + accounts: [], + getDataUI: async (_connection: Connection, data: Uint8Array) => { + return ( + <> +
{JSON.stringify(data)}
+ + ) + }, + }, +} + +export const ADRENA_INSTRUCTIONS = { + // TODO: Replace with the correct program id + SW1TCH7qEPTdLsDHRgPuMQjbQxKdH2aBStViMFnt64f: INSTRUCTIONS, +} diff --git a/idls/adrena.json b/idls/adrena.json index 0aec6393b..38c4d8821 100644 --- a/idls/adrena.json +++ b/idls/adrena.json @@ -9,61 +9,81 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "protocolFeeRecipient", "isMut": false, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "feeRedistributionMint", "isMut": false, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "rent", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] } ], "args": [ @@ -82,61 +102,81 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "lmTokenMintMetadata", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "mplTokenMetadataProgram", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "rent", "isMut": false, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] } ], "args": [] @@ -148,31 +188,41 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "governanceTokenMint", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "governanceRealm", @@ -180,32 +230,40 @@ "isSigner": false, "docs": [ "#6", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "A realm represent one project within the governance program" ] }, { "name": "governanceProgram", "isMut": false, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "rent", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] } ], "args": [] @@ -217,49 +275,65 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "vestRegistry", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "rent", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] } ], "args": [] @@ -271,55 +345,73 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "owner", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "vestRegistry", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "vest", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "governanceTokenMint", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "governanceRealm", @@ -327,14 +419,16 @@ "isSigner": false, "docs": [ "#10", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "A realm represent one project within the governance program" ] }, { "name": "governanceRealmConfig", "isMut": false, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] }, { "name": "governanceGoverningTokenHolding", @@ -358,25 +452,33 @@ "name": "governanceProgram", "isMut": false, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#14" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#15" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#16" + ] }, { "name": "rent", "isMut": false, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#17" + ] } ], "args": [ @@ -392,75 +494,109 @@ { "name": "claimVest", "accounts": [ + { + "name": "caller", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, { "name": "owner", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "payer", "isMut": true, - "isSigner": true, - "docs": ["#1"] + "isSigner": false, + "docs": [ + "#3" + ] }, { "name": "receivingAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#4" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#5" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#6" + ] }, { "name": "vestRegistry", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#7" + ] }, { "name": "vest", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#8" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#9" + ] }, { "name": "governanceTokenMint", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#10" + ] }, { "name": "governanceRealm", "isMut": false, "isSigner": false, "docs": [ - "#9", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "#11", + "A realm represent one project within the governance program" ] }, { "name": "governanceRealmConfig", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#12" + ] }, { "name": "governanceGoverningTokenHolding", "isMut": true, "isSigner": false, "docs": [ - "#11", + "#13", "Token account owned by governance program holding user's locked tokens" ] }, @@ -469,7 +605,7 @@ "isMut": true, "isSigner": false, "docs": [ - "#12", + "#14", "Account owned by governance storing user information" ] }, @@ -477,202 +613,423 @@ "name": "governanceProgram", "isMut": false, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#15" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#16" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#17" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#18" + ] }, { "name": "rent", "isMut": false, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#19" + ] } ], "args": [], "returns": "u64" }, { - "name": "addPoolPartOne", + "name": "cancelVest", "accounts": [ { "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#3" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#5" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#6" + ] }, { - "name": "pool", + "name": "vestRegistry", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#7" + ] }, { - "name": "lpTokenMint", + "name": "vest", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#8" + ] }, { - "name": "lpTokenMintMetadata", + "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#9" + ] }, { - "name": "systemProgram", - "isMut": false, + "name": "governanceTokenMint", + "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#10" + ] }, { - "name": "tokenProgram", + "name": "governanceRealm", "isMut": false, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#11", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] }, { - "name": "mplTokenMetadataProgram", + "name": "governanceRealmConfig", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#12" + ] }, { - "name": "adrenaProgram", - "isMut": false, + "name": "governanceGoverningTokenHolding", + "isMut": true, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#13", + "Token account owned by governance program holding user's locked tokens" + ] }, { - "name": "rent", - "isMut": false, + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, "isSigner": false, - "docs": ["#12"] - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "AddPoolPartOneParams" - } - } - ], - "returns": "u8" - }, - { - "name": "addPoolPartTwo", - "accounts": [ + "docs": [ + "#14", + "Account owned by governance storing user information" + ] + }, { - "name": "admin", + "name": "governanceProgram", "isMut": false, - "isSigner": true, - "docs": ["#1"] + "isSigner": false, + "docs": [ + "#15" + ] }, { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": ["#2"] + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] }, { - "name": "transferAuthority", + "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#17" + ] }, { - "name": "cortex", - "isMut": true, + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#19" + ] + } + ], + "args": [] + }, + { + "name": "addPoolPartOne", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "lpTokenMintMetadata", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "mplTokenMetadataProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddPoolPartOneParams" + } + } + ], + "returns": "u8" + }, + { + "name": "addPoolPartTwo", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "lpTokenMint", "isMut": false, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "genesisLock", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "finalizeGenesisLockCampaignThread", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "sablierProgram", "isMut": false, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#12" + ] }, { "name": "rent", "isMut": false, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#13" + ] } ], "args": [ @@ -692,37 +1049,49 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] } ], "args": [], @@ -735,67 +1104,105 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "custodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] + }, + { + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] }, { "name": "custodyTokenMint", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#10" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#11" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#12" + ] }, { "name": "rent", "isMut": false, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#13" + ] } ], "args": [ @@ -815,55 +1222,73 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "cortex", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "custodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] } ], "args": [ @@ -883,25 +1308,33 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] } ], "args": [ @@ -921,25 +1354,33 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] } ], "args": [ @@ -958,25 +1399,33 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] } ], "args": [ @@ -995,19 +1444,25 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] } ], "args": [ @@ -1026,19 +1481,25 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] - }, + "docs": [ + "#1" + ] + }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] } ], "args": [ @@ -1057,19 +1518,25 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] } ], "args": [ @@ -1081,62 +1548,6 @@ } ] }, - { - "name": "setTestOraclePrice", - "accounts": [ - { - "name": "admin", - "isMut": false, - "isSigner": true, - "docs": ["#1"] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": ["#2"] - }, - { - "name": "cortex", - "isMut": false, - "isSigner": false, - "docs": ["#3"] - }, - { - "name": "pool", - "isMut": false, - "isSigner": false, - "docs": ["#4"] - }, - { - "name": "custody", - "isMut": false, - "isSigner": false, - "docs": ["#5"] - }, - { - "name": "oracleAccount", - "isMut": true, - "isSigner": false, - "docs": ["#6"] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": ["#7"] - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "SetTestOraclePriceParams" - } - } - ], - "returns": "u8" - }, { "name": "testAdminRemoveCollateral", "accounts": [ @@ -1144,85 +1555,113 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "owner", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "receivingAccount", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "position", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "collateralCustody", "isMut": true, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] }, { "name": "collateralCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#12" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#13" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#14" + ] } ], "args": [ @@ -1241,146 +1680,194 @@ "name": "owner", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "fundingAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "receivingAccount", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "lmStaking", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "lpStaking", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "stakingRewardTokenCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] }, { "name": "receivingCustody", "isMut": true, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#12" + ] }, { - "name": "receivingCustodyOracleAccount", + "name": "receivingCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#13" + ] }, { "name": "receivingCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#14" + ] }, { "name": "dispensingCustody", "isMut": true, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#15" + ] }, { - "name": "dispensingCustodyOracleAccount", + "name": "dispensingCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#16" + ] }, { "name": "dispensingCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#17" + ] }, { "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#18"] + "docs": [ + "#18" + ] }, { "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#19"] + "docs": [ + "#19" + ] }, { "name": "lpTokenMint", "isMut": true, "isSigner": false, - "docs": ["#20"] + "docs": [ + "#20" + ] }, { "name": "protocolFeeRecipient", "isMut": true, "isSigner": false, - "docs": ["#21"] + "docs": [ + "#21" + ] }, { "name": "userProfile", "isMut": true, "isSigner": false, "isOptional": true, - "docs": ["#22"] + "docs": [ + "#22" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#23"] + "docs": [ + "#23" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#24"] + "docs": [ + "#24" + ] } ], "args": [ @@ -1399,127 +1886,169 @@ "name": "owner", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "fundingAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "lpTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3 Front end will target the owner account, but not limited to" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "lmStaking", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "lpStaking", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "stakingRewardTokenCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#12" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#13" + ] }, { "name": "custodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#14" + ] }, { "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#15" + ] }, { "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#16" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#17" + ] }, { "name": "lpTokenMint", "isMut": true, "isSigner": false, - "docs": ["#18"] + "docs": [ + "#18" + ] }, { "name": "protocolFeeRecipient", "isMut": true, "isSigner": false, - "docs": ["#19"] + "docs": [ + "#19" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#20"] + "docs": [ + "#20" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#21"] + "docs": [ + "#21" + ] } ], "args": [ @@ -1538,113 +2067,137 @@ "name": "owner", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "fundingAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] - }, - { - "name": "lpTokenAccount", - "isMut": true, - "isSigner": false, - "docs": ["#3"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#3" + ] }, { "name": "lpUserStaking", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#4" + ] }, { "name": "lpStaking", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#5" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#6" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#7" + ] }, { "name": "lpStakingStakedTokenVault", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#8" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#9" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#10" + ] }, { "name": "custodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#11" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#12" + ] }, { "name": "lpTokenMint", "isMut": true, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#13" + ] }, { "name": "governanceTokenMint", "isMut": true, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#14" + ] }, { "name": "governanceRealm", "isMut": false, "isSigner": false, "docs": [ - "#16", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "#15", + "A realm represent one project within the governance program" ] }, { "name": "governanceRealmConfig", "isMut": false, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#16" + ] }, { "name": "governanceGoverningTokenHolding", "isMut": true, "isSigner": false, "docs": [ - "#18", + "#17", "Token account owned by governance program holding user's locked tokens" ] }, @@ -1653,7 +2206,7 @@ "isMut": true, "isSigner": false, "docs": [ - "#19", + "#18", "Account owned by governance storing user information" ] }, @@ -1661,48 +2214,65 @@ "name": "lpStakeResolutionThread", "isMut": true, "isSigner": false, - "docs": ["#20"] + "docs": [ + "#19" + ] }, { "name": "stakesClaimCronThread", "isMut": true, "isSigner": false, - "docs": ["#21"] + "docs": [ + "#20" + ] }, { "name": "sablierProgram", "isMut": false, "isSigner": false, - "docs": ["#23"] + "docs": [ + "#21" + ] }, { "name": "governanceProgram", "isMut": false, "isSigner": false, - "docs": ["#24"] + "docs": [ + "#22" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#25"] + "docs": [ + "#23" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#26"] + "docs": [ + "#24" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#27"] + "docs": [ + "#25" + ] }, { "name": "genesisLock", "isMut": true, - "isSigner": false + "isSigner": false, + "docs": [ + "#26" + ] } ], "args": [ @@ -1721,121 +2291,161 @@ "name": "owner", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "receivingAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2 Front end will target the owner account, but not limited to" + ] }, { "name": "lpTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "lmStaking", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "lpStaking", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#10"] - }, + "docs": [ + "#10" + ] + }, { "name": "stakingRewardTokenCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#12" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#13" + ] }, { "name": "custodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#14" + ] }, { "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#15" + ] }, { "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#16" + ] }, { "name": "lpTokenMint", "isMut": true, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#17" + ] }, { "name": "protocolFeeRecipient", "isMut": true, "isSigner": false, - "docs": ["#18"] + "docs": [ + "#18" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#19"] + "docs": [ + "#19" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#20"] + "docs": [ + "#20" + ] } ], "args": [ @@ -1854,140 +2464,122 @@ "name": "owner", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "fundingAccount", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#4"] - }, - { - "name": "lmStaking", - "isMut": true, - "isSigner": false, - "docs": ["#5"] - }, - { - "name": "lpStaking", - "isMut": true, - "isSigner": false, - "docs": ["#6"] + "docs": [ + "#4" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#5" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#6" + ] }, { "name": "position", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#7" + ] }, { - "name": "stakingRewardTokenCustody", + "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#8" + ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, - "docs": ["#11"] - }, - { - "name": "stakingRewardTokenCustodyTokenAccount", - "isMut": true, - "isSigner": false, - "docs": ["#12"] - }, - { - "name": "custody", - "isMut": true, - "isSigner": false, - "docs": ["#13"] + "docs": [ + "#9" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#10" + ] }, { "name": "custodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#15"] - }, - { - "name": "lmStakingRewardTokenVault", - "isMut": true, - "isSigner": false, - "docs": ["#16"] - }, - { - "name": "lpStakingRewardTokenVault", - "isMut": true, - "isSigner": false, - "docs": ["#17"] - }, - { - "name": "lpTokenMint", - "isMut": true, - "isSigner": false, - "docs": ["#18"] - }, - { - "name": "protocolFeeRecipient", - "isMut": true, - "isSigner": false, - "docs": ["#19"] + "docs": [ + "#11" + ] }, { "name": "userProfile", "isMut": true, "isSigner": false, "isOptional": true, - "docs": ["#20"] + "docs": [ + "#12" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#21"] + "docs": [ + "#13" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#22"] + "docs": [ + "#14" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#23"] + "docs": [ + "#15" + ] } ], "args": [ @@ -2006,152 +2598,130 @@ "name": "owner", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "fundingAccount", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#4"] - }, - { - "name": "lmStaking", - "isMut": true, - "isSigner": false, - "docs": ["#5"] - }, - { - "name": "lpStaking", - "isMut": true, - "isSigner": false, - "docs": ["#6"] + "docs": [ + "#4" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#5" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#6" + ] }, { "name": "position", "isMut": true, "isSigner": false, - "docs": ["#9"] - }, - { - "name": "stakingRewardTokenCustody", - "isMut": true, - "isSigner": false, - "docs": ["#10"] - }, - { - "name": "stakingRewardTokenCustodyOracleAccount", - "isMut": false, - "isSigner": false, - "docs": ["#11"] - }, - { - "name": "stakingRewardTokenCustodyTokenAccount", - "isMut": true, - "isSigner": false, - "docs": ["#12"] + "docs": [ + "#7" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#8" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#9" + ] }, { "name": "collateralCustody", "isMut": true, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#10" + ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#11" + ] }, { "name": "collateralCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#17"] - }, - { - "name": "lmStakingRewardTokenVault", - "isMut": true, - "isSigner": false, - "docs": ["#18"] - }, - { - "name": "lpStakingRewardTokenVault", - "isMut": true, - "isSigner": false, - "docs": ["#19"] - }, - { - "name": "lpTokenMint", - "isMut": true, - "isSigner": false, - "docs": ["#20"] - }, - { - "name": "protocolFeeRecipient", - "isMut": true, - "isSigner": false, - "docs": ["#21"] + "docs": [ + "#12" + ] }, { "name": "userProfile", "isMut": true, "isSigner": false, "isOptional": true, - "docs": ["#22"] + "docs": [ + "#13" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#23"] + "docs": [ + "#14" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#24"] + "docs": [ + "#15" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#25"] + "docs": [ + "#16" + ] } ], "args": [ @@ -2170,164 +2740,226 @@ "name": "owner", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "fundingAccount", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "collateralAccount", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "receivingCustody", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { - "name": "receivingCustodyOracleAccount", + "name": "receivingCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "receivingCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "principalCustody", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] + }, + { + "name": "principalCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] }, { - "name": "principalCustodyOracleAccount", + "name": "principalCustodyTradeOracle", "isMut": false, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#10" + ] }, { "name": "principalCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#11" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#12" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#13" + ] }, { "name": "lmStaking", "isMut": true, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#14" + ] }, { "name": "lpStaking", "isMut": true, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#15" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#16" + ] }, { "name": "position", "isMut": true, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#17" + ] }, { "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#18" + ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#18"] + "docs": [ + "#19" + ] }, { "name": "stakingRewardTokenCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#19"] + "docs": [ + "#20" + ] }, { "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#20"] + "docs": [ + "#21" + ] }, { "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#21"] + "docs": [ + "#22" + ] }, { "name": "lpTokenMint", "isMut": true, "isSigner": false, - "docs": ["#22"] + "docs": [ + "#23" + ] }, { "name": "protocolFeeRecipient", "isMut": true, "isSigner": false, - "docs": ["#23"] + "docs": [ + "#24" + ] }, { "name": "userProfile", "isMut": true, "isSigner": false, "isOptional": true, - "docs": ["#24"] + "docs": [ + "#25" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#25"] + "docs": [ + "#26" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#26"] + "docs": [ + "#27" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#27"] + "docs": [ + "#28" + ] } ], "args": [ @@ -2346,182 +2978,242 @@ "name": "owner", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "fundingAccount", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "collateralAccount", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "receivingCustody", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { - "name": "receivingCustodyOracleAccount", + "name": "receivingCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "receivingCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "collateralCustody", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "collateralCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "principalCustody", "isMut": true, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] }, { - "name": "principalCustodyOracleAccount", + "name": "principalCustodyTradeOracle", "isMut": false, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#12" + ] }, { "name": "principalCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#13"] - }, + "docs": [ + "#13" + ] + }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#14" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#15" + ] }, { "name": "lmStaking", "isMut": true, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#16" + ] }, { "name": "lpStaking", "isMut": true, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#17" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#18"] + "docs": [ + "#18" + ] }, { "name": "position", "isMut": true, "isSigner": false, - "docs": ["#19"] + "docs": [ + "#19" + ] }, { "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, - "docs": ["#20"] + "docs": [ + "#20" + ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#21"] + "docs": [ + "#21" + ] }, { "name": "stakingRewardTokenCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#22"] + "docs": [ + "#22" + ] }, { "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#23"] + "docs": [ + "#23" + ] }, { "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#24"] + "docs": [ + "#24" + ] }, { "name": "lpTokenMint", "isMut": true, "isSigner": false, - "docs": ["#25"] + "docs": [ + "#25" + ] }, { "name": "protocolFeeRecipient", "isMut": true, "isSigner": false, - "docs": ["#26"] + "docs": [ + "#26" + ] }, { "name": "userProfile", "isMut": true, "isSigner": false, "isOptional": true, - "docs": ["#27"] + "docs": [ + "#27" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#28"] + "docs": [ + "#28" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#29"] + "docs": [ + "#29" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#30"] + "docs": [ + "#30" + ] } ], "args": [ @@ -2540,67 +3232,89 @@ "name": "owner", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "fundingAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "position", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "custodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] } ], "args": [ @@ -2619,79 +3333,105 @@ "name": "owner", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "fundingAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "position", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "collateralCustody", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "collateralCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#12" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#13" + ] } ], "args": [ @@ -2710,67 +3450,89 @@ "name": "owner", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "receivingAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "position", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "custodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] } ], "args": [ @@ -2789,79 +3551,105 @@ "name": "owner", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "receivingAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "position", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "collateralCustody", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "collateralCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#12" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#13" + ] } ], "args": [ @@ -2877,131 +3665,213 @@ "name": "closePositionLong", "accounts": [ { - "name": "owner", + "name": "caller", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] }, { "name": "receivingAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#3" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#4" + ] }, { "name": "lmStaking", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#5" + ] }, { "name": "lpStaking", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#6" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#7" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#8" + ] }, { "name": "position", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#9" + ] }, { "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#10" + ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#11" + ] }, { "name": "stakingRewardTokenCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#12" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#13" + ] + }, + { + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#15" + ] }, { "name": "custodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#16" + ] }, { "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#17" + ] }, { "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#18" + ] }, { "name": "lpTokenMint", "isMut": true, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#19" + ] }, { "name": "protocolFeeRecipient", "isMut": true, "isSigner": false, - "docs": ["#18"] + "docs": [ + "#20" + ] }, { "name": "userProfile", "isMut": true, "isSigner": false, "isOptional": true, - "docs": ["#19"] + "docs": [ + "#21" + ] + }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#23" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#20"] + "docs": [ + "#24" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#21"] + "docs": [ + "#25" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] } ], "args": [ @@ -3017,143 +3887,215 @@ "name": "closePositionShort", "accounts": [ { - "name": "owner", + "name": "caller", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] }, { "name": "receivingAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#3" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#4" + ] }, { "name": "lmStaking", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#5" + ] }, { "name": "lpStaking", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#6" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#7" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#8" + ] }, { "name": "position", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#9" + ] }, { "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#10" + ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#11" + ] }, { "name": "stakingRewardTokenCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#12" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#13" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#14" + ] }, { "name": "collateralCustody", "isMut": true, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#15" + ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#16" + ] }, { "name": "collateralCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#17" + ] }, { "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#18" + ] }, { "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#18"] + "docs": [ + "#19" + ] }, { "name": "lpTokenMint", "isMut": true, "isSigner": false, - "docs": ["#19"] + "docs": [ + "#20" + ] }, { "name": "protocolFeeRecipient", "isMut": true, "isSigner": false, - "docs": ["#20"] + "docs": [ + "#21" + ] }, { "name": "userProfile", "isMut": true, "isSigner": false, "isOptional": true, - "docs": ["#21"] + "docs": [ + "#22" + ] + }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#22"] + "docs": [ + "#25" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#23"] + "docs": [ + "#26" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] } ], "args": [ @@ -3172,128 +4114,202 @@ "name": "signer", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "receivingAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "lmStaking", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "lpStaking", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "position", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "stakingRewardTokenCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#12" + ] + }, + { + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#14" + ] }, { "name": "custodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#15" + ] }, { "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#16" + ] }, { "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#17" + ] }, { "name": "lpTokenMint", "isMut": true, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#18" + ] }, { "name": "protocolFeeRecipient", "isMut": true, "isSigner": false, - "docs": ["#18"] + "docs": [ + "#19" + ] }, { "name": "userProfile", "isMut": true, "isSigner": false, "isOptional": true, - "docs": ["#19"] + "docs": [ + "#20" + ] + }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#20"] + "docs": [ + "#23" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#21"] + "docs": [ + "#24" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] } ], "args": [ @@ -3312,140 +4328,210 @@ "name": "signer", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "receivingAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "lmStaking", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "lpStaking", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "position", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "stakingRewardTokenCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#12" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#13" + ] }, { "name": "collateralCustody", "isMut": true, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#14" + ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#15" + ] }, { "name": "collateralCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#16" + ] }, { "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#17" + ] }, { "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#18"] + "docs": [ + "#18" + ] }, { "name": "lpTokenMint", "isMut": true, "isSigner": false, - "docs": ["#19"] + "docs": [ + "#19" + ] }, { "name": "protocolFeeRecipient", "isMut": true, "isSigner": false, - "docs": ["#20"] + "docs": [ + "#20" + ] }, { "name": "userProfile", "isMut": true, "isSigner": false, "isOptional": true, - "docs": ["#21"] + "docs": [ + "#21" + ] + }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#23" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#22"] + "docs": [ + "#24" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#23"] + "docs": [ + "#25" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] } ], "args": [ @@ -3464,19 +4550,25 @@ "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "cortex", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] } ], "args": [], @@ -3489,31 +4581,41 @@ "name": "cortex", "isMut": false, "isSigner": false, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "pool", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "custody", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "lpTokenMint", "isMut": false, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] } ], "args": [ @@ -3535,31 +4637,41 @@ "name": "cortex", "isMut": false, "isSigner": false, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "pool", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "custody", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "lpTokenMint", "isMut": false, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] } ], "args": [ @@ -3581,37 +4693,49 @@ "name": "cortex", "isMut": false, "isSigner": false, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "pool", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "custody", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "collateralCustody", "isMut": false, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] } ], "args": [ @@ -3633,55 +4757,73 @@ "name": "cortex", "isMut": false, "isSigner": false, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "pool", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "receivingCustody", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { - "name": "receivingCustodyOracleAccount", + "name": "receivingCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "collateralCustody", "isMut": false, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "principalCustody", "isMut": false, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { - "name": "principalCustodyOracleAccount", + "name": "principalCustodyTradeOracle", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] } ], "args": [ @@ -3703,43 +4845,57 @@ "name": "cortex", "isMut": false, "isSigner": false, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "pool", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "position", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "custody", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "collateralCustody", "isMut": false, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] } ], "args": [], @@ -3754,43 +4910,57 @@ "name": "cortex", "isMut": false, "isSigner": false, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "pool", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "position", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "custody", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "collateralCustody", "isMut": false, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] } ], "args": [], @@ -3805,43 +4975,49 @@ "name": "cortex", "isMut": false, "isSigner": false, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "pool", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "position", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "custody", "isMut": false, "isSigner": false, - "docs": ["#4"] - }, - { - "name": "custodyOracleAccount", - "isMut": false, - "isSigner": false, - "docs": ["#5"] + "docs": [ + "#4" + ] }, { "name": "collateralCustody", "isMut": false, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#5" + ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#6" + ] } ], "args": [ @@ -3861,43 +5037,57 @@ "name": "cortex", "isMut": false, "isSigner": false, - "docs": ["#1"] - }, + "docs": [ + "#1" + ] + }, { "name": "pool", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "position", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "custody", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "collateralCustody", "isMut": false, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] } ], "args": [], @@ -3910,25 +5100,33 @@ "name": "cortex", "isMut": false, "isSigner": false, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "pool", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "custody", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] } ], "args": [], @@ -3941,37 +5139,49 @@ "name": "cortex", "isMut": false, "isSigner": false, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "pool", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "receivingCustody", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { - "name": "receivingCustodyOracleAccount", + "name": "receivingCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "dispensingCustody", "isMut": false, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { - "name": "dispensingCustodyOracleAccount", + "name": "dispensingCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] } ], "args": [ @@ -3993,13 +5203,17 @@ "name": "cortex", "isMut": false, "isSigner": false, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "pool", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] } ], "args": [], @@ -4012,103 +5226,153 @@ "name": "owner", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "rewardTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "lmTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "stakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "stakingLmRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "userStaking", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "stakesClaimCronThread", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "stakesClaimPayer", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "staking", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] }, { "name": "lmTokenMint", "isMut": false, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#14" + ] }, { "name": "feeRedistributionMint", "isMut": false, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#15" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#16" + ] }, { "name": "sablierProgram", "isMut": false, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#17" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#18" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#19" + ] } ], "args": [ @@ -4127,37 +5391,41 @@ "name": "user", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "userProfile", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#5"] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": ["#6"] + "docs": [ + "#5" + ] } ], "args": [ @@ -4176,31 +5444,33 @@ "name": "user", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "userProfile", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#4"] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": ["#5"] + "docs": [ + "#4" + ] } ], "args": [ @@ -4219,43 +5489,49 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "user", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "userProfile", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#6"] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": ["#7"] + "docs": [ + "#6" + ] } ], "args": [] @@ -4267,79 +5543,105 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "staking", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "stakingStakedTokenVault", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "feeRedistributionMint", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "stakingStakedTokenMint", "isMut": false, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#12" + ] }, { "name": "rent", "isMut": false, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#13" + ] } ], "args": [ @@ -4359,61 +5661,81 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "staking", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "stakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "feeRedistributionMint", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] } ], "args": [], @@ -4426,61 +5748,81 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "staking", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "stakingLmRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "feeRedistributionMint", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] } ], "args": [], @@ -4493,109 +5835,145 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "staking", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "stakingStakedTokenVault", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "stakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "stakingLmRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "feeRedistributionMint", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "stakingStakedTokenMint", "isMut": false, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] }, { "name": "resolveRoundCronThread", "isMut": true, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#12" + ] }, { "name": "resolveRoundPayer", "isMut": true, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#13" + ] }, { "name": "sablierProgram", "isMut": false, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#14" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#15" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#16" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#17" + ] }, { "name": "rent", "isMut": false, "isSigner": false, - "docs": ["#18"] + "docs": [ + "#18" + ] } ], "args": [ @@ -4615,107 +5993,153 @@ "name": "owner", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "fundingAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "rewardTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "lmTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "stakingStakedTokenVault", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "stakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "stakingLmRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "userStaking", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "staking", "isMut": true, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#15" + ] }, { "name": "governanceTokenMint", "isMut": true, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#16" + ] }, { "name": "feeRedistributionMint", "isMut": false, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#17" + ] }, { "name": "governanceRealm", "isMut": false, "isSigner": false, "docs": [ - "#15", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "#18", + "A realm represent one project within the governance program" ] }, { "name": "governanceRealmConfig", "isMut": false, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#19" + ] }, { "name": "governanceGoverningTokenHolding", "isMut": true, "isSigner": false, "docs": [ - "#17", + "#20", "Token account owned by governance program holding user's locked tokens" ] }, @@ -4724,7 +6148,7 @@ "isMut": true, "isSigner": false, "docs": [ - "#18", + "#21", "Account owned by governance storing user information" ] }, @@ -4732,37 +6156,49 @@ "name": "stakesClaimCronThread", "isMut": true, "isSigner": false, - "docs": ["#19"] + "docs": [ + "#22" + ] }, { "name": "sablierProgram", "isMut": false, "isSigner": false, - "docs": ["#20"] + "docs": [ + "#23" + ] }, { "name": "governanceProgram", "isMut": false, "isSigner": false, - "docs": ["#21"] + "docs": [ + "#24" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#22"] + "docs": [ + "#25" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#23"] + "docs": [ + "#26" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#24"] + "docs": [ + "#27" + ] } ], "args": [ @@ -4781,73 +6217,97 @@ "name": "owner", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "fundingAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "rewardTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "stakingStakedTokenVault", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "stakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "userStaking", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "staking", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "governanceTokenMint", "isMut": true, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] }, { "name": "feeRedistributionMint", "isMut": false, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#12" + ] }, { "name": "governanceRealm", @@ -4855,14 +6315,16 @@ "isSigner": false, "docs": [ "#13", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "A realm represent one project within the governance program" ] }, { "name": "governanceRealmConfig", "isMut": false, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#14" + ] }, { "name": "governanceGoverningTokenHolding", @@ -4886,43 +6348,57 @@ "name": "stakeResolutionThread", "isMut": true, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#17" + ] }, { "name": "stakesClaimCronThread", "isMut": true, "isSigner": false, - "docs": ["#18"] + "docs": [ + "#18" + ] }, { "name": "sablierProgram", "isMut": false, "isSigner": false, - "docs": ["#19"] + "docs": [ + "#19" + ] }, { "name": "governanceProgram", "isMut": false, "isSigner": false, - "docs": ["#20"] + "docs": [ + "#20" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#21"] + "docs": [ + "#21" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#22"] + "docs": [ + "#22" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#23"] + "docs": [ + "#23" + ] } ], "args": [ @@ -4941,107 +6417,153 @@ "name": "owner", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "stakedTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "lmTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "rewardTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "stakingStakedTokenVault", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "stakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "stakingLmRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "userStaking", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "staking", "isMut": true, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#14" + ] }, { "name": "governanceTokenMint", "isMut": true, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#15" + ] }, { "name": "feeRedistributionMint", "isMut": false, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#16" + ] }, { "name": "governanceRealm", "isMut": false, "isSigner": false, "docs": [ - "#15", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "#17", + "A realm represent one project within the governance program" ] }, { "name": "governanceRealmConfig", "isMut": false, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#18" + ] }, { "name": "governanceGoverningTokenHolding", "isMut": true, "isSigner": false, "docs": [ - "#17", + "#19", "Token account owned by governance program holding user's locked tokens" ] }, @@ -5050,7 +6572,7 @@ "isMut": true, "isSigner": false, "docs": [ - "#18", + "#20", "Account owned by governance storing user information" ] }, @@ -5058,37 +6580,49 @@ "name": "stakesClaimCronThread", "isMut": true, "isSigner": false, - "docs": ["#19"] + "docs": [ + "#21" + ] }, { "name": "sablierProgram", "isMut": false, "isSigner": false, - "docs": ["#20"] + "docs": [ + "#22" + ] }, { "name": "governanceProgram", "isMut": false, "isSigner": false, - "docs": ["#21"] + "docs": [ + "#23" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#22"] + "docs": [ + "#24" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#23"] + "docs": [ + "#23" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#24"] + "docs": [ + "#24" + ] } ], "args": [ @@ -5107,113 +6641,161 @@ "name": "owner", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "lmTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "stakedTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "rewardTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "stakingStakedTokenVault", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "stakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "stakingLmRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "userStaking", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "staking", "isMut": true, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#14" + ] }, { "name": "stakedTokenMint", "isMut": true, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#15" + ] }, { "name": "governanceTokenMint", "isMut": true, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#16" + ] }, { "name": "feeRedistributionMint", "isMut": false, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#17" + ] }, { "name": "governanceRealm", "isMut": false, "isSigner": false, "docs": [ - "#16", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "#18", + "A realm represent one project within the governance program" ] }, { "name": "governanceRealmConfig", "isMut": false, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#19" + ] }, { "name": "governanceGoverningTokenHolding", "isMut": true, "isSigner": false, "docs": [ - "#18", + "#20", "Token account owned by governance program holding user's locked tokens" ] }, @@ -5222,7 +6804,7 @@ "isMut": true, "isSigner": false, "docs": [ - "#19", + "#21", "Account owned by governance storing user information" ] }, @@ -5230,37 +6812,49 @@ "name": "stakesClaimCronThread", "isMut": true, "isSigner": false, - "docs": ["#20"] + "docs": [ + "#22" + ] }, { "name": "sablierProgram", "isMut": false, "isSigner": false, - "docs": ["#21"] + "docs": [ + "#23" + ] }, { "name": "governanceProgram", "isMut": false, "isSigner": false, - "docs": ["#22"] + "docs": [ + "#24" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#23"] + "docs": [ + "#25" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#24"] + "docs": [ + "#26" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#25"] + "docs": [ + "#27" + ] } ], "args": [ @@ -5279,97 +6873,145 @@ "name": "caller", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "owner", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "rewardTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "lmTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "stakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "stakingLmRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "userStaking", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "staking", "isMut": true, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#14" + ] }, { "name": "feeRedistributionMint", "isMut": false, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#15" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#16" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#17" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#18" + ] } ], "args": [] @@ -5381,43 +7023,57 @@ "name": "caller", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "cortex", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#3"] - }, + "docs": [ + "#3" + ] + }, { "name": "genesisLock", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] } ], "args": [] @@ -5429,19 +7085,25 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] } ], "args": [ @@ -5460,49 +7122,65 @@ "name": "caller", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "owner", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "userStaking", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "staking", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "governanceTokenMint", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "governanceRealm", @@ -5510,14 +7188,16 @@ "isSigner": false, "docs": [ "#9", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "A realm represent one project within the governance program" ] }, { "name": "governanceRealmConfig", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "governanceGoverningTokenHolding", @@ -5541,37 +7221,49 @@ "name": "stakeResolutionThread", "isMut": true, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#13" + ] }, { "name": "sablierProgram", "isMut": false, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#14" + ] }, { "name": "governanceProgram", "isMut": false, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#15" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#16" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#17" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#18"] + "docs": [ + "#18" + ] } ], "args": [ @@ -5583,72 +7275,6 @@ } ] }, - { - "name": "updateStakingThread", - "accounts": [ - { - "name": "admin", - "isMut": true, - "isSigner": true, - "docs": ["#1"] - }, - { - "name": "cortex", - "isMut": false, - "isSigner": false, - "docs": ["#2"] - }, - { - "name": "pool", - "isMut": true, - "isSigner": false, - "docs": ["#3"] - }, - { - "name": "transferAuthority", - "isMut": false, - "isSigner": false, - "docs": ["#4"] - }, - { - "name": "lmResolveRoundCronThread", - "isMut": true, - "isSigner": false, - "docs": ["#5"] - }, - { - "name": "lpResolveRoundCronThread", - "isMut": true, - "isSigner": false, - "docs": ["#6"] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": ["#7"] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": ["#8"] - }, - { - "name": "adrenaProgram", - "isMut": false, - "isSigner": false, - "docs": ["#9"] - }, - { - "name": "sablierProgram", - "isMut": false, - "isSigner": false, - "docs": ["#10"] - } - ], - "args": [] - }, { "name": "resolveStakingRound", "accounts": [ @@ -5656,79 +7282,105 @@ "name": "caller", "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "stakingStakedTokenVault", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "stakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "stakingLmRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { "name": "staking", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { "name": "feeRedistributionMint", "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] }, { "name": "systemProgram", "isMut": false, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#12" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#13" + ] } ], "args": [] @@ -5740,19 +7392,25 @@ "name": "cortex", "isMut": false, "isSigner": false, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "pool", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "lpTokenMint", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] } ], "args": [], @@ -5765,37 +7423,49 @@ "name": "admin", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "receivingAccount", "isMut": true, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] } ], "args": [ @@ -5815,393 +7485,1401 @@ "name": "owner", "isMut": false, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] }, { "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#2" + ] }, { "name": "fundingAccount", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#3" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#4" + ] }, { - "name": "lmStaking", + "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#5" + ] }, { - "name": "lpStaking", + "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#6" + ] }, { - "name": "cortex", + "name": "position", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#7" + ] }, { - "name": "pool", + "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#8" + ] }, { - "name": "position", + "name": "custodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#9" + ] }, { - "name": "stakingRewardTokenCustody", - "isMut": true, + "name": "custodyOracle", + "isMut": false, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#10" + ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#11" + ] }, { - "name": "stakingRewardTokenCustodyTokenAccount", - "isMut": true, + "name": "systemProgram", + "isMut": false, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#12" + ] }, { - "name": "custody", - "isMut": true, + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#14" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "IncreasePositionLongParams" + } + } + ] + }, + { + "name": "increasePositionShort", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] }, { - "name": "custodyTokenAccount", + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "fundingAccount", "isMut": true, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#3" + ] }, { - "name": "custodyOracleAccount", + "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#4" + ] }, { - "name": "lmStakingRewardTokenVault", + "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#5" + ] }, { - "name": "lpStakingRewardTokenVault", + "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#6" + ] }, { - "name": "lpTokenMint", + "name": "position", "isMut": true, "isSigner": false, - "docs": ["#18"] + "docs": [ + "#7" + ] }, { - "name": "protocolFeeRecipient", + "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#19"] + "docs": [ + "#8" + ] }, { - "name": "systemProgram", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, - "docs": ["#20"] + "docs": [ + "#9" + ] }, { - "name": "tokenProgram", - "isMut": false, + "name": "collateralCustody", + "isMut": true, "isSigner": false, - "docs": ["#21"] + "docs": [ + "#10" + ] + }, + { + "name": "collateralCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "IncreasePositionShortParams" + } + } + ] + }, + { + "name": "setStakingLmEmissionPotentiometers", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "staking", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetStakingLmEmissionPotentiometersParams" + } + } + ] + }, + { + "name": "setAdmin", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetAdminParams" + } + } + ] + }, + { + "name": "setCustodyMaxCumulativeShortPositionSizeUsd", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetCustodyMaxCumulativeShortPositionSizeUsdParams" + } + } + ] + }, + { + "name": "setTakeProfitLong", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#20" + ] + }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#21", + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22", + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetTakeProfitLongParams" + } + } + ] + }, + { + "name": "setStopLossLong", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#20" + ] + }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#21", + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22", + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetStopLossLongParams" + } + } + ] + }, + { + "name": "setTakeProfitShort", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "collateralCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#21" + ] + }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false, + "docs": [ + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#22"] + "docs": [ + "#27" + ] } ], "args": [ { "name": "params", "type": { - "defined": "IncreasePositionLongParams" + "defined": "SetTakeProfitShortParams" } } ] }, { - "name": "increasePositionShort", + "name": "setStopLossShort", "accounts": [ { "name": "owner", - "isMut": false, - "isSigner": true, - "docs": ["#1"] - }, - { - "name": "payer", "isMut": true, "isSigner": true, - "docs": ["#2"] + "docs": [ + "#1" + ] }, { - "name": "fundingAccount", + "name": "receivingAccount", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#2" + ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, - "docs": ["#4"] + "docs": [ + "#3" + ] }, { "name": "lmStaking", "isMut": true, "isSigner": false, - "docs": ["#5"] + "docs": [ + "#4" + ] }, { "name": "lpStaking", "isMut": true, "isSigner": false, - "docs": ["#6"] + "docs": [ + "#5" + ] }, { "name": "cortex", "isMut": true, "isSigner": false, - "docs": ["#7"] + "docs": [ + "#6" + ] }, { "name": "pool", "isMut": true, "isSigner": false, - "docs": ["#8"] + "docs": [ + "#7" + ] }, { "name": "position", "isMut": true, "isSigner": false, - "docs": ["#9"] + "docs": [ + "#8" + ] }, { "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, - "docs": ["#10"] + "docs": [ + "#9" + ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#11"] + "docs": [ + "#10" + ] }, { "name": "stakingRewardTokenCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#12"] + "docs": [ + "#11" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#13"] + "docs": [ + "#12" + ] }, { - "name": "custodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, - "docs": ["#14"] + "docs": [ + "#13" + ] }, { "name": "collateralCustody", "isMut": true, "isSigner": false, - "docs": ["#15"] + "docs": [ + "#14" + ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, - "docs": ["#16"] + "docs": [ + "#15" + ] }, { "name": "collateralCustodyTokenAccount", "isMut": true, "isSigner": false, - "docs": ["#17"] + "docs": [ + "#16" + ] }, { "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#18"] + "docs": [ + "#17" + ] }, { "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, - "docs": ["#19"] + "docs": [ + "#18" + ] }, { "name": "lpTokenMint", "isMut": true, "isSigner": false, - "docs": ["#20"] + "docs": [ + "#19" + ] }, { "name": "protocolFeeRecipient", "isMut": true, "isSigner": false, - "docs": ["#21"] + "docs": [ + "#20" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#21" + ] + }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false, + "docs": [ + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false }, { "name": "systemProgram", "isMut": false, - "isSigner": false, - "docs": ["#22"] + "isSigner": false }, { "name": "tokenProgram", "isMut": false, "isSigner": false, - "docs": ["#23"] + "docs": [ + "#26" + ] }, { "name": "adrenaProgram", "isMut": false, "isSigner": false, - "docs": ["#24"] + "docs": [ + "#27" + ] } ], "args": [ { "name": "params", "type": { - "defined": "IncreasePositionShortParams" + "defined": "SetStopLossShortParams" } } ] }, { - "name": "setStakingLmEmissionPotentiometers", + "name": "cancelTakeProfit", "accounts": [ { - "name": "admin", - "isMut": false, + "name": "owner", + "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] }, { "name": "cortex", "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#3" + ] }, { - "name": "staking", + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "position", "isMut": true, "isSigner": false, - "docs": ["#3"] - } - ], - "args": [ + "docs": [ + "#5" + ] + }, { - "name": "params", - "type": { - "defined": "SetStakingLmEmissionPotentiometersParams" - } - } - ] - }, - { - "name": "setAdmin", - "accounts": [ + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, { - "name": "admin", + "name": "takeProfitThread", + "isMut": true, + "isSigner": false + }, + { + "name": "sablierProgram", "isMut": false, - "isSigner": true, - "docs": ["#1"] + "isSigner": false }, { - "name": "cortex", - "isMut": true, - "isSigner": false, - "docs": ["#2"] + "name": "systemProgram", + "isMut": false, + "isSigner": false } ], - "args": [ - { - "name": "params", - "type": { - "defined": "SetAdminParams" - } - } - ] + "args": [] }, { - "name": "setCustodyMaxCumulativeShortPositionSizeUsd", + "name": "cancelStopLoss", "accounts": [ { - "name": "admin", - "isMut": false, + "name": "owner", + "isMut": true, "isSigner": true, - "docs": ["#1"] + "docs": [ + "#1" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] }, { "name": "cortex", - "isMut": true, + "isMut": false, "isSigner": false, - "docs": ["#2"] + "docs": [ + "#3" + ] }, { "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "position", "isMut": true, "isSigner": false, - "docs": ["#3"] + "docs": [ + "#5" + ] }, { "name": "custody", "isMut": true, "isSigner": false, - "docs": ["#4"] - } - ], - "args": [ + "docs": [ + "#6" + ] + }, { - "name": "params", - "type": { - "defined": "SetCustodyMaxCumulativeShortPositionSizeUsdParams" - } + "name": "stopLossThread", + "isMut": true, + "isSigner": false + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false } - ] + ], + "args": [] } ], "accounts": [ @@ -6237,9 +8915,16 @@ { "name": "padding", "type": { - "array": ["u8", 2] + "array": [ + "u8", + 2 + ] } }, + { + "name": "lmTokenMint", + "type": "publicKey" + }, { "name": "inceptionTime", "type": "i64" @@ -6259,7 +8944,10 @@ { "name": "pools", "type": { - "array": ["publicKey", 4] + "array": [ + "publicKey", + 4 + ] } }, { @@ -6325,6 +9013,10 @@ { "name": "genesisLiquidityAlpAmount", "type": "u64" + }, + { + "name": "uniquePositionAutomationThreadIdCounter", + "type": "u64" } ] } @@ -6361,7 +9053,10 @@ { "name": "padding", "type": { - "array": ["u8", 2] + "array": [ + "u8", + 2 + ] } }, { @@ -6378,9 +9073,11 @@ }, { "name": "oracle", - "type": { - "defined": "OracleParams" - } + "type": "publicKey" + }, + { + "name": "tradeOracle", + "type": "publicKey" }, { "name": "pricing", @@ -6461,7 +9158,10 @@ { "name": "padding", "type": { - "array": ["u8", 6] + "array": [ + "u8", + 6 + ] } }, { @@ -6485,52 +9185,34 @@ "type": "u64" }, { - "name": "publicAmountClaimed", - "type": "u64" - }, - { - "name": "reservedAmountClaimed", - "type": "u64" - }, - { - "name": "reservedGrantOwners", - "type": { - "array": ["publicKey", 17] - } - }, - { - "name": "reservedGrantAmounts", - "type": { - "array": ["u64", 17] - } - }, - { - "name": "finalizeGenesisLockCampaignThreadId", - "type": "u64" - } - ] - } - }, - { - "name": "CustomOracle", - "type": { - "kind": "struct", - "fields": [ + "name": "publicAmountClaimed", + "type": "u64" + }, { - "name": "price", + "name": "reservedAmountClaimed", "type": "u64" }, { - "name": "expo", - "type": "i32" + "name": "reservedGrantOwners", + "type": { + "array": [ + "publicKey", + 30 + ] + } }, { - "name": "conf", - "type": "u64" + "name": "reservedGrantAmounts", + "type": { + "array": [ + "u64", + 30 + ] + } }, { - "name": "publishTime", - "type": "i64" + "name": "finalizeGenesisLockCampaignThreadId", + "type": "u64" } ] } @@ -6581,7 +9263,10 @@ { "name": "custodies", "type": { - "array": ["publicKey", 10] + "array": [ + "publicKey", + 10 + ] } }, { @@ -6625,10 +9310,21 @@ "name": "side", "type": "u8" }, + { + "name": "takeProfitThreadIsSet", + "type": "u8" + }, + { + "name": "stopLossThreadIsSet", + "type": "u8" + }, { "name": "padding", "type": { - "array": ["u8", 6] + "array": [ + "u8", + 4 + ] } }, { @@ -6690,15 +9386,31 @@ "type": "u64" }, { - "name": "entryFeeUsd", + "name": "exitFeeUsd", + "type": "u64" + }, + { + "name": "liquidationFeeUsd", "type": "u64" }, { - "name": "exitFeeUsd", + "name": "takeProfitThreadId", "type": "u64" }, { - "name": "liquidationFeeUsd", + "name": "takeProfitLimitPrice", + "type": "u64" + }, + { + "name": "stopLossThreadId", + "type": "u64" + }, + { + "name": "stopLossLimitPrice", + "type": "u64" + }, + { + "name": "stopLossClosePositionPrice", "type": "u64" } ] @@ -6799,7 +9511,10 @@ { "name": "padding", "type": { - "array": ["u8", 3] + "array": [ + "u8", + 3 + ] } }, { @@ -6837,7 +9552,10 @@ { "name": "padding", "type": { - "array": ["u8", 7] + "array": [ + "u8", + 7 + ] } }, { @@ -6897,7 +9615,10 @@ { "name": "padding", "type": { - "array": ["u8", 6] + "array": [ + "u8", + 6 + ] } }, { @@ -6963,12 +9684,23 @@ "name": "originBucket", "type": "u8" }, + { + "name": "cancelled", + "type": "u8" + }, { "name": "padding", "type": { - "array": ["u8", 6] + "array": [ + "u8", + 1 + ] } }, + { + "name": "voteMultiplier", + "type": "u32" + }, { "name": "amount", "type": "u64" @@ -7039,12 +9771,6 @@ "name": "isStable", "type": "bool" }, - { - "name": "oracle", - "type": { - "defined": "OracleParams" - } - }, { "name": "pricing", "type": { @@ -7139,9 +9865,11 @@ }, { "name": "oracle", - "type": { - "defined": "OracleParams" - } + "type": "publicKey" + }, + { + "name": "tradeOracle", + "type": "publicKey" }, { "name": "pricing", @@ -7259,6 +9987,12 @@ { "name": "finalizeGenesisLockCampaignThreadId", "type": "u64" + }, + { + "name": "reservedSpots", + "type": { + "defined": "ReservedSpots" + } } ] } @@ -7311,30 +10045,6 @@ ] } }, - { - "name": "SetTestOraclePriceParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "price", - "type": "u64" - }, - { - "name": "expo", - "type": "i32" - }, - { - "name": "conf", - "type": "u64" - }, - { - "name": "publishTime", - "type": "i64" - } - ] - } - }, { "name": "InitStakingFourParams", "type": { @@ -7475,6 +10185,66 @@ ] } }, + { + "name": "SetStopLossLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stopLossLimitPrice", + "type": "u64" + }, + { + "name": "closePositionPrice", + "type": { + "option": "u64" + } + } + ] + } + }, + { + "name": "SetStopLossShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stopLossLimitPrice", + "type": "u64" + }, + { + "name": "closePositionPrice", + "type": { + "option": "u64" + } + } + ] + } + }, + { + "name": "SetTakeProfitLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "takeProfitLimitPrice", + "type": "u64" + } + ] + } + }, + { + "name": "SetTakeProfitShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "takeProfitLimitPrice", + "type": "u64" + } + ] + } + }, { "name": "ClosePositionLongParams", "type": { @@ -7482,7 +10252,9 @@ "fields": [ { "name": "price", - "type": "u64" + "type": { + "option": "u64" + } } ] } @@ -7494,7 +10266,9 @@ "fields": [ { "name": "price", - "type": "u64" + "type": { + "option": "u64" + } } ] } @@ -7765,6 +10539,10 @@ { "name": "unlockEndTimestamp", "type": "i64" + }, + { + "name": "voteMultiplier", + "type": "u32" } ] } @@ -7918,10 +10696,6 @@ "name": "liquidationPrice", "type": "u64" }, - { - "name": "entryFee", - "type": "u64" - }, { "name": "exitFee", "type": "u64" @@ -7958,10 +10732,6 @@ "name": "swapFeeOut", "type": "u64" }, - { - "name": "openPositionFee", - "type": "u64" - }, { "name": "exitFee", "type": "u64" @@ -8000,11 +10770,7 @@ { "name": "ProfitAndLoss", "docs": [ - "Specific to the codebase, this struct is used to store the profit and loss of a position.", - "Specific because entry fees are paid right away at position opening and on top of the requested size/leverage (to match it exactly).", - "As such, the profit and loss are calculated with the entry fees already paid (and out of these two numbers).", - "To get the \"real overall\" profit and loss, one must add the entry fees back to the profit and loss.", - "And to get the \"pure\" profit and loss, one must subtract the exit and paid_interests (borrow interests) from the profit and loss." + "Specific to the codebase, this struct is used to store the profit and loss of a position." ], "type": { "kind": "struct", @@ -8017,10 +10783,6 @@ "name": "lossUsd", "type": "u64" }, - { - "name": "entryFeeUsd", - "type": "u64" - }, { "name": "exitFee", "type": "u64" @@ -8065,10 +10827,6 @@ "name": "removeLiquidity", "type": "u16" }, - { - "name": "openPosition", - "type": "u16" - }, { "name": "closePosition", "type": "u16" @@ -8088,7 +10846,10 @@ { "name": "padding", "type": { - "array": ["u8", 2] + "array": [ + "u8", + 4 + ] } }, { @@ -8115,10 +10876,6 @@ "name": "removeLiquidityUsd", "type": "u64" }, - { - "name": "openPositionUsd", - "type": "u64" - }, { "name": "closePositionUsd", "type": "u64" @@ -8308,7 +11065,10 @@ { "name": "padding", "type": { - "array": ["u8", 8] + "array": [ + "u8", + 8 + ] } }, { @@ -8351,7 +11111,10 @@ { "name": "padding", "type": { - "array": ["u8", 8] + "array": [ + "u8", + 8 + ] } } ] @@ -8371,34 +11134,12 @@ "type": "i32" }, { - "name": "conf", + "name": "confidence", "type": "u64" } ] } }, - { - "name": "OracleParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "oracleAccount", - "type": "publicKey" - }, - { - "name": "oracleType", - "type": "u8" - }, - { - "name": "padding", - "type": { - "array": ["u8", 15] - } - } - ] - } - }, { "name": "TokenRatios", "type": { @@ -8419,7 +11160,10 @@ { "name": "padding", "type": { - "array": ["u8", 2] + "array": [ + "u8", + 2 + ] } } ] @@ -8434,6 +11178,10 @@ "name": "startTime", "type": "i64" }, + { + "name": "endTime", + "type": "i64" + }, { "name": "rate", "type": "u64" @@ -8542,6 +11290,10 @@ "name": "claimTime", "type": "i64" }, + { + "name": "endTime", + "type": "i64" + }, { "name": "lockDuration", "type": "u64" @@ -8561,7 +11313,10 @@ { "name": "padding", "type": { - "array": ["u8", 4] + "array": [ + "u8", + 4 + ] } }, { @@ -8579,7 +11334,10 @@ { "name": "padding2", "type": { - "array": ["u8", 7] + "array": [ + "u8", + 7 + ] } }, { @@ -8593,7 +11351,10 @@ { "name": "padding3", "type": { - "array": ["u8", 7] + "array": [ + "u8", + 7 + ] } }, { @@ -8607,7 +11368,10 @@ { "name": "padding4", "type": { - "array": ["u8", 7] + "array": [ + "u8", + 7 + ] } }, { @@ -8625,7 +11389,10 @@ { "name": "value", "type": { - "array": ["u8", 31] + "array": [ + "u8", + 31 + ] } }, { @@ -8672,41 +11439,48 @@ } }, { - "name": "CortexInitializationStep", + "name": "ReservedSpots", "type": { "kind": "enum", "variants": [ { - "name": "NotCreated" - }, - { - "name": "Step1" - }, - { - "name": "Step2" - }, - { - "name": "Step3" + "name": "None" }, { - "name": "Initialized" + "name": "Test", + "fields": [ + { + "name": "firstReservedSpot", + "type": "publicKey" + }, + { + "name": "secondReservedSpot", + "type": "publicKey" + } + ] } ] } }, { - "name": "OracleType", + "name": "CortexInitializationStep", "type": { "kind": "enum", "variants": [ { - "name": "None" + "name": "NotCreated" + }, + { + "name": "Step1" + }, + { + "name": "Step2" }, { - "name": "Custom" + "name": "Step3" }, { - "name": "Pyth" + "name": "Initialized" } ] } @@ -8826,11 +11600,6 @@ "name": "leverage", "type": "u32", "index": false - }, - { - "name": "feeUsd", - "type": "u64", - "index": false } ] }, @@ -8876,11 +11645,6 @@ "name": "leverage", "type": "u32", "index": false - }, - { - "name": "feeUsd", - "type": "u64", - "index": false } ] }, @@ -9390,9 +12154,34 @@ "code": 6061, "name": "InvalidBucketName", "msg": "Invalid bucket name" + }, + { + "code": 6062, + "name": "InvalidThreadId", + "msg": "The provided Sablier thread does not have the expected ID" + }, + { + "code": 6063, + "name": "PythPriceExponentTooLargeIncurringPrecisionLoss", + "msg": "The exponent used for pyth price lead to high precision loss" + }, + { + "code": 6064, + "name": "MissingClosePositionPrice", + "msg": "The close position price is mandatory" + }, + { + "code": 6065, + "name": "InvalidVoteMultiplier", + "msg": "Invalid vote multiplier" + }, + { + "code": 6066, + "name": "PositionTooYoung", + "msg": "A position cannot be close right after open, a slight delay is enforced" } ], "metadata": { - "address": "9abyuDsJ7zYFGHe6BjjW7xDCB59FrnhfeWLFLuqWEUtY" + "address": "3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3" } -} +} \ No newline at end of file diff --git a/idls/adrena.ts b/idls/adrena.ts index 4e2d18420..923bb7d9b 100644 --- a/idls/adrena.ts +++ b/idls/adrena.ts @@ -230,7 +230,7 @@ export type Adrena = { "isSigner": false, "docs": [ "#6", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "A realm represent one project within the governance program" ] }, { @@ -419,7 +419,7 @@ export type Adrena = { "isSigner": false, "docs": [ "#10", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "A realm represent one project within the governance program" ] }, { @@ -494,28 +494,206 @@ export type Adrena = { { "name": "claimVest", "accounts": [ + { + "name": "caller", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, { "name": "owner", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "vestRegistry", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "vest", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#11", + "A realm represent one project within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#13", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", "isMut": true, + "isSigner": false, + "docs": [ + "#14", + "Account owned by governance storing user information" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#19" + ] + } + ], + "args": [], + "returns": "u64" + }, + { + "name": "cancelVest", + "accounts": [ + { + "name": "admin", + "isMut": false, "isSigner": true, "docs": [ "#1" ] }, { - "name": "receivingAccount", + "name": "owner", "isMut": true, "isSigner": false, "docs": [ "#2" ] }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#3" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, { "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ - "#3" + "#5" ] }, { @@ -523,7 +701,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#4" + "#6" ] }, { @@ -531,7 +709,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#5" + "#7" ] }, { @@ -539,7 +717,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#6" + "#8" ] }, { @@ -547,7 +725,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#7" + "#9" ] }, { @@ -555,7 +733,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#8" + "#10" ] }, { @@ -563,7 +741,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#9", + "#11", "A realm represent one project (ADRENA, MANGO etc.) within the governance program" ] }, @@ -572,7 +750,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#10" + "#12" ] }, { @@ -580,7 +758,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#11", + "#13", "Token account owned by governance program holding user's locked tokens" ] }, @@ -589,7 +767,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#12", + "#14", "Account owned by governance storing user information" ] }, @@ -598,7 +776,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#13" + "#15" ] }, { @@ -606,7 +784,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#14" + "#16" ] }, { @@ -614,7 +792,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#15" + "#17" ] }, { @@ -622,7 +800,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#16" + "#18" ] }, { @@ -630,12 +808,11 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#17" + "#19" ] } ], - "args": [], - "returns": "u64" + "args": [] }, { "name": "addPoolPartOne", @@ -980,7 +1157,7 @@ export type Adrena = { ] }, { - "name": "custodyTokenMint", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -988,7 +1165,7 @@ export type Adrena = { ] }, { - "name": "systemProgram", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ @@ -996,7 +1173,7 @@ export type Adrena = { ] }, { - "name": "tokenProgram", + "name": "custodyTokenMint", "isMut": false, "isSigner": false, "docs": [ @@ -1004,12 +1181,28 @@ export type Adrena = { ] }, { - "name": "rent", + "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ "#11" ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] } ], "args": [ @@ -1356,7 +1549,7 @@ export type Adrena = { ] }, { - "name": "setTestOraclePrice", + "name": "testAdminRemoveCollateral", "accounts": [ { "name": "admin", @@ -1367,23 +1560,23 @@ export type Adrena = { ] }, { - "name": "payer", - "isMut": true, - "isSigner": true, + "name": "owner", + "isMut": false, + "isSigner": false, "docs": [ "#2" ] }, { - "name": "cortex", - "isMut": false, + "name": "receivingAccount", + "isMut": true, "isSigner": false, "docs": [ "#3" ] }, { - "name": "pool", + "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ @@ -1391,15 +1584,15 @@ export type Adrena = { ] }, { - "name": "custody", - "isMut": false, + "name": "cortex", + "isMut": true, "isSigner": false, "docs": [ "#5" ] }, { - "name": "oracleAccount", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -1407,78 +1600,8 @@ export type Adrena = { ] }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#7" - ] - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "SetTestOraclePriceParams" - } - } - ], - "returns": "u8" - }, - { - "name": "testAdminRemoveCollateral", - "accounts": [ - { - "name": "admin", - "isMut": false, - "isSigner": true, - "docs": [ - "#1" - ] - }, - { - "name": "owner", - "isMut": false, - "isSigner": false, - "docs": [ - "#2" - ] - }, - { - "name": "receivingAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "#3" - ] - }, - { - "name": "transferAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "#4" - ] - }, - { - "name": "cortex", - "isMut": true, - "isSigner": false, - "docs": [ - "#5" - ] - }, - { - "name": "pool", - "isMut": true, - "isSigner": false, - "docs": [ - "#6" - ] - }, - { - "name": "position", - "isMut": true, + "name": "position", + "isMut": true, "isSigner": false, "docs": [ "#7" @@ -1493,7 +1616,7 @@ export type Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -1509,7 +1632,7 @@ export type Adrena = { ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -1626,7 +1749,7 @@ export type Adrena = { ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -1650,7 +1773,7 @@ export type Adrena = { ] }, { - "name": "receivingCustodyOracleAccount", + "name": "receivingCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -1674,7 +1797,7 @@ export type Adrena = { ] }, { - "name": "dispensingCustodyOracleAccount", + "name": "dispensingCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -1780,7 +1903,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#3" + "#3 Front end will target the owner account, but not limited to" ] }, { @@ -1832,7 +1955,7 @@ export type Adrena = { ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -1856,7 +1979,7 @@ export type Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -1956,20 +2079,12 @@ export type Adrena = { "#2" ] }, - { - "name": "lpTokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "#3" - ] - }, { "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ - "#4" + "#3" ] }, { @@ -1977,7 +2092,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#5" + "#4" ] }, { @@ -1985,7 +2100,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#6" + "#5" ] }, { @@ -1993,7 +2108,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#7" + "#6" ] }, { @@ -2001,7 +2116,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#8" + "#7" ] }, { @@ -2009,7 +2124,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#9" + "#8" ] }, { @@ -2017,15 +2132,15 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#10" + "#9" ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ - "#11" + "#10" ] }, { @@ -2033,7 +2148,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#12" + "#11" ] }, { @@ -2041,7 +2156,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#13" + "#12" ] }, { @@ -2049,7 +2164,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#14" + "#13" ] }, { @@ -2057,7 +2172,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#15" + "#14" ] }, { @@ -2065,8 +2180,8 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#16", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "#15", + "A realm represent one project within the governance program" ] }, { @@ -2074,7 +2189,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#17" + "#16" ] }, { @@ -2082,7 +2197,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#18", + "#17", "Token account owned by governance program holding user's locked tokens" ] }, @@ -2091,7 +2206,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#19", + "#18", "Account owned by governance storing user information" ] }, @@ -2100,7 +2215,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#20" + "#19" ] }, { @@ -2108,7 +2223,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#21" + "#20" ] }, { @@ -2116,7 +2231,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#23" + "#21" ] }, { @@ -2124,7 +2239,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#24" + "#22" ] }, { @@ -2132,7 +2247,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#25" + "#23" ] }, { @@ -2140,7 +2255,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#26" + "#24" ] }, { @@ -2148,13 +2263,16 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#27" + "#25" ] }, { "name": "genesisLock", "isMut": true, - "isSigner": false + "isSigner": false, + "docs": [ + "#26" + ] } ], "args": [ @@ -2182,7 +2300,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#2" + "#2 Front end will target the owner account, but not limited to" ] }, { @@ -2242,7 +2360,7 @@ export type Adrena = { ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -2266,7 +2384,7 @@ export type Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -2375,7 +2493,7 @@ export type Adrena = { ] }, { - "name": "lmStaking", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -2383,7 +2501,7 @@ export type Adrena = { ] }, { - "name": "lpStaking", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -2391,7 +2509,7 @@ export type Adrena = { ] }, { - "name": "cortex", + "name": "position", "isMut": true, "isSigner": false, "docs": [ @@ -2399,7 +2517,7 @@ export type Adrena = { ] }, { - "name": "pool", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ @@ -2407,51 +2525,19 @@ export type Adrena = { ] }, { - "name": "position", - "isMut": true, - "isSigner": false, - "docs": [ - "#9" - ] - }, - { - "name": "stakingRewardTokenCustody", - "isMut": true, - "isSigner": false, - "docs": [ - "#10" - ] - }, - { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ - "#11" - ] - }, - { - "name": "stakingRewardTokenCustodyTokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "#12" - ] - }, - { - "name": "custody", - "isMut": true, - "isSigner": false, - "docs": [ - "#13" + "#9" ] }, { - "name": "custodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ - "#14" + "#10" ] }, { @@ -2459,39 +2545,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#15" - ] - }, - { - "name": "lmStakingRewardTokenVault", - "isMut": true, - "isSigner": false, - "docs": [ - "#16" - ] - }, - { - "name": "lpStakingRewardTokenVault", - "isMut": true, - "isSigner": false, - "docs": [ - "#17" - ] - }, - { - "name": "lpTokenMint", - "isMut": true, - "isSigner": false, - "docs": [ - "#18" - ] - }, - { - "name": "protocolFeeRecipient", - "isMut": true, - "isSigner": false, - "docs": [ - "#19" + "#11" ] }, { @@ -2500,7 +2554,7 @@ export type Adrena = { "isSigner": false, "isOptional": true, "docs": [ - "#20" + "#12" ] }, { @@ -2508,7 +2562,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#21" + "#13" ] }, { @@ -2516,7 +2570,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#22" + "#14" ] }, { @@ -2524,7 +2578,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#23" + "#15" ] } ], @@ -2573,7 +2627,7 @@ export type Adrena = { ] }, { - "name": "lmStaking", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -2581,7 +2635,7 @@ export type Adrena = { ] }, { - "name": "lpStaking", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -2589,7 +2643,7 @@ export type Adrena = { ] }, { - "name": "cortex", + "name": "position", "isMut": true, "isSigner": false, "docs": [ @@ -2597,7 +2651,7 @@ export type Adrena = { ] }, { - "name": "pool", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ @@ -2605,15 +2659,15 @@ export type Adrena = { ] }, { - "name": "position", - "isMut": true, + "name": "custodyTradeOracle", + "isMut": false, "isSigner": false, "docs": [ "#9" ] }, { - "name": "stakingRewardTokenCustody", + "name": "collateralCustody", "isMut": true, "isSigner": false, "docs": [ @@ -2621,7 +2675,7 @@ export type Adrena = { ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -2629,7 +2683,7 @@ export type Adrena = { ] }, { - "name": "stakingRewardTokenCustodyTokenAccount", + "name": "collateralCustodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -2637,15 +2691,16 @@ export type Adrena = { ] }, { - "name": "custody", + "name": "userProfile", "isMut": true, "isSigner": false, + "isOptional": true, "docs": [ "#13" ] }, { - "name": "custodyOracleAccount", + "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ @@ -2653,96 +2708,23 @@ export type Adrena = { ] }, { - "name": "collateralCustody", - "isMut": true, + "name": "tokenProgram", + "isMut": false, "isSigner": false, "docs": [ "#15" ] }, { - "name": "collateralCustodyOracleAccount", + "name": "adrenaProgram", "isMut": false, "isSigner": false, "docs": [ "#16" ] - }, - { - "name": "collateralCustodyTokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "#17" - ] - }, - { - "name": "lmStakingRewardTokenVault", - "isMut": true, - "isSigner": false, - "docs": [ - "#18" - ] - }, - { - "name": "lpStakingRewardTokenVault", - "isMut": true, - "isSigner": false, - "docs": [ - "#19" - ] - }, - { - "name": "lpTokenMint", - "isMut": true, - "isSigner": false, - "docs": [ - "#20" - ] - }, - { - "name": "protocolFeeRecipient", - "isMut": true, - "isSigner": false, - "docs": [ - "#21" - ] - }, - { - "name": "userProfile", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "#22" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#23" - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#24" - ] - }, - { - "name": "adrenaProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#25" - ] - } - ], - "args": [ + } + ], + "args": [ { "name": "params", "type": { @@ -2795,7 +2777,7 @@ export type Adrena = { ] }, { - "name": "receivingCustodyOracleAccount", + "name": "receivingCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -2819,19 +2801,27 @@ export type Adrena = { ] }, { - "name": "principalCustodyOracleAccount", + "name": "principalCustodyOracle", "isMut": false, "isSigner": false, "docs": [ "#9" ] }, + { + "name": "principalCustodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, { "name": "principalCustodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ - "#10" + "#11" ] }, { @@ -2839,7 +2829,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#11" + "#12" ] }, { @@ -2847,7 +2837,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#12" + "#13" ] }, { @@ -2855,7 +2845,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#13" + "#14" ] }, { @@ -2863,7 +2853,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#14" + "#15" ] }, { @@ -2871,7 +2861,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#15" + "#16" ] }, { @@ -2879,7 +2869,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#16" + "#17" ] }, { @@ -2887,15 +2877,15 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#17" + "#18" ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, "docs": [ - "#18" + "#19" ] }, { @@ -2903,7 +2893,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#19" + "#20" ] }, { @@ -2911,7 +2901,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#20" + "#21" ] }, { @@ -2919,7 +2909,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#21" + "#22" ] }, { @@ -2927,7 +2917,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#22" + "#23" ] }, { @@ -2935,7 +2925,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#23" + "#24" ] }, { @@ -2944,7 +2934,7 @@ export type Adrena = { "isSigner": false, "isOptional": true, "docs": [ - "#24" + "#25" ] }, { @@ -2952,7 +2942,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#25" + "#26" ] }, { @@ -2960,7 +2950,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#26" + "#27" ] }, { @@ -2968,7 +2958,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#27" + "#28" ] } ], @@ -3025,7 +3015,7 @@ export type Adrena = { ] }, { - "name": "receivingCustodyOracleAccount", + "name": "receivingCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -3049,7 +3039,7 @@ export type Adrena = { ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -3073,7 +3063,7 @@ export type Adrena = { ] }, { - "name": "principalCustodyOracleAccount", + "name": "principalCustodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ @@ -3145,7 +3135,7 @@ export type Adrena = { ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -3295,7 +3285,7 @@ export type Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -3396,7 +3386,7 @@ export type Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -3412,7 +3402,7 @@ export type Adrena = { ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -3513,7 +3503,7 @@ export type Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -3614,7 +3604,7 @@ export type Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -3630,7 +3620,7 @@ export type Adrena = { ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -3675,7 +3665,7 @@ export type Adrena = { "name": "closePositionLong", "accounts": [ { - "name": "owner", + "name": "caller", "isMut": true, "isSigner": true, "docs": [ @@ -3683,19 +3673,27 @@ export type Adrena = { ] }, { - "name": "receivingAccount", + "name": "owner", "isMut": true, "isSigner": false, "docs": [ "#2" ] }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, { "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ - "#3" + "#4" ] }, { @@ -3703,7 +3701,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#4" + "#5" ] }, { @@ -3711,7 +3709,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#5" + "#6" ] }, { @@ -3719,7 +3717,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#6" + "#7" ] }, { @@ -3727,7 +3725,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#7" + "#8" ] }, { @@ -3735,7 +3733,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#8" + "#9" ] }, { @@ -3743,15 +3741,15 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#9" + "#10" ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, "docs": [ - "#10" + "#11" ] }, { @@ -3759,7 +3757,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#11" + "#12" ] }, { @@ -3767,15 +3765,23 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#12" + "#13" ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ - "#13" + "#14" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" ] }, { @@ -3783,7 +3789,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#14" + "#16" ] }, { @@ -3791,7 +3797,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#15" + "#17" ] }, { @@ -3799,7 +3805,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#16" + "#18" ] }, { @@ -3807,7 +3813,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#17" + "#19" ] }, { @@ -3815,7 +3821,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#18" + "#20" ] }, { @@ -3824,7 +3830,23 @@ export type Adrena = { "isSigner": false, "isOptional": true, "docs": [ - "#19" + "#21" + ] + }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#23" ] }, { @@ -3832,7 +3854,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#20" + "#24" ] }, { @@ -3840,7 +3862,15 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#21" + "#25" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" ] } ], @@ -3857,7 +3887,7 @@ export type Adrena = { "name": "closePositionShort", "accounts": [ { - "name": "owner", + "name": "caller", "isMut": true, "isSigner": true, "docs": [ @@ -3865,19 +3895,27 @@ export type Adrena = { ] }, { - "name": "receivingAccount", + "name": "owner", "isMut": true, "isSigner": false, "docs": [ "#2" ] }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, { "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ - "#3" + "#4" ] }, { @@ -3885,7 +3923,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#4" + "#5" ] }, { @@ -3893,7 +3931,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#5" + "#6" ] }, { @@ -3901,7 +3939,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#6" + "#7" ] }, { @@ -3909,7 +3947,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#7" + "#8" ] }, { @@ -3917,7 +3955,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#8" + "#9" ] }, { @@ -3925,15 +3963,15 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#9" + "#10" ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, "docs": [ - "#10" + "#11" ] }, { @@ -3941,7 +3979,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#11" + "#12" ] }, { @@ -3949,15 +3987,15 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#12" + "#13" ] }, { - "name": "custodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ - "#13" + "#14" ] }, { @@ -3965,15 +4003,15 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#14" + "#15" ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ - "#15" + "#16" ] }, { @@ -3981,7 +4019,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#16" + "#17" ] }, { @@ -3989,7 +4027,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#17" + "#18" ] }, { @@ -3997,7 +4035,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#18" + "#19" ] }, { @@ -4005,7 +4043,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#19" + "#20" ] }, { @@ -4013,7 +4051,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#20" + "#21" ] }, { @@ -4022,15 +4060,25 @@ export type Adrena = { "isSigner": false, "isOptional": true, "docs": [ - "#21" + "#22" ] }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false + }, { "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ - "#22" + "#25" ] }, { @@ -4038,7 +4086,15 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#23" + "#26" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" ] } ], @@ -4127,7 +4183,7 @@ export type Adrena = { ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -4151,7 +4207,7 @@ export type Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -4159,15 +4215,15 @@ export type Adrena = { ] }, { - "name": "custodyTokenAccount", - "isMut": true, + "name": "custodyTradeOracle", + "isMut": false, "isSigner": false, "docs": [ "#14" ] }, { - "name": "lmStakingRewardTokenVault", + "name": "custodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -4175,7 +4231,7 @@ export type Adrena = { ] }, { - "name": "lpStakingRewardTokenVault", + "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -4183,7 +4239,7 @@ export type Adrena = { ] }, { - "name": "lpTokenMint", + "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -4191,20 +4247,44 @@ export type Adrena = { ] }, { - "name": "protocolFeeRecipient", + "name": "lpTokenMint", "isMut": true, "isSigner": false, "docs": [ "#18" ] }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, { "name": "userProfile", "isMut": true, "isSigner": false, "isOptional": true, "docs": [ - "#19" + "#20" + ] + }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" ] }, { @@ -4212,7 +4292,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#20" + "#23" ] }, { @@ -4220,7 +4300,15 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#21" + "#24" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" ] } ], @@ -4309,7 +4397,7 @@ export type Adrena = { ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -4333,7 +4421,7 @@ export type Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ @@ -4349,7 +4437,7 @@ export type Adrena = { ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -4405,12 +4493,28 @@ export type Adrena = { "#21" ] }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#23" + ] + }, { "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ - "#22" + "#24" ] }, { @@ -4418,7 +4522,15 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#23" + "#25" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" ] } ], @@ -4490,7 +4602,7 @@ export type Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -4546,7 +4658,7 @@ export type Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -4602,7 +4714,7 @@ export type Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ @@ -4618,7 +4730,7 @@ export type Adrena = { ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -4666,7 +4778,7 @@ export type Adrena = { ] }, { - "name": "receivingCustodyOracleAccount", + "name": "receivingCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -4682,7 +4794,7 @@ export type Adrena = { ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -4698,7 +4810,7 @@ export type Adrena = { ] }, { - "name": "principalCustodyOracleAccount", + "name": "principalCustodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ @@ -4762,7 +4874,7 @@ export type Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ @@ -4778,7 +4890,7 @@ export type Adrena = { ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -4827,7 +4939,7 @@ export type Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ @@ -4843,7 +4955,7 @@ export type Adrena = { ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -4892,7 +5004,7 @@ export type Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "collateralCustody", "isMut": false, "isSigner": false, "docs": [ @@ -4900,20 +5012,12 @@ export type Adrena = { ] }, { - "name": "collateralCustody", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ "#6" ] - }, - { - "name": "collateralCustodyOracleAccount", - "isMut": false, - "isSigner": false, - "docs": [ - "#7" - ] } ], "args": [ @@ -4962,7 +5066,7 @@ export type Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -4978,7 +5082,7 @@ export type Adrena = { ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -5017,7 +5121,7 @@ export type Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -5056,7 +5160,7 @@ export type Adrena = { ] }, { - "name": "receivingCustodyOracleAccount", + "name": "receivingCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -5072,7 +5176,7 @@ export type Adrena = { ] }, { - "name": "dispensingCustodyOracleAccount", + "name": "dispensingCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -5206,12 +5310,28 @@ export type Adrena = { "#11" ] }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, { "name": "lmTokenMint", "isMut": false, "isSigner": false, "docs": [ - "#12" + "#14" ] }, { @@ -5219,7 +5339,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#13" + "#15" ] }, { @@ -5227,7 +5347,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#14" + "#16" ] }, { @@ -5235,7 +5355,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#15" + "#17" ] }, { @@ -5243,7 +5363,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#16" + "#18" ] }, { @@ -5251,7 +5371,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#17" + "#19" ] } ], @@ -5306,14 +5426,6 @@ export type Adrena = { "docs": [ "#5" ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#6" - ] } ], "args": [ @@ -5359,14 +5471,6 @@ export type Adrena = { "docs": [ "#4" ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#5" - ] } ], "args": [ @@ -5428,14 +5532,6 @@ export type Adrena = { "docs": [ "#6" ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#7" - ] } ], "args": [] @@ -5981,12 +6077,28 @@ export type Adrena = { "#11" ] }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, { "name": "lmTokenMint", "isMut": true, "isSigner": false, "docs": [ - "#12" + "#15" ] }, { @@ -5994,7 +6106,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#13" + "#16" ] }, { @@ -6002,7 +6114,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#14" + "#17" ] }, { @@ -6010,8 +6122,8 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#15", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "#18", + "A realm represent one project within the governance program" ] }, { @@ -6019,7 +6131,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#16" + "#19" ] }, { @@ -6027,7 +6139,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#17", + "#20", "Token account owned by governance program holding user's locked tokens" ] }, @@ -6036,7 +6148,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#18", + "#21", "Account owned by governance storing user information" ] }, @@ -6045,7 +6157,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#19" + "#22" ] }, { @@ -6053,7 +6165,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#20" + "#23" ] }, { @@ -6061,7 +6173,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#21" + "#24" ] }, { @@ -6069,7 +6181,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#22" + "#25" ] }, { @@ -6077,7 +6189,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#23" + "#26" ] }, { @@ -6085,7 +6197,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#24" + "#27" ] } ], @@ -6203,7 +6315,7 @@ export type Adrena = { "isSigner": false, "docs": [ "#13", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "A realm represent one project within the governance program" ] }, { @@ -6390,7 +6502,7 @@ export type Adrena = { ] }, { - "name": "lmTokenMint", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -6398,19 +6510,35 @@ export type Adrena = { ] }, { - "name": "governanceTokenMint", + "name": "genesisLock", "isMut": true, "isSigner": false, "docs": [ "#13" ] }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, { "name": "feeRedistributionMint", "isMut": false, "isSigner": false, "docs": [ - "#14" + "#16" ] }, { @@ -6418,8 +6546,8 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#15", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "#17", + "A realm represent one project within the governance program" ] }, { @@ -6427,7 +6555,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#16" + "#18" ] }, { @@ -6435,7 +6563,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#17", + "#19", "Token account owned by governance program holding user's locked tokens" ] }, @@ -6444,7 +6572,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#18", + "#20", "Account owned by governance storing user information" ] }, @@ -6453,7 +6581,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#19" + "#21" ] }, { @@ -6461,7 +6589,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#20" + "#22" ] }, { @@ -6469,7 +6597,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#21" + "#23" ] }, { @@ -6477,7 +6605,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#22" + "#24" ] }, { @@ -6598,7 +6726,7 @@ export type Adrena = { ] }, { - "name": "lmTokenMint", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -6606,7 +6734,7 @@ export type Adrena = { ] }, { - "name": "stakedTokenMint", + "name": "genesisLock", "isMut": true, "isSigner": false, "docs": [ @@ -6614,19 +6742,35 @@ export type Adrena = { ] }, { - "name": "governanceTokenMint", + "name": "lmTokenMint", "isMut": true, "isSigner": false, "docs": [ "#14" ] }, + { + "name": "stakedTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, { "name": "feeRedistributionMint", "isMut": false, "isSigner": false, "docs": [ - "#15" + "#17" ] }, { @@ -6634,8 +6778,8 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#16", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "#18", + "A realm represent one project within the governance program" ] }, { @@ -6643,7 +6787,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#17" + "#19" ] }, { @@ -6651,7 +6795,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#18", + "#20", "Token account owned by governance program holding user's locked tokens" ] }, @@ -6660,7 +6804,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#19", + "#21", "Account owned by governance storing user information" ] }, @@ -6669,7 +6813,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#20" + "#22" ] }, { @@ -6677,7 +6821,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#21" + "#23" ] }, { @@ -6685,7 +6829,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#22" + "#24" ] }, { @@ -6693,7 +6837,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#23" + "#25" ] }, { @@ -6701,7 +6845,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#24" + "#26" ] }, { @@ -6709,7 +6853,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#25" + "#27" ] } ], @@ -6814,19 +6958,35 @@ export type Adrena = { ] }, { - "name": "lmTokenMint", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ "#12" ] }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, { "name": "feeRedistributionMint", "isMut": false, "isSigner": false, "docs": [ - "#13" + "#15" ] }, { @@ -6834,7 +6994,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#14" + "#16" ] }, { @@ -6842,7 +7002,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#15" + "#17" ] }, { @@ -6850,7 +7010,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#16" + "#18" ] } ], @@ -7028,7 +7188,7 @@ export type Adrena = { "isSigner": false, "docs": [ "#9", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "A realm represent one project within the governance program" ] }, { @@ -7115,92 +7275,6 @@ export type Adrena = { } ] }, - { - "name": "updateStakingThread", - "accounts": [ - { - "name": "admin", - "isMut": true, - "isSigner": true, - "docs": [ - "#1" - ] - }, - { - "name": "cortex", - "isMut": false, - "isSigner": false, - "docs": [ - "#2" - ] - }, - { - "name": "pool", - "isMut": true, - "isSigner": false, - "docs": [ - "#3" - ] - }, - { - "name": "transferAuthority", - "isMut": false, - "isSigner": false, - "docs": [ - "#4" - ] - }, - { - "name": "lmResolveRoundCronThread", - "isMut": true, - "isSigner": false, - "docs": [ - "#5" - ] - }, - { - "name": "lpResolveRoundCronThread", - "isMut": true, - "isSigner": false, - "docs": [ - "#6" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#7" - ] - }, - { - "name": "tokenProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#8" - ] - }, - { - "name": "adrenaProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#9" - ] - }, - { - "name": "sablierProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#10" - ] - } - ], - "args": [] - }, { "name": "resolveStakingRound", "accounts": [ @@ -7440,7 +7514,7 @@ export type Adrena = { ] }, { - "name": "lmStaking", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -7448,7 +7522,7 @@ export type Adrena = { ] }, { - "name": "lpStaking", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -7456,7 +7530,7 @@ export type Adrena = { ] }, { - "name": "cortex", + "name": "position", "isMut": true, "isSigner": false, "docs": [ @@ -7464,7 +7538,7 @@ export type Adrena = { ] }, { - "name": "pool", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ @@ -7472,7 +7546,7 @@ export type Adrena = { ] }, { - "name": "position", + "name": "custodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -7480,91 +7554,27 @@ export type Adrena = { ] }, { - "name": "stakingRewardTokenCustody", - "isMut": true, + "name": "custodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#10" ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ "#11" ] }, - { - "name": "stakingRewardTokenCustodyTokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "#12" - ] - }, - { - "name": "custody", - "isMut": true, - "isSigner": false, - "docs": [ - "#13" - ] - }, - { - "name": "custodyTokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "#14" - ] - }, - { - "name": "custodyOracleAccount", - "isMut": false, - "isSigner": false, - "docs": [ - "#15" - ] - }, - { - "name": "lmStakingRewardTokenVault", - "isMut": true, - "isSigner": false, - "docs": [ - "#16" - ] - }, - { - "name": "lpStakingRewardTokenVault", - "isMut": true, - "isSigner": false, - "docs": [ - "#17" - ] - }, - { - "name": "lpTokenMint", - "isMut": true, - "isSigner": false, - "docs": [ - "#18" - ] - }, - { - "name": "protocolFeeRecipient", - "isMut": true, - "isSigner": false, - "docs": [ - "#19" - ] - }, { "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ - "#20" + "#12" ] }, { @@ -7572,7 +7582,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#21" + "#13" ] }, { @@ -7580,7 +7590,7 @@ export type Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#22" + "#14" ] } ], @@ -7629,7 +7639,7 @@ export type Adrena = { ] }, { - "name": "lmStaking", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -7637,7 +7647,7 @@ export type Adrena = { ] }, { - "name": "lpStaking", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -7645,7 +7655,7 @@ export type Adrena = { ] }, { - "name": "cortex", + "name": "position", "isMut": true, "isSigner": false, "docs": [ @@ -7653,7 +7663,7 @@ export type Adrena = { ] }, { - "name": "pool", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ @@ -7661,15 +7671,15 @@ export type Adrena = { ] }, { - "name": "position", - "isMut": true, + "name": "custodyTradeOracle", + "isMut": false, "isSigner": false, "docs": [ "#9" ] }, { - "name": "stakingRewardTokenCustody", + "name": "collateralCustody", "isMut": true, "isSigner": false, "docs": [ @@ -7677,115 +7687,109 @@ export type Adrena = { ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ - "#11" + "#16" ] }, { - "name": "stakingRewardTokenCustodyTokenAccount", + "name": "collateralCustodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ - "#12" + "#11" ] }, { - "name": "custody", - "isMut": true, + "name": "systemProgram", + "isMut": false, "isSigner": false, "docs": [ - "#13" + "#12" ] }, { - "name": "custodyOracleAccount", + "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ - "#14" + "#13" ] }, { - "name": "collateralCustody", - "isMut": true, + "name": "adrenaProgram", + "isMut": false, "isSigner": false, "docs": [ - "#15" + "#14" ] - }, + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "IncreasePositionShortParams" + } + } + ] + }, + { + "name": "setStakingLmEmissionPotentiometers", + "accounts": [ { - "name": "collateralCustodyOracleAccount", + "name": "admin", "isMut": false, - "isSigner": false, + "isSigner": true, "docs": [ - "#16" + "#1" ] }, { - "name": "collateralCustodyTokenAccount", - "isMut": true, + "name": "cortex", + "isMut": false, "isSigner": false, "docs": [ - "#17" + "#2" ] }, { - "name": "lmStakingRewardTokenVault", + "name": "staking", "isMut": true, "isSigner": false, "docs": [ - "#18" + "#3" ] - }, - { - "name": "lpStakingRewardTokenVault", - "isMut": true, - "isSigner": false, - "docs": [ - "#19" - ] - }, - { - "name": "lpTokenMint", - "isMut": true, - "isSigner": false, - "docs": [ - "#20" - ] - }, - { - "name": "protocolFeeRecipient", - "isMut": true, - "isSigner": false, - "docs": [ - "#21" - ] - }, + } + ], + "args": [ { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#22" - ] - }, + "name": "params", + "type": { + "defined": "SetStakingLmEmissionPotentiometersParams" + } + } + ] + }, + { + "name": "setAdmin", + "accounts": [ { - "name": "tokenProgram", + "name": "admin", "isMut": false, - "isSigner": false, + "isSigner": true, "docs": [ - "#23" + "#1" ] }, { - "name": "adrenaProgram", - "isMut": false, + "name": "cortex", + "isMut": true, "isSigner": false, "docs": [ - "#24" + "#2" ] } ], @@ -7793,13 +7797,13 @@ export type Adrena = { { "name": "params", "type": { - "defined": "IncreasePositionShortParams" + "defined": "SetAdminParams" } } ] }, { - "name": "setStakingLmEmissionPotentiometers", + "name": "setCustodyMaxCumulativeShortPositionSizeUsd", "accounts": [ { "name": "admin", @@ -7811,68 +7815,79 @@ export type Adrena = { }, { "name": "cortex", - "isMut": false, + "isMut": true, "isSigner": false, "docs": [ "#2" ] }, { - "name": "staking", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ "#3" ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] } ], "args": [ { "name": "params", "type": { - "defined": "SetStakingLmEmissionPotentiometersParams" + "defined": "SetCustodyMaxCumulativeShortPositionSizeUsdParams" } } ] }, { - "name": "setAdmin", + "name": "setTakeProfitLong", "accounts": [ { - "name": "admin", - "isMut": false, + "name": "owner", + "isMut": true, "isSigner": true, "docs": [ "#1" ] }, { - "name": "cortex", + "name": "receivingAccount", "isMut": true, "isSigner": false, "docs": [ "#2" ] - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "SetAdminParams" - } - } - ] - }, - { - "name": "setCustodyMaxCumulativeShortPositionSizeUsd", - "accounts": [ + }, { - "name": "admin", + "name": "transferAuthority", "isMut": false, - "isSigner": true, + "isSigner": false, "docs": [ - "#1" + "#3" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" ] }, { @@ -7880,7 +7895,7 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#2" + "#6" ] }, { @@ -7888,7 +7903,39 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#3" + "#7" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" ] }, { @@ -7896,670 +7943,1207 @@ export type Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#4" + "#12" ] - } - ], - "args": [ + }, { - "name": "params", - "type": { - "defined": "SetCustodyMaxCumulativeShortPositionSizeUsdParams" - } - } - ] - } - ], - "accounts": [ - { - "name": "cortex", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "transferAuthorityBump", - "type": "u8" - }, - { - "name": "lmTokenBump", - "type": "u8" - }, - { - "name": "governanceTokenBump", - "type": "u8" - }, - { - "name": "initialized", - "type": "u8" - }, - { - "name": "feeConversionDecimals", - "type": "u8" - }, - { - "name": "padding", - "type": { - "array": [ - "u8", - 2 - ] - } - }, - { - "name": "inceptionTime", - "type": "i64" - }, - { - "name": "admin", - "type": "publicKey" - }, - { - "name": "feeRedistributionMint", - "type": "publicKey" - }, - { - "name": "protocolFeeRecipient", - "type": "publicKey" - }, - { - "name": "pools", - "type": { - "array": [ - "publicKey", - 4 - ] - } - }, - { - "name": "userProfilesCount", - "type": "u64" - }, - { - "name": "governanceProgram", - "type": "publicKey" - }, - { - "name": "governanceRealm", - "type": "publicKey" - }, - { - "name": "coreContributorBucketAllocation", - "type": "u64" - }, - { - "name": "daoTreasuryBucketAllocation", - "type": "u64" - }, - { - "name": "polBucketAllocation", - "type": "u64" - }, - { - "name": "ecosystemBucketAllocation", - "type": "u64" - }, - { - "name": "coreContributorBucketVestedAmount", - "type": "u64" - }, - { - "name": "coreContributorBucketMintedAmount", - "type": "u64" - }, - { - "name": "daoTreasuryBucketVestedAmount", - "type": "u64" - }, - { - "name": "daoTreasuryBucketMintedAmount", - "type": "u64" - }, - { - "name": "polBucketVestedAmount", - "type": "u64" - }, - { - "name": "polBucketMintedAmount", - "type": "u64" - }, - { - "name": "ecosystemBucketVestedAmount", - "type": "u64" - }, - { - "name": "ecosystemBucketMintedAmount", - "type": "u64" - }, - { - "name": "genesisLiquidityAlpAmount", - "type": "u64" + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#20" + ] + }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#21", + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22", + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetTakeProfitLongParams" } - ] - } + } + ] }, { - "name": "custody", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "tokenAccountBump", - "type": "u8" - }, - { - "name": "allowTrade", - "type": "u8" - }, - { - "name": "allowSwap", - "type": "u8" - }, - { - "name": "decimals", - "type": "u8" - }, - { - "name": "isStable", - "type": "u8" - }, - { - "name": "padding", - "type": { - "array": [ - "u8", - 2 - ] - } - }, - { - "name": "pool", - "type": "publicKey" - }, - { - "name": "mint", - "type": "publicKey" - }, - { - "name": "tokenAccount", - "type": "publicKey" - }, - { - "name": "oracle", - "type": { - "defined": "OracleParams" - } - }, - { - "name": "pricing", - "type": { - "defined": "PricingParams" - } - }, - { - "name": "fees", - "type": { - "defined": "Fees" - } - }, - { - "name": "borrowRate", - "type": { - "defined": "BorrowRateParams" - } - }, - { - "name": "collectedFees", - "type": { - "defined": "FeesStats" - } - }, - { - "name": "volumeStats", - "type": { - "defined": "VolumeStats" - } - }, - { - "name": "tradeStats", - "type": { - "defined": "TradeStats" - } - }, - { - "name": "assets", - "type": { - "defined": "Assets" - } - }, - { - "name": "longPositions", - "type": { - "defined": "PositionsAccounting" - } - }, - { - "name": "shortPositions", - "type": { - "defined": "PositionsAccounting" - } - }, - { - "name": "borrowRateState", - "type": { - "defined": "BorrowRateState" - } + "name": "setStopLossLong", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#20" + ] + }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#21", + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22", + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetStopLossLongParams" } - ] - } + } + ] }, { - "name": "genesisLock", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "hasTransitionedToFullyPublic", - "type": "u8" - }, - { - "name": "padding", - "type": { - "array": [ - "u8", - 6 - ] - } - }, - { - "name": "campaignDuration", - "type": "i64" - }, - { - "name": "reservedGrantDuration", - "type": "i64" - }, - { - "name": "campaignStartDate", - "type": "i64" - }, - { - "name": "publicAmount", - "type": "u64" - }, - { - "name": "reservedAmount", - "type": "u64" - }, - { - "name": "publicAmountClaimed", - "type": "u64" - }, - { - "name": "reservedAmountClaimed", - "type": "u64" - }, - { - "name": "reservedGrantOwners", - "type": { - "array": [ - "publicKey", - 17 - ] - } - }, - { - "name": "reservedGrantAmounts", - "type": { - "array": [ - "u64", - 17 - ] - } - }, - { - "name": "finalizeGenesisLockCampaignThreadId", - "type": "u64" + "name": "setTakeProfitShort", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "collateralCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#21" + ] + }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false, + "docs": [ + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetTakeProfitShortParams" } - ] - } + } + ] }, { - "name": "customOracle", - "type": { - "kind": "struct", - "fields": [ - { - "name": "price", - "type": "u64" - }, - { - "name": "expo", - "type": "i32" - }, - { - "name": "conf", - "type": "u64" - }, - { - "name": "publishTime", - "type": "i64" + "name": "setStopLossShort", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingRewardTokenCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "stakingRewardTokenCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "collateralCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#21" + ] + }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false, + "docs": [ + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetStopLossShortParams" } - ] - } + } + ] }, { - "name": "pool", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" - }, - { - "name": "lpTokenBump", - "type": "u8" - }, - { - "name": "nbStableCustody", - "type": "u8" - }, - { - "name": "initialized", - "type": "u8" - }, - { - "name": "allowTrade", - "type": "u8" - }, - { - "name": "allowSwap", - "type": "u8" - }, - { - "name": "liquidityState", - "type": "u8" - }, - { - "name": "registeredCustodyCount", + "name": "cancelTakeProfit", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "cancelStopLoss", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + } + ], + "accounts": [ + { + "name": "cortex", + "type": { + "kind": "struct", + "fields": [ + { + "name": "bump", "type": "u8" }, { - "name": "name", - "type": { - "defined": "LimitedString" - } + "name": "transferAuthorityBump", + "type": "u8" }, { - "name": "custodies", - "type": { - "array": [ - "publicKey", - 10 - ] - } + "name": "lmTokenBump", + "type": "u8" }, { - "name": "ratios", + "name": "governanceTokenBump", + "type": "u8" + }, + { + "name": "initialized", + "type": "u8" + }, + { + "name": "feeConversionDecimals", + "type": "u8" + }, + { + "name": "padding", "type": { "array": [ - { - "defined": "TokenRatios" - }, - 10 + "u8", + 2 ] } }, { - "name": "aumUsd", - "type": { - "defined": "U128Split" - } + "name": "lmTokenMint", + "type": "publicKey" }, { "name": "inceptionTime", "type": "i64" }, { - "name": "aumSoftCapUsd", - "type": "u64" - } - ] - } - }, - { - "name": "position", - "type": { - "kind": "struct", - "fields": [ + "name": "admin", + "type": "publicKey" + }, { - "name": "bump", - "type": "u8" + "name": "feeRedistributionMint", + "type": "publicKey" }, { - "name": "side", - "type": "u8" + "name": "protocolFeeRecipient", + "type": "publicKey" }, { - "name": "padding", + "name": "pools", "type": { "array": [ - "u8", - 6 + "publicKey", + 4 ] } }, { - "name": "owner", - "type": "publicKey" + "name": "userProfilesCount", + "type": "u64" }, { - "name": "pool", + "name": "governanceProgram", "type": "publicKey" }, { - "name": "custody", + "name": "governanceRealm", "type": "publicKey" }, { - "name": "collateralCustody", - "type": "publicKey" + "name": "coreContributorBucketAllocation", + "type": "u64" }, { - "name": "openTime", - "type": "i64" + "name": "daoTreasuryBucketAllocation", + "type": "u64" }, { - "name": "updateTime", - "type": "i64" + "name": "polBucketAllocation", + "type": "u64" }, { - "name": "price", + "name": "ecosystemBucketAllocation", "type": "u64" }, { - "name": "sizeUsd", + "name": "coreContributorBucketVestedAmount", "type": "u64" }, { - "name": "borrowSizeUsd", + "name": "coreContributorBucketMintedAmount", "type": "u64" }, { - "name": "collateralUsd", + "name": "daoTreasuryBucketVestedAmount", "type": "u64" }, { - "name": "unrealizedLossUsd", + "name": "daoTreasuryBucketMintedAmount", "type": "u64" }, { - "name": "cumulativeInterestSnapshot", - "type": { - "defined": "U128Split" - } + "name": "polBucketVestedAmount", + "type": "u64" }, { - "name": "lockedAmount", + "name": "polBucketMintedAmount", "type": "u64" }, { - "name": "collateralAmount", + "name": "ecosystemBucketVestedAmount", "type": "u64" }, { - "name": "entryFeeUsd", + "name": "ecosystemBucketMintedAmount", "type": "u64" }, { - "name": "exitFeeUsd", + "name": "genesisLiquidityAlpAmount", "type": "u64" }, { - "name": "liquidationFeeUsd", + "name": "uniquePositionAutomationThreadIdCounter", "type": "u64" } ] } }, { - "name": "staking", + "name": "custody", "type": { "kind": "struct", "fields": [ - { - "name": "stakingType", - "type": "u8" - }, { "name": "bump", "type": "u8" }, { - "name": "stakedTokenVaultBump", - "type": "u8" - }, - { - "name": "rewardTokenVaultBump", + "name": "tokenAccountBump", "type": "u8" }, { - "name": "lmRewardTokenVaultBump", + "name": "allowTrade", "type": "u8" }, { - "name": "rewardTokenDecimals", + "name": "allowSwap", "type": "u8" }, { - "name": "stakedTokenDecimals", + "name": "decimals", "type": "u8" }, { - "name": "initialized", + "name": "isStable", "type": "u8" }, { - "name": "nbLockedTokens", - "type": "u64" - }, - { - "name": "nbLiquidTokens", - "type": "u64" + "name": "padding", + "type": { + "array": [ + "u8", + 2 + ] + } }, { - "name": "stakedTokenMint", + "name": "pool", "type": "publicKey" }, { - "name": "resolvedRewardTokenAmount", - "type": "u64" + "name": "mint", + "type": "publicKey" }, { - "name": "resolvedStakedTokenAmount", - "type": "u64" + "name": "tokenAccount", + "type": "publicKey" }, { - "name": "resolvedLmRewardTokenAmount", - "type": "u64" + "name": "oracle", + "type": "publicKey" }, { - "name": "resolvedLmStakedTokenAmount", - "type": "u64" + "name": "tradeOracle", + "type": "publicKey" }, { - "name": "currentStakingRound", + "name": "pricing", "type": { - "defined": "StakingRound" + "defined": "PricingParams" } }, { - "name": "nextStakingRound", + "name": "fees", "type": { - "defined": "StakingRound" + "defined": "Fees" } }, { - "name": "resolvedStakingRounds", + "name": "borrowRate", "type": { - "array": [ - { - "defined": "StakingRound" - }, - 32 - ] + "defined": "BorrowRateParams" } }, { - "name": "registeredResolvedStakingRoundCount", - "type": "u8" + "name": "collectedFees", + "type": { + "defined": "FeesStats" + } }, { - "name": "padding", + "name": "volumeStats", "type": { - "array": [ - "u8", - 3 - ] + "defined": "VolumeStats" } }, { - "name": "lmEmissionPotentiometerBps", - "type": "u16" + "name": "tradeStats", + "type": { + "defined": "TradeStats" + } }, { - "name": "monthsElapsedSinceInception", - "type": "u16" + "name": "assets", + "type": { + "defined": "Assets" + } }, { - "name": "resolveRoundCronThreadId", - "type": "u64" + "name": "longPositions", + "type": { + "defined": "PositionsAccounting" + } }, { - "name": "emissionAmountPerRoundLastUpdate", - "type": "i64" + "name": "shortPositions", + "type": { + "defined": "PositionsAccounting" + } }, { - "name": "currentMonthEmissionAmountPerRound", - "type": "u64" + "name": "borrowRateState", + "type": { + "defined": "BorrowRateState" + } } ] } }, { - "name": "userProfile", + "name": "genesisLock", "type": { "kind": "struct", "fields": [ @@ -8567,58 +9151,74 @@ export type Adrena = { "name": "bump", "type": "u8" }, + { + "name": "hasTransitionedToFullyPublic", + "type": "u8" + }, { "name": "padding", "type": { "array": [ "u8", - 7 + 6 ] } }, { - "name": "nickname", - "type": { - "defined": "LimitedString" - } + "name": "campaignDuration", + "type": "i64" }, { - "name": "createdAt", + "name": "reservedGrantDuration", "type": "i64" }, { - "name": "owner", - "type": "publicKey" + "name": "campaignStartDate", + "type": "i64" }, { - "name": "swapCount", + "name": "publicAmount", "type": "u64" }, { - "name": "swapVolumeUsd", + "name": "reservedAmount", "type": "u64" }, { - "name": "swapFeePaidUsd", + "name": "publicAmountClaimed", "type": "u64" }, { - "name": "shortStats", + "name": "reservedAmountClaimed", + "type": "u64" + }, + { + "name": "reservedGrantOwners", "type": { - "defined": "TradingStats" + "array": [ + "publicKey", + 30 + ] } }, { - "name": "longStats", + "name": "reservedGrantAmounts", "type": { - "defined": "TradingStats" + "array": [ + "u64", + 30 + ] } + }, + { + "name": "finalizeGenesisLockCampaignThreadId", + "type": "u64" } ] } }, { - "name": "userStaking", + "name": "pool", "type": { "kind": "struct", "fields": [ @@ -8627,70 +9227,78 @@ export type Adrena = { "type": "u8" }, { - "name": "threadAuthorityBump", + "name": "lpTokenBump", "type": "u8" }, { - "name": "padding", - "type": { - "array": [ - "u8", - 6 - ] - } + "name": "nbStableCustody", + "type": "u8" }, { - "name": "stakesClaimCronThreadId", - "type": "u64" + "name": "initialized", + "type": "u8" }, { - "name": "liquidStake", + "name": "allowTrade", + "type": "u8" + }, + { + "name": "allowSwap", + "type": "u8" + }, + { + "name": "liquidityState", + "type": "u8" + }, + { + "name": "registeredCustodyCount", + "type": "u8" + }, + { + "name": "name", "type": { - "defined": "LiquidStake" + "defined": "LimitedString" } }, { - "name": "lockedStakes", + "name": "custodies", + "type": { + "array": [ + "publicKey", + 10 + ] + } + }, + { + "name": "ratios", "type": { "array": [ { - "defined": "LockedStake" + "defined": "TokenRatios" }, - 32 + 10 ] } - } - ] - } - }, - { - "name": "vestRegistry", - "type": { - "kind": "struct", - "fields": [ - { - "name": "bump", - "type": "u8" }, { - "name": "vests", + "name": "aumUsd", "type": { - "vec": "publicKey" + "defined": "U128Split" } }, { - "name": "vestingTokenAmount", - "type": "u64" + "name": "inceptionTime", + "type": "i64" }, { - "name": "vestedTokenAmount", + "name": "aumSoftCapUsd", "type": "u64" } ] } }, { - "name": "vest", + "name": "position", "type": { "kind": "struct", "fields": [ @@ -8699,7 +9307,15 @@ export type Adrena = { "type": "u8" }, { - "name": "originBucket", + "name": "side", + "type": "u8" + }, + { + "name": "takeProfitThreadIsSet", + "type": "u8" + }, + { + "name": "stopLossThreadIsSet", "type": "u8" }, { @@ -8707,798 +9323,1214 @@ export type Adrena = { "type": { "array": [ "u8", - 6 + 4 ] } }, { - "name": "amount", - "type": "u64" + "name": "owner", + "type": "publicKey" }, { - "name": "unlockStartTimestamp", - "type": "i64" + "name": "pool", + "type": "publicKey" }, { - "name": "unlockEndTimestamp", - "type": "i64" + "name": "custody", + "type": "publicKey" }, { - "name": "claimedAmount", - "type": "u64" + "name": "collateralCustody", + "type": "publicKey" }, { - "name": "lastClaimTimestamp", + "name": "openTime", "type": "i64" }, { - "name": "owner", - "type": "publicKey" - } - ] - } - } - ], - "types": [ - { - "name": "MintLmTokensFromBucketParams", - "type": { - "kind": "struct", - "fields": [ + "name": "updateTime", + "type": "i64" + }, { - "name": "bucketName", - "type": "u8" + "name": "price", + "type": "u64" }, { - "name": "amount", + "name": "sizeUsd", "type": "u64" }, { - "name": "reason", - "type": "string" - } - ] - } - }, - { - "name": "SetAdminParams", - "type": { - "kind": "struct", - "fields": [ + "name": "borrowSizeUsd", + "type": "u64" + }, { - "name": "newAdmin", - "type": "publicKey" + "name": "collateralUsd", + "type": "u64" + }, + { + "name": "unrealizedLossUsd", + "type": "u64" + }, + { + "name": "cumulativeInterestSnapshot", + "type": { + "defined": "U128Split" + } + }, + { + "name": "lockedAmount", + "type": "u64" + }, + { + "name": "collateralAmount", + "type": "u64" + }, + { + "name": "exitFeeUsd", + "type": "u64" + }, + { + "name": "liquidationFeeUsd", + "type": "u64" + }, + { + "name": "takeProfitThreadId", + "type": "u64" + }, + { + "name": "takeProfitLimitPrice", + "type": "u64" + }, + { + "name": "stopLossThreadId", + "type": "u64" + }, + { + "name": "stopLossLimitPrice", + "type": "u64" + }, + { + "name": "stopLossClosePositionPrice", + "type": "u64" } ] } }, { - "name": "AddCustodyParams", + "name": "staking", "type": { "kind": "struct", "fields": [ { - "name": "isStable", - "type": "bool" + "name": "stakingType", + "type": "u8" }, { - "name": "oracle", - "type": { - "defined": "OracleParams" - } + "name": "bump", + "type": "u8" }, { - "name": "pricing", - "type": { - "defined": "PricingParams" - } + "name": "stakedTokenVaultBump", + "type": "u8" }, { - "name": "allowSwap", - "type": "bool" + "name": "rewardTokenVaultBump", + "type": "u8" }, { - "name": "allowTrade", - "type": "bool" + "name": "lmRewardTokenVaultBump", + "type": "u8" }, { - "name": "fees", + "name": "rewardTokenDecimals", + "type": "u8" + }, + { + "name": "stakedTokenDecimals", + "type": "u8" + }, + { + "name": "initialized", + "type": "u8" + }, + { + "name": "nbLockedTokens", + "type": "u64" + }, + { + "name": "nbLiquidTokens", + "type": "u64" + }, + { + "name": "stakedTokenMint", + "type": "publicKey" + }, + { + "name": "resolvedRewardTokenAmount", + "type": "u64" + }, + { + "name": "resolvedStakedTokenAmount", + "type": "u64" + }, + { + "name": "resolvedLmRewardTokenAmount", + "type": "u64" + }, + { + "name": "resolvedLmStakedTokenAmount", + "type": "u64" + }, + { + "name": "currentStakingRound", "type": { - "defined": "Fees" + "defined": "StakingRound" } }, { - "name": "borrowRate", + "name": "nextStakingRound", "type": { - "defined": "BorrowRateParams" + "defined": "StakingRound" } }, { - "name": "ratios", + "name": "resolvedStakingRounds", "type": { "array": [ { - "defined": "TokenRatios" + "defined": "StakingRound" }, - 10 + 32 ] } - } - ] - } - }, - { - "name": "RemoveCustodyParams", - "type": { - "kind": "struct", - "fields": [ + }, { - "name": "ratios", + "name": "registeredResolvedStakingRoundCount", + "type": "u8" + }, + { + "name": "padding", "type": { "array": [ - { - "defined": "TokenRatios" - }, - 10 + "u8", + 3 ] } - } - ] - } - }, - { - "name": "SetCustodyAllowSwapParams", - "type": { - "kind": "struct", - "fields": [ + }, { - "name": "allowSwap", - "type": "bool" - } - ] - } - }, - { - "name": "SetCustodyAllowTradeParams", - "type": { - "kind": "struct", - "fields": [ + "name": "lmEmissionPotentiometerBps", + "type": "u16" + }, { - "name": "allowTrade", - "type": "bool" + "name": "monthsElapsedSinceInception", + "type": "u16" + }, + { + "name": "resolveRoundCronThreadId", + "type": "u64" + }, + { + "name": "emissionAmountPerRoundLastUpdate", + "type": "i64" + }, + { + "name": "currentMonthEmissionAmountPerRound", + "type": "u64" } ] } }, { - "name": "SetCustodyConfigParams", + "name": "userProfile", "type": { "kind": "struct", "fields": [ { - "name": "isStable", - "type": "bool" + "name": "bump", + "type": "u8" }, { - "name": "oracle", + "name": "padding", "type": { - "defined": "OracleParams" + "array": [ + "u8", + 7 + ] } }, { - "name": "pricing", + "name": "nickname", "type": { - "defined": "PricingParams" + "defined": "LimitedString" } }, { - "name": "fees", - "type": { - "defined": "Fees" - } + "name": "createdAt", + "type": "i64" }, { - "name": "borrowRate", - "type": { - "defined": "BorrowRateParams" - } + "name": "owner", + "type": "publicKey" }, { - "name": "ratios", - "type": { - "array": [ - { - "defined": "TokenRatios" - }, - 10 - ] + "name": "swapCount", + "type": "u64" + }, + { + "name": "swapVolumeUsd", + "type": "u64" + }, + { + "name": "swapFeePaidUsd", + "type": "u64" + }, + { + "name": "shortStats", + "type": { + "defined": "TradingStats" + } + }, + { + "name": "longStats", + "type": { + "defined": "TradingStats" } } ] } }, { - "name": "SetCustodyMaxCumulativeShortPositionSizeUsdParams", + "name": "userStaking", "type": { "kind": "struct", "fields": [ { - "name": "maxCumulativeShortPositionSizeUsd", + "name": "bump", + "type": "u8" + }, + { + "name": "threadAuthorityBump", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 6 + ] + } + }, + { + "name": "stakesClaimCronThreadId", "type": "u64" + }, + { + "name": "liquidStake", + "type": { + "defined": "LiquidStake" + } + }, + { + "name": "lockedStakes", + "type": { + "array": [ + { + "defined": "LockedStake" + }, + 32 + ] + } } ] } }, { - "name": "InitOneParams", + "name": "vestRegistry", "type": { "kind": "struct", "fields": [ { - "name": "ecosystemBucketAllocation", - "type": "u64" + "name": "bump", + "type": "u8" }, { - "name": "coreContributorBucketAllocation", - "type": "u64" + "name": "vests", + "type": { + "vec": "publicKey" + } }, { - "name": "daoTreasuryBucketAllocation", + "name": "vestingTokenAmount", "type": "u64" }, { - "name": "polBucketAllocation", + "name": "vestedTokenAmount", "type": "u64" } ] } }, { - "name": "AddPoolPartOneParams", + "name": "vest", "type": { "kind": "struct", "fields": [ { - "name": "name", - "type": "string" + "name": "bump", + "type": "u8" }, { - "name": "aumSoftCapUsd", - "type": "u64" + "name": "originBucket", + "type": "u8" }, { - "name": "lpTokenName", - "type": "string" + "name": "cancelled", + "type": "u8" }, { - "name": "lpTokenSymbol", - "type": "string" + "name": "padding", + "type": { + "array": [ + "u8", + 1 + ] + } }, { - "name": "lpTokenUri", - "type": "string" - } - ] - } - }, - { - "name": "AddPoolPartTwoParams", - "type": { - "kind": "struct", - "fields": [ + "name": "voteMultiplier", + "type": "u32" + }, { - "name": "genesisLockCampaignDuration", - "type": "i64" + "name": "amount", + "type": "u64" }, { - "name": "genesisReservedGrantDuration", + "name": "unlockStartTimestamp", "type": "i64" }, { - "name": "genesisLockCampaignStartDate", + "name": "unlockEndTimestamp", "type": "i64" }, { - "name": "finalizeGenesisLockCampaignThreadId", + "name": "claimedAmount", "type": "u64" - } - ] - } - }, - { - "name": "SetPoolAllowSwapParams", - "type": { - "kind": "struct", - "fields": [ + }, { - "name": "allowSwap", - "type": "bool" - } - ] - } - }, - { - "name": "SetPoolAllowTradeParams", - "type": { - "kind": "struct", - "fields": [ + "name": "lastClaimTimestamp", + "type": "i64" + }, { - "name": "allowTrade", - "type": "bool" + "name": "owner", + "type": "publicKey" } ] } - }, + } + ], + "types": [ { - "name": "SetPoolAumSoftCapUsdParams", + "name": "MintLmTokensFromBucketParams", "type": { "kind": "struct", "fields": [ { - "name": "aumSoftCapUsd", + "name": "bucketName", + "type": "u8" + }, + { + "name": "amount", "type": "u64" + }, + { + "name": "reason", + "type": "string" } ] } }, { - "name": "SetPoolLiquidityStateParams", + "name": "SetAdminParams", "type": { "kind": "struct", "fields": [ { - "name": "liquidityState", - "type": "u8" + "name": "newAdmin", + "type": "publicKey" } ] } }, { - "name": "SetTestOraclePriceParams", + "name": "AddCustodyParams", "type": { "kind": "struct", "fields": [ { - "name": "price", - "type": "u64" + "name": "isStable", + "type": "bool" }, { - "name": "expo", - "type": "i32" + "name": "pricing", + "type": { + "defined": "PricingParams" + } }, { - "name": "conf", - "type": "u64" + "name": "allowSwap", + "type": "bool" }, { - "name": "publishTime", - "type": "i64" - } - ] - } - }, - { - "name": "InitStakingFourParams", - "type": { - "kind": "struct", - "fields": [ + "name": "allowTrade", + "type": "bool" + }, { - "name": "resolveRoundCronThreadId", - "type": "u64" + "name": "fees", + "type": { + "defined": "Fees" + } + }, + { + "name": "borrowRate", + "type": { + "defined": "BorrowRateParams" + } + }, + { + "name": "ratios", + "type": { + "array": [ + { + "defined": "TokenRatios" + }, + 10 + ] + } } ] } }, { - "name": "InitStakingOneParams", + "name": "RemoveCustodyParams", "type": { "kind": "struct", "fields": [ { - "name": "stakingType", - "type": "u8" + "name": "ratios", + "type": { + "array": [ + { + "defined": "TokenRatios" + }, + 10 + ] + } } ] } }, { - "name": "SetStakingLmEmissionPotentiometersParams", + "name": "SetCustodyAllowSwapParams", "type": { "kind": "struct", "fields": [ { - "name": "lmEmissionPotentiometerBps", - "type": "u16" + "name": "allowSwap", + "type": "bool" } ] } }, { - "name": "TestAdminRemoveCollateralParams", + "name": "SetCustodyAllowTradeParams", "type": { "kind": "struct", "fields": [ { - "name": "collateralUsd", - "type": "u64" + "name": "allowTrade", + "type": "bool" } ] } }, { - "name": "AddGenesisLiquidityParams", + "name": "SetCustodyConfigParams", "type": { "kind": "struct", "fields": [ { - "name": "lpStakeResolutionThreadId", - "type": "u64" + "name": "isStable", + "type": "bool" }, { - "name": "amountIn", - "type": "u64" + "name": "oracle", + "type": "publicKey" }, { - "name": "minLpAmountOut", - "type": "u64" + "name": "tradeOracle", + "type": "publicKey" + }, + { + "name": "pricing", + "type": { + "defined": "PricingParams" + } + }, + { + "name": "fees", + "type": { + "defined": "Fees" + } + }, + { + "name": "borrowRate", + "type": { + "defined": "BorrowRateParams" + } + }, + { + "name": "ratios", + "type": { + "array": [ + { + "defined": "TokenRatios" + }, + 10 + ] + } } ] } }, { - "name": "AddLiquidityParams", + "name": "SetCustodyMaxCumulativeShortPositionSizeUsdParams", "type": { "kind": "struct", "fields": [ { - "name": "amountIn", - "type": "u64" - }, - { - "name": "minLpAmountOut", + "name": "maxCumulativeShortPositionSizeUsd", "type": "u64" } ] } }, { - "name": "RemoveLiquidityParams", + "name": "InitOneParams", "type": { "kind": "struct", "fields": [ { - "name": "lpAmountIn", + "name": "ecosystemBucketAllocation", "type": "u64" }, { - "name": "minAmountOut", + "name": "coreContributorBucketAllocation", + "type": "u64" + }, + { + "name": "daoTreasuryBucketAllocation", + "type": "u64" + }, + { + "name": "polBucketAllocation", "type": "u64" } ] } }, { - "name": "SwapParams", + "name": "AddPoolPartOneParams", "type": { "kind": "struct", "fields": [ { - "name": "amountIn", - "type": "u64" + "name": "name", + "type": "string" }, { - "name": "minAmountOut", + "name": "aumSoftCapUsd", "type": "u64" + }, + { + "name": "lpTokenName", + "type": "string" + }, + { + "name": "lpTokenSymbol", + "type": "string" + }, + { + "name": "lpTokenUri", + "type": "string" } ] } }, { - "name": "AddCollateralLongParams", + "name": "AddPoolPartTwoParams", "type": { "kind": "struct", "fields": [ { - "name": "collateral", + "name": "genesisLockCampaignDuration", + "type": "i64" + }, + { + "name": "genesisReservedGrantDuration", + "type": "i64" + }, + { + "name": "genesisLockCampaignStartDate", + "type": "i64" + }, + { + "name": "finalizeGenesisLockCampaignThreadId", "type": "u64" + }, + { + "name": "reservedSpots", + "type": { + "defined": "ReservedSpots" + } } ] } }, { - "name": "AddCollateralShortParams", + "name": "SetPoolAllowSwapParams", "type": { "kind": "struct", "fields": [ { - "name": "collateral", - "type": "u64" + "name": "allowSwap", + "type": "bool" } ] } }, { - "name": "ClosePositionLongParams", + "name": "SetPoolAllowTradeParams", "type": { "kind": "struct", "fields": [ { - "name": "price", - "type": "u64" + "name": "allowTrade", + "type": "bool" } ] } }, { - "name": "ClosePositionShortParams", + "name": "SetPoolAumSoftCapUsdParams", "type": { "kind": "struct", "fields": [ { - "name": "price", + "name": "aumSoftCapUsd", "type": "u64" } ] } }, { - "name": "IncreasePositionLongParams", + "name": "SetPoolLiquidityStateParams", "type": { "kind": "struct", "fields": [ { - "name": "price", - "type": "u64" - }, - { - "name": "collateral", - "type": "u64" - }, - { - "name": "leverage", - "type": "u32" + "name": "liquidityState", + "type": "u8" } ] } }, { - "name": "IncreasePositionShortParams", + "name": "InitStakingFourParams", "type": { "kind": "struct", "fields": [ { - "name": "price", - "type": "u64" - }, - { - "name": "collateral", + "name": "resolveRoundCronThreadId", "type": "u64" - }, - { - "name": "leverage", - "type": "u32" } ] } }, { - "name": "LiquidateLongParams", + "name": "InitStakingOneParams", "type": { "kind": "struct", - "fields": [] + "fields": [ + { + "name": "stakingType", + "type": "u8" + } + ] } }, { - "name": "LiquidateShortParams", + "name": "SetStakingLmEmissionPotentiometersParams", "type": { "kind": "struct", - "fields": [] + "fields": [ + { + "name": "lmEmissionPotentiometerBps", + "type": "u16" + } + ] } }, { - "name": "OpenPositionWithSwapParams", + "name": "TestAdminRemoveCollateralParams", "type": { "kind": "struct", "fields": [ { - "name": "price", - "type": "u64" - }, - { - "name": "collateral", + "name": "collateralUsd", "type": "u64" - }, - { - "name": "leverage", - "type": "u32" } ] } }, { - "name": "OpenPositionLongParams", + "name": "AddGenesisLiquidityParams", "type": { "kind": "struct", "fields": [ { - "name": "price", + "name": "lpStakeResolutionThreadId", "type": "u64" }, { - "name": "collateral", + "name": "amountIn", "type": "u64" }, { - "name": "leverage", - "type": "u32" + "name": "minLpAmountOut", + "type": "u64" } ] } }, { - "name": "OpenPositionShortParams", + "name": "AddLiquidityParams", "type": { "kind": "struct", "fields": [ { - "name": "price", + "name": "amountIn", "type": "u64" }, { - "name": "collateral", + "name": "minLpAmountOut", "type": "u64" - }, - { - "name": "leverage", - "type": "u32" } ] } }, { - "name": "RemoveCollateralLongParams", + "name": "RemoveLiquidityParams", "type": { "kind": "struct", "fields": [ { - "name": "collateralUsd", + "name": "lpAmountIn", + "type": "u64" + }, + { + "name": "minAmountOut", "type": "u64" } ] } }, { - "name": "RemoveCollateralShortParams", + "name": "SwapParams", "type": { "kind": "struct", "fields": [ { - "name": "collateralUsd", + "name": "amountIn", + "type": "u64" + }, + { + "name": "minAmountOut", "type": "u64" } ] } }, { - "name": "AddLiquidStakeParams", + "name": "AddCollateralLongParams", "type": { "kind": "struct", "fields": [ { - "name": "amount", + "name": "collateral", "type": "u64" } ] } }, { - "name": "AddLockedStakeParams", + "name": "AddCollateralShortParams", "type": { "kind": "struct", "fields": [ { - "name": "stakeResolutionThreadId", - "type": "u64" - }, - { - "name": "amount", + "name": "collateral", "type": "u64" - }, - { - "name": "lockedDays", - "type": "u32" } ] } }, { - "name": "FinalizeLockedStakeParams", + "name": "SetStopLossLongParams", "type": { "kind": "struct", "fields": [ { - "name": "threadId", + "name": "stopLossLimitPrice", "type": "u64" }, { - "name": "earlyExit", - "type": "bool" + "name": "closePositionPrice", + "type": { + "option": "u64" + } } ] } }, { - "name": "InitUserStakingParams", + "name": "SetStopLossShortParams", "type": { "kind": "struct", "fields": [ { - "name": "stakesClaimCronThreadId", + "name": "stopLossLimitPrice", "type": "u64" + }, + { + "name": "closePositionPrice", + "type": { + "option": "u64" + } } ] } }, { - "name": "RemoveLiquidStakeParams", + "name": "SetTakeProfitLongParams", "type": { "kind": "struct", "fields": [ { - "name": "amount", + "name": "takeProfitLimitPrice", "type": "u64" } ] } }, { - "name": "RemoveLockedStakeParams", + "name": "SetTakeProfitShortParams", "type": { "kind": "struct", "fields": [ { - "name": "lockedStakeIndex", + "name": "takeProfitLimitPrice", "type": "u64" } ] } }, { - "name": "EditUserProfileParams", + "name": "ClosePositionLongParams", "type": { "kind": "struct", "fields": [ { - "name": "nickname", - "type": "string" + "name": "price", + "type": { + "option": "u64" + } } ] } }, { - "name": "InitUserProfileParams", + "name": "ClosePositionShortParams", "type": { "kind": "struct", "fields": [ { - "name": "nickname", - "type": "string" + "name": "price", + "type": { + "option": "u64" + } } ] } }, { - "name": "AddVestParams", + "name": "IncreasePositionLongParams", "type": { "kind": "struct", "fields": [ { - "name": "amount", + "name": "price", "type": "u64" }, { - "name": "originBucket", - "type": "u8" + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "IncreasePositionShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "LiquidateLongParams", + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "LiquidateShortParams", + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "OpenPositionWithSwapParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "OpenPositionLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "OpenPositionShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": "u64" + }, + { + "name": "collateral", + "type": "u64" + }, + { + "name": "leverage", + "type": "u32" + } + ] + } + }, + { + "name": "RemoveCollateralLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateralUsd", + "type": "u64" + } + ] + } + }, + { + "name": "RemoveCollateralShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "collateralUsd", + "type": "u64" + } + ] + } + }, + { + "name": "AddLiquidStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + } + ] + } + }, + { + "name": "AddLockedStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stakeResolutionThreadId", + "type": "u64" + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "lockedDays", + "type": "u32" + } + ] + } + }, + { + "name": "FinalizeLockedStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "threadId", + "type": "u64" + }, + { + "name": "earlyExit", + "type": "bool" + } + ] + } + }, + { + "name": "InitUserStakingParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stakesClaimCronThreadId", + "type": "u64" + } + ] + } + }, + { + "name": "RemoveLiquidStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + } + ] + } + }, + { + "name": "RemoveLockedStakeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "lockedStakeIndex", + "type": "u64" + } + ] + } + }, + { + "name": "EditUserProfileParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "nickname", + "type": "string" + } + ] + } + }, + { + "name": "InitUserProfileParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "nickname", + "type": "string" + } + ] + } + }, + { + "name": "AddVestParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "originBucket", + "type": "u8" }, { "name": "unlockStartTimestamp", @@ -9507,6 +10539,10 @@ export type Adrena = { { "name": "unlockEndTimestamp", "type": "i64" + }, + { + "name": "voteMultiplier", + "type": "u32" } ] } @@ -9660,10 +10696,6 @@ export type Adrena = { "name": "liquidationPrice", "type": "u64" }, - { - "name": "entryFee", - "type": "u64" - }, { "name": "exitFee", "type": "u64" @@ -9701,11 +10733,7 @@ export type Adrena = { "type": "u64" }, { - "name": "openPositionFee", - "type": "u64" - }, - { - "name": "exitFee", + "name": "exitFee", "type": "u64" }, { @@ -9742,11 +10770,7 @@ export type Adrena = { { "name": "ProfitAndLoss", "docs": [ - "Specific to the codebase, this struct is used to store the profit and loss of a position.", - "Specific because entry fees are paid right away at position opening and on top of the requested size/leverage (to match it exactly).", - "As such, the profit and loss are calculated with the entry fees already paid (and out of these two numbers).", - "To get the \"real overall\" profit and loss, one must add the entry fees back to the profit and loss.", - "And to get the \"pure\" profit and loss, one must subtract the exit and paid_interests (borrow interests) from the profit and loss." + "Specific to the codebase, this struct is used to store the profit and loss of a position." ], "type": { "kind": "struct", @@ -9759,10 +10783,6 @@ export type Adrena = { "name": "lossUsd", "type": "u64" }, - { - "name": "entryFeeUsd", - "type": "u64" - }, { "name": "exitFee", "type": "u64" @@ -9807,10 +10827,6 @@ export type Adrena = { "name": "removeLiquidity", "type": "u16" }, - { - "name": "openPosition", - "type": "u16" - }, { "name": "closePosition", "type": "u16" @@ -9832,7 +10848,7 @@ export type Adrena = { "type": { "array": [ "u8", - 2 + 4 ] } }, @@ -9860,10 +10876,6 @@ export type Adrena = { "name": "removeLiquidityUsd", "type": "u64" }, - { - "name": "openPositionUsd", - "type": "u64" - }, { "name": "closePositionUsd", "type": "u64" @@ -10122,37 +11134,12 @@ export type Adrena = { "type": "i32" }, { - "name": "conf", + "name": "confidence", "type": "u64" } ] } }, - { - "name": "OracleParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "oracleAccount", - "type": "publicKey" - }, - { - "name": "oracleType", - "type": "u8" - }, - { - "name": "padding", - "type": { - "array": [ - "u8", - 15 - ] - } - } - ] - } - }, { "name": "TokenRatios", "type": { @@ -10191,6 +11178,10 @@ export type Adrena = { "name": "startTime", "type": "i64" }, + { + "name": "endTime", + "type": "i64" + }, { "name": "rate", "type": "u64" @@ -10299,6 +11290,10 @@ export type Adrena = { "name": "claimTime", "type": "i64" }, + { + "name": "endTime", + "type": "i64" + }, { "name": "lockDuration", "type": "u64" @@ -10444,41 +11439,48 @@ export type Adrena = { } }, { - "name": "CortexInitializationStep", + "name": "ReservedSpots", "type": { "kind": "enum", "variants": [ { - "name": "NotCreated" - }, - { - "name": "Step1" - }, - { - "name": "Step2" - }, - { - "name": "Step3" + "name": "None" }, { - "name": "Initialized" + "name": "Test", + "fields": [ + { + "name": "firstReservedSpot", + "type": "publicKey" + }, + { + "name": "secondReservedSpot", + "type": "publicKey" + } + ] } ] } }, { - "name": "OracleType", + "name": "CortexInitializationStep", "type": { "kind": "enum", "variants": [ { - "name": "None" + "name": "NotCreated" + }, + { + "name": "Step1" + }, + { + "name": "Step2" }, { - "name": "Custom" + "name": "Step3" }, { - "name": "Pyth" + "name": "Initialized" } ] } @@ -10598,11 +11600,6 @@ export type Adrena = { "name": "leverage", "type": "u32", "index": false - }, - { - "name": "feeUsd", - "type": "u64", - "index": false } ] }, @@ -10648,11 +11645,6 @@ export type Adrena = { "name": "leverage", "type": "u32", "index": false - }, - { - "name": "feeUsd", - "type": "u64", - "index": false } ] }, @@ -11159,19 +12151,695 @@ export type Adrena = { "msg": "The instruction must be call with a specific account as caller" }, { - "code": 6061, - "name": "InvalidBucketName", - "msg": "Invalid bucket name" - } - ] -}; - -export const IDL: Adrena = { - "version": "1.0.0", - "name": "adrena", - "instructions": [ - { - "name": "initOneCore", + "code": 6061, + "name": "InvalidBucketName", + "msg": "Invalid bucket name" + }, + { + "code": 6062, + "name": "InvalidThreadId", + "msg": "The provided Sablier thread does not have the expected ID" + }, + { + "code": 6063, + "name": "PythPriceExponentTooLargeIncurringPrecisionLoss", + "msg": "The exponent used for pyth price lead to high precision loss" + }, + { + "code": 6064, + "name": "MissingClosePositionPrice", + "msg": "The close position price is mandatory" + }, + { + "code": 6065, + "name": "InvalidVoteMultiplier", + "msg": "Invalid vote multiplier" + }, + { + "code": 6066, + "name": "PositionTooYoung", + "msg": "A position cannot be close right after open, a slight delay is enforced" + } + ] +}; + +export const IDL: Adrena = { + "version": "1.0.0", + "name": "adrena", + "instructions": [ + { + "name": "initOneCore", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "InitOneParams" + } + } + ] + }, + { + "name": "initTwoLmTokenMetadata", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "lmTokenMintMetadata", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "mplTokenMetadataProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + } + ], + "args": [] + }, + { + "name": "initThreeGovernance", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#6", + "A realm represent one project within the governance program" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + } + ], + "args": [] + }, + { + "name": "initFourVesting", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "vestRegistry", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + } + ], + "args": [] + }, + { + "name": "addVest", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "owner", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "vestRegistry", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "vest", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#10", + "A realm represent one project within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#12", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#13", + "Account owned by governance storing user information" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddVestParams" + } + } + ], + "returns": "u8" + }, + { + "name": "claimVest", + "accounts": [ + { + "name": "caller", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "owner", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "receivingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "vestRegistry", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "vest", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#11", + "A realm represent one project within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#13", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#14", + "Account owned by governance storing user information" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#19" + ] + } + ], + "args": [], + "returns": "u64" + }, + { + "name": "cancelVest", "accounts": [ { "name": "admin", @@ -11182,23 +12850,23 @@ export const IDL: Adrena = { ] }, { - "name": "payer", + "name": "owner", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ "#2" ] }, { - "name": "transferAuthority", + "name": "payer", "isMut": true, - "isSigner": false, + "isSigner": true, "docs": [ "#3" ] }, { - "name": "cortex", + "name": "receivingAccount", "isMut": true, "isSigner": false, "docs": [ @@ -11206,7 +12874,7 @@ export const IDL: Adrena = { ] }, { - "name": "protocolFeeRecipient", + "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ @@ -11214,27 +12882,102 @@ export const IDL: Adrena = { ] }, { - "name": "feeRedistributionMint", - "isMut": false, + "name": "cortex", + "isMut": true, "isSigner": false, "docs": [ "#6" ] }, { - "name": "lmTokenMint", + "name": "vestRegistry", "isMut": true, "isSigner": false, "docs": [ "#7" ] }, + { + "name": "vest", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#11", + "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#13", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#14", + "Account owned by governance storing user information" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, { "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ - "#8" + "#17" ] }, { @@ -11242,7 +12985,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#9" + "#18" ] }, { @@ -11250,21 +12993,14 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#10" + "#19" ] } ], - "args": [ - { - "name": "params", - "type": { - "defined": "InitOneParams" - } - } - ] + "args": [] }, { - "name": "initTwoLmTokenMetadata", + "name": "addPoolPartOne", "accounts": [ { "name": "admin", @@ -11294,12 +13030,20 @@ export const IDL: Adrena = { "name": "cortex", "isMut": true, "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, "docs": [ "#5" ] }, { - "name": "lmTokenMint", + "name": "lpTokenMint", "isMut": true, "isSigner": false, "docs": [ @@ -11307,7 +13051,7 @@ export const IDL: Adrena = { ] }, { - "name": "lmTokenMintMetadata", + "name": "lpTokenMintMetadata", "isMut": true, "isSigner": false, "docs": [ @@ -11339,18 +13083,34 @@ export const IDL: Adrena = { ] }, { - "name": "rent", + "name": "adrenaProgram", "isMut": false, "isSigner": false, "docs": [ "#11" ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] } ], - "args": [] + "args": [ + { + "name": "params", + "type": { + "defined": "AddPoolPartOneParams" + } + } + ], + "returns": "u8" }, { - "name": "initThreeGovernance", + "name": "addPoolPartTwo", "accounts": [ { "name": "admin", @@ -11385,7 +13145,7 @@ export const IDL: Adrena = { ] }, { - "name": "governanceTokenMint", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -11393,28 +13153,35 @@ export const IDL: Adrena = { ] }, { - "name": "governanceRealm", + "name": "lpTokenMint", "isMut": false, "isSigner": false, "docs": [ - "#6", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "#6" ] }, { - "name": "governanceProgram", - "isMut": false, + "name": "genesisLock", + "isMut": true, "isSigner": false, "docs": [ "#7" ] }, + { + "name": "finalizeGenesisLockCampaignThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, { "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ - "#8" + "#9" ] }, { @@ -11422,7 +13189,23 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#9" + "#10" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" ] }, { @@ -11430,14 +13213,77 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#10" + "#13" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddPoolPartTwoParams" + } + } + ], + "returns": "u8" + }, + { + "name": "removePool", + "accounts": [ + { + "name": "admin", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "transferAuthority", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" ] } ], - "args": [] + "args": [], + "returns": "u8" }, { - "name": "initFourVesting", + "name": "addCustody", "accounts": [ { "name": "admin", @@ -11472,19 +13318,59 @@ export const IDL: Adrena = { ] }, { - "name": "vestRegistry", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ "#5" ] }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "custodyTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, { "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ - "#6" + "#11" ] }, { @@ -11492,7 +13378,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#7" + "#12" ] }, { @@ -11500,14 +13386,22 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#8" + "#13" ] } ], - "args": [] + "args": [ + { + "name": "params", + "type": { + "defined": "AddCustodyParams" + } + } + ], + "returns": "u8" }, { - "name": "addVest", + "name": "removeCustody", "accounts": [ { "name": "admin", @@ -11518,23 +13412,23 @@ export const IDL: Adrena = { ] }, { - "name": "owner", - "isMut": false, - "isSigner": false, + "name": "payer", + "isMut": true, + "isSigner": true, "docs": [ "#2" ] }, { - "name": "payer", + "name": "transferAuthority", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ "#3" ] }, { - "name": "transferAuthority", + "name": "cortex", "isMut": false, "isSigner": false, "docs": [ @@ -11542,7 +13436,7 @@ export const IDL: Adrena = { ] }, { - "name": "cortex", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -11550,7 +13444,7 @@ export const IDL: Adrena = { ] }, { - "name": "vestRegistry", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ @@ -11558,7 +13452,7 @@ export const IDL: Adrena = { ] }, { - "name": "vest", + "name": "custodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -11566,86 +13460,111 @@ export const IDL: Adrena = { ] }, { - "name": "lmTokenMint", - "isMut": true, + "name": "systemProgram", + "isMut": false, "isSigner": false, "docs": [ "#8" ] }, { - "name": "governanceTokenMint", - "isMut": true, + "name": "tokenProgram", + "isMut": false, "isSigner": false, "docs": [ "#9" ] - }, + } + ], + "args": [ { - "name": "governanceRealm", + "name": "params", + "type": { + "defined": "RemoveCustodyParams" + } + } + ], + "returns": "u8" + }, + { + "name": "setCustodyConfig", + "accounts": [ + { + "name": "admin", "isMut": false, - "isSigner": false, + "isSigner": true, "docs": [ - "#10", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "#1" ] }, { - "name": "governanceRealmConfig", - "isMut": false, + "name": "pool", + "isMut": true, "isSigner": false, "docs": [ - "#11" + "#2" ] }, { - "name": "governanceGoverningTokenHolding", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ - "#12", - "Token account owned by governance program holding user's locked tokens" + "#3" ] }, { - "name": "governanceGoverningTokenOwnerRecord", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ - "#13", - "Account owned by governance storing user information" + "#4" ] - }, + } + ], + "args": [ { - "name": "governanceProgram", + "name": "params", + "type": { + "defined": "SetCustodyConfigParams" + } + } + ], + "returns": "u8" + }, + { + "name": "setCustodyAllowSwap", + "accounts": [ + { + "name": "admin", "isMut": false, - "isSigner": false, + "isSigner": true, "docs": [ - "#14" + "#1" ] }, { - "name": "systemProgram", - "isMut": false, + "name": "cortex", + "isMut": true, "isSigner": false, "docs": [ - "#15" + "#2" ] }, { - "name": "tokenProgram", - "isMut": false, + "name": "pool", + "isMut": true, "isSigner": false, "docs": [ - "#16" + "#3" ] }, { - "name": "rent", - "isMut": false, + "name": "custody", + "isMut": true, "isSigner": false, "docs": [ - "#17" + "#4" ] } ], @@ -11653,25 +13572,24 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "AddVestParams" + "defined": "SetCustodyAllowSwapParams" } } - ], - "returns": "u8" + ] }, { - "name": "claimVest", + "name": "setCustodyAllowTrade", "accounts": [ { - "name": "owner", - "isMut": true, + "name": "admin", + "isMut": false, "isSigner": true, "docs": [ "#1" ] }, { - "name": "receivingAccount", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -11679,134 +13597,144 @@ export const IDL: Adrena = { ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "pool", + "isMut": true, "isSigner": false, "docs": [ "#3" ] }, { - "name": "cortex", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ "#4" ] - }, + } + ], + "args": [ { - "name": "vestRegistry", - "isMut": true, - "isSigner": false, - "docs": [ - "#5" - ] - }, + "name": "params", + "type": { + "defined": "SetCustodyAllowTradeParams" + } + } + ] + }, + { + "name": "setPoolAllowSwap", + "accounts": [ { - "name": "vest", - "isMut": true, - "isSigner": false, + "name": "admin", + "isMut": false, + "isSigner": true, "docs": [ - "#6" + "#1" ] }, { - "name": "lmTokenMint", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ - "#7" + "#2" ] }, { - "name": "governanceTokenMint", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ - "#8" - ] - }, - { - "name": "governanceRealm", - "isMut": false, - "isSigner": false, - "docs": [ - "#9", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "#3" ] - }, + } + ], + "args": [ { - "name": "governanceRealmConfig", - "isMut": false, - "isSigner": false, - "docs": [ - "#10" - ] - }, + "name": "params", + "type": { + "defined": "SetPoolAllowSwapParams" + } + } + ] + }, + { + "name": "setPoolAllowTrade", + "accounts": [ { - "name": "governanceGoverningTokenHolding", - "isMut": true, - "isSigner": false, + "name": "admin", + "isMut": false, + "isSigner": true, "docs": [ - "#11", - "Token account owned by governance program holding user's locked tokens" + "#1" ] }, { - "name": "governanceGoverningTokenOwnerRecord", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ - "#12", - "Account owned by governance storing user information" + "#2" ] }, { - "name": "governanceProgram", - "isMut": false, + "name": "pool", + "isMut": true, "isSigner": false, "docs": [ - "#13" + "#3" ] - }, + } + ], + "args": [ { - "name": "adrenaProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#14" - ] - }, + "name": "params", + "type": { + "defined": "SetPoolAllowTradeParams" + } + } + ] + }, + { + "name": "setPoolAumSoftCapUsd", + "accounts": [ { - "name": "systemProgram", + "name": "admin", "isMut": false, - "isSigner": false, + "isSigner": true, "docs": [ - "#15" + "#1" ] }, { - "name": "tokenProgram", - "isMut": false, + "name": "cortex", + "isMut": true, "isSigner": false, "docs": [ - "#16" + "#2" ] }, { - "name": "rent", - "isMut": false, + "name": "pool", + "isMut": true, "isSigner": false, "docs": [ - "#17" + "#3" ] } ], - "args": [], - "returns": "u64" + "args": [ + { + "name": "params", + "type": { + "defined": "SetPoolAumSoftCapUsdParams" + } + } + ] }, { - "name": "addPoolPartOne", + "name": "testAdminRemoveCollateral", "accounts": [ { "name": "admin", @@ -11817,31 +13745,31 @@ export const IDL: Adrena = { ] }, { - "name": "payer", - "isMut": true, - "isSigner": true, + "name": "owner", + "isMut": false, + "isSigner": false, "docs": [ "#2" ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "receivingAccount", + "isMut": true, "isSigner": false, "docs": [ "#3" ] }, { - "name": "cortex", - "isMut": true, + "name": "transferAuthority", + "isMut": false, "isSigner": false, "docs": [ "#4" ] }, { - "name": "pool", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -11849,7 +13777,7 @@ export const IDL: Adrena = { ] }, { - "name": "lpTokenMint", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -11857,7 +13785,7 @@ export const IDL: Adrena = { ] }, { - "name": "lpTokenMintMetadata", + "name": "position", "isMut": true, "isSigner": false, "docs": [ @@ -11865,15 +13793,15 @@ export const IDL: Adrena = { ] }, { - "name": "systemProgram", - "isMut": false, + "name": "custody", + "isMut": true, "isSigner": false, "docs": [ "#8" ] }, { - "name": "tokenProgram", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -11881,15 +13809,15 @@ export const IDL: Adrena = { ] }, { - "name": "mplTokenMetadataProgram", - "isMut": false, + "name": "collateralCustody", + "isMut": true, "isSigner": false, "docs": [ "#10" ] }, { - "name": "adrenaProgram", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -11897,29 +13825,44 @@ export const IDL: Adrena = { ] }, { - "name": "rent", - "isMut": false, + "name": "collateralCustodyTokenAccount", + "isMut": true, "isSigner": false, "docs": [ "#12" ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] } ], "args": [ { "name": "params", "type": { - "defined": "AddPoolPartOneParams" + "defined": "TestAdminRemoveCollateralParams" } } - ], - "returns": "u8" + ] }, { - "name": "addPoolPartTwo", + "name": "swap", "accounts": [ { - "name": "admin", + "name": "owner", "isMut": false, "isSigner": true, "docs": [ @@ -11927,31 +13870,31 @@ export const IDL: Adrena = { ] }, { - "name": "payer", + "name": "fundingAccount", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ "#2" ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "receivingAccount", + "isMut": true, "isSigner": false, "docs": [ "#3" ] }, { - "name": "cortex", - "isMut": true, + "name": "transferAuthority", + "isMut": false, "isSigner": false, "docs": [ "#4" ] }, { - "name": "pool", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -11959,15 +13902,15 @@ export const IDL: Adrena = { ] }, { - "name": "lpTokenMint", - "isMut": false, + "name": "lmStaking", + "isMut": true, "isSigner": false, "docs": [ "#6" ] }, { - "name": "genesisLock", + "name": "lpStaking", "isMut": true, "isSigner": false, "docs": [ @@ -11975,7 +13918,7 @@ export const IDL: Adrena = { ] }, { - "name": "finalizeGenesisLockCampaignThread", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -11983,15 +13926,15 @@ export const IDL: Adrena = { ] }, { - "name": "systemProgram", - "isMut": false, + "name": "stakingRewardTokenCustody", + "isMut": true, "isSigner": false, "docs": [ "#9" ] }, { - "name": "tokenProgram", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -11999,132 +13942,165 @@ export const IDL: Adrena = { ] }, { - "name": "sablierProgram", - "isMut": false, + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, "isSigner": false, "docs": [ "#11" ] }, { - "name": "adrenaProgram", - "isMut": false, + "name": "receivingCustody", + "isMut": true, "isSigner": false, "docs": [ "#12" ] }, { - "name": "rent", + "name": "receivingCustodyOracle", "isMut": false, "isSigner": false, "docs": [ "#13" ] - } - ], - "args": [ + }, { - "name": "params", - "type": { - "defined": "AddPoolPartTwoParams" - } - } - ], - "returns": "u8" - }, - { - "name": "removePool", - "accounts": [ + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, { - "name": "admin", + "name": "dispensingCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "dispensingCustodyOracle", "isMut": false, - "isSigner": true, + "isSigner": false, "docs": [ - "#1" + "#16" ] }, { - "name": "payer", + "name": "dispensingCustodyTokenAccount", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ - "#2" + "#17" ] }, { - "name": "transferAuthority", + "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ - "#3" + "#18" ] }, { - "name": "cortex", + "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ - "#4" + "#19" ] }, { - "name": "pool", + "name": "lpTokenMint", "isMut": true, "isSigner": false, "docs": [ - "#5" + "#20" ] }, { - "name": "systemProgram", + "name": "protocolFeeRecipient", + "isMut": true, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#22" + ] + }, + { + "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ - "#6" + "#23" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" ] } - ], - "args": [], - "returns": "u8" + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SwapParams" + } + } + ] }, { - "name": "addCustody", + "name": "addLiquidity", "accounts": [ { - "name": "admin", - "isMut": false, + "name": "owner", + "isMut": true, "isSigner": true, "docs": [ "#1" ] }, { - "name": "payer", + "name": "fundingAccount", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ "#2" ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "lpTokenAccount", + "isMut": true, "isSigner": false, "docs": [ - "#3" + "#3 Front end will target the owner account, but not limited to" ] }, { - "name": "cortex", - "isMut": true, + "name": "transferAuthority", + "isMut": false, "isSigner": false, "docs": [ "#4" ] }, { - "name": "pool", + "name": "lmStaking", "isMut": true, "isSigner": false, "docs": [ @@ -12132,7 +14108,7 @@ export const IDL: Adrena = { ] }, { - "name": "custody", + "name": "lpStaking", "isMut": true, "isSigner": false, "docs": [ @@ -12140,7 +14116,7 @@ export const IDL: Adrena = { ] }, { - "name": "custodyTokenAccount", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -12148,23 +14124,23 @@ export const IDL: Adrena = { ] }, { - "name": "custodyTokenMint", - "isMut": false, + "name": "pool", + "isMut": true, "isSigner": false, "docs": [ "#8" ] }, { - "name": "systemProgram", - "isMut": false, + "name": "stakingRewardTokenCustody", + "isMut": true, "isSigner": false, "docs": [ "#9" ] }, { - "name": "tokenProgram", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -12172,97 +14148,91 @@ export const IDL: Adrena = { ] }, { - "name": "rent", - "isMut": false, + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, "isSigner": false, "docs": [ "#11" ] - } - ], - "args": [ + }, { - "name": "params", - "type": { - "defined": "AddCustodyParams" - } - } - ], - "returns": "u8" - }, - { - "name": "removeCustody", - "accounts": [ + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, { - "name": "admin", + "name": "custodyOracle", "isMut": false, - "isSigner": true, + "isSigner": false, "docs": [ - "#1" + "#13" ] }, { - "name": "payer", + "name": "custodyTokenAccount", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ - "#2" + "#14" ] }, { - "name": "transferAuthority", + "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ - "#3" + "#15" ] }, { - "name": "cortex", - "isMut": false, + "name": "lpStakingRewardTokenVault", + "isMut": true, "isSigner": false, "docs": [ - "#4" + "#16" ] }, { - "name": "pool", + "name": "lmTokenMint", "isMut": true, "isSigner": false, "docs": [ - "#5" + "#17" ] }, { - "name": "custody", + "name": "lpTokenMint", "isMut": true, "isSigner": false, "docs": [ - "#6" + "#18" ] }, { - "name": "custodyTokenAccount", + "name": "protocolFeeRecipient", "isMut": true, "isSigner": false, "docs": [ - "#7" + "#19" ] }, { - "name": "systemProgram", + "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ - "#8" + "#20" ] }, { - "name": "tokenProgram", + "name": "adrenaProgram", "isMut": false, "isSigner": false, "docs": [ - "#9" + "#21" ] } ], @@ -12270,25 +14240,24 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "RemoveCustodyParams" + "defined": "AddLiquidityParams" } } - ], - "returns": "u8" + ] }, { - "name": "setCustodyConfig", + "name": "addGenesisLiquidity", "accounts": [ { - "name": "admin", - "isMut": false, + "name": "owner", + "isMut": true, "isSigner": true, "docs": [ "#1" ] }, { - "name": "pool", + "name": "fundingAccount", "isMut": true, "isSigner": false, "docs": [ @@ -12296,41 +14265,27 @@ export const IDL: Adrena = { ] }, { - "name": "cortex", - "isMut": true, + "name": "transferAuthority", + "isMut": false, "isSigner": false, "docs": [ "#3" ] }, { - "name": "custody", + "name": "lpUserStaking", "isMut": true, "isSigner": false, "docs": [ "#4" ] - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "SetCustodyConfigParams" - } - } - ], - "returns": "u8" - }, - { - "name": "setCustodyAllowSwap", - "accounts": [ + }, { - "name": "admin", - "isMut": false, - "isSigner": true, + "name": "lpStaking", + "isMut": true, + "isSigner": false, "docs": [ - "#1" + "#5" ] }, { @@ -12338,7 +14293,7 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#2" + "#6" ] }, { @@ -12346,171 +14301,162 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#3" + "#7" ] }, { - "name": "custody", + "name": "lpStakingStakedTokenVault", "isMut": true, "isSigner": false, "docs": [ - "#4" + "#8" ] - } - ], - "args": [ + }, { - "name": "params", - "type": { - "defined": "SetCustodyAllowSwapParams" - } - } - ] - }, - { - "name": "setCustodyAllowTrade", - "accounts": [ + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, { - "name": "admin", + "name": "custodyOracle", "isMut": false, - "isSigner": true, + "isSigner": false, "docs": [ - "#1" + "#10" ] }, { - "name": "cortex", + "name": "custodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ - "#2" + "#11" ] }, { - "name": "pool", + "name": "lmTokenMint", "isMut": true, "isSigner": false, "docs": [ - "#3" + "#12" ] }, { - "name": "custody", + "name": "lpTokenMint", "isMut": true, "isSigner": false, "docs": [ - "#4" + "#13" ] - } - ], - "args": [ + }, { - "name": "params", - "type": { - "defined": "SetCustodyAllowTradeParams" - } - } - ] - }, - { - "name": "setPoolAllowSwap", - "accounts": [ + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, { - "name": "admin", + "name": "governanceRealm", "isMut": false, - "isSigner": true, + "isSigner": false, "docs": [ - "#1" + "#15", + "A realm represent one project within the governance program" ] }, { - "name": "cortex", - "isMut": true, + "name": "governanceRealmConfig", + "isMut": false, "isSigner": false, "docs": [ - "#2" + "#16" ] }, { - "name": "pool", + "name": "governanceGoverningTokenHolding", "isMut": true, "isSigner": false, "docs": [ - "#3" + "#17", + "Token account owned by governance program holding user's locked tokens" ] - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "SetPoolAllowSwapParams" - } - } - ] - }, - { - "name": "setPoolAllowTrade", - "accounts": [ + }, { - "name": "admin", - "isMut": false, - "isSigner": true, + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, "docs": [ - "#1" + "#18", + "Account owned by governance storing user information" ] }, { - "name": "cortex", + "name": "lpStakeResolutionThread", "isMut": true, "isSigner": false, "docs": [ - "#2" + "#19" ] }, { - "name": "pool", + "name": "stakesClaimCronThread", "isMut": true, "isSigner": false, "docs": [ - "#3" + "#20" ] - } - ], - "args": [ + }, { - "name": "params", - "type": { - "defined": "SetPoolAllowTradeParams" - } - } - ] - }, - { - "name": "setPoolAumSoftCapUsd", - "accounts": [ + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#21" + ] + }, { - "name": "admin", + "name": "governanceProgram", "isMut": false, - "isSigner": true, + "isSigner": false, "docs": [ - "#1" + "#22" ] }, { - "name": "cortex", - "isMut": true, + "name": "systemProgram", + "isMut": false, "isSigner": false, "docs": [ - "#2" + "#23" ] }, { - "name": "pool", + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "genesisLock", "isMut": true, "isSigner": false, "docs": [ - "#3" + "#26" ] } ], @@ -12518,40 +14464,40 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "SetPoolAumSoftCapUsdParams" + "defined": "AddGenesisLiquidityParams" } } ] }, { - "name": "setTestOraclePrice", + "name": "removeLiquidity", "accounts": [ { - "name": "admin", - "isMut": false, + "name": "owner", + "isMut": true, "isSigner": true, "docs": [ "#1" ] }, { - "name": "payer", + "name": "receivingAccount", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ - "#2" + "#2 Front end will target the owner account, but not limited to" ] }, { - "name": "cortex", - "isMut": false, + "name": "lpTokenAccount", + "isMut": true, "isSigner": false, "docs": [ "#3" ] }, { - "name": "pool", + "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ @@ -12559,15 +14505,15 @@ export const IDL: Adrena = { ] }, { - "name": "custody", - "isMut": false, + "name": "lmStaking", + "isMut": true, "isSigner": false, "docs": [ "#5" ] }, { - "name": "oracleAccount", + "name": "lpStaking", "isMut": true, "isSigner": false, "docs": [ @@ -12575,137 +14521,115 @@ export const IDL: Adrena = { ] }, { - "name": "systemProgram", - "isMut": false, + "name": "cortex", + "isMut": true, "isSigner": false, "docs": [ "#7" ] - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "SetTestOraclePriceParams" - } - } - ], - "returns": "u8" - }, - { - "name": "testAdminRemoveCollateral", - "accounts": [ - { - "name": "admin", - "isMut": false, - "isSigner": true, - "docs": [ - "#1" - ] }, { - "name": "owner", - "isMut": false, + "name": "pool", + "isMut": true, "isSigner": false, "docs": [ - "#2" + "#8" ] }, { - "name": "receivingAccount", + "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, "docs": [ - "#3" + "#9" ] }, { - "name": "transferAuthority", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, "docs": [ - "#4" + "#10" ] }, { - "name": "cortex", + "name": "stakingRewardTokenCustodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ - "#5" + "#11" ] }, { - "name": "pool", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ - "#6" + "#12" ] }, { - "name": "position", - "isMut": true, + "name": "custodyOracle", + "isMut": false, "isSigner": false, "docs": [ - "#7" + "#13" ] }, { - "name": "custody", + "name": "custodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ - "#8" + "#14" ] }, { - "name": "custodyOracleAccount", - "isMut": false, + "name": "lmStakingRewardTokenVault", + "isMut": true, "isSigner": false, "docs": [ - "#9" + "#15" ] }, { - "name": "collateralCustody", + "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ - "#10" + "#16" ] }, { - "name": "collateralCustodyOracleAccount", - "isMut": false, + "name": "lpTokenMint", + "isMut": true, "isSigner": false, "docs": [ - "#11" + "#17" ] }, { - "name": "collateralCustodyTokenAccount", + "name": "protocolFeeRecipient", "isMut": true, "isSigner": false, "docs": [ - "#12" + "#18" ] }, { - "name": "adrenaProgram", + "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ - "#13" + "#19" ] }, { - "name": "tokenProgram", + "name": "adrenaProgram", "isMut": false, "isSigner": false, "docs": [ - "#14" + "#20" ] } ], @@ -12713,13 +14637,13 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "TestAdminRemoveCollateralParams" + "defined": "RemoveLiquidityParams" } } ] }, { - "name": "swap", + "name": "openPositionLong", "accounts": [ { "name": "owner", @@ -12730,15 +14654,15 @@ export const IDL: Adrena = { ] }, { - "name": "fundingAccount", + "name": "payer", "isMut": true, - "isSigner": false, + "isSigner": true, "docs": [ "#2" ] }, { - "name": "receivingAccount", + "name": "fundingAccount", "isMut": true, "isSigner": false, "docs": [ @@ -12762,7 +14686,7 @@ export const IDL: Adrena = { ] }, { - "name": "lmStaking", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -12770,7 +14694,7 @@ export const IDL: Adrena = { ] }, { - "name": "lpStaking", + "name": "position", "isMut": true, "isSigner": false, "docs": [ @@ -12778,7 +14702,7 @@ export const IDL: Adrena = { ] }, { - "name": "pool", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ @@ -12786,15 +14710,15 @@ export const IDL: Adrena = { ] }, { - "name": "stakingRewardTokenCustody", - "isMut": true, + "name": "custodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#9" ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ @@ -12802,7 +14726,7 @@ export const IDL: Adrena = { ] }, { - "name": "stakingRewardTokenCustodyTokenAccount", + "name": "custodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -12810,15 +14734,16 @@ export const IDL: Adrena = { ] }, { - "name": "receivingCustody", + "name": "userProfile", "isMut": true, "isSigner": false, + "isOptional": true, "docs": [ "#12" ] }, { - "name": "receivingCustodyOracleAccount", + "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ @@ -12826,67 +14751,128 @@ export const IDL: Adrena = { ] }, { - "name": "receivingCustodyTokenAccount", - "isMut": true, + "name": "tokenProgram", + "isMut": false, "isSigner": false, "docs": [ "#14" ] }, { - "name": "dispensingCustody", + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "OpenPositionLongParams" + } + } + ] + }, + { + "name": "openPositionShort", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "payer", + "isMut": true, + "isSigner": true, + "docs": [ + "#2" + ] + }, + { + "name": "fundingAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "pool", "isMut": true, "isSigner": false, "docs": [ - "#15" + "#6" ] }, { - "name": "dispensingCustodyOracleAccount", - "isMut": false, + "name": "position", + "isMut": true, "isSigner": false, "docs": [ - "#16" + "#7" ] }, { - "name": "dispensingCustodyTokenAccount", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ - "#17" + "#8" ] }, { - "name": "lmStakingRewardTokenVault", - "isMut": true, + "name": "custodyTradeOracle", + "isMut": false, "isSigner": false, "docs": [ - "#18" + "#9" ] }, { - "name": "lpStakingRewardTokenVault", + "name": "collateralCustody", "isMut": true, "isSigner": false, "docs": [ - "#19" + "#10" ] }, { - "name": "lpTokenMint", - "isMut": true, + "name": "collateralCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ - "#20" + "#11" ] }, { - "name": "protocolFeeRecipient", + "name": "collateralCustodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ - "#21" + "#12" ] }, { @@ -12895,7 +14881,15 @@ export const IDL: Adrena = { "isSigner": false, "isOptional": true, "docs": [ - "#22" + "#13" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" ] }, { @@ -12903,7 +14897,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#23" + "#15" ] }, { @@ -12911,7 +14905,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#24" + "#16" ] } ], @@ -12919,32 +14913,32 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "SwapParams" + "defined": "OpenPositionShortParams" } } ] }, { - "name": "addLiquidity", + "name": "openOrIncreasePositionWithSwapLong", "accounts": [ { "name": "owner", - "isMut": true, + "isMut": false, "isSigner": true, "docs": [ "#1" ] }, { - "name": "fundingAccount", + "name": "payer", "isMut": true, - "isSigner": false, + "isSigner": true, "docs": [ "#2" ] }, { - "name": "lpTokenAccount", + "name": "fundingAccount", "isMut": true, "isSigner": false, "docs": [ @@ -12952,15 +14946,15 @@ export const IDL: Adrena = { ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "collateralAccount", + "isMut": true, "isSigner": false, "docs": [ "#4" ] }, { - "name": "lmStaking", + "name": "receivingCustody", "isMut": true, "isSigner": false, "docs": [ @@ -12968,15 +14962,15 @@ export const IDL: Adrena = { ] }, { - "name": "lpStaking", - "isMut": true, + "name": "receivingCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#6" ] }, { - "name": "cortex", + "name": "receivingCustodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -12984,7 +14978,7 @@ export const IDL: Adrena = { ] }, { - "name": "pool", + "name": "principalCustody", "isMut": true, "isSigner": false, "docs": [ @@ -12992,15 +14986,15 @@ export const IDL: Adrena = { ] }, { - "name": "stakingRewardTokenCustody", - "isMut": true, + "name": "principalCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#9" ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "principalCustodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ @@ -13008,7 +15002,7 @@ export const IDL: Adrena = { ] }, { - "name": "stakingRewardTokenCustodyTokenAccount", + "name": "principalCustodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -13016,23 +15010,23 @@ export const IDL: Adrena = { ] }, { - "name": "custody", - "isMut": true, + "name": "transferAuthority", + "isMut": false, "isSigner": false, "docs": [ "#12" ] }, { - "name": "custodyOracleAccount", - "isMut": false, + "name": "cortex", + "isMut": true, "isSigner": false, "docs": [ "#13" ] }, { - "name": "custodyTokenAccount", + "name": "lmStaking", "isMut": true, "isSigner": false, "docs": [ @@ -13040,7 +15034,7 @@ export const IDL: Adrena = { ] }, { - "name": "lmStakingRewardTokenVault", + "name": "lpStaking", "isMut": true, "isSigner": false, "docs": [ @@ -13048,7 +15042,7 @@ export const IDL: Adrena = { ] }, { - "name": "lpStakingRewardTokenVault", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -13056,7 +15050,7 @@ export const IDL: Adrena = { ] }, { - "name": "lmTokenMint", + "name": "position", "isMut": true, "isSigner": false, "docs": [ @@ -13064,19 +15058,76 @@ export const IDL: Adrena = { ] }, { - "name": "lpTokenMint", + "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, "docs": [ "#18" ] }, + { + "name": "stakingRewardTokenCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#20" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#23" + ] + }, { "name": "protocolFeeRecipient", "isMut": true, "isSigner": false, "docs": [ - "#19" + "#24" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#25" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" ] }, { @@ -13084,7 +15135,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#20" + "#27" ] }, { @@ -13092,7 +15143,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#21" + "#28" ] } ], @@ -13100,32 +15151,32 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "AddLiquidityParams" + "defined": "OpenPositionWithSwapParams" } } ] }, { - "name": "addGenesisLiquidity", + "name": "openOrIncreasePositionWithSwapShort", "accounts": [ { "name": "owner", - "isMut": true, + "isMut": false, "isSigner": true, "docs": [ "#1" ] }, { - "name": "fundingAccount", + "name": "payer", "isMut": true, - "isSigner": false, + "isSigner": true, "docs": [ "#2" ] }, { - "name": "lpTokenAccount", + "name": "fundingAccount", "isMut": true, "isSigner": false, "docs": [ @@ -13133,15 +15184,15 @@ export const IDL: Adrena = { ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "collateralAccount", + "isMut": true, "isSigner": false, "docs": [ "#4" ] }, { - "name": "lpUserStaking", + "name": "receivingCustody", "isMut": true, "isSigner": false, "docs": [ @@ -13149,15 +15200,15 @@ export const IDL: Adrena = { ] }, { - "name": "lpStaking", - "isMut": true, + "name": "receivingCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#6" ] }, { - "name": "cortex", + "name": "receivingCustodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -13165,7 +15216,7 @@ export const IDL: Adrena = { ] }, { - "name": "pool", + "name": "collateralCustody", "isMut": true, "isSigner": false, "docs": [ @@ -13173,15 +15224,15 @@ export const IDL: Adrena = { ] }, { - "name": "lpStakingStakedTokenVault", - "isMut": true, + "name": "collateralCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#9" ] }, { - "name": "custody", + "name": "collateralCustodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -13189,23 +15240,23 @@ export const IDL: Adrena = { ] }, { - "name": "custodyOracleAccount", - "isMut": false, + "name": "principalCustody", + "isMut": true, "isSigner": false, "docs": [ "#11" ] }, { - "name": "custodyTokenAccount", - "isMut": true, + "name": "principalCustodyTradeOracle", + "isMut": false, "isSigner": false, "docs": [ "#12" ] }, { - "name": "lmTokenMint", + "name": "principalCustodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -13213,15 +15264,15 @@ export const IDL: Adrena = { ] }, { - "name": "lpTokenMint", - "isMut": true, + "name": "transferAuthority", + "isMut": false, "isSigner": false, "docs": [ "#14" ] }, { - "name": "governanceTokenMint", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -13229,42 +15280,39 @@ export const IDL: Adrena = { ] }, { - "name": "governanceRealm", - "isMut": false, + "name": "lmStaking", + "isMut": true, "isSigner": false, "docs": [ - "#16", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "#16" ] }, { - "name": "governanceRealmConfig", - "isMut": false, + "name": "lpStaking", + "isMut": true, "isSigner": false, "docs": [ "#17" ] }, { - "name": "governanceGoverningTokenHolding", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ - "#18", - "Token account owned by governance program holding user's locked tokens" + "#18" ] }, { - "name": "governanceGoverningTokenOwnerRecord", + "name": "position", "isMut": true, "isSigner": false, "docs": [ - "#19", - "Account owned by governance storing user information" + "#19" ] }, { - "name": "lpStakeResolutionThread", + "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, "docs": [ @@ -13272,27 +15320,60 @@ export const IDL: Adrena = { ] }, { - "name": "stakesClaimCronThread", - "isMut": true, + "name": "stakingRewardTokenCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#21" ] }, { - "name": "sablierProgram", - "isMut": false, + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "lmStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "protocolFeeRecipient", + "isMut": true, "isSigner": false, "docs": [ - "#23" + "#26" ] }, { - "name": "governanceProgram", - "isMut": false, + "name": "userProfile", + "isMut": true, "isSigner": false, + "isOptional": true, "docs": [ - "#24" + "#27" ] }, { @@ -13300,7 +15381,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#25" + "#28" ] }, { @@ -13308,7 +15389,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#26" + "#29" ] }, { @@ -13316,26 +15397,21 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#27" + "#30" ] - }, - { - "name": "genesisLock", - "isMut": true, - "isSigner": false } ], "args": [ { "name": "params", "type": { - "defined": "AddGenesisLiquidityParams" + "defined": "OpenPositionWithSwapParams" } } ] }, { - "name": "removeLiquidity", + "name": "addCollateralLong", "accounts": [ { "name": "owner", @@ -13346,7 +15422,7 @@ export const IDL: Adrena = { ] }, { - "name": "receivingAccount", + "name": "fundingAccount", "isMut": true, "isSigner": false, "docs": [ @@ -13354,23 +15430,23 @@ export const IDL: Adrena = { ] }, { - "name": "lpTokenAccount", - "isMut": true, + "name": "transferAuthority", + "isMut": false, "isSigner": false, "docs": [ "#3" ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "cortex", + "isMut": true, "isSigner": false, "docs": [ "#4" ] }, { - "name": "lmStaking", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -13378,7 +15454,7 @@ export const IDL: Adrena = { ] }, { - "name": "lpStaking", + "name": "position", "isMut": true, "isSigner": false, "docs": [ @@ -13386,7 +15462,7 @@ export const IDL: Adrena = { ] }, { - "name": "cortex", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ @@ -13394,15 +15470,15 @@ export const IDL: Adrena = { ] }, { - "name": "pool", - "isMut": true, + "name": "custodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#8" ] }, { - "name": "stakingRewardTokenCustody", + "name": "custodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -13410,7 +15486,7 @@ export const IDL: Adrena = { ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ @@ -13418,67 +15494,112 @@ export const IDL: Adrena = { ] }, { - "name": "stakingRewardTokenCustodyTokenAccount", - "isMut": true, + "name": "adrenaProgram", + "isMut": false, "isSigner": false, "docs": [ "#11" ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "AddCollateralLongParams" + } + } + ] + }, + { + "name": "addCollateralShort", + "accounts": [ + { + "name": "owner", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] }, { - "name": "custody", + "name": "fundingAccount", "isMut": true, "isSigner": false, "docs": [ - "#12" + "#2" ] }, { - "name": "custodyOracleAccount", + "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ - "#13" + "#3" ] }, { - "name": "custodyTokenAccount", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ - "#14" + "#4" ] }, { - "name": "lmStakingRewardTokenVault", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ - "#15" + "#5" ] }, { - "name": "lpStakingRewardTokenVault", + "name": "position", "isMut": true, "isSigner": false, "docs": [ - "#16" + "#6" ] }, { - "name": "lpTokenMint", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ - "#17" + "#7" ] }, { - "name": "protocolFeeRecipient", + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "collateralCustody", "isMut": true, "isSigner": false, "docs": [ - "#18" + "#9" + ] + }, + { + "name": "collateralCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" ] }, { @@ -13486,7 +15607,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#19" + "#12" ] }, { @@ -13494,7 +15615,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#20" + "#13" ] } ], @@ -13502,48 +15623,48 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "RemoveLiquidityParams" + "defined": "AddCollateralShortParams" } } ] }, { - "name": "openPositionLong", + "name": "removeCollateralLong", "accounts": [ { "name": "owner", - "isMut": false, + "isMut": true, "isSigner": true, "docs": [ "#1" ] }, { - "name": "payer", + "name": "receivingAccount", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ "#2" ] }, { - "name": "fundingAccount", - "isMut": true, + "name": "transferAuthority", + "isMut": false, "isSigner": false, "docs": [ "#3" ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "cortex", + "isMut": true, "isSigner": false, "docs": [ "#4" ] }, { - "name": "lmStaking", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -13551,7 +15672,7 @@ export const IDL: Adrena = { ] }, { - "name": "lpStaking", + "name": "position", "isMut": true, "isSigner": false, "docs": [ @@ -13559,7 +15680,7 @@ export const IDL: Adrena = { ] }, { - "name": "cortex", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ @@ -13567,15 +15688,15 @@ export const IDL: Adrena = { ] }, { - "name": "pool", - "isMut": true, + "name": "custodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#8" ] }, { - "name": "position", + "name": "custodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -13583,108 +15704,120 @@ export const IDL: Adrena = { ] }, { - "name": "stakingRewardTokenCustody", - "isMut": true, + "name": "adrenaProgram", + "isMut": false, "isSigner": false, "docs": [ "#10" ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ "#11" ] - }, + } + ], + "args": [ { - "name": "stakingRewardTokenCustodyTokenAccount", + "name": "params", + "type": { + "defined": "RemoveCollateralLongParams" + } + } + ] + }, + { + "name": "removeCollateralShort", + "accounts": [ + { + "name": "owner", "isMut": true, - "isSigner": false, + "isSigner": true, "docs": [ - "#12" + "#1" ] }, { - "name": "custody", + "name": "receivingAccount", "isMut": true, "isSigner": false, "docs": [ - "#13" + "#2" ] }, { - "name": "custodyOracleAccount", + "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ - "#14" + "#3" ] }, { - "name": "custodyTokenAccount", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ - "#15" + "#4" ] }, { - "name": "lmStakingRewardTokenVault", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ - "#16" + "#5" ] }, { - "name": "lpStakingRewardTokenVault", + "name": "position", "isMut": true, "isSigner": false, "docs": [ - "#17" + "#6" ] }, { - "name": "lpTokenMint", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ - "#18" + "#7" ] }, { - "name": "protocolFeeRecipient", - "isMut": true, + "name": "custodyOracle", + "isMut": false, "isSigner": false, "docs": [ - "#19" + "#8" ] }, { - "name": "userProfile", + "name": "collateralCustody", "isMut": true, "isSigner": false, - "isOptional": true, "docs": [ - "#20" + "#9" ] }, { - "name": "systemProgram", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ - "#21" + "#10" ] }, { - "name": "tokenProgram", - "isMut": false, + "name": "collateralCustodyTokenAccount", + "isMut": true, "isSigner": false, "docs": [ - "#22" + "#11" ] }, { @@ -13692,7 +15825,15 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#23" + "#12" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" ] } ], @@ -13700,32 +15841,32 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "OpenPositionLongParams" + "defined": "RemoveCollateralShortParams" } } ] }, { - "name": "openPositionShort", + "name": "closePositionLong", "accounts": [ { - "name": "owner", - "isMut": false, + "name": "caller", + "isMut": true, "isSigner": true, "docs": [ "#1" ] }, { - "name": "payer", + "name": "owner", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ "#2" ] }, { - "name": "fundingAccount", + "name": "receivingAccount", "isMut": true, "isSigner": false, "docs": [ @@ -13789,7 +15930,7 @@ export const IDL: Adrena = { ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -13813,7 +15954,7 @@ export const IDL: Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -13821,23 +15962,23 @@ export const IDL: Adrena = { ] }, { - "name": "collateralCustody", - "isMut": true, + "name": "custodyTradeOracle", + "isMut": false, "isSigner": false, "docs": [ "#15" ] }, { - "name": "collateralCustodyOracleAccount", - "isMut": false, + "name": "custodyTokenAccount", + "isMut": true, "isSigner": false, "docs": [ "#16" ] }, { - "name": "collateralCustodyTokenAccount", + "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -13845,7 +15986,7 @@ export const IDL: Adrena = { ] }, { - "name": "lmStakingRewardTokenVault", + "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -13853,7 +15994,7 @@ export const IDL: Adrena = { ] }, { - "name": "lpStakingRewardTokenVault", + "name": "lpTokenMint", "isMut": true, "isSigner": false, "docs": [ @@ -13861,7 +16002,7 @@ export const IDL: Adrena = { ] }, { - "name": "lpTokenMint", + "name": "protocolFeeRecipient", "isMut": true, "isSigner": false, "docs": [ @@ -13869,25 +16010,25 @@ export const IDL: Adrena = { ] }, { - "name": "protocolFeeRecipient", + "name": "userProfile", "isMut": true, "isSigner": false, + "isOptional": true, "docs": [ "#21" ] }, { - "name": "userProfile", + "name": "takeProfitThread", "isMut": true, "isSigner": false, - "isOptional": true, "docs": [ "#22" ] }, { - "name": "systemProgram", - "isMut": false, + "name": "stopLossThread", + "isMut": true, "isSigner": false, "docs": [ "#23" @@ -13908,38 +16049,46 @@ export const IDL: Adrena = { "docs": [ "#25" ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] } ], "args": [ { "name": "params", "type": { - "defined": "OpenPositionShortParams" + "defined": "ClosePositionLongParams" } } ] }, { - "name": "openOrIncreasePositionWithSwapLong", + "name": "closePositionShort", "accounts": [ { - "name": "owner", - "isMut": false, + "name": "caller", + "isMut": true, "isSigner": true, "docs": [ "#1" ] }, { - "name": "payer", + "name": "owner", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ "#2" ] }, { - "name": "fundingAccount", + "name": "receivingAccount", "isMut": true, "isSigner": false, "docs": [ @@ -13947,15 +16096,15 @@ export const IDL: Adrena = { ] }, { - "name": "collateralAccount", - "isMut": true, + "name": "transferAuthority", + "isMut": false, "isSigner": false, "docs": [ "#4" ] }, { - "name": "receivingCustody", + "name": "lmStaking", "isMut": true, "isSigner": false, "docs": [ @@ -13963,15 +16112,15 @@ export const IDL: Adrena = { ] }, { - "name": "receivingCustodyOracleAccount", - "isMut": false, + "name": "lpStaking", + "isMut": true, "isSigner": false, "docs": [ "#6" ] }, { - "name": "receivingCustodyTokenAccount", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -13979,7 +16128,7 @@ export const IDL: Adrena = { ] }, { - "name": "principalCustody", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -13987,15 +16136,15 @@ export const IDL: Adrena = { ] }, { - "name": "principalCustodyOracleAccount", - "isMut": false, + "name": "position", + "isMut": true, "isSigner": false, "docs": [ "#9" ] }, { - "name": "principalCustodyTokenAccount", + "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, "docs": [ @@ -14003,7 +16152,7 @@ export const IDL: Adrena = { ] }, { - "name": "transferAuthority", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -14011,7 +16160,7 @@ export const IDL: Adrena = { ] }, { - "name": "cortex", + "name": "stakingRewardTokenCustodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -14019,7 +16168,7 @@ export const IDL: Adrena = { ] }, { - "name": "lmStaking", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ @@ -14027,15 +16176,15 @@ export const IDL: Adrena = { ] }, { - "name": "lpStaking", - "isMut": true, + "name": "custodyTradeOracle", + "isMut": false, "isSigner": false, "docs": [ "#14" ] }, { - "name": "pool", + "name": "collateralCustody", "isMut": true, "isSigner": false, "docs": [ @@ -14043,15 +16192,15 @@ export const IDL: Adrena = { ] }, { - "name": "position", - "isMut": true, + "name": "collateralCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#16" ] }, { - "name": "stakingRewardTokenCustody", + "name": "collateralCustodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -14059,15 +16208,15 @@ export const IDL: Adrena = { ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", - "isMut": false, + "name": "lmStakingRewardTokenVault", + "isMut": true, "isSigner": false, "docs": [ "#18" ] }, { - "name": "stakingRewardTokenCustodyTokenAccount", + "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -14075,7 +16224,7 @@ export const IDL: Adrena = { ] }, { - "name": "lmStakingRewardTokenVault", + "name": "lpTokenMint", "isMut": true, "isSigner": false, "docs": [ @@ -14083,7 +16232,7 @@ export const IDL: Adrena = { ] }, { - "name": "lpStakingRewardTokenVault", + "name": "protocolFeeRecipient", "isMut": true, "isSigner": false, "docs": [ @@ -14091,32 +16240,26 @@ export const IDL: Adrena = { ] }, { - "name": "lpTokenMint", + "name": "userProfile", "isMut": true, "isSigner": false, + "isOptional": true, "docs": [ "#22" ] }, { - "name": "protocolFeeRecipient", + "name": "takeProfitThread", "isMut": true, - "isSigner": false, - "docs": [ - "#23" - ] + "isSigner": false }, { - "name": "userProfile", + "name": "stopLossThread", "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "#24" - ] + "isSigner": false }, { - "name": "systemProgram", + "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ @@ -14124,7 +16267,7 @@ export const IDL: Adrena = { ] }, { - "name": "tokenProgram", + "name": "adrenaProgram", "isMut": false, "isSigner": false, "docs": [ @@ -14132,7 +16275,7 @@ export const IDL: Adrena = { ] }, { - "name": "adrenaProgram", + "name": "sablierProgram", "isMut": false, "isSigner": false, "docs": [ @@ -14144,40 +16287,40 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "OpenPositionWithSwapParams" + "defined": "ClosePositionShortParams" } } ] }, { - "name": "openOrIncreasePositionWithSwapShort", + "name": "liquidateLong", "accounts": [ { - "name": "owner", - "isMut": false, + "name": "signer", + "isMut": true, "isSigner": true, "docs": [ "#1" ] }, { - "name": "payer", + "name": "receivingAccount", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ "#2" ] }, { - "name": "fundingAccount", - "isMut": true, + "name": "transferAuthority", + "isMut": false, "isSigner": false, "docs": [ "#3" ] }, { - "name": "collateralAccount", + "name": "lmStaking", "isMut": true, "isSigner": false, "docs": [ @@ -14185,7 +16328,7 @@ export const IDL: Adrena = { ] }, { - "name": "receivingCustody", + "name": "lpStaking", "isMut": true, "isSigner": false, "docs": [ @@ -14193,15 +16336,15 @@ export const IDL: Adrena = { ] }, { - "name": "receivingCustodyOracleAccount", - "isMut": false, + "name": "cortex", + "isMut": true, "isSigner": false, "docs": [ "#6" ] }, { - "name": "receivingCustodyTokenAccount", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -14209,7 +16352,7 @@ export const IDL: Adrena = { ] }, { - "name": "collateralCustody", + "name": "position", "isMut": true, "isSigner": false, "docs": [ @@ -14217,23 +16360,23 @@ export const IDL: Adrena = { ] }, { - "name": "collateralCustodyOracleAccount", - "isMut": false, + "name": "stakingRewardTokenCustody", + "isMut": true, "isSigner": false, "docs": [ "#9" ] }, { - "name": "collateralCustodyTokenAccount", - "isMut": true, + "name": "stakingRewardTokenCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#10" ] }, { - "name": "principalCustody", + "name": "stakingRewardTokenCustodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -14241,23 +16384,23 @@ export const IDL: Adrena = { ] }, { - "name": "principalCustodyOracleAccount", - "isMut": false, + "name": "custody", + "isMut": true, "isSigner": false, "docs": [ "#12" ] }, { - "name": "principalCustodyTokenAccount", - "isMut": true, + "name": "custodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#13" ] }, { - "name": "transferAuthority", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ @@ -14265,7 +16408,7 @@ export const IDL: Adrena = { ] }, { - "name": "cortex", + "name": "custodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -14273,7 +16416,7 @@ export const IDL: Adrena = { ] }, { - "name": "lmStaking", + "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -14281,7 +16424,7 @@ export const IDL: Adrena = { ] }, { - "name": "lpStaking", + "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -14289,7 +16432,7 @@ export const IDL: Adrena = { ] }, { - "name": "pool", + "name": "lpTokenMint", "isMut": true, "isSigner": false, "docs": [ @@ -14297,7 +16440,7 @@ export const IDL: Adrena = { ] }, { - "name": "position", + "name": "protocolFeeRecipient", "isMut": true, "isSigner": false, "docs": [ @@ -14305,23 +16448,24 @@ export const IDL: Adrena = { ] }, { - "name": "stakingRewardTokenCustody", + "name": "userProfile", "isMut": true, "isSigner": false, + "isOptional": true, "docs": [ "#20" ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", - "isMut": false, + "name": "takeProfitThread", + "isMut": true, "isSigner": false, "docs": [ "#21" ] }, { - "name": "stakingRewardTokenCustodyTokenAccount", + "name": "stopLossThread", "isMut": true, "isSigner": false, "docs": [ @@ -14329,68 +16473,27 @@ export const IDL: Adrena = { ] }, { - "name": "lmStakingRewardTokenVault", - "isMut": true, - "isSigner": false, - "docs": [ - "#23" - ] - }, - { - "name": "lpStakingRewardTokenVault", - "isMut": true, - "isSigner": false, - "docs": [ - "#24" - ] - }, - { - "name": "lpTokenMint", - "isMut": true, - "isSigner": false, - "docs": [ - "#25" - ] - }, - { - "name": "protocolFeeRecipient", - "isMut": true, - "isSigner": false, - "docs": [ - "#26" - ] - }, - { - "name": "userProfile", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "#27" - ] - }, - { - "name": "systemProgram", + "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ - "#28" + "#23" ] }, { - "name": "tokenProgram", + "name": "adrenaProgram", "isMut": false, "isSigner": false, "docs": [ - "#29" + "#24" ] }, { - "name": "adrenaProgram", + "name": "sablierProgram", "isMut": false, "isSigner": false, "docs": [ - "#30" + "#25" ] } ], @@ -14398,16 +16501,16 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "OpenPositionWithSwapParams" + "defined": "LiquidateLongParams" } } ] }, { - "name": "addCollateralLong", + "name": "liquidateShort", "accounts": [ { - "name": "owner", + "name": "signer", "isMut": true, "isSigner": true, "docs": [ @@ -14415,7 +16518,7 @@ export const IDL: Adrena = { ] }, { - "name": "fundingAccount", + "name": "receivingAccount", "isMut": true, "isSigner": false, "docs": [ @@ -14431,7 +16534,7 @@ export const IDL: Adrena = { ] }, { - "name": "cortex", + "name": "lmStaking", "isMut": true, "isSigner": false, "docs": [ @@ -14439,7 +16542,7 @@ export const IDL: Adrena = { ] }, { - "name": "pool", + "name": "lpStaking", "isMut": true, "isSigner": false, "docs": [ @@ -14447,7 +16550,7 @@ export const IDL: Adrena = { ] }, { - "name": "position", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -14455,7 +16558,7 @@ export const IDL: Adrena = { ] }, { - "name": "custody", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -14463,15 +16566,15 @@ export const IDL: Adrena = { ] }, { - "name": "custodyOracleAccount", - "isMut": false, + "name": "position", + "isMut": true, "isSigner": false, "docs": [ "#8" ] }, { - "name": "custodyTokenAccount", + "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, "docs": [ @@ -14479,7 +16582,7 @@ export const IDL: Adrena = { ] }, { - "name": "tokenProgram", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -14487,112 +16590,108 @@ export const IDL: Adrena = { ] }, { - "name": "adrenaProgram", - "isMut": false, + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, "isSigner": false, "docs": [ "#11" ] - } - ], - "args": [ + }, { - "name": "params", - "type": { - "defined": "AddCollateralLongParams" - } - } - ] - }, - { - "name": "addCollateralShort", - "accounts": [ + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, { - "name": "owner", - "isMut": true, - "isSigner": true, + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, "docs": [ - "#1" + "#13" ] }, { - "name": "fundingAccount", + "name": "collateralCustody", "isMut": true, "isSigner": false, "docs": [ - "#2" + "#14" ] }, { - "name": "transferAuthority", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ - "#3" + "#15" ] }, { - "name": "cortex", + "name": "collateralCustodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ - "#4" + "#16" ] }, { - "name": "pool", + "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ - "#5" + "#17" ] }, { - "name": "position", + "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ - "#6" + "#18" ] }, { - "name": "custody", + "name": "lpTokenMint", "isMut": true, "isSigner": false, "docs": [ - "#7" + "#19" ] }, { - "name": "custodyOracleAccount", - "isMut": false, + "name": "protocolFeeRecipient", + "isMut": true, "isSigner": false, "docs": [ - "#8" + "#20" ] }, { - "name": "collateralCustody", + "name": "userProfile", "isMut": true, "isSigner": false, + "isOptional": true, "docs": [ - "#9" + "#21" ] }, { - "name": "collateralCustodyOracleAccount", - "isMut": false, + "name": "takeProfitThread", + "isMut": true, "isSigner": false, "docs": [ - "#10" + "#22" ] }, { - "name": "collateralCustodyTokenAccount", + "name": "stopLossThread", "isMut": true, "isSigner": false, "docs": [ - "#11" + "#23" ] }, { @@ -14600,7 +16699,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#12" + "#24" ] }, { @@ -14608,7 +16707,15 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#13" + "#25" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" ] } ], @@ -14616,16 +16723,16 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "AddCollateralShortParams" + "defined": "LiquidateShortParams" } } ] }, { - "name": "removeCollateralLong", + "name": "updatePoolAum", "accounts": [ { - "name": "owner", + "name": "payer", "isMut": true, "isSigner": true, "docs": [ @@ -14633,83 +16740,122 @@ export const IDL: Adrena = { ] }, { - "name": "receivingAccount", - "isMut": true, + "name": "cortex", + "isMut": false, "isSigner": false, "docs": [ "#2" ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "pool", + "isMut": true, "isSigner": false, "docs": [ "#3" ] - }, + } + ], + "args": [], + "returns": "u128" + }, + { + "name": "getAddLiquidityAmountAndFee", + "accounts": [ { "name": "cortex", - "isMut": true, + "isMut": false, "isSigner": false, "docs": [ - "#4" + "#1" ] }, { "name": "pool", - "isMut": true, + "isMut": false, "isSigner": false, "docs": [ - "#5" + "#2" ] }, { - "name": "position", - "isMut": true, + "name": "custody", + "isMut": false, "isSigner": false, "docs": [ - "#6" + "#3" ] }, { - "name": "custody", - "isMut": true, + "name": "custodyOracle", + "isMut": false, "isSigner": false, "docs": [ - "#7" + "#4" ] }, { - "name": "custodyOracleAccount", + "name": "lpTokenMint", "isMut": false, "isSigner": false, "docs": [ - "#8" + "#5" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetAddLiquidityAmountAndFeeParams" + } + } + ], + "returns": { + "defined": "AmountAndFee" + } + }, + { + "name": "getRemoveLiquidityAmountAndFee", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" ] }, { - "name": "custodyTokenAccount", - "isMut": true, + "name": "pool", + "isMut": false, "isSigner": false, "docs": [ - "#9" + "#2" ] }, { - "name": "adrenaProgram", + "name": "custody", "isMut": false, "isSigner": false, "docs": [ - "#10" + "#3" ] }, { - "name": "tokenProgram", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ - "#11" + "#4" + ] + }, + { + "name": "lpTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" ] } ], @@ -14717,32 +16863,35 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "RemoveCollateralLongParams" + "defined": "GetRemoveLiquidityAmountAndFeeParams" } } - ] + ], + "returns": { + "defined": "AmountAndFee" + } }, { - "name": "removeCollateralShort", + "name": "getEntryPriceAndFee", "accounts": [ { - "name": "owner", - "isMut": true, - "isSigner": true, + "name": "cortex", + "isMut": false, + "isSigner": false, "docs": [ "#1" ] }, { - "name": "receivingAccount", - "isMut": true, + "name": "pool", + "isMut": false, "isSigner": false, "docs": [ "#2" ] }, { - "name": "transferAuthority", + "name": "custody", "isMut": false, "isSigner": false, "docs": [ @@ -14750,83 +16899,115 @@ export const IDL: Adrena = { ] }, { - "name": "cortex", - "isMut": true, + "name": "custodyTradeOracle", + "isMut": false, "isSigner": false, "docs": [ "#4" ] }, { - "name": "pool", - "isMut": true, + "name": "collateralCustody", + "isMut": false, "isSigner": false, "docs": [ "#5" ] }, { - "name": "position", - "isMut": true, + "name": "collateralCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#6" ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "GetEntryPriceAndFeeParams" + } + } + ], + "returns": { + "defined": "NewPositionPricesAndFee" + } + }, + { + "name": "getOpenPositionWithSwapAmountAndFees", + "accounts": [ + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#1" + ] }, { - "name": "custody", - "isMut": true, + "name": "pool", + "isMut": false, "isSigner": false, "docs": [ - "#7" + "#2" ] }, { - "name": "custodyOracleAccount", + "name": "receivingCustody", "isMut": false, "isSigner": false, "docs": [ - "#8" + "#3" + ] + }, + { + "name": "receivingCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" ] }, { "name": "collateralCustody", - "isMut": true, + "isMut": false, "isSigner": false, "docs": [ - "#9" + "#5" ] }, { - "name": "collateralCustodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ - "#10" + "#6" ] }, { - "name": "collateralCustodyTokenAccount", - "isMut": true, + "name": "principalCustody", + "isMut": false, "isSigner": false, "docs": [ - "#11" + "#7" ] }, { - "name": "adrenaProgram", + "name": "principalCustodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ - "#12" + "#8" ] }, { - "name": "tokenProgram", + "name": "adrenaProgram", "isMut": false, "isSigner": false, "docs": [ - "#13" + "#9" ] } ], @@ -14834,32 +17015,35 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "RemoveCollateralShortParams" + "defined": "GetOpenPositionWithSwapAmountAndFeesParams" } } - ] + ], + "returns": { + "defined": "OpenPositionWithSwapAmountAndFees" + } }, { - "name": "closePositionLong", + "name": "getExitPriceAndFee", "accounts": [ { - "name": "owner", - "isMut": true, - "isSigner": true, + "name": "cortex", + "isMut": false, + "isSigner": false, "docs": [ "#1" ] }, { - "name": "receivingAccount", - "isMut": true, + "name": "pool", + "isMut": false, "isSigner": false, "docs": [ "#2" ] }, { - "name": "transferAuthority", + "name": "position", "isMut": false, "isSigner": false, "docs": [ @@ -14867,148 +17051,157 @@ export const IDL: Adrena = { ] }, { - "name": "lmStaking", - "isMut": true, + "name": "custody", + "isMut": false, "isSigner": false, "docs": [ "#4" ] }, { - "name": "lpStaking", - "isMut": true, + "name": "custodyTradeOracle", + "isMut": false, "isSigner": false, "docs": [ "#5" ] }, { - "name": "cortex", - "isMut": true, + "name": "collateralCustody", + "isMut": false, "isSigner": false, "docs": [ "#6" ] }, { - "name": "pool", - "isMut": true, + "name": "collateralCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#7" ] - }, - { - "name": "position", - "isMut": true, - "isSigner": false, - "docs": [ - "#8" - ] - }, + } + ], + "args": [], + "returns": { + "defined": "ExitPriceAndFee" + } + }, + { + "name": "getPnl", + "accounts": [ { - "name": "stakingRewardTokenCustody", - "isMut": true, + "name": "cortex", + "isMut": false, "isSigner": false, "docs": [ - "#9" + "#1" ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "pool", "isMut": false, "isSigner": false, "docs": [ - "#10" + "#2" ] }, { - "name": "stakingRewardTokenCustodyTokenAccount", - "isMut": true, + "name": "position", + "isMut": false, "isSigner": false, "docs": [ - "#11" + "#3" ] }, { "name": "custody", - "isMut": true, + "isMut": false, "isSigner": false, "docs": [ - "#12" + "#4" ] }, { - "name": "custodyOracleAccount", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ - "#13" + "#5" ] }, { - "name": "custodyTokenAccount", - "isMut": true, + "name": "collateralCustody", + "isMut": false, "isSigner": false, "docs": [ - "#14" + "#6" ] }, { - "name": "lmStakingRewardTokenVault", - "isMut": true, + "name": "collateralCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ - "#15" + "#7" ] - }, + } + ], + "args": [], + "returns": { + "defined": "ProfitAndLoss" + } + }, + { + "name": "getLiquidationPrice", + "accounts": [ { - "name": "lpStakingRewardTokenVault", - "isMut": true, + "name": "cortex", + "isMut": false, "isSigner": false, "docs": [ - "#16" + "#1" ] }, { - "name": "lpTokenMint", - "isMut": true, + "name": "pool", + "isMut": false, "isSigner": false, "docs": [ - "#17" + "#2" ] }, { - "name": "protocolFeeRecipient", - "isMut": true, + "name": "position", + "isMut": false, "isSigner": false, "docs": [ - "#18" + "#3" ] }, { - "name": "userProfile", - "isMut": true, + "name": "custody", + "isMut": false, "isSigner": false, - "isOptional": true, "docs": [ - "#19" + "#4" ] }, { - "name": "tokenProgram", + "name": "collateralCustody", "isMut": false, "isSigner": false, "docs": [ - "#20" + "#5" ] }, { - "name": "adrenaProgram", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ - "#21" + "#6" ] } ], @@ -15016,32 +17209,33 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "ClosePositionLongParams" + "defined": "GetLiquidationPriceParams" } } - ] + ], + "returns": "u64" }, { - "name": "closePositionShort", + "name": "getLiquidationState", "accounts": [ { - "name": "owner", - "isMut": true, - "isSigner": true, + "name": "cortex", + "isMut": false, + "isSigner": false, "docs": [ "#1" ] }, { - "name": "receivingAccount", - "isMut": true, + "name": "pool", + "isMut": false, "isSigner": false, "docs": [ "#2" ] }, { - "name": "transferAuthority", + "name": "position", "isMut": false, "isSigner": false, "docs": [ @@ -15049,181 +17243,172 @@ export const IDL: Adrena = { ] }, { - "name": "lmStaking", - "isMut": true, + "name": "custody", + "isMut": false, "isSigner": false, "docs": [ "#4" ] }, { - "name": "lpStaking", - "isMut": true, + "name": "custodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#5" ] }, { - "name": "cortex", - "isMut": true, + "name": "collateralCustody", + "isMut": false, "isSigner": false, "docs": [ "#6" ] }, { - "name": "pool", - "isMut": true, + "name": "collateralCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#7" ] - }, - { - "name": "position", - "isMut": true, - "isSigner": false, - "docs": [ - "#8" - ] - }, - { - "name": "stakingRewardTokenCustody", - "isMut": true, - "isSigner": false, - "docs": [ - "#9" - ] - }, + } + ], + "args": [], + "returns": "u8" + }, + { + "name": "getOraclePrice", + "accounts": [ { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "cortex", "isMut": false, "isSigner": false, "docs": [ - "#10" + "#1" ] }, { - "name": "stakingRewardTokenCustodyTokenAccount", - "isMut": true, + "name": "pool", + "isMut": false, "isSigner": false, "docs": [ - "#11" + "#2" ] }, { "name": "custody", - "isMut": true, - "isSigner": false, - "docs": [ - "#12" - ] - }, - { - "name": "custodyOracleAccount", "isMut": false, "isSigner": false, "docs": [ - "#13" + "#3" ] }, { - "name": "collateralCustody", - "isMut": true, + "name": "custodyOracle", + "isMut": false, "isSigner": false, "docs": [ - "#14" + "#4" ] - }, + } + ], + "args": [], + "returns": "u64" + }, + { + "name": "getSwapAmountAndFees", + "accounts": [ { - "name": "collateralCustodyOracleAccount", + "name": "cortex", "isMut": false, "isSigner": false, "docs": [ - "#15" + "#1" ] }, { - "name": "collateralCustodyTokenAccount", - "isMut": true, + "name": "pool", + "isMut": false, "isSigner": false, "docs": [ - "#16" + "#2" ] }, { - "name": "lmStakingRewardTokenVault", - "isMut": true, + "name": "receivingCustody", + "isMut": false, "isSigner": false, "docs": [ - "#17" + "#3" ] }, { - "name": "lpStakingRewardTokenVault", - "isMut": true, + "name": "receivingCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ - "#18" + "#4" ] }, { - "name": "lpTokenMint", - "isMut": true, + "name": "dispensingCustody", + "isMut": false, "isSigner": false, "docs": [ - "#19" + "#5" ] }, { - "name": "protocolFeeRecipient", - "isMut": true, + "name": "dispensingCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ - "#20" + "#6" ] - }, + } + ], + "args": [ { - "name": "userProfile", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "#21" - ] - }, + "name": "params", + "type": { + "defined": "GetSwapAmountAndFeesParams" + } + } + ], + "returns": { + "defined": "SwapAmountAndFees" + } + }, + { + "name": "getAssetsUnderManagement", + "accounts": [ { - "name": "tokenProgram", + "name": "cortex", "isMut": false, "isSigner": false, "docs": [ - "#22" + "#1" ] }, { - "name": "adrenaProgram", + "name": "pool", "isMut": false, "isSigner": false, "docs": [ - "#23" + "#2" ] } ], - "args": [ - { - "name": "params", - "type": { - "defined": "ClosePositionShortParams" - } - } - ] + "args": [], + "returns": "u128" }, { - "name": "liquidateLong", + "name": "initUserStaking", "accounts": [ { - "name": "signer", + "name": "owner", "isMut": true, "isSigner": true, "docs": [ @@ -15231,7 +17416,7 @@ export const IDL: Adrena = { ] }, { - "name": "receivingAccount", + "name": "rewardTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -15239,15 +17424,15 @@ export const IDL: Adrena = { ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "lmTokenAccount", + "isMut": true, "isSigner": false, "docs": [ "#3" ] }, { - "name": "lmStaking", + "name": "stakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -15255,7 +17440,7 @@ export const IDL: Adrena = { ] }, { - "name": "lpStaking", + "name": "stakingLmRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -15263,7 +17448,7 @@ export const IDL: Adrena = { ] }, { - "name": "cortex", + "name": "userStaking", "isMut": true, "isSigner": false, "docs": [ @@ -15271,15 +17456,15 @@ export const IDL: Adrena = { ] }, { - "name": "pool", - "isMut": true, + "name": "transferAuthority", + "isMut": false, "isSigner": false, "docs": [ "#7" ] }, { - "name": "position", + "name": "stakesClaimCronThread", "isMut": true, "isSigner": false, "docs": [ @@ -15287,7 +17472,7 @@ export const IDL: Adrena = { ] }, { - "name": "stakingRewardTokenCustody", + "name": "stakesClaimPayer", "isMut": true, "isSigner": false, "docs": [ @@ -15295,7 +17480,7 @@ export const IDL: Adrena = { ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "staking", "isMut": false, "isSigner": false, "docs": [ @@ -15303,7 +17488,7 @@ export const IDL: Adrena = { ] }, { - "name": "stakingRewardTokenCustodyTokenAccount", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -15311,7 +17496,7 @@ export const IDL: Adrena = { ] }, { - "name": "custody", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -15319,76 +17504,59 @@ export const IDL: Adrena = { ] }, { - "name": "custodyOracleAccount", - "isMut": false, + "name": "genesisLock", + "isMut": true, "isSigner": false, "docs": [ "#13" ] }, { - "name": "custodyTokenAccount", - "isMut": true, + "name": "lmTokenMint", + "isMut": false, "isSigner": false, "docs": [ "#14" ] }, { - "name": "lmStakingRewardTokenVault", - "isMut": true, + "name": "feeRedistributionMint", + "isMut": false, "isSigner": false, "docs": [ "#15" ] }, { - "name": "lpStakingRewardTokenVault", - "isMut": true, + "name": "adrenaProgram", + "isMut": false, "isSigner": false, "docs": [ "#16" ] }, { - "name": "lpTokenMint", - "isMut": true, + "name": "sablierProgram", + "isMut": false, "isSigner": false, "docs": [ "#17" ] }, { - "name": "protocolFeeRecipient", - "isMut": true, + "name": "systemProgram", + "isMut": false, "isSigner": false, "docs": [ "#18" ] }, - { - "name": "userProfile", - "isMut": true, - "isSigner": false, - "isOptional": true, - "docs": [ - "#19" - ] - }, { "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ - "#20" - ] - }, - { - "name": "adrenaProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#21" + "#19" ] } ], @@ -15396,40 +17564,40 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "LiquidateLongParams" + "defined": "InitUserStakingParams" } } ] }, { - "name": "liquidateShort", + "name": "initUserProfile", "accounts": [ { - "name": "signer", - "isMut": true, + "name": "user", + "isMut": false, "isSigner": true, "docs": [ "#1" ] }, { - "name": "receivingAccount", + "name": "payer", "isMut": true, - "isSigner": false, + "isSigner": true, "docs": [ "#2" ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "userProfile", + "isMut": true, "isSigner": false, "docs": [ "#3" ] }, { - "name": "lmStaking", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -15437,240 +17605,227 @@ export const IDL: Adrena = { ] }, { - "name": "lpStaking", - "isMut": true, + "name": "systemProgram", + "isMut": false, "isSigner": false, "docs": [ "#5" ] - }, + } + ], + "args": [ { - "name": "cortex", - "isMut": true, - "isSigner": false, - "docs": [ - "#6" - ] - }, + "name": "params", + "type": { + "defined": "InitUserProfileParams" + } + } + ] + }, + { + "name": "editUserProfile", + "accounts": [ { - "name": "pool", - "isMut": true, - "isSigner": false, + "name": "user", + "isMut": false, + "isSigner": true, "docs": [ - "#7" + "#1" ] }, { - "name": "position", + "name": "payer", "isMut": true, - "isSigner": false, + "isSigner": true, "docs": [ - "#8" + "#2" ] }, { - "name": "stakingRewardTokenCustody", + "name": "userProfile", "isMut": true, "isSigner": false, "docs": [ - "#9" + "#3" ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", + "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ - "#10" - ] - }, - { - "name": "stakingRewardTokenCustodyTokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "#11" + "#4" ] - }, + } + ], + "args": [ { - "name": "custody", - "isMut": true, - "isSigner": false, - "docs": [ - "#12" - ] - }, + "name": "params", + "type": { + "defined": "EditUserProfileParams" + } + } + ] + }, + { + "name": "deleteUserProfile", + "accounts": [ { - "name": "custodyOracleAccount", + "name": "admin", "isMut": false, - "isSigner": false, - "docs": [ - "#13" - ] - }, - { - "name": "collateralCustody", - "isMut": true, - "isSigner": false, + "isSigner": true, "docs": [ - "#14" + "#1" ] }, { - "name": "collateralCustodyOracleAccount", + "name": "user", "isMut": false, "isSigner": false, "docs": [ - "#15" + "#2" ] }, { - "name": "collateralCustodyTokenAccount", + "name": "payer", "isMut": true, - "isSigner": false, + "isSigner": true, "docs": [ - "#16" + "#3" ] }, { - "name": "lmStakingRewardTokenVault", + "name": "userProfile", "isMut": true, "isSigner": false, "docs": [ - "#17" + "#4" ] }, { - "name": "lpStakingRewardTokenVault", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ - "#18" + "#5" ] }, { - "name": "lpTokenMint", - "isMut": true, + "name": "systemProgram", + "isMut": false, "isSigner": false, "docs": [ - "#19" + "#6" ] - }, + } + ], + "args": [] + }, + { + "name": "initStakingOne", + "accounts": [ { - "name": "protocolFeeRecipient", - "isMut": true, - "isSigner": false, + "name": "admin", + "isMut": false, + "isSigner": true, "docs": [ - "#20" + "#1" ] }, { - "name": "userProfile", + "name": "payer", "isMut": true, - "isSigner": false, - "isOptional": true, + "isSigner": true, "docs": [ - "#21" + "#2" ] }, { - "name": "tokenProgram", + "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ - "#22" + "#3" ] }, { - "name": "adrenaProgram", - "isMut": false, + "name": "staking", + "isMut": true, "isSigner": false, "docs": [ - "#23" + "#4" ] - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "LiquidateShortParams" - } - } - ] - }, - { - "name": "updatePoolAum", - "accounts": [ + }, { - "name": "payer", + "name": "lmTokenMint", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ - "#1" + "#5" ] }, { "name": "cortex", - "isMut": false, + "isMut": true, "isSigner": false, "docs": [ - "#2" + "#6" ] }, { - "name": "pool", + "name": "stakingStakedTokenVault", "isMut": true, "isSigner": false, "docs": [ - "#3" + "#7" ] - } - ], - "args": [], - "returns": "u128" - }, - { - "name": "getAddLiquidityAmountAndFee", - "accounts": [ + }, { - "name": "cortex", + "name": "feeRedistributionMint", "isMut": false, "isSigner": false, "docs": [ - "#1" + "#8" ] }, { - "name": "pool", + "name": "stakingStakedTokenMint", "isMut": false, "isSigner": false, "docs": [ - "#2" + "#9" ] }, { - "name": "custody", + "name": "adrenaProgram", "isMut": false, "isSigner": false, "docs": [ - "#3" + "#10" ] }, { - "name": "custodyOracleAccount", + "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ - "#4" + "#11" ] }, { - "name": "lpTokenMint", + "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ - "#5" + "#12" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" ] } ], @@ -15678,35 +17833,33 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "GetAddLiquidityAmountAndFeeParams" + "defined": "InitStakingOneParams" } } ], - "returns": { - "defined": "AmountAndFee" - } + "returns": "u8" }, { - "name": "getRemoveLiquidityAmountAndFee", + "name": "initStakingTwo", "accounts": [ { - "name": "cortex", + "name": "admin", "isMut": false, - "isSigner": false, + "isSigner": true, "docs": [ "#1" ] }, { - "name": "pool", - "isMut": false, - "isSigner": false, + "name": "payer", + "isMut": true, + "isSigner": true, "docs": [ "#2" ] }, { - "name": "custody", + "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ @@ -15714,119 +17867,86 @@ export const IDL: Adrena = { ] }, { - "name": "custodyOracleAccount", - "isMut": false, + "name": "staking", + "isMut": true, "isSigner": false, "docs": [ "#4" ] }, { - "name": "lpTokenMint", - "isMut": false, + "name": "lmTokenMint", + "isMut": true, "isSigner": false, "docs": [ "#5" ] - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "GetRemoveLiquidityAmountAndFeeParams" - } - } - ], - "returns": { - "defined": "AmountAndFee" - } - }, - { - "name": "getEntryPriceAndFee", - "accounts": [ - { - "name": "cortex", - "isMut": false, - "isSigner": false, - "docs": [ - "#1" - ] }, { - "name": "pool", - "isMut": false, + "name": "cortex", + "isMut": true, "isSigner": false, "docs": [ - "#2" + "#6" ] }, { - "name": "custody", - "isMut": false, + "name": "stakingRewardTokenVault", + "isMut": true, "isSigner": false, "docs": [ - "#3" + "#7" ] }, { - "name": "custodyOracleAccount", + "name": "feeRedistributionMint", "isMut": false, "isSigner": false, "docs": [ - "#4" + "#8" ] }, { - "name": "collateralCustody", + "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ - "#5" + "#9" ] }, { - "name": "collateralCustodyOracleAccount", + "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ - "#6" + "#10" ] } ], - "args": [ - { - "name": "params", - "type": { - "defined": "GetEntryPriceAndFeeParams" - } - } - ], - "returns": { - "defined": "NewPositionPricesAndFee" - } + "args": [], + "returns": "u8" }, { - "name": "getOpenPositionWithSwapAmountAndFees", + "name": "initStakingThree", "accounts": [ { - "name": "cortex", + "name": "admin", "isMut": false, - "isSigner": false, + "isSigner": true, "docs": [ "#1" ] }, { - "name": "pool", - "isMut": false, - "isSigner": false, + "name": "payer", + "isMut": true, + "isSigner": true, "docs": [ "#2" ] }, { - "name": "receivingCustody", + "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ @@ -15834,39 +17954,39 @@ export const IDL: Adrena = { ] }, { - "name": "receivingCustodyOracleAccount", - "isMut": false, + "name": "staking", + "isMut": true, "isSigner": false, "docs": [ "#4" ] }, { - "name": "collateralCustody", - "isMut": false, + "name": "lmTokenMint", + "isMut": true, "isSigner": false, "docs": [ "#5" ] }, { - "name": "collateralCustodyOracleAccount", - "isMut": false, + "name": "cortex", + "isMut": true, "isSigner": false, "docs": [ "#6" ] }, { - "name": "principalCustody", - "isMut": false, + "name": "stakingLmRewardTokenVault", + "isMut": true, "isSigner": false, "docs": [ "#7" ] }, { - "name": "principalCustodyOracleAccount", + "name": "feeRedistributionMint", "isMut": false, "isSigner": false, "docs": [ @@ -15874,47 +17994,46 @@ export const IDL: Adrena = { ] }, { - "name": "adrenaProgram", + "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ "#9" ] - } - ], - "args": [ + }, { - "name": "params", - "type": { - "defined": "GetOpenPositionWithSwapAmountAndFeesParams" - } + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] } ], - "returns": { - "defined": "OpenPositionWithSwapAmountAndFees" - } + "args": [], + "returns": "u8" }, { - "name": "getExitPriceAndFee", + "name": "initStakingFour", "accounts": [ { - "name": "cortex", + "name": "admin", "isMut": false, - "isSigner": false, + "isSigner": true, "docs": [ "#1" ] }, { - "name": "pool", - "isMut": false, - "isSigner": false, + "name": "payer", + "isMut": true, + "isSigner": true, "docs": [ "#2" ] }, { - "name": "position", + "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ @@ -15922,369 +18041,362 @@ export const IDL: Adrena = { ] }, { - "name": "custody", - "isMut": false, + "name": "staking", + "isMut": true, "isSigner": false, "docs": [ "#4" ] }, { - "name": "custodyOracleAccount", - "isMut": false, + "name": "lmTokenMint", + "isMut": true, "isSigner": false, "docs": [ "#5" ] }, { - "name": "collateralCustody", + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "stakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "stakingRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "stakingLmRewardTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "feeRedistributionMint", "isMut": false, "isSigner": false, "docs": [ - "#6" + "#10" ] }, { - "name": "collateralCustodyOracleAccount", + "name": "stakingStakedTokenMint", "isMut": false, "isSigner": false, "docs": [ - "#7" + "#11" ] - } - ], - "args": [], - "returns": { - "defined": "ExitPriceAndFee" - } - }, - { - "name": "getPnl", - "accounts": [ + }, { - "name": "cortex", - "isMut": false, + "name": "resolveRoundCronThread", + "isMut": true, "isSigner": false, "docs": [ - "#1" + "#12" ] }, { - "name": "pool", - "isMut": false, + "name": "resolveRoundPayer", + "isMut": true, "isSigner": false, "docs": [ - "#2" + "#13" ] }, { - "name": "position", + "name": "sablierProgram", "isMut": false, "isSigner": false, "docs": [ - "#3" + "#14" ] }, { - "name": "custody", + "name": "adrenaProgram", "isMut": false, "isSigner": false, "docs": [ - "#4" + "#15" ] }, { - "name": "custodyOracleAccount", + "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ - "#5" + "#16" ] }, { - "name": "collateralCustody", + "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ - "#6" + "#17" ] }, { - "name": "collateralCustodyOracleAccount", + "name": "rent", "isMut": false, "isSigner": false, "docs": [ - "#7" + "#18" ] } ], - "args": [], - "returns": { - "defined": "ProfitAndLoss" - } + "args": [ + { + "name": "params", + "type": { + "defined": "InitStakingFourParams" + } + } + ], + "returns": "u8" }, { - "name": "getLiquidationPrice", + "name": "addLiquidStake", "accounts": [ { - "name": "cortex", - "isMut": false, - "isSigner": false, + "name": "owner", + "isMut": true, + "isSigner": true, "docs": [ "#1" ] }, { - "name": "pool", - "isMut": false, + "name": "fundingAccount", + "isMut": true, "isSigner": false, "docs": [ "#2" ] }, { - "name": "position", - "isMut": false, + "name": "rewardTokenAccount", + "isMut": true, "isSigner": false, "docs": [ "#3" ] }, { - "name": "custody", - "isMut": false, + "name": "lmTokenAccount", + "isMut": true, "isSigner": false, "docs": [ "#4" ] }, { - "name": "custodyOracleAccount", - "isMut": false, + "name": "stakingStakedTokenVault", + "isMut": true, "isSigner": false, "docs": [ "#5" ] }, { - "name": "collateralCustody", - "isMut": false, + "name": "stakingRewardTokenVault", + "isMut": true, "isSigner": false, "docs": [ "#6" ] }, { - "name": "collateralCustodyOracleAccount", - "isMut": false, + "name": "stakingLmRewardTokenVault", + "isMut": true, "isSigner": false, "docs": [ "#7" ] - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "GetLiquidationPriceParams" - } - } - ], - "returns": "u64" - }, - { - "name": "getLiquidationState", - "accounts": [ + }, { - "name": "cortex", + "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ - "#1" + "#8" ] }, { - "name": "pool", - "isMut": false, + "name": "userStaking", + "isMut": true, "isSigner": false, "docs": [ - "#2" + "#9" ] }, { - "name": "position", - "isMut": false, + "name": "staking", + "isMut": true, "isSigner": false, "docs": [ - "#3" + "#10" ] }, { - "name": "custody", - "isMut": false, + "name": "cortex", + "isMut": true, "isSigner": false, "docs": [ - "#4" + "#11" ] }, { - "name": "custodyOracleAccount", - "isMut": false, + "name": "pool", + "isMut": true, "isSigner": false, "docs": [ - "#5" + "#13" ] }, { - "name": "collateralCustody", - "isMut": false, + "name": "genesisLock", + "isMut": true, "isSigner": false, "docs": [ - "#6" + "#14" ] }, { - "name": "collateralCustodyOracleAccount", - "isMut": false, + "name": "lmTokenMint", + "isMut": true, "isSigner": false, "docs": [ - "#7" + "#15" ] - } - ], - "args": [], - "returns": "u8" - }, - { - "name": "getOraclePrice", - "accounts": [ + }, { - "name": "cortex", - "isMut": false, + "name": "governanceTokenMint", + "isMut": true, "isSigner": false, "docs": [ - "#1" + "#16" ] }, { - "name": "pool", + "name": "feeRedistributionMint", "isMut": false, "isSigner": false, "docs": [ - "#2" + "#17" ] }, { - "name": "custody", + "name": "governanceRealm", "isMut": false, "isSigner": false, "docs": [ - "#3" + "#18", + "A realm represent one project within the governance program" ] }, { - "name": "custodyOracleAccount", + "name": "governanceRealmConfig", "isMut": false, "isSigner": false, "docs": [ - "#4" + "#19" ] - } - ], - "args": [], - "returns": "u64" - }, - { - "name": "getSwapAmountAndFees", - "accounts": [ + }, { - "name": "cortex", - "isMut": false, + "name": "governanceGoverningTokenHolding", + "isMut": true, "isSigner": false, "docs": [ - "#1" + "#20", + "Token account owned by governance program holding user's locked tokens" ] }, { - "name": "pool", - "isMut": false, + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, "isSigner": false, "docs": [ - "#2" + "#21", + "Account owned by governance storing user information" ] }, { - "name": "receivingCustody", - "isMut": false, + "name": "stakesClaimCronThread", + "isMut": true, "isSigner": false, "docs": [ - "#3" + "#22" ] }, { - "name": "receivingCustodyOracleAccount", + "name": "sablierProgram", "isMut": false, "isSigner": false, "docs": [ - "#4" + "#23" ] }, { - "name": "dispensingCustody", + "name": "governanceProgram", "isMut": false, "isSigner": false, "docs": [ - "#5" + "#24" ] }, { - "name": "dispensingCustodyOracleAccount", + "name": "adrenaProgram", "isMut": false, "isSigner": false, "docs": [ - "#6" + "#25" ] - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "GetSwapAmountAndFeesParams" - } - } - ], - "returns": { - "defined": "SwapAmountAndFees" - } - }, - { - "name": "getAssetsUnderManagement", - "accounts": [ + }, { - "name": "cortex", + "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ - "#1" + "#26" ] }, { - "name": "pool", + "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ - "#2" + "#27" ] } ], - "args": [], - "returns": "u128" + "args": [ + { + "name": "params", + "type": { + "defined": "AddLiquidStakeParams" + } + } + ] }, { - "name": "initUserStaking", + "name": "addLockedStake", "accounts": [ { "name": "owner", @@ -16295,7 +18407,7 @@ export const IDL: Adrena = { ] }, { - "name": "rewardTokenAccount", + "name": "fundingAccount", "isMut": true, "isSigner": false, "docs": [ @@ -16303,7 +18415,7 @@ export const IDL: Adrena = { ] }, { - "name": "lmTokenAccount", + "name": "rewardTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -16311,7 +18423,7 @@ export const IDL: Adrena = { ] }, { - "name": "stakingRewardTokenVault", + "name": "stakingStakedTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -16319,7 +18431,7 @@ export const IDL: Adrena = { ] }, { - "name": "stakingLmRewardTokenVault", + "name": "stakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -16327,23 +18439,23 @@ export const IDL: Adrena = { ] }, { - "name": "userStaking", - "isMut": true, + "name": "transferAuthority", + "isMut": false, "isSigner": false, "docs": [ "#6" ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "userStaking", + "isMut": true, "isSigner": false, "docs": [ "#7" ] }, { - "name": "stakesClaimCronThread", + "name": "staking", "isMut": true, "isSigner": false, "docs": [ @@ -16351,7 +18463,7 @@ export const IDL: Adrena = { ] }, { - "name": "stakesClaimPayer", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -16359,15 +18471,15 @@ export const IDL: Adrena = { ] }, { - "name": "staking", - "isMut": false, + "name": "lmTokenMint", + "isMut": true, "isSigner": false, "docs": [ "#10" ] }, { - "name": "cortex", + "name": "governanceTokenMint", "isMut": true, "isSigner": false, "docs": [ @@ -16375,7 +18487,7 @@ export const IDL: Adrena = { ] }, { - "name": "lmTokenMint", + "name": "feeRedistributionMint", "isMut": false, "isSigner": false, "docs": [ @@ -16383,15 +18495,16 @@ export const IDL: Adrena = { ] }, { - "name": "feeRedistributionMint", + "name": "governanceRealm", "isMut": false, "isSigner": false, "docs": [ - "#13" + "#13", + "A realm represent one project within the governance program" ] }, { - "name": "adrenaProgram", + "name": "governanceRealmConfig", "isMut": false, "isSigner": false, "docs": [ @@ -16399,125 +18512,61 @@ export const IDL: Adrena = { ] }, { - "name": "sablierProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#15" - ] - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#16" - ] - }, - { - "name": "tokenProgram", - "isMut": false, + "name": "governanceGoverningTokenHolding", + "isMut": true, "isSigner": false, "docs": [ - "#17" - ] - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "InitUserStakingParams" - } - } - ] - }, - { - "name": "initUserProfile", - "accounts": [ - { - "name": "user", - "isMut": false, - "isSigner": true, - "docs": [ - "#1" + "#15", + "Token account owned by governance program holding user's locked tokens" ] }, { - "name": "payer", + "name": "governanceGoverningTokenOwnerRecord", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ - "#2" + "#16", + "Account owned by governance storing user information" ] }, { - "name": "userProfile", + "name": "stakeResolutionThread", "isMut": true, "isSigner": false, "docs": [ - "#3" + "#17" ] }, { - "name": "cortex", + "name": "stakesClaimCronThread", "isMut": true, "isSigner": false, "docs": [ - "#4" + "#18" ] }, { - "name": "systemProgram", + "name": "sablierProgram", "isMut": false, "isSigner": false, "docs": [ - "#5" + "#19" ] }, { - "name": "tokenProgram", + "name": "governanceProgram", "isMut": false, "isSigner": false, "docs": [ - "#6" - ] - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "InitUserProfileParams" - } - } - ] - }, - { - "name": "editUserProfile", - "accounts": [ - { - "name": "user", - "isMut": false, - "isSigner": true, - "docs": [ - "#1" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "#2" + "#20" ] }, { - "name": "userProfile", - "isMut": true, + "name": "adrenaProgram", + "isMut": false, "isSigner": false, "docs": [ - "#3" + "#21" ] }, { @@ -16525,7 +18574,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#4" + "#22" ] }, { @@ -16533,7 +18582,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#5" + "#23" ] } ], @@ -16541,40 +18590,40 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "EditUserProfileParams" + "defined": "AddLockedStakeParams" } } ] }, { - "name": "deleteUserProfile", + "name": "removeLiquidStake", "accounts": [ { - "name": "admin", - "isMut": false, + "name": "owner", + "isMut": true, "isSigner": true, "docs": [ "#1" ] }, { - "name": "user", - "isMut": false, + "name": "stakedTokenAccount", + "isMut": true, "isSigner": false, "docs": [ "#2" ] }, { - "name": "payer", + "name": "lmTokenAccount", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ "#3" ] }, { - "name": "userProfile", + "name": "rewardTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -16582,7 +18631,7 @@ export const IDL: Adrena = { ] }, { - "name": "cortex", + "name": "stakingStakedTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -16590,65 +18639,43 @@ export const IDL: Adrena = { ] }, { - "name": "systemProgram", - "isMut": false, + "name": "stakingRewardTokenVault", + "isMut": true, "isSigner": false, "docs": [ "#6" ] }, { - "name": "tokenProgram", - "isMut": false, + "name": "stakingLmRewardTokenVault", + "isMut": true, "isSigner": false, "docs": [ "#7" ] - } - ], - "args": [] - }, - { - "name": "initStakingOne", - "accounts": [ - { - "name": "admin", - "isMut": false, - "isSigner": true, - "docs": [ - "#1" - ] - }, - { - "name": "payer", - "isMut": true, - "isSigner": true, - "docs": [ - "#2" - ] }, { "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ - "#3" + "#8" ] }, { - "name": "staking", + "name": "userStaking", "isMut": true, "isSigner": false, "docs": [ - "#4" + "#9" ] }, { - "name": "lmTokenMint", + "name": "staking", "isMut": true, "isSigner": false, "docs": [ - "#5" + "#10" ] }, { @@ -16656,141 +18683,114 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#6" + "#11" ] }, { - "name": "stakingStakedTokenVault", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ - "#7" + "#12" ] }, { - "name": "feeRedistributionMint", - "isMut": false, + "name": "genesisLock", + "isMut": true, "isSigner": false, "docs": [ - "#8" + "#13" ] }, { - "name": "stakingStakedTokenMint", - "isMut": false, + "name": "lmTokenMint", + "isMut": true, "isSigner": false, "docs": [ - "#9" + "#14" ] }, { - "name": "adrenaProgram", - "isMut": false, + "name": "governanceTokenMint", + "isMut": true, "isSigner": false, "docs": [ - "#10" + "#15" ] }, { - "name": "systemProgram", + "name": "feeRedistributionMint", "isMut": false, "isSigner": false, "docs": [ - "#11" + "#16" ] }, { - "name": "tokenProgram", + "name": "governanceRealm", "isMut": false, "isSigner": false, "docs": [ - "#12" + "#17", + "A realm represent one project within the governance program" ] }, { - "name": "rent", + "name": "governanceRealmConfig", "isMut": false, "isSigner": false, "docs": [ - "#13" - ] - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "InitStakingOneParams" - } - } - ], - "returns": "u8" - }, - { - "name": "initStakingTwo", - "accounts": [ - { - "name": "admin", - "isMut": false, - "isSigner": true, - "docs": [ - "#1" + "#18" ] }, { - "name": "payer", + "name": "governanceGoverningTokenHolding", "isMut": true, - "isSigner": true, - "docs": [ - "#2" - ] - }, - { - "name": "transferAuthority", - "isMut": false, "isSigner": false, "docs": [ - "#3" + "#19", + "Token account owned by governance program holding user's locked tokens" ] }, { - "name": "staking", + "name": "governanceGoverningTokenOwnerRecord", "isMut": true, "isSigner": false, "docs": [ - "#4" + "#20", + "Account owned by governance storing user information" ] }, { - "name": "lmTokenMint", + "name": "stakesClaimCronThread", "isMut": true, "isSigner": false, "docs": [ - "#5" + "#21" ] }, { - "name": "cortex", - "isMut": true, + "name": "sablierProgram", + "isMut": false, "isSigner": false, "docs": [ - "#6" + "#22" ] }, { - "name": "stakingRewardTokenVault", - "isMut": true, + "name": "governanceProgram", + "isMut": false, "isSigner": false, "docs": [ - "#7" + "#23" ] }, { - "name": "feeRedistributionMint", + "name": "adrenaProgram", "isMut": false, "isSigner": false, "docs": [ - "#8" + "#24" ] }, { @@ -16798,7 +18798,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#9" + "#23" ] }, { @@ -16806,42 +18806,48 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#10" + "#24" ] } ], - "args": [], - "returns": "u8" + "args": [ + { + "name": "params", + "type": { + "defined": "RemoveLiquidStakeParams" + } + } + ] }, { - "name": "initStakingThree", + "name": "removeLockedStake", "accounts": [ { - "name": "admin", - "isMut": false, + "name": "owner", + "isMut": true, "isSigner": true, "docs": [ "#1" ] }, { - "name": "payer", + "name": "lmTokenAccount", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ "#2" ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "stakedTokenAccount", + "isMut": true, "isSigner": false, "docs": [ "#3" ] }, { - "name": "staking", + "name": "rewardTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -16849,7 +18855,7 @@ export const IDL: Adrena = { ] }, { - "name": "lmTokenMint", + "name": "stakingStakedTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -16857,7 +18863,7 @@ export const IDL: Adrena = { ] }, { - "name": "cortex", + "name": "stakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -16873,7 +18879,7 @@ export const IDL: Adrena = { ] }, { - "name": "feeRedistributionMint", + "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ @@ -16881,58 +18887,43 @@ export const IDL: Adrena = { ] }, { - "name": "systemProgram", - "isMut": false, + "name": "userStaking", + "isMut": true, "isSigner": false, "docs": [ "#9" ] }, { - "name": "tokenProgram", - "isMut": false, + "name": "staking", + "isMut": true, "isSigner": false, "docs": [ "#10" ] - } - ], - "args": [], - "returns": "u8" - }, - { - "name": "initStakingFour", - "accounts": [ - { - "name": "admin", - "isMut": false, - "isSigner": true, - "docs": [ - "#1" - ] }, { - "name": "payer", + "name": "cortex", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ - "#2" + "#11" ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "pool", + "isMut": true, "isSigner": false, "docs": [ - "#3" + "#12" ] }, { - "name": "staking", + "name": "genesisLock", "isMut": true, "isSigner": false, "docs": [ - "#4" + "#13" ] }, { @@ -16940,71 +18931,74 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#5" + "#14" ] }, { - "name": "cortex", + "name": "stakedTokenMint", "isMut": true, "isSigner": false, "docs": [ - "#6" + "#15" ] }, { - "name": "stakingStakedTokenVault", + "name": "governanceTokenMint", "isMut": true, "isSigner": false, "docs": [ - "#7" + "#16" ] }, { - "name": "stakingRewardTokenVault", - "isMut": true, + "name": "feeRedistributionMint", + "isMut": false, "isSigner": false, "docs": [ - "#8" + "#17" ] }, { - "name": "stakingLmRewardTokenVault", - "isMut": true, + "name": "governanceRealm", + "isMut": false, "isSigner": false, "docs": [ - "#9" + "#18", + "A realm represent one project within the governance program" ] }, { - "name": "feeRedistributionMint", + "name": "governanceRealmConfig", "isMut": false, "isSigner": false, "docs": [ - "#10" + "#19" ] }, { - "name": "stakingStakedTokenMint", - "isMut": false, + "name": "governanceGoverningTokenHolding", + "isMut": true, "isSigner": false, "docs": [ - "#11" + "#20", + "Token account owned by governance program holding user's locked tokens" ] }, { - "name": "resolveRoundCronThread", + "name": "governanceGoverningTokenOwnerRecord", "isMut": true, "isSigner": false, "docs": [ - "#12" + "#21", + "Account owned by governance storing user information" ] }, { - "name": "resolveRoundPayer", + "name": "stakesClaimCronThread", "isMut": true, "isSigner": false, "docs": [ - "#13" + "#22" ] }, { @@ -17012,39 +19006,39 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#14" + "#23" ] }, { - "name": "adrenaProgram", + "name": "governanceProgram", "isMut": false, "isSigner": false, "docs": [ - "#15" + "#24" ] }, { - "name": "systemProgram", + "name": "adrenaProgram", "isMut": false, "isSigner": false, "docs": [ - "#16" + "#25" ] }, { - "name": "tokenProgram", + "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ - "#17" + "#26" ] }, { - "name": "rent", + "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ - "#18" + "#27" ] } ], @@ -17052,17 +19046,16 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "InitStakingFourParams" + "defined": "RemoveLockedStakeParams" } } - ], - "returns": "u8" + ] }, { - "name": "addLiquidStake", + "name": "claimStakes", "accounts": [ { - "name": "owner", + "name": "caller", "isMut": true, "isSigner": true, "docs": [ @@ -17070,15 +19063,15 @@ export const IDL: Adrena = { ] }, { - "name": "fundingAccount", + "name": "payer", "isMut": true, - "isSigner": false, + "isSigner": true, "docs": [ "#2" ] }, { - "name": "rewardTokenAccount", + "name": "owner", "isMut": true, "isSigner": false, "docs": [ @@ -17086,7 +19079,7 @@ export const IDL: Adrena = { ] }, { - "name": "lmTokenAccount", + "name": "rewardTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -17094,7 +19087,7 @@ export const IDL: Adrena = { ] }, { - "name": "stakingStakedTokenVault", + "name": "lmTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -17150,7 +19143,7 @@ export const IDL: Adrena = { ] }, { - "name": "lmTokenMint", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -17158,7 +19151,7 @@ export const IDL: Adrena = { ] }, { - "name": "governanceTokenMint", + "name": "genesisLock", "isMut": true, "isSigner": false, "docs": [ @@ -17166,24 +19159,23 @@ export const IDL: Adrena = { ] }, { - "name": "feeRedistributionMint", - "isMut": false, + "name": "lmTokenMint", + "isMut": true, "isSigner": false, "docs": [ "#14" ] }, { - "name": "governanceRealm", + "name": "feeRedistributionMint", "isMut": false, "isSigner": false, "docs": [ - "#15", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "#15" ] }, { - "name": "governanceRealmConfig", + "name": "adrenaProgram", "isMut": false, "isSigner": false, "docs": [ @@ -17191,53 +19183,57 @@ export const IDL: Adrena = { ] }, { - "name": "governanceGoverningTokenHolding", - "isMut": true, + "name": "systemProgram", + "isMut": false, "isSigner": false, "docs": [ - "#17", - "Token account owned by governance program holding user's locked tokens" + "#17" ] }, { - "name": "governanceGoverningTokenOwnerRecord", - "isMut": true, + "name": "tokenProgram", + "isMut": false, "isSigner": false, "docs": [ - "#18", - "Account owned by governance storing user information" + "#18" ] - }, + } + ], + "args": [] + }, + { + "name": "finalizeGenesisLockCampaign", + "accounts": [ { - "name": "stakesClaimCronThread", + "name": "caller", "isMut": true, - "isSigner": false, + "isSigner": true, "docs": [ - "#19" + "#1" ] }, { - "name": "sablierProgram", + "name": "cortex", "isMut": false, "isSigner": false, "docs": [ - "#20" + "#2" ] }, { - "name": "governanceProgram", - "isMut": false, + "name": "pool", + "isMut": true, "isSigner": false, "docs": [ - "#21" + "#3" ] }, { - "name": "adrenaProgram", - "isMut": false, + "name": "genesisLock", + "isMut": true, "isSigner": false, "docs": [ - "#22" + "#4" ] }, { @@ -17245,7 +19241,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#23" + "#5" ] }, { @@ -17253,32 +19249,33 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#24" + "#6" ] - } - ], - "args": [ + }, { - "name": "params", - "type": { - "defined": "AddLiquidStakeParams" - } + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] } - ] + ], + "args": [] }, { - "name": "addLockedStake", + "name": "setPoolLiquidityState", "accounts": [ { - "name": "owner", - "isMut": true, + "name": "admin", + "isMut": false, "isSigner": true, "docs": [ "#1" ] }, { - "name": "fundingAccount", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -17286,27 +19283,40 @@ export const IDL: Adrena = { ] }, { - "name": "rewardTokenAccount", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ "#3" ] - }, + } + ], + "args": [ { - "name": "stakingStakedTokenVault", + "name": "params", + "type": { + "defined": "SetPoolLiquidityStateParams" + } + } + ] + }, + { + "name": "finalizeLockedStake", + "accounts": [ + { + "name": "caller", "isMut": true, - "isSigner": false, + "isSigner": true, "docs": [ - "#4" + "#1" ] }, { - "name": "stakingRewardTokenVault", + "name": "owner", "isMut": true, "isSigner": false, "docs": [ - "#5" + "#2" ] }, { @@ -17314,7 +19324,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#6" + "#3" ] }, { @@ -17322,7 +19332,7 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#7" + "#4" ] }, { @@ -17330,7 +19340,7 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#8" + "#5" ] }, { @@ -17338,7 +19348,7 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#9" + "#6" ] }, { @@ -17346,7 +19356,7 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#10" + "#7" ] }, { @@ -17354,15 +19364,7 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#11" - ] - }, - { - "name": "feeRedistributionMint", - "isMut": false, - "isSigner": false, - "docs": [ - "#12" + "#8" ] }, { @@ -17370,8 +19372,8 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#13", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "#9", + "A realm represent one project within the governance program" ] }, { @@ -17379,7 +19381,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#14" + "#10" ] }, { @@ -17387,7 +19389,7 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#15", + "#11", "Token account owned by governance program holding user's locked tokens" ] }, @@ -17396,7 +19398,7 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#16", + "#12", "Account owned by governance storing user information" ] }, @@ -17405,15 +19407,7 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#17" - ] - }, - { - "name": "stakesClaimCronThread", - "isMut": true, - "isSigner": false, - "docs": [ - "#18" + "#13" ] }, { @@ -17421,7 +19415,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#19" + "#14" ] }, { @@ -17429,7 +19423,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#20" + "#15" ] }, { @@ -17437,7 +19431,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#21" + "#16" ] }, { @@ -17445,7 +19439,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#22" + "#17" ] }, { @@ -17453,7 +19447,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#23" + "#18" ] } ], @@ -17461,16 +19455,16 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "AddLockedStakeParams" + "defined": "FinalizeLockedStakeParams" } } ] }, { - "name": "removeLiquidStake", + "name": "resolveStakingRound", "accounts": [ { - "name": "owner", + "name": "caller", "isMut": true, "isSigner": true, "docs": [ @@ -17478,35 +19472,19 @@ export const IDL: Adrena = { ] }, { - "name": "stakedTokenAccount", + "name": "payer", "isMut": true, - "isSigner": false, + "isSigner": true, "docs": [ "#2" ] }, - { - "name": "lmTokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "#3" - ] - }, - { - "name": "rewardTokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "#4" - ] - }, { "name": "stakingStakedTokenVault", "isMut": true, "isSigner": false, "docs": [ - "#5" + "#3" ] }, { @@ -17514,7 +19492,7 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#6" + "#4" ] }, { @@ -17522,7 +19500,7 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#7" + "#5" ] }, { @@ -17530,15 +19508,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#8" - ] - }, - { - "name": "userStaking", - "isMut": true, - "isSigner": false, - "docs": [ - "#9" + "#6" ] }, { @@ -17546,7 +19516,7 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#10" + "#7" ] }, { @@ -17554,7 +19524,7 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#11" + "#8" ] }, { @@ -17562,15 +19532,7 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#12" - ] - }, - { - "name": "governanceTokenMint", - "isMut": true, - "isSigner": false, - "docs": [ - "#13" + "#9" ] }, { @@ -17578,66 +19540,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#14" - ] - }, - { - "name": "governanceRealm", - "isMut": false, - "isSigner": false, - "docs": [ - "#15", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" - ] - }, - { - "name": "governanceRealmConfig", - "isMut": false, - "isSigner": false, - "docs": [ - "#16" - ] - }, - { - "name": "governanceGoverningTokenHolding", - "isMut": true, - "isSigner": false, - "docs": [ - "#17", - "Token account owned by governance program holding user's locked tokens" - ] - }, - { - "name": "governanceGoverningTokenOwnerRecord", - "isMut": true, - "isSigner": false, - "docs": [ - "#18", - "Account owned by governance storing user information" - ] - }, - { - "name": "stakesClaimCronThread", - "isMut": true, - "isSigner": false, - "docs": [ - "#19" - ] - }, - { - "name": "sablierProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#20" - ] - }, - { - "name": "governanceProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#21" + "#10" ] }, { @@ -17645,7 +19548,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#22" + "#11" ] }, { @@ -17653,7 +19556,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#23" + "#12" ] }, { @@ -17661,76 +19564,60 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#24" + "#13" ] } ], - "args": [ - { - "name": "params", - "type": { - "defined": "RemoveLiquidStakeParams" - } - } - ] + "args": [] }, { - "name": "removeLockedStake", + "name": "getLpTokenPrice", "accounts": [ { - "name": "owner", - "isMut": true, - "isSigner": true, + "name": "cortex", + "isMut": false, + "isSigner": false, "docs": [ "#1" ] }, { - "name": "lmTokenAccount", - "isMut": true, + "name": "pool", + "isMut": false, "isSigner": false, "docs": [ "#2" ] }, { - "name": "stakedTokenAccount", - "isMut": true, + "name": "lpTokenMint", + "isMut": false, "isSigner": false, "docs": [ "#3" ] - }, - { - "name": "rewardTokenAccount", - "isMut": true, - "isSigner": false, - "docs": [ - "#4" - ] - }, - { - "name": "stakingStakedTokenVault", - "isMut": true, - "isSigner": false, - "docs": [ - "#5" - ] - }, + } + ], + "args": [], + "returns": "u64" + }, + { + "name": "mintLmTokensFromBucket", + "accounts": [ { - "name": "stakingRewardTokenVault", - "isMut": true, - "isSigner": false, + "name": "admin", + "isMut": false, + "isSigner": true, "docs": [ - "#6" + "#1" ] }, { - "name": "stakingLmRewardTokenVault", + "name": "receivingAccount", "isMut": true, "isSigner": false, "docs": [ - "#7" + "#2" ] }, { @@ -17738,146 +19625,157 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#8" + "#3" ] }, { - "name": "userStaking", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ - "#9" + "#4" ] }, { - "name": "staking", + "name": "lmTokenMint", "isMut": true, "isSigner": false, "docs": [ - "#10" + "#5" ] }, { - "name": "cortex", - "isMut": true, + "name": "tokenProgram", + "isMut": false, "isSigner": false, "docs": [ - "#11" + "#6" ] - }, + } + ], + "args": [ { - "name": "lmTokenMint", - "isMut": true, - "isSigner": false, + "name": "params", + "type": { + "defined": "MintLmTokensFromBucketParams" + } + } + ], + "returns": "u8" + }, + { + "name": "increasePositionLong", + "accounts": [ + { + "name": "owner", + "isMut": false, + "isSigner": true, "docs": [ - "#12" + "#1" ] }, { - "name": "stakedTokenMint", + "name": "payer", "isMut": true, - "isSigner": false, + "isSigner": true, "docs": [ - "#13" + "#2" ] }, { - "name": "governanceTokenMint", + "name": "fundingAccount", "isMut": true, "isSigner": false, "docs": [ - "#14" + "#3" ] }, { - "name": "feeRedistributionMint", + "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ - "#15" + "#4" ] }, { - "name": "governanceRealm", - "isMut": false, + "name": "cortex", + "isMut": true, "isSigner": false, "docs": [ - "#16", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "#5" ] }, { - "name": "governanceRealmConfig", - "isMut": false, + "name": "pool", + "isMut": true, "isSigner": false, "docs": [ - "#17" + "#6" ] }, { - "name": "governanceGoverningTokenHolding", + "name": "position", "isMut": true, "isSigner": false, "docs": [ - "#18", - "Token account owned by governance program holding user's locked tokens" + "#7" ] }, { - "name": "governanceGoverningTokenOwnerRecord", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ - "#19", - "Account owned by governance storing user information" + "#8" ] }, { - "name": "stakesClaimCronThread", + "name": "custodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ - "#20" + "#9" ] }, { - "name": "sablierProgram", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ - "#21" + "#10" ] }, { - "name": "governanceProgram", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ - "#22" + "#11" ] }, { - "name": "adrenaProgram", + "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ - "#23" + "#12" ] }, { - "name": "systemProgram", + "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ - "#24" + "#13" ] }, { - "name": "tokenProgram", + "name": "adrenaProgram", "isMut": false, "isSigner": false, "docs": [ - "#25" + "#14" ] } ], @@ -17885,17 +19783,17 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "RemoveLockedStakeParams" + "defined": "IncreasePositionLongParams" } } ] }, { - "name": "claimStakes", + "name": "increasePositionShort", "accounts": [ { - "name": "caller", - "isMut": true, + "name": "owner", + "isMut": false, "isSigner": true, "docs": [ "#1" @@ -17910,7 +19808,7 @@ export const IDL: Adrena = { ] }, { - "name": "owner", + "name": "fundingAccount", "isMut": true, "isSigner": false, "docs": [ @@ -17918,15 +19816,15 @@ export const IDL: Adrena = { ] }, { - "name": "rewardTokenAccount", - "isMut": true, + "name": "transferAuthority", + "isMut": false, "isSigner": false, "docs": [ "#4" ] }, { - "name": "lmTokenAccount", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -17934,7 +19832,7 @@ export const IDL: Adrena = { ] }, { - "name": "stakingRewardTokenVault", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -17942,7 +19840,7 @@ export const IDL: Adrena = { ] }, { - "name": "stakingLmRewardTokenVault", + "name": "position", "isMut": true, "isSigner": false, "docs": [ @@ -17950,23 +19848,23 @@ export const IDL: Adrena = { ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "custody", + "isMut": true, "isSigner": false, "docs": [ "#8" ] }, { - "name": "userStaking", - "isMut": true, + "name": "custodyTradeOracle", + "isMut": false, "isSigner": false, "docs": [ "#9" ] }, { - "name": "staking", + "name": "collateralCustody", "isMut": true, "isSigner": false, "docs": [ @@ -17974,62 +19872,61 @@ export const IDL: Adrena = { ] }, { - "name": "cortex", - "isMut": true, + "name": "collateralCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ - "#11" + "#16" ] }, { - "name": "lmTokenMint", + "name": "collateralCustodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ - "#12" - ] - }, - { - "name": "feeRedistributionMint", - "isMut": false, - "isSigner": false, - "docs": [ - "#13" + "#11" ] }, { - "name": "adrenaProgram", + "name": "systemProgram", "isMut": false, "isSigner": false, "docs": [ - "#14" + "#12" ] }, { - "name": "systemProgram", + "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ - "#15" + "#13" ] }, { - "name": "tokenProgram", + "name": "adrenaProgram", "isMut": false, "isSigner": false, "docs": [ - "#16" + "#14" ] } ], - "args": [] + "args": [ + { + "name": "params", + "type": { + "defined": "IncreasePositionShortParams" + } + } + ] }, { - "name": "finalizeGenesisLockCampaign", + "name": "setStakingLmEmissionPotentiometers", "accounts": [ { - "name": "caller", - "isMut": true, + "name": "admin", + "isMut": false, "isSigner": true, "docs": [ "#1" @@ -18044,50 +19941,54 @@ export const IDL: Adrena = { ] }, { - "name": "pool", + "name": "staking", "isMut": true, "isSigner": false, "docs": [ "#3" ] - }, - { - "name": "genesisLock", - "isMut": true, - "isSigner": false, - "docs": [ - "#4" - ] - }, + } + ], + "args": [ { - "name": "systemProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#5" - ] - }, + "name": "params", + "type": { + "defined": "SetStakingLmEmissionPotentiometersParams" + } + } + ] + }, + { + "name": "setAdmin", + "accounts": [ { - "name": "tokenProgram", + "name": "admin", "isMut": false, - "isSigner": false, + "isSigner": true, "docs": [ - "#6" + "#1" ] }, { - "name": "adrenaProgram", - "isMut": false, + "name": "cortex", + "isMut": true, "isSigner": false, "docs": [ - "#7" + "#2" ] } ], - "args": [] + "args": [ + { + "name": "params", + "type": { + "defined": "SetAdminParams" + } + } + ] }, { - "name": "setPoolLiquidityState", + "name": "setCustodyMaxCumulativeShortPositionSizeUsd", "accounts": [ { "name": "admin", @@ -18112,22 +20013,30 @@ export const IDL: Adrena = { "docs": [ "#3" ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#4" + ] } ], "args": [ { "name": "params", "type": { - "defined": "SetPoolLiquidityStateParams" + "defined": "SetCustodyMaxCumulativeShortPositionSizeUsdParams" } } ] }, { - "name": "finalizeLockedStake", + "name": "setTakeProfitLong", "accounts": [ { - "name": "caller", + "name": "owner", "isMut": true, "isSigner": true, "docs": [ @@ -18135,7 +20044,7 @@ export const IDL: Adrena = { ] }, { - "name": "owner", + "name": "receivingAccount", "isMut": true, "isSigner": false, "docs": [ @@ -18151,7 +20060,7 @@ export const IDL: Adrena = { ] }, { - "name": "userStaking", + "name": "lmStaking", "isMut": true, "isSigner": false, "docs": [ @@ -18159,7 +20068,7 @@ export const IDL: Adrena = { ] }, { - "name": "staking", + "name": "lpStaking", "isMut": true, "isSigner": false, "docs": [ @@ -18175,7 +20084,7 @@ export const IDL: Adrena = { ] }, { - "name": "lmTokenMint", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -18183,7 +20092,7 @@ export const IDL: Adrena = { ] }, { - "name": "governanceTokenMint", + "name": "position", "isMut": true, "isSigner": false, "docs": [ @@ -18191,16 +20100,15 @@ export const IDL: Adrena = { ] }, { - "name": "governanceRealm", - "isMut": false, + "name": "stakingRewardTokenCustody", + "isMut": true, "isSigner": false, "docs": [ - "#9", - "A realm represent one project (ADRENA, MANGO etc.) within the governance program" + "#9" ] }, { - "name": "governanceRealmConfig", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -18208,33 +20116,31 @@ export const IDL: Adrena = { ] }, { - "name": "governanceGoverningTokenHolding", + "name": "stakingRewardTokenCustodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ - "#11", - "Token account owned by governance program holding user's locked tokens" + "#11" ] }, { - "name": "governanceGoverningTokenOwnerRecord", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ - "#12", - "Account owned by governance storing user information" + "#12" ] }, { - "name": "stakeResolutionThread", - "isMut": true, + "name": "custodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#13" ] }, { - "name": "sablierProgram", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ @@ -18242,96 +20148,78 @@ export const IDL: Adrena = { ] }, { - "name": "governanceProgram", - "isMut": false, + "name": "custodyTokenAccount", + "isMut": true, "isSigner": false, "docs": [ "#15" ] }, { - "name": "adrenaProgram", - "isMut": false, + "name": "lmStakingRewardTokenVault", + "isMut": true, "isSigner": false, "docs": [ "#16" ] }, { - "name": "systemProgram", - "isMut": false, + "name": "lpStakingRewardTokenVault", + "isMut": true, "isSigner": false, "docs": [ "#17" ] }, { - "name": "tokenProgram", - "isMut": false, + "name": "lpTokenMint", + "isMut": true, "isSigner": false, "docs": [ "#18" ] - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "FinalizeLockedStakeParams" - } - } - ] - }, - { - "name": "updateStakingThread", - "accounts": [ - { - "name": "admin", - "isMut": true, - "isSigner": true, - "docs": [ - "#1" - ] }, { - "name": "cortex", - "isMut": false, + "name": "protocolFeeRecipient", + "isMut": true, "isSigner": false, "docs": [ - "#2" + "#19" ] }, { - "name": "pool", + "name": "userProfile", "isMut": true, "isSigner": false, + "isOptional": true, "docs": [ - "#3" + "#20" ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "takeProfitThread", + "isMut": true, "isSigner": false, "docs": [ - "#4" + "#21", + "User can use only TP or only SL. We check the account later in the CPI." ] }, { - "name": "lmResolveRoundCronThread", + "name": "stopLossThread", "isMut": true, "isSigner": false, "docs": [ - "#5" + "#22", + "User can use only TP or only SL. We check the account later in the CPI." ] }, { - "name": "lpResolveRoundCronThread", - "isMut": true, + "name": "sablierProgram", + "isMut": false, "isSigner": false, "docs": [ - "#6" + "#23" ] }, { @@ -18339,7 +20227,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#7" + "#24" ] }, { @@ -18347,7 +20235,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#8" + "#25" ] }, { @@ -18355,25 +20243,24 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#9" - ] - }, - { - "name": "sablierProgram", - "isMut": false, - "isSigner": false, - "docs": [ - "#10" + "#26" ] } ], - "args": [] + "args": [ + { + "name": "params", + "type": { + "defined": "SetTakeProfitLongParams" + } + } + ] }, { - "name": "resolveStakingRound", + "name": "setStopLossLong", "accounts": [ { - "name": "caller", + "name": "owner", "isMut": true, "isSigner": true, "docs": [ @@ -18381,23 +20268,23 @@ export const IDL: Adrena = { ] }, { - "name": "payer", + "name": "receivingAccount", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ "#2" ] }, { - "name": "stakingStakedTokenVault", - "isMut": true, + "name": "transferAuthority", + "isMut": false, "isSigner": false, "docs": [ "#3" ] }, { - "name": "stakingRewardTokenVault", + "name": "lmStaking", "isMut": true, "isSigner": false, "docs": [ @@ -18405,7 +20292,7 @@ export const IDL: Adrena = { ] }, { - "name": "stakingLmRewardTokenVault", + "name": "lpStaking", "isMut": true, "isSigner": false, "docs": [ @@ -18413,15 +20300,15 @@ export const IDL: Adrena = { ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "cortex", + "isMut": true, "isSigner": false, "docs": [ "#6" ] }, { - "name": "staking", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -18429,7 +20316,7 @@ export const IDL: Adrena = { ] }, { - "name": "cortex", + "name": "position", "isMut": true, "isSigner": false, "docs": [ @@ -18437,7 +20324,7 @@ export const IDL: Adrena = { ] }, { - "name": "lmTokenMint", + "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, "docs": [ @@ -18445,7 +20332,7 @@ export const IDL: Adrena = { ] }, { - "name": "feeRedistributionMint", + "name": "stakingRewardTokenCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -18453,104 +20340,118 @@ export const IDL: Adrena = { ] }, { - "name": "adrenaProgram", - "isMut": false, + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, "isSigner": false, "docs": [ "#11" ] }, { - "name": "systemProgram", - "isMut": false, + "name": "custody", + "isMut": true, "isSigner": false, "docs": [ "#12" ] }, { - "name": "tokenProgram", + "name": "custodyOracle", "isMut": false, "isSigner": false, "docs": [ "#13" ] - } - ], - "args": [] - }, - { - "name": "getLpTokenPrice", - "accounts": [ + }, { - "name": "cortex", + "name": "custodyTradeOracle", "isMut": false, "isSigner": false, "docs": [ - "#1" + "#14" ] }, { - "name": "pool", - "isMut": false, + "name": "custodyTokenAccount", + "isMut": true, "isSigner": false, "docs": [ - "#2" + "#15" ] }, { - "name": "lpTokenMint", - "isMut": false, + "name": "lmStakingRewardTokenVault", + "isMut": true, "isSigner": false, "docs": [ - "#3" + "#16" ] - } - ], - "args": [], - "returns": "u64" - }, - { - "name": "mintLmTokensFromBucket", - "accounts": [ + }, { - "name": "admin", - "isMut": false, - "isSigner": true, + "name": "lpStakingRewardTokenVault", + "isMut": true, + "isSigner": false, "docs": [ - "#1" + "#17" ] }, { - "name": "receivingAccount", + "name": "lpTokenMint", "isMut": true, "isSigner": false, "docs": [ - "#2" + "#18" ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "protocolFeeRecipient", + "isMut": true, "isSigner": false, "docs": [ - "#3" + "#19" ] }, { - "name": "cortex", + "name": "userProfile", "isMut": true, "isSigner": false, + "isOptional": true, "docs": [ - "#4" + "#20" ] }, { - "name": "lmTokenMint", + "name": "takeProfitThread", "isMut": true, "isSigner": false, "docs": [ - "#5" + "#21", + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22", + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" ] }, { @@ -18558,7 +20459,15 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#6" + "#25" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" ] } ], @@ -18566,49 +20475,48 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "MintLmTokensFromBucketParams" + "defined": "SetStopLossLongParams" } } - ], - "returns": "u8" + ] }, { - "name": "increasePositionLong", + "name": "setTakeProfitShort", "accounts": [ { "name": "owner", - "isMut": false, + "isMut": true, "isSigner": true, "docs": [ "#1" ] }, { - "name": "payer", + "name": "receivingAccount", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ "#2" ] }, { - "name": "fundingAccount", - "isMut": true, + "name": "transferAuthority", + "isMut": false, "isSigner": false, "docs": [ "#3" ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "lmStaking", + "isMut": true, "isSigner": false, "docs": [ "#4" ] }, { - "name": "lmStaking", + "name": "lpStaking", "isMut": true, "isSigner": false, "docs": [ @@ -18616,7 +20524,7 @@ export const IDL: Adrena = { ] }, { - "name": "lpStaking", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -18624,7 +20532,7 @@ export const IDL: Adrena = { ] }, { - "name": "cortex", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -18632,7 +20540,7 @@ export const IDL: Adrena = { ] }, { - "name": "pool", + "name": "position", "isMut": true, "isSigner": false, "docs": [ @@ -18640,7 +20548,7 @@ export const IDL: Adrena = { ] }, { - "name": "position", + "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, "docs": [ @@ -18648,23 +20556,23 @@ export const IDL: Adrena = { ] }, { - "name": "stakingRewardTokenCustody", - "isMut": true, + "name": "stakingRewardTokenCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#10" ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", - "isMut": false, + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, "isSigner": false, "docs": [ "#11" ] }, { - "name": "stakingRewardTokenCustodyTokenAccount", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ @@ -18672,15 +20580,15 @@ export const IDL: Adrena = { ] }, { - "name": "custody", - "isMut": true, + "name": "custodyTradeOracle", + "isMut": false, "isSigner": false, "docs": [ "#13" ] }, { - "name": "custodyTokenAccount", + "name": "collateralCustody", "isMut": true, "isSigner": false, "docs": [ @@ -18688,7 +20596,7 @@ export const IDL: Adrena = { ] }, { - "name": "custodyOracleAccount", + "name": "collateralCustodyOracle", "isMut": false, "isSigner": false, "docs": [ @@ -18696,7 +20604,7 @@ export const IDL: Adrena = { ] }, { - "name": "lmStakingRewardTokenVault", + "name": "collateralCustodyTokenAccount", "isMut": true, "isSigner": false, "docs": [ @@ -18704,7 +20612,7 @@ export const IDL: Adrena = { ] }, { - "name": "lpStakingRewardTokenVault", + "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -18712,7 +20620,7 @@ export const IDL: Adrena = { ] }, { - "name": "lpTokenMint", + "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -18720,7 +20628,7 @@ export const IDL: Adrena = { ] }, { - "name": "protocolFeeRecipient", + "name": "lpTokenMint", "isMut": true, "isSigner": false, "docs": [ @@ -18728,19 +20636,54 @@ export const IDL: Adrena = { ] }, { - "name": "systemProgram", - "isMut": false, + "name": "protocolFeeRecipient", + "isMut": true, "isSigner": false, "docs": [ "#20" ] }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#21" + ] + }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false, + "docs": [ + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, { "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ - "#21" + "#26" ] }, { @@ -18748,7 +20691,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#22" + "#27" ] } ], @@ -18756,48 +20699,48 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "IncreasePositionLongParams" + "defined": "SetTakeProfitShortParams" } } ] }, { - "name": "increasePositionShort", + "name": "setStopLossShort", "accounts": [ { "name": "owner", - "isMut": false, + "isMut": true, "isSigner": true, "docs": [ "#1" ] }, { - "name": "payer", + "name": "receivingAccount", "isMut": true, - "isSigner": true, + "isSigner": false, "docs": [ "#2" ] }, { - "name": "fundingAccount", - "isMut": true, + "name": "transferAuthority", + "isMut": false, "isSigner": false, "docs": [ "#3" ] }, { - "name": "transferAuthority", - "isMut": false, + "name": "lmStaking", + "isMut": true, "isSigner": false, "docs": [ "#4" ] }, { - "name": "lmStaking", + "name": "lpStaking", "isMut": true, "isSigner": false, "docs": [ @@ -18805,7 +20748,7 @@ export const IDL: Adrena = { ] }, { - "name": "lpStaking", + "name": "cortex", "isMut": true, "isSigner": false, "docs": [ @@ -18813,7 +20756,7 @@ export const IDL: Adrena = { ] }, { - "name": "cortex", + "name": "pool", "isMut": true, "isSigner": false, "docs": [ @@ -18821,7 +20764,7 @@ export const IDL: Adrena = { ] }, { - "name": "pool", + "name": "position", "isMut": true, "isSigner": false, "docs": [ @@ -18829,7 +20772,7 @@ export const IDL: Adrena = { ] }, { - "name": "position", + "name": "stakingRewardTokenCustody", "isMut": true, "isSigner": false, "docs": [ @@ -18837,23 +20780,23 @@ export const IDL: Adrena = { ] }, { - "name": "stakingRewardTokenCustody", - "isMut": true, + "name": "stakingRewardTokenCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#10" ] }, { - "name": "stakingRewardTokenCustodyOracleAccount", - "isMut": false, + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, "isSigner": false, "docs": [ "#11" ] }, { - "name": "stakingRewardTokenCustodyTokenAccount", + "name": "custody", "isMut": true, "isSigner": false, "docs": [ @@ -18861,39 +20804,39 @@ export const IDL: Adrena = { ] }, { - "name": "custody", - "isMut": true, + "name": "custodyTradeOracle", + "isMut": false, "isSigner": false, "docs": [ "#13" ] }, { - "name": "custodyOracleAccount", - "isMut": false, + "name": "collateralCustody", + "isMut": true, "isSigner": false, "docs": [ "#14" ] }, { - "name": "collateralCustody", - "isMut": true, + "name": "collateralCustodyOracle", + "isMut": false, "isSigner": false, "docs": [ "#15" ] }, { - "name": "collateralCustodyOracleAccount", - "isMut": false, + "name": "collateralCustodyTokenAccount", + "isMut": true, "isSigner": false, "docs": [ "#16" ] }, { - "name": "collateralCustodyTokenAccount", + "name": "lmStakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -18901,7 +20844,7 @@ export const IDL: Adrena = { ] }, { - "name": "lmStakingRewardTokenVault", + "name": "lpStakingRewardTokenVault", "isMut": true, "isSigner": false, "docs": [ @@ -18909,7 +20852,7 @@ export const IDL: Adrena = { ] }, { - "name": "lpStakingRewardTokenVault", + "name": "lpTokenMint", "isMut": true, "isSigner": false, "docs": [ @@ -18917,7 +20860,7 @@ export const IDL: Adrena = { ] }, { - "name": "lpTokenMint", + "name": "protocolFeeRecipient", "isMut": true, "isSigner": false, "docs": [ @@ -18925,27 +20868,46 @@ export const IDL: Adrena = { ] }, { - "name": "protocolFeeRecipient", + "name": "userProfile", "isMut": true, "isSigner": false, + "isOptional": true, "docs": [ "#21" ] }, { - "name": "systemProgram", - "isMut": false, + "name": "takeProfitThread", + "isMut": true, "isSigner": false, "docs": [ - "#22" + "User can use only TP or only SL. We check the account later in the CPI." ] }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "User can use only TP or only SL. We check the account later in the CPI." + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, { "name": "tokenProgram", "isMut": false, "isSigner": false, "docs": [ - "#23" + "#26" ] }, { @@ -18953,7 +20915,7 @@ export const IDL: Adrena = { "isMut": false, "isSigner": false, "docs": [ - "#24" + "#27" ] } ], @@ -18961,24 +20923,24 @@ export const IDL: Adrena = { { "name": "params", "type": { - "defined": "IncreasePositionShortParams" + "defined": "SetStopLossShortParams" } } ] }, { - "name": "setStakingLmEmissionPotentiometers", + "name": "cancelTakeProfit", "accounts": [ { - "name": "admin", - "isMut": false, + "name": "owner", + "isMut": true, "isSigner": true, "docs": [ "#1" ] }, { - "name": "cortex", + "name": "transferAuthority", "isMut": false, "isSigner": false, "docs": [ @@ -18986,77 +20948,96 @@ export const IDL: Adrena = { ] }, { - "name": "staking", - "isMut": true, + "name": "cortex", + "isMut": false, "isSigner": false, "docs": [ "#3" ] - } - ], - "args": [ - { - "name": "params", - "type": { - "defined": "SetStakingLmEmissionPotentiometersParams" - } - } - ] - }, - { - "name": "setAdmin", - "accounts": [ + }, { - "name": "admin", + "name": "pool", "isMut": false, - "isSigner": true, + "isSigner": false, "docs": [ - "#1" + "#4" ] }, { - "name": "cortex", + "name": "position", "isMut": true, "isSigner": false, "docs": [ - "#2" + "#5" ] - } - ], - "args": [ + }, { - "name": "params", - "type": { - "defined": "SetAdminParams" - } + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "takeProfitThread", + "isMut": true, + "isSigner": false + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false } - ] + ], + "args": [] }, { - "name": "setCustodyMaxCumulativeShortPositionSizeUsd", + "name": "cancelStopLoss", "accounts": [ { - "name": "admin", - "isMut": false, + "name": "owner", + "isMut": true, "isSigner": true, "docs": [ "#1" ] }, { - "name": "cortex", - "isMut": true, + "name": "transferAuthority", + "isMut": false, "isSigner": false, "docs": [ "#2" ] }, + { + "name": "cortex", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, { "name": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "position", "isMut": true, "isSigner": false, "docs": [ - "#3" + "#5" ] }, { @@ -19064,18 +21045,26 @@ export const IDL: Adrena = { "isMut": true, "isSigner": false, "docs": [ - "#4" + "#6" ] - } - ], - "args": [ + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false + }, { - "name": "params", - "type": { - "defined": "SetCustodyMaxCumulativeShortPositionSizeUsdParams" - } + "name": "systemProgram", + "isMut": false, + "isSigner": false } - ] + ], + "args": [] } ], "accounts": [ @@ -19117,6 +21106,10 @@ export const IDL: Adrena = { ] } }, + { + "name": "lmTokenMint", + "type": "publicKey" + }, { "name": "inceptionTime", "type": "i64" @@ -19205,6 +21198,10 @@ export const IDL: Adrena = { { "name": "genesisLiquidityAlpAmount", "type": "u64" + }, + { + "name": "uniquePositionAutomationThreadIdCounter", + "type": "u64" } ] } @@ -19261,9 +21258,11 @@ export const IDL: Adrena = { }, { "name": "oracle", - "type": { - "defined": "OracleParams" - } + "type": "publicKey" + }, + { + "name": "tradeOracle", + "type": "publicKey" }, { "name": "pricing", @@ -19383,7 +21382,7 @@ export const IDL: Adrena = { "type": { "array": [ "publicKey", - 17 + 30 ] } }, @@ -19392,7 +21391,7 @@ export const IDL: Adrena = { "type": { "array": [ "u64", - 17 + 30 ] } }, @@ -19403,30 +21402,6 @@ export const IDL: Adrena = { ] } }, - { - "name": "customOracle", - "type": { - "kind": "struct", - "fields": [ - { - "name": "price", - "type": "u64" - }, - { - "name": "expo", - "type": "i32" - }, - { - "name": "conf", - "type": "u64" - }, - { - "name": "publishTime", - "type": "i64" - } - ] - } - }, { "name": "pool", "type": { @@ -19520,12 +21495,20 @@ export const IDL: Adrena = { "name": "side", "type": "u8" }, + { + "name": "takeProfitThreadIsSet", + "type": "u8" + }, + { + "name": "stopLossThreadIsSet", + "type": "u8" + }, { "name": "padding", "type": { "array": [ "u8", - 6 + 4 ] } }, @@ -19588,15 +21571,31 @@ export const IDL: Adrena = { "type": "u64" }, { - "name": "entryFeeUsd", + "name": "exitFeeUsd", "type": "u64" }, { - "name": "exitFeeUsd", + "name": "liquidationFeeUsd", "type": "u64" }, { - "name": "liquidationFeeUsd", + "name": "takeProfitThreadId", + "type": "u64" + }, + { + "name": "takeProfitLimitPrice", + "type": "u64" + }, + { + "name": "stopLossThreadId", + "type": "u64" + }, + { + "name": "stopLossLimitPrice", + "type": "u64" + }, + { + "name": "stopLossClosePositionPrice", "type": "u64" } ] @@ -19870,15 +21869,23 @@ export const IDL: Adrena = { "name": "originBucket", "type": "u8" }, + { + "name": "cancelled", + "type": "u8" + }, { "name": "padding", "type": { "array": [ "u8", - 6 + 1 ] } }, + { + "name": "voteMultiplier", + "type": "u32" + }, { "name": "amount", "type": "u64" @@ -19949,12 +21956,6 @@ export const IDL: Adrena = { "name": "isStable", "type": "bool" }, - { - "name": "oracle", - "type": { - "defined": "OracleParams" - } - }, { "name": "pricing", "type": { @@ -20049,9 +22050,11 @@ export const IDL: Adrena = { }, { "name": "oracle", - "type": { - "defined": "OracleParams" - } + "type": "publicKey" + }, + { + "name": "tradeOracle", + "type": "publicKey" }, { "name": "pricing", @@ -20169,6 +22172,12 @@ export const IDL: Adrena = { { "name": "finalizeGenesisLockCampaignThreadId", "type": "u64" + }, + { + "name": "reservedSpots", + "type": { + "defined": "ReservedSpots" + } } ] } @@ -20221,30 +22230,6 @@ export const IDL: Adrena = { ] } }, - { - "name": "SetTestOraclePriceParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "price", - "type": "u64" - }, - { - "name": "expo", - "type": "i32" - }, - { - "name": "conf", - "type": "u64" - }, - { - "name": "publishTime", - "type": "i64" - } - ] - } - }, { "name": "InitStakingFourParams", "type": { @@ -20385,6 +22370,66 @@ export const IDL: Adrena = { ] } }, + { + "name": "SetStopLossLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stopLossLimitPrice", + "type": "u64" + }, + { + "name": "closePositionPrice", + "type": { + "option": "u64" + } + } + ] + } + }, + { + "name": "SetStopLossShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "stopLossLimitPrice", + "type": "u64" + }, + { + "name": "closePositionPrice", + "type": { + "option": "u64" + } + } + ] + } + }, + { + "name": "SetTakeProfitLongParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "takeProfitLimitPrice", + "type": "u64" + } + ] + } + }, + { + "name": "SetTakeProfitShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "takeProfitLimitPrice", + "type": "u64" + } + ] + } + }, { "name": "ClosePositionLongParams", "type": { @@ -20392,7 +22437,9 @@ export const IDL: Adrena = { "fields": [ { "name": "price", - "type": "u64" + "type": { + "option": "u64" + } } ] } @@ -20404,7 +22451,9 @@ export const IDL: Adrena = { "fields": [ { "name": "price", - "type": "u64" + "type": { + "option": "u64" + } } ] } @@ -20675,6 +22724,10 @@ export const IDL: Adrena = { { "name": "unlockEndTimestamp", "type": "i64" + }, + { + "name": "voteMultiplier", + "type": "u32" } ] } @@ -20828,10 +22881,6 @@ export const IDL: Adrena = { "name": "liquidationPrice", "type": "u64" }, - { - "name": "entryFee", - "type": "u64" - }, { "name": "exitFee", "type": "u64" @@ -20868,10 +22917,6 @@ export const IDL: Adrena = { "name": "swapFeeOut", "type": "u64" }, - { - "name": "openPositionFee", - "type": "u64" - }, { "name": "exitFee", "type": "u64" @@ -20910,11 +22955,7 @@ export const IDL: Adrena = { { "name": "ProfitAndLoss", "docs": [ - "Specific to the codebase, this struct is used to store the profit and loss of a position.", - "Specific because entry fees are paid right away at position opening and on top of the requested size/leverage (to match it exactly).", - "As such, the profit and loss are calculated with the entry fees already paid (and out of these two numbers).", - "To get the \"real overall\" profit and loss, one must add the entry fees back to the profit and loss.", - "And to get the \"pure\" profit and loss, one must subtract the exit and paid_interests (borrow interests) from the profit and loss." + "Specific to the codebase, this struct is used to store the profit and loss of a position." ], "type": { "kind": "struct", @@ -20927,10 +22968,6 @@ export const IDL: Adrena = { "name": "lossUsd", "type": "u64" }, - { - "name": "entryFeeUsd", - "type": "u64" - }, { "name": "exitFee", "type": "u64" @@ -20975,10 +23012,6 @@ export const IDL: Adrena = { "name": "removeLiquidity", "type": "u16" }, - { - "name": "openPosition", - "type": "u16" - }, { "name": "closePosition", "type": "u16" @@ -21000,7 +23033,7 @@ export const IDL: Adrena = { "type": { "array": [ "u8", - 2 + 4 ] } }, @@ -21028,10 +23061,6 @@ export const IDL: Adrena = { "name": "removeLiquidityUsd", "type": "u64" }, - { - "name": "openPositionUsd", - "type": "u64" - }, { "name": "closePositionUsd", "type": "u64" @@ -21290,37 +23319,12 @@ export const IDL: Adrena = { "type": "i32" }, { - "name": "conf", + "name": "confidence", "type": "u64" } ] } }, - { - "name": "OracleParams", - "type": { - "kind": "struct", - "fields": [ - { - "name": "oracleAccount", - "type": "publicKey" - }, - { - "name": "oracleType", - "type": "u8" - }, - { - "name": "padding", - "type": { - "array": [ - "u8", - 15 - ] - } - } - ] - } - }, { "name": "TokenRatios", "type": { @@ -21359,6 +23363,10 @@ export const IDL: Adrena = { "name": "startTime", "type": "i64" }, + { + "name": "endTime", + "type": "i64" + }, { "name": "rate", "type": "u64" @@ -21467,6 +23475,10 @@ export const IDL: Adrena = { "name": "claimTime", "type": "i64" }, + { + "name": "endTime", + "type": "i64" + }, { "name": "lockDuration", "type": "u64" @@ -21612,41 +23624,48 @@ export const IDL: Adrena = { } }, { - "name": "CortexInitializationStep", + "name": "ReservedSpots", "type": { "kind": "enum", "variants": [ { - "name": "NotCreated" - }, - { - "name": "Step1" - }, - { - "name": "Step2" - }, - { - "name": "Step3" + "name": "None" }, { - "name": "Initialized" + "name": "Test", + "fields": [ + { + "name": "firstReservedSpot", + "type": "publicKey" + }, + { + "name": "secondReservedSpot", + "type": "publicKey" + } + ] } ] } }, { - "name": "OracleType", + "name": "CortexInitializationStep", "type": { "kind": "enum", "variants": [ { - "name": "None" + "name": "NotCreated" + }, + { + "name": "Step1" + }, + { + "name": "Step2" }, { - "name": "Custom" + "name": "Step3" }, { - "name": "Pyth" + "name": "Initialized" } ] } @@ -21766,11 +23785,6 @@ export const IDL: Adrena = { "name": "leverage", "type": "u32", "index": false - }, - { - "name": "feeUsd", - "type": "u64", - "index": false } ] }, @@ -21816,11 +23830,6 @@ export const IDL: Adrena = { "name": "leverage", "type": "u32", "index": false - }, - { - "name": "feeUsd", - "type": "u64", - "index": false } ] }, @@ -22330,6 +24339,31 @@ export const IDL: Adrena = { "code": 6061, "name": "InvalidBucketName", "msg": "Invalid bucket name" + }, + { + "code": 6062, + "name": "InvalidThreadId", + "msg": "The provided Sablier thread does not have the expected ID" + }, + { + "code": 6063, + "name": "PythPriceExponentTooLargeIncurringPrecisionLoss", + "msg": "The exponent used for pyth price lead to high precision loss" + }, + { + "code": 6064, + "name": "MissingClosePositionPrice", + "msg": "The close position price is mandatory" + }, + { + "code": 6065, + "name": "InvalidVoteMultiplier", + "msg": "Invalid vote multiplier" + }, + { + "code": 6066, + "name": "PositionTooYoung", + "msg": "A position cannot be close right after open, a slight delay is enforced" } ] }; diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/AddVest.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/AddVest.tsx index 2c2021348..5de2ec7d7 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/AddVest.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/AddVest.tsx @@ -33,6 +33,7 @@ export interface AddVestForm { originBucket: number unlockStartTimestamp: number unlockEndTimestamp: number + voteMultiplier: number } export default function AddVest({ @@ -53,6 +54,7 @@ export default function AddVest({ originBucket: ORIGIN_BUCKET_VALUES[3].value, // Ecosystem as default unlockStartTimestamp: 0, unlockEndTimestamp: 0, + voteMultiplier: 0, }) const [formErrors, setFormErrors] = useState({}) @@ -61,7 +63,7 @@ export default function AddVest({ // TODO: load the program owned by the selected governance: form.governedAccount?.governance const adrenaClient = useAdrenaClient( - new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + new PublicKey('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') ) const validateInstruction = async (): Promise => { @@ -94,6 +96,7 @@ export default function AddVest({ originBucket: form.originBucket, unlockStartTimestamp: new BN(form.unlockStartTimestamp), unlockEndTimestamp: new BN(form.unlockEndTimestamp), + voteMultiplier: Math.floor(form.voteMultiplier * 10000), }) .accountsStrict({ admin: governance.nativeTreasuryAddress, @@ -153,6 +156,7 @@ export default function AddVest({ unlockEndTimestamp: yup .number() .required('Unlock end timestamp is required'), + voteMultiplier: yup.number().required('Vote multiplier is required'), }) const inputs: InstructionInput[] = [ @@ -200,6 +204,13 @@ export default function AddVest({ inputType: 'number', name: 'unlockEndTimestamp', }, + { + label: 'Vote Multiplier', + initialValue: form.voteMultiplier, + type: InstructionInputType.INPUT, + inputType: 'number', + name: 'unlockEndTimestamp', + }, ] if (!form) return <> diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/MintLmTokensFromBucket.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/MintLmTokensFromBucket.tsx index 96e039a83..8c9257a24 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/MintLmTokensFromBucket.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/MintLmTokensFromBucket.tsx @@ -55,7 +55,7 @@ export default function MintLmTokensFromBucket({ // TODO: load the program owned by the selected governance: form.governedAccount?.governance const adrenaClient = useAdrenaClient( - new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + new PublicKey('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') ) const validateInstruction = async (): Promise => { diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowSwap.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowSwap.tsx index c8a042ff9..a3d2a51e7 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowSwap.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowSwap.tsx @@ -45,7 +45,7 @@ export default function SetCustodyAllowSwap({ // TODO: load the program owned by the selected governance: form.governedAccount?.governance const adrenaClient = useAdrenaClient( - new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + new PublicKey('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') ) const pools = useAdrenaPools(adrenaClient) diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowTrade.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowTrade.tsx index 7489f1b4e..ea6787bc5 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowTrade.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowTrade.tsx @@ -45,7 +45,7 @@ export default function SetCustodyAllowTrade({ // TODO: load the program owned by the selected governance: form.governedAccount?.governance const adrenaClient = useAdrenaClient( - new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + new PublicKey('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') ) const pools = useAdrenaPools(adrenaClient) diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyMaxCumulativeShortSizeUsd.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyMaxCumulativeShortSizeUsd.tsx index df467c97e..7d8fbe749 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyMaxCumulativeShortSizeUsd.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyMaxCumulativeShortSizeUsd.tsx @@ -46,7 +46,7 @@ export default function SetCustodyMaxCumulativeShortSizeUsd({ // TODO: load the program owned by the selected governance: form.governedAccount?.governance const adrenaClient = useAdrenaClient( - new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + new PublicKey('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') ) const pools = useAdrenaPools(adrenaClient) diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowSwap.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowSwap.tsx index 9d4f5fff7..b63aee16f 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowSwap.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowSwap.tsx @@ -42,7 +42,7 @@ export default function SetPoolAllowSwap({ // TODO: load the program owned by the selected governance: form.governedAccount?.governance const adrenaClient = useAdrenaClient( - new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + new PublicKey('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') ) const pools = useAdrenaPools(adrenaClient) diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowTrade.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowTrade.tsx index d1c02f5a6..0fc91f497 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowTrade.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowTrade.tsx @@ -42,7 +42,7 @@ export default function SetPoolAllowSwap({ // TODO: load the program owned by the selected governance: form.governedAccount?.governance const adrenaClient = useAdrenaClient( - new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + new PublicKey('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') ) const pools = useAdrenaPools(adrenaClient) diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAumSoftCapUsd.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAumSoftCapUsd.tsx index f2abe1aef..1ee80706e 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAumSoftCapUsd.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAumSoftCapUsd.tsx @@ -43,7 +43,7 @@ export default function SetPoolAllowSwap({ // TODO: load the program owned by the selected governance: form.governedAccount?.governance const adrenaClient = useAdrenaClient( - new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + new PublicKey('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') ) const pools = useAdrenaPools(adrenaClient) diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolLiquidityState.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolLiquidityState.tsx index e30d09d1f..6b2847523 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolLiquidityState.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolLiquidityState.tsx @@ -48,7 +48,7 @@ export default function SetPoolLiquidityState({ // TODO: load the program owned by the selected governance: form.governedAccount?.governance const adrenaClient = useAdrenaClient( - new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + new PublicKey('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') ) const pools = useAdrenaPools(adrenaClient) diff --git a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetStakingLmEmissionPotentiometers.tsx b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetStakingLmEmissionPotentiometers.tsx index 3adf01747..872c9c48d 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetStakingLmEmissionPotentiometers.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetStakingLmEmissionPotentiometers.tsx @@ -42,7 +42,7 @@ export default function SetStakingLmEmissionPotentiometers({ // TODO: load the program owned by the selected governance: form.governedAccount?.governance const adrenaClient = useAdrenaClient( - new PublicKey('2ZHEtEKT7S1dSPodH2Sdu6cErDyFWad6Yc35cbbqtAaV') + new PublicKey('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') ) const stakings = useAdrenaStakings(adrenaClient) diff --git a/utils/uiTypes/proposalCreationTypes.ts b/utils/uiTypes/proposalCreationTypes.ts index a7793abe6..47e7565d4 100644 --- a/utils/uiTypes/proposalCreationTypes.ts +++ b/utils/uiTypes/proposalCreationTypes.ts @@ -121,7 +121,8 @@ export interface ClawbackForm { holdupTime: number } -export interface SendTokenCompactViewForm extends Omit { +export interface SendTokenCompactViewForm + extends Omit { destinationAccount: string[] amount: (number | undefined)[] txDollarAmount: (string | undefined)[]