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/hooks/useAdrenaClient.ts b/hooks/useAdrenaClient.ts new file mode 100644 index 000000000..2ae5c8b6d --- /dev/null +++ b/hooks/useAdrenaClient.ts @@ -0,0 +1,32 @@ +import { useEffect, useState } from 'react' +import { PublicKey } from '@solana/web3.js' + +import { useConnection } from '@solana/wallet-adapter-react' +import { AnchorProvider, Wallet } from '@coral-xyz/anchor' +import useWalletOnePointOh from './useWalletOnePointOh' +import AdrenaClient from '@tools/sdk/adrena/Adrena' + +export default function useAdrenaClient( + programId: PublicKey | null +): AdrenaClient | null { + const { connection } = useConnection() + const wallet = useWalletOnePointOh() + const [adrenaClient, setAdrenaClient] = useState(null) + + useEffect(() => { + 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, programId]) + + 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 f0f320b68..f6671f2c9 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', }, @@ -217,6 +221,54 @@ export default function useGovernanceAssets() { // // If isVisible is not set, it is equal to canUseAnyInstruction const instructionsMap: InstructionsMap = { + /* + █████ ██████ ██████ ███████ ███ ██ █████ + ██ ██ ██ ██ ██ ██ ██ ████ ██ ██ ██ + ███████ ██ ██ ██████ █████ ██ ██ ██ ███████ + ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ + ██ ██ ██████ ██ ██ ███████ ██ ████ ██ ██ + */ + [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.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..38c4d8821 --- /dev/null +++ b/idls/adrena.json @@ -0,0 +1,12187 @@ +{ + "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", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "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": [ + "#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 (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": [ + "#17" + ] + }, + { + "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" + ] + }, + { + "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": "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": [ + "#11" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + } + ], + "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": "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": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "stakingRewardTokenCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "receivingCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "receivingCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "dispensingCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "dispensingCustodyOracle", + "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 Front end will target the owner account, but not limited to" + ] + }, + { + "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": "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": "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": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lpUserStaking", + "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": "lpStakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#15", + "A realm represent one project 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": "lpStakeResolutionThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "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": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#26" + ] + } + ], + "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 Front end will target the owner account, but not limited to" + ] + }, + { + "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": "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": "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": "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": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#12" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "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": [ + "#6" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "collateralCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#13" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + } + ], + "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": "receivingCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "principalCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "principalCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "principalCustodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "principalCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "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": [ + "#24" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#25" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#28" + ] + } + ], + "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": "receivingCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "collateralCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "principalCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "principalCustodyTradeOracle", + "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": "stakingRewardTokenCustodyOracle", + "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": "custodyOracle", + "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": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "custodyOracle", + "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": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "caller", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "receivingAccount", + "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": "stakingRewardTokenCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "custodyTokenAccount", + "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": [ + "#22" + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "ClosePositionLongParams" + } + } + ] + }, + { + "name": "closePositionShort", + "accounts": [ + { + "name": "caller", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "receivingAccount", + "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": "stakingRewardTokenCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "takeProfitThread", + "isMut": true, + "isSigner": false + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + } + ], + "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": "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" + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + } + ], + "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": "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": [ + "#22" + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + } + ], + "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": "custodyOracle", + "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": "custodyOracle", + "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": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "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": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "receivingCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "receivingCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "principalCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "principalCustodyTradeOracle", + "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": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + } + ], + "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": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "custodyOracle", + "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": "receivingCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "dispensingCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "dispensingCustodyOracle", + "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": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "lmTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#19" + ] + } + ], + "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" + ] + } + ], + "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" + ] + } + ], + "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" + ] + } + ], + "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": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#18", + "A realm represent one project within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#20", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#21", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + } + ], + "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 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": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "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": [ + "#16" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#17", + "A realm represent one project within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#19", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#20", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "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": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "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": [ + "#17" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#18", + "A realm represent one project within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#20", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#21", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + } + ], + "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": "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": [ + "#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": "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 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": "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": "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": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "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": "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": "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": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "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": [ + "#27" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetTakeProfitShortParams" + } + } + ] + }, + { + "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": "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": "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": "lmTokenMint", + "type": "publicKey" + }, + { + "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": "uniquePositionAutomationThreadIdCounter", + "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": "publicKey" + }, + { + "name": "tradeOracle", + "type": "publicKey" + }, + { + "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", + 30 + ] + } + }, + { + "name": "reservedGrantAmounts", + "type": { + "array": [ + "u64", + 30 + ] + } + }, + { + "name": "finalizeGenesisLockCampaignThreadId", + "type": "u64" + } + ] + } + }, + { + "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": "takeProfitThreadIsSet", + "type": "u8" + }, + { + "name": "stopLossThreadIsSet", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 4 + ] + } + }, + { + "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": "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": "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": "cancelled", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 1 + ] + } + }, + { + "name": "voteMultiplier", + "type": "u32" + }, + { + "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": "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": "publicKey" + }, + { + "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": "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": "reservedSpots", + "type": { + "defined": "ReservedSpots" + } + } + ] + } + }, + { + "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": "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": "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": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": { + "option": "u64" + } + } + ] + } + }, + { + "name": "ClosePositionShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": { + "option": "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": "voteMultiplier", + "type": "u32" + } + ] + } + }, + { + "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": "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": "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." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "profitUsd", + "type": "u64" + }, + { + "name": "lossUsd", + "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": "closePosition", + "type": "u16" + }, + { + "name": "liquidation", + "type": "u16" + }, + { + "name": "feeMax", + "type": "u16" + }, + { + "name": "protocolShare", + "type": "u16" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 4 + ] + } + }, + { + "name": "padding2", + "type": "u64" + } + ] + } + }, + { + "name": "FeesStats", + "type": { + "kind": "struct", + "fields": [ + { + "name": "swapUsd", + "type": "u64" + }, + { + "name": "addLiquidityUsd", + "type": "u64" + }, + { + "name": "removeLiquidityUsd", + "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": "confidence", + "type": "u64" + } + ] + } + }, + { + "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": "endTime", + "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": "endTime", + "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": "ReservedSpots", + "type": { + "kind": "enum", + "variants": [ + { + "name": "None" + }, + { + "name": "Test", + "fields": [ + { + "name": "firstReservedSpot", + "type": "publicKey" + }, + { + "name": "secondReservedSpot", + "type": "publicKey" + } + ] + } + ] + } + }, + { + "name": "CortexInitializationStep", + "type": { + "kind": "enum", + "variants": [ + { + "name": "NotCreated" + }, + { + "name": "Step1" + }, + { + "name": "Step2" + }, + { + "name": "Step3" + }, + { + "name": "Initialized" + } + ] + } + }, + { + "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": "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": "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" + }, + { + "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": "3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3" + } +} \ No newline at end of file diff --git a/idls/adrena.ts b/idls/adrena.ts new file mode 100644 index 000000000..923bb7d9b --- /dev/null +++ b/idls/adrena.ts @@ -0,0 +1,24369 @@ +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 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", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "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": [ + "#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 (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": [ + "#17" + ] + }, + { + "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" + ] + }, + { + "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": "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": [ + "#11" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + } + ], + "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": "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": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "stakingRewardTokenCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "receivingCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "receivingCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "dispensingCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "dispensingCustodyOracle", + "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 Front end will target the owner account, but not limited to" + ] + }, + { + "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": "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": "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": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lpUserStaking", + "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": "lpStakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#15", + "A realm represent one project 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": "lpStakeResolutionThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "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": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#26" + ] + } + ], + "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 Front end will target the owner account, but not limited to" + ] + }, + { + "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": "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": "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": "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": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#12" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "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": [ + "#6" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "collateralCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#13" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + } + ], + "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": "receivingCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "principalCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "principalCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "principalCustodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "principalCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "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": [ + "#24" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#25" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#28" + ] + } + ], + "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": "receivingCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "collateralCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "principalCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "principalCustodyTradeOracle", + "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": "stakingRewardTokenCustodyOracle", + "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": "custodyOracle", + "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": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "custodyOracle", + "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": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "caller", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "receivingAccount", + "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": "stakingRewardTokenCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "custodyTokenAccount", + "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": [ + "#22" + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "ClosePositionLongParams" + } + } + ] + }, + { + "name": "closePositionShort", + "accounts": [ + { + "name": "caller", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "receivingAccount", + "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": "stakingRewardTokenCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "takeProfitThread", + "isMut": true, + "isSigner": false + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + } + ], + "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": "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" + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + } + ], + "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": "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": [ + "#22" + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + } + ], + "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": "custodyOracle", + "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": "custodyOracle", + "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": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "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": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "receivingCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "receivingCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "principalCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "principalCustodyTradeOracle", + "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": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + } + ], + "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": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "custodyOracle", + "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": "receivingCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "dispensingCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "dispensingCustodyOracle", + "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": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "lmTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#19" + ] + } + ], + "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" + ] + } + ], + "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" + ] + } + ], + "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" + ] + } + ], + "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": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#18", + "A realm represent one project within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#20", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#21", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + } + ], + "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 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": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "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": [ + "#16" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#17", + "A realm represent one project within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#19", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#20", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "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": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "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": [ + "#17" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#18", + "A realm represent one project within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#20", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#21", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + } + ], + "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": "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": [ + "#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": "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 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": "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": "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": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "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": "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": "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": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "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": [ + "#27" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetTakeProfitShortParams" + } + } + ] + }, + { + "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": "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": "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": "lmTokenMint", + "type": "publicKey" + }, + { + "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": "uniquePositionAutomationThreadIdCounter", + "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": "publicKey" + }, + { + "name": "tradeOracle", + "type": "publicKey" + }, + { + "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", + 30 + ] + } + }, + { + "name": "reservedGrantAmounts", + "type": { + "array": [ + "u64", + 30 + ] + } + }, + { + "name": "finalizeGenesisLockCampaignThreadId", + "type": "u64" + } + ] + } + }, + { + "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": "takeProfitThreadIsSet", + "type": "u8" + }, + { + "name": "stopLossThreadIsSet", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 4 + ] + } + }, + { + "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": "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": "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": "cancelled", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 1 + ] + } + }, + { + "name": "voteMultiplier", + "type": "u32" + }, + { + "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": "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": "publicKey" + }, + { + "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": "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": "reservedSpots", + "type": { + "defined": "ReservedSpots" + } + } + ] + } + }, + { + "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": "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": "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": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": { + "option": "u64" + } + } + ] + } + }, + { + "name": "ClosePositionShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": { + "option": "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": "voteMultiplier", + "type": "u32" + } + ] + } + }, + { + "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": "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": "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." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "profitUsd", + "type": "u64" + }, + { + "name": "lossUsd", + "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": "closePosition", + "type": "u16" + }, + { + "name": "liquidation", + "type": "u16" + }, + { + "name": "feeMax", + "type": "u16" + }, + { + "name": "protocolShare", + "type": "u16" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 4 + ] + } + }, + { + "name": "padding2", + "type": "u64" + } + ] + } + }, + { + "name": "FeesStats", + "type": { + "kind": "struct", + "fields": [ + { + "name": "swapUsd", + "type": "u64" + }, + { + "name": "addLiquidityUsd", + "type": "u64" + }, + { + "name": "removeLiquidityUsd", + "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": "confidence", + "type": "u64" + } + ] + } + }, + { + "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": "endTime", + "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": "endTime", + "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": "ReservedSpots", + "type": { + "kind": "enum", + "variants": [ + { + "name": "None" + }, + { + "name": "Test", + "fields": [ + { + "name": "firstReservedSpot", + "type": "publicKey" + }, + { + "name": "secondReservedSpot", + "type": "publicKey" + } + ] + } + ] + } + }, + { + "name": "CortexInitializationStep", + "type": { + "kind": "enum", + "variants": [ + { + "name": "NotCreated" + }, + { + "name": "Step1" + }, + { + "name": "Step2" + }, + { + "name": "Step3" + }, + { + "name": "Initialized" + } + ] + } + }, + { + "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": "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": "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" + }, + { + "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", + "isMut": false, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "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": [ + "#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 (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": [ + "#17" + ] + }, + { + "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" + ] + }, + { + "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": "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": [ + "#11" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "rent", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + } + ], + "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": "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": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "stakingRewardTokenCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "receivingCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "receivingCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "dispensingCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "dispensingCustodyOracle", + "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 Front end will target the owner account, but not limited to" + ] + }, + { + "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": "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": "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": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "lpUserStaking", + "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": "lpStakingStakedTokenVault", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "lpTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#15", + "A realm represent one project 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": "lpStakeResolutionThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "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": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#26" + ] + } + ], + "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 Front end will target the owner account, but not limited to" + ] + }, + { + "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": "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": "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": "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": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#12" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "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": [ + "#6" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "collateralCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#13" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + } + ], + "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": "receivingCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "principalCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "principalCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "principalCustodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "principalCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "transferAuthority", + "isMut": false, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "cortex", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "lmStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "lpStaking", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "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": [ + "#24" + ] + }, + { + "name": "userProfile", + "isMut": true, + "isSigner": false, + "isOptional": true, + "docs": [ + "#25" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#28" + ] + } + ], + "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": "receivingCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "receivingCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "collateralCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "principalCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "principalCustodyTradeOracle", + "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": "stakingRewardTokenCustodyOracle", + "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": "custodyOracle", + "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": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "custodyOracle", + "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": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#8" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "caller", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "receivingAccount", + "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": "stakingRewardTokenCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "custodyTokenAccount", + "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": [ + "#22" + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "ClosePositionLongParams" + } + } + ] + }, + { + "name": "closePositionShort", + "accounts": [ + { + "name": "caller", + "isMut": true, + "isSigner": true, + "docs": [ + "#1" + ] + }, + { + "name": "owner", + "isMut": true, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "receivingAccount", + "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": "stakingRewardTokenCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#11" + ] + }, + { + "name": "stakingRewardTokenCustodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "custody", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "takeProfitThread", + "isMut": true, + "isSigner": false + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + } + ], + "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": "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" + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + } + ], + "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": "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": [ + "#22" + ] + }, + { + "name": "stopLossThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + } + ], + "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": "custodyOracle", + "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": "custodyOracle", + "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": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "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": "pool", + "isMut": false, + "isSigner": false, + "docs": [ + "#2" + ] + }, + { + "name": "receivingCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#3" + ] + }, + { + "name": "receivingCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "principalCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#7" + ] + }, + { + "name": "principalCustodyTradeOracle", + "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": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + } + ], + "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": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "collateralCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#6" + ] + }, + { + "name": "collateralCustodyOracle", + "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": "custodyOracle", + "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": "receivingCustodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#4" + ] + }, + { + "name": "dispensingCustody", + "isMut": false, + "isSigner": false, + "docs": [ + "#5" + ] + }, + { + "name": "dispensingCustodyOracle", + "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": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "lmTokenMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#19" + ] + } + ], + "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" + ] + } + ], + "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" + ] + } + ], + "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" + ] + } + ], + "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": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#14" + ] + }, + { + "name": "lmTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#15" + ] + }, + { + "name": "governanceTokenMint", + "isMut": true, + "isSigner": false, + "docs": [ + "#16" + ] + }, + { + "name": "feeRedistributionMint", + "isMut": false, + "isSigner": false, + "docs": [ + "#17" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#18", + "A realm represent one project within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#20", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#21", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + } + ], + "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 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": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "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": [ + "#16" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#17", + "A realm represent one project within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#18" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#19", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#20", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#21" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "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": "pool", + "isMut": true, + "isSigner": false, + "docs": [ + "#12" + ] + }, + { + "name": "genesisLock", + "isMut": true, + "isSigner": false, + "docs": [ + "#13" + ] + }, + { + "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": [ + "#17" + ] + }, + { + "name": "governanceRealm", + "isMut": false, + "isSigner": false, + "docs": [ + "#18", + "A realm represent one project within the governance program" + ] + }, + { + "name": "governanceRealmConfig", + "isMut": false, + "isSigner": false, + "docs": [ + "#19" + ] + }, + { + "name": "governanceGoverningTokenHolding", + "isMut": true, + "isSigner": false, + "docs": [ + "#20", + "Token account owned by governance program holding user's locked tokens" + ] + }, + { + "name": "governanceGoverningTokenOwnerRecord", + "isMut": true, + "isSigner": false, + "docs": [ + "#21", + "Account owned by governance storing user information" + ] + }, + { + "name": "stakesClaimCronThread", + "isMut": true, + "isSigner": false, + "docs": [ + "#22" + ] + }, + { + "name": "sablierProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#23" + ] + }, + { + "name": "governanceProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#24" + ] + }, + { + "name": "adrenaProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#25" + ] + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#26" + ] + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false, + "docs": [ + "#27" + ] + } + ], + "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": "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": [ + "#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": "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 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": "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": "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": "custodyTokenAccount", + "isMut": true, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "custodyOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#10" + ] + }, + { + "name": "custodyTradeOracle", + "isMut": false, + "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": "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": "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": "custodyTradeOracle", + "isMut": false, + "isSigner": false, + "docs": [ + "#9" + ] + }, + { + "name": "collateralCustody", + "isMut": true, + "isSigner": false, + "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": [ + "#27" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": "SetTakeProfitShortParams" + } + } + ] + }, + { + "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": "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": "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": "lmTokenMint", + "type": "publicKey" + }, + { + "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": "uniquePositionAutomationThreadIdCounter", + "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": "publicKey" + }, + { + "name": "tradeOracle", + "type": "publicKey" + }, + { + "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", + 30 + ] + } + }, + { + "name": "reservedGrantAmounts", + "type": { + "array": [ + "u64", + 30 + ] + } + }, + { + "name": "finalizeGenesisLockCampaignThreadId", + "type": "u64" + } + ] + } + }, + { + "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": "takeProfitThreadIsSet", + "type": "u8" + }, + { + "name": "stopLossThreadIsSet", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 4 + ] + } + }, + { + "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": "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": "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": "cancelled", + "type": "u8" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 1 + ] + } + }, + { + "name": "voteMultiplier", + "type": "u32" + }, + { + "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": "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": "publicKey" + }, + { + "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": "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": "reservedSpots", + "type": { + "defined": "ReservedSpots" + } + } + ] + } + }, + { + "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": "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": "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": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": { + "option": "u64" + } + } + ] + } + }, + { + "name": "ClosePositionShortParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "price", + "type": { + "option": "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": "voteMultiplier", + "type": "u32" + } + ] + } + }, + { + "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": "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": "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." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "profitUsd", + "type": "u64" + }, + { + "name": "lossUsd", + "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": "closePosition", + "type": "u16" + }, + { + "name": "liquidation", + "type": "u16" + }, + { + "name": "feeMax", + "type": "u16" + }, + { + "name": "protocolShare", + "type": "u16" + }, + { + "name": "padding", + "type": { + "array": [ + "u8", + 4 + ] + } + }, + { + "name": "padding2", + "type": "u64" + } + ] + } + }, + { + "name": "FeesStats", + "type": { + "kind": "struct", + "fields": [ + { + "name": "swapUsd", + "type": "u64" + }, + { + "name": "addLiquidityUsd", + "type": "u64" + }, + { + "name": "removeLiquidityUsd", + "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": "confidence", + "type": "u64" + } + ] + } + }, + { + "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": "endTime", + "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": "endTime", + "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": "ReservedSpots", + "type": { + "kind": "enum", + "variants": [ + { + "name": "None" + }, + { + "name": "Test", + "fields": [ + { + "name": "firstReservedSpot", + "type": "publicKey" + }, + { + "name": "secondReservedSpot", + "type": "publicKey" + } + ] + } + ] + } + }, + { + "name": "CortexInitializationStep", + "type": { + "kind": "enum", + "variants": [ + { + "name": "NotCreated" + }, + { + "name": "Step1" + }, + { + "name": "Step2" + }, + { + "name": "Step3" + }, + { + "name": "Initialized" + } + ] + } + }, + { + "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": "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": "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" + }, + { + "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 new file mode 100644 index 000000000..5de2ec7d7 --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/AddVest.tsx @@ -0,0 +1,227 @@ +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 { BN } from '@coral-xyz/anchor' +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 + voteMultiplier: number +} + +export default function AddVest({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + const wallet = useWalletOnePointOh() + const { assetAccounts } = useGovernanceAssets() + const shouldBeGoverned = !!(index !== 0 && governance) + + const [form, setForm] = useState({ + governedAccount: null, + owner: '', + amount: 0, + originBucket: ORIGIN_BUCKET_VALUES[3].value, // Ecosystem as default + unlockStartTimestamp: 0, + unlockEndTimestamp: 0, + voteMultiplier: 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('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') + ) + + 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 || !adrenaClient || !wallet?.publicKey) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const owner = new PublicKey(form.owner) + const cortex = await adrenaClient.getCortex() + + const instruction = await adrenaClient.program.methods + .addVest({ + amount: getMintNaturalAmountFromDecimalAsBN(form.amount, 9), + originBucket: form.originBucket, + unlockStartTimestamp: new BN(form.unlockStartTimestamp), + unlockEndTimestamp: new BN(form.unlockEndTimestamp), + voteMultiplier: Math.floor(form.voteMultiplier * 10000), + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: adrenaClient.cortexPda, + owner, + payer: wallet.publicKey, + 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, + 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'), + 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'), + voteMultiplier: yup.number().required('Vote multiplier is required'), + }) + + const inputs: InstructionInput[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + governance, + options: assetAccounts, + }, + { + 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', + }, + { + label: 'Vote Multiplier', + initialValue: form.voteMultiplier, + type: InstructionInputType.INPUT, + inputType: 'number', + name: 'unlockEndTimestamp', + }, + ] + + 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..8c9257a24 --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/MintLmTokensFromBucket.tsx @@ -0,0 +1,180 @@ +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 { 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 + 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, +}: { + index: number + governance: ProgramAccount | null +}) { + const { assetAccounts } = useGovernanceAssets() + const shouldBeGoverned = !!(index !== 0 && governance) + + const [form, setForm] = useState({ + governedAccount: null, + 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('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') + ) + + 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 || !adrenaClient) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + 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, + receivingAccount, + transferAuthority: adrenaClient.transferAuthorityPda, + cortex: adrenaClient.cortexPda, + lmTokenMint: adrenaClient.lmTokenMint, + tokenProgram: TOKEN_PROGRAM_ID, + }) + .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'), + 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[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + governance, + options: assetAccounts, + }, + { + 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', + }, + ] + + 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..a3d2a51e7 --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowSwap.tsx @@ -0,0 +1,168 @@ +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 { 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({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + 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('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') + ) + + const pools = useAdrenaPools(adrenaClient) + const custodies = useAdrenaCustodies(adrenaClient, form.pool) + + 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 || + !adrenaClient || + !form.pool || + !form.custody + ) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaClient.program.methods + .setCustodyAllowSwap({ + allowSwap: form.allow, + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: adrenaClient.cortexPda, + pool: form.pool.pubkey, + custody: form.custody.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: '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, + 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..ea6787bc5 --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyAllowTrade.tsx @@ -0,0 +1,168 @@ +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 { 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({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + 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('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') + ) + + const pools = useAdrenaPools(adrenaClient) + const custodies = useAdrenaCustodies(adrenaClient, form.pool) + + 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 || + !adrenaClient || + !form.pool || + !form.custody + ) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaClient.program.methods + .setCustodyAllowTrade({ + allowTrade: form.allow, + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: adrenaClient.cortexPda, + pool: form.pool.pubkey, + custody: form.custody.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: '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', + }, + ] + + 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..7d8fbe749 --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetCustodyMaxCumulativeShortSizeUsd.tsx @@ -0,0 +1,174 @@ +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 { 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 + maxCumulativeShortSizeUsd: number + pool: PoolWithPubkey | null + custody: CustodyWithPubkey | null +} + +export default function SetCustodyMaxCumulativeShortSizeUsd({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + const { assetAccounts } = useGovernanceAssets() + const shouldBeGoverned = !!(index !== 0 && governance) + + const [form, setForm] = useState({ + governedAccount: null, + 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('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') + ) + + const pools = useAdrenaPools(adrenaClient) + const custodies = useAdrenaCustodies(adrenaClient, form.pool) + + 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 || + !adrenaClient || + !form.pool || + !form.custody + ) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaClient.program.methods + .setCustodyMaxCumulativeShortPositionSizeUsd({ + maxCumulativeShortPositionSizeUsd: new BN( + form.maxCumulativeShortSizeUsd * 10 ** 6 + ), + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: adrenaClient.cortexPda, + pool: form.pool.pubkey, + custody: form.custody.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'), + maxCumulativeShortSizeUsd: yup + .number() + .required('Max Cumulative Short Size Usd'), + }) + + const inputs: InstructionInput[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + 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: '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', + }, + ] + + 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..b63aee16f --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowSwap.tsx @@ -0,0 +1,146 @@ +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 { 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({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + 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('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') + ) + + const pools = useAdrenaPools(adrenaClient) + + 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 || !adrenaClient || !form.pool) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaClient.program.methods + .setPoolAllowSwap({ + allowSwap: form.allow, + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: adrenaClient.cortexPda, + pool: form.pool.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: '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, + 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..0fc91f497 --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAllowTrade.tsx @@ -0,0 +1,146 @@ +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 { 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 SetPoolAllowSwap({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + 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('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') + ) + + const pools = useAdrenaPools(adrenaClient) + + 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 || !adrenaClient || !form.pool) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaClient.program.methods + .setPoolAllowTrade({ + allowTrade: form.allow, + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: adrenaClient.cortexPda, + pool: form.pool.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: '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', + }, + ] + + 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..1ee80706e --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolAumSoftCapUsd.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 { 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 + aumSoftCapUsd: number + pool: PoolWithPubkey | null +} + +export default function SetPoolAllowSwap({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + const { assetAccounts } = useGovernanceAssets() + const shouldBeGoverned = !!(index !== 0 && governance) + + const [form, setForm] = useState({ + governedAccount: null, + 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('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') + ) + + const pools = useAdrenaPools(adrenaClient) + + 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 || !adrenaClient || !form.pool) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaClient.program.methods + .setPoolAumSoftCapUsd({ + aumSoftCapUsd: new BN(form.aumSoftCapUsd * 10 ** 6), + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: adrenaClient.cortexPda, + pool: form.pool.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'), + aumSoftCapUsd: yup.number().required('Aum soft cap usd is required'), + }) + + const inputs: InstructionInput[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + 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: 'Aum Soft Cap Usd', + initialValue: form.aumSoftCapUsd, + type: InstructionInputType.INPUT, + name: 'aumSoftCapUsd', + inputType: 'number', + }, + ] + + 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..6b2847523 --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetPoolLiquidityState.tsx @@ -0,0 +1,153 @@ +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 { 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 SetPoolAumSoftCapUsdForm { + governedAccount: AssetAccount | null + 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, +}: { + index: number + governance: ProgramAccount | null +}) { + const { assetAccounts } = useGovernanceAssets() + const shouldBeGoverned = !!(index !== 0 && governance) + + const [form, setForm] = useState({ + governedAccount: null, + 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('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') + ) + + const pools = useAdrenaPools(adrenaClient) + + 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 || !adrenaClient || !form.pool) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaClient.program.methods + .setPoolLiquidityState({ + liquidityState: form.liquidityState, + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: adrenaClient.cortexPda, + pool: form.pool.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'), + liquidityState: yup.number().required('Liquidity state is required'), + }) + + const inputs: InstructionInput[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + 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: 'Liquidity State', + initialValue: form.liquidityState, + type: InstructionInputType.SELECT, + name: 'liquidityState', + options: LIQUIDITY_STATE_VALUES, + }, + ] + + 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..872c9c48d --- /dev/null +++ b/pages/dao/[symbol]/proposal/components/instructions/Adrena/SetStakingLmEmissionPotentiometers.tsx @@ -0,0 +1,149 @@ +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 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 + lmEmissionPotentiometerBps: number + staking: StakingWithPubkey | null +} + +export default function SetStakingLmEmissionPotentiometers({ + index, + governance, +}: { + index: number + governance: ProgramAccount | null +}) { + const { assetAccounts } = useGovernanceAssets() + const shouldBeGoverned = !!(index !== 0 && governance) + + const [form, setForm] = useState({ + governedAccount: null, + 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('3UT4rMBgSTi6NPHVYKM5AxaWgrkGNJeFQED8NK86axk3') + ) + + const stakings = useAdrenaStakings(adrenaClient) + + 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 || !adrenaClient || !form.staking) { + return { + serializedInstruction: '', + isValid, + governance, + chunkBy: 1, + } + } + + const instruction = await adrenaClient.program.methods + .setStakingLmEmissionPotentiometers({ + lmEmissionPotentiometerBps: form.lmEmissionPotentiometerBps, + }) + .accountsStrict({ + admin: governance.nativeTreasuryAddress, + cortex: adrenaClient.cortexPda, + staking: form.staking.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'), + lmEmissionPotentiometerBps: yup + .number() + .required('LM emission potentiometer BPS is required'), + }) + + const inputs: InstructionInput[] = [ + { + label: 'Governance', + initialValue: form.governedAccount, + name: 'governedAccount', + type: InstructionInputType.GOVERNED_ACCOUNT, + shouldBeGoverned: shouldBeGoverned as any, + governance, + options: assetAccounts, + }, + { + 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, + })) ?? [], + }, + ] + + if (!form) return <> + + return ( + + ) +} diff --git a/pages/dao/[symbol]/proposal/new.tsx b/pages/dao/[symbol]/proposal/new.tsx index 30fe0ba64..d8a647fe5 100644 --- a/pages/dao/[symbol]/proposal/new.tsx +++ b/pages/dao/[symbol]/proposal/new.tsx @@ -59,6 +59,16 @@ import WithdrawFromOracle from './components/instructions/Switchboard/WithdrawFr import StakeValidator from './components/instructions/Validators/StakeValidator' import SanctumDepositStake from './components/instructions/Validators/SanctumDepositStake' import SanctumWithdrawStake from './components/instructions/Validators/SanctumWithdrawStake' +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 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' @@ -469,6 +479,16 @@ const New = () => { | null } = useMemo( () => ({ + [Instructions.AdrenaAddVest]: AdrenaAddVest, + [Instructions.AdrenaMintLmTokensFromBucket]: AdrenaMintLmTokensFromBucket, + [Instructions.AdrenaSetCustodyAllowSwap]: AdrenaSetCustodyAllowSwap, + [Instructions.AdrenaSetCustodyAllowTrade]: AdrenaSetCustodyAllowTrade, + [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/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/utils/uiTypes/proposalCreationTypes.ts b/utils/uiTypes/proposalCreationTypes.ts index d0aaa9eaa..8f7fa6231 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, @@ -121,7 +122,8 @@ export interface ClawbackForm { holdupTime: number } -export interface SendTokenCompactViewForm extends Omit { +export interface SendTokenCompactViewForm + extends Omit { destinationAccount: string[] amount: (number | undefined)[] txDollarAmount: (string | undefined)[] @@ -295,6 +297,16 @@ export interface JoinDAOForm { } export enum Instructions { + AdrenaAddVest, + AdrenaMintLmTokensFromBucket, + AdrenaSetCustodyAllowSwap, + AdrenaSetCustodyAllowTrade, + AdrenaSetCustodyMaxCumulativeShortSizeUsd, + AdrenaSetPoolAllowSwap, + AdrenaSetPoolAllowTrade, + AdrenaSetPoolAumSoftCapUsd, + AdrenaSetPoolLiquidityState, + AdrenaSetStakingLmEmissionPotentiometers, Base64, Burn, ChangeMakeDonation,