From 4deb050c8b62e6c5a10cf07475890f8c85925820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20Brzezi=C5=84ski?= Date: Thu, 16 Jun 2022 01:58:49 +0200 Subject: [PATCH] Feature/small program version fix (#757) * fix * format fix --- README.md | 4 +- SwitchboardVotePlugin/SwitchboardIdl.ts | 11725 ++++++++-------- .../SwitchboardQueueVoterClient.ts | 48 +- SwitchboardVotePlugin/gameofnodes.json | 7 +- .../store/switchboardStore.ts | 9 +- SwitchboardVotePlugin/switchboard_v2.json | 257 +- VoteStakeRegistry/tools/deposits.ts | 5 +- actions/castVote.ts | 7 +- actions/createProposal.ts | 7 +- actions/switchboardRefreshVoterWeight.ts | 14 +- .../SwitchboardPermissionCard.tsx | 52 +- .../TokenBalance/TokenBalanceCardWrapper.tsx | 6 +- hooks/useRealm.tsx | 2 +- hooks/useVotingPlugins.ts | 101 +- models/voteWeights.ts | 8 +- .../proposal/components/NewProposalBtn.tsx | 4 +- .../instructions/Switchboard/AdmitOracle.tsx | 211 +- .../instructions/Switchboard/RevokeOracle.tsx | 203 +- pages/dao/[symbol]/proposal/new.tsx | 21 +- utils/uiTypes/VotePlugin.ts | 32 +- 20 files changed, 6148 insertions(+), 6575 deletions(-) diff --git a/README.md b/README.md index 45d85ac5fd..823ed208b1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Switchboard Add-in Support -## To set this up for development with Switchboard, the first step is to get [this](https://github.com/switchboard-xyz/switchboard-core/blob/main/switchboard_v2/tests/addin-tests.ts) to work. +## To set this up for development with Switchboard, the first step is to get [this](https://github.com/switchboard-xyz/switchboard-core/blob/main/switchboard_v2/tests/addin-tests.ts) to work. + - [install anchor](https://project-serum.github.io/anchor/getting-started/installation.html#installing-dependencies)[install anchor](https://project-serum.github.io/anchor/getting-started/installation.html#installing-dependencies) if you don't currently have it installed - navigate to the `switchboard_v2` directory within `switchboard-core` and run `anchor test`. This will build switchboardv2 and run the addin-tests.ts script, which will set up a realm, governance, queue, oracles, permissions, and proposal. - you will need to make sure the pubkeys of the governance program and switchboard program throughout the codebase are pointed to your local pubkeys of those programs: @@ -12,6 +13,7 @@ - start the governance-ui by running `yarn dev` ## Working on governance-ui + - most of the work is in `hooks/useRealm.ts` and `hooks/useVotingPlugins.ts` in the governance-ui. The UI work is in `components/TokenBalance` # NextJS Typescript Boilerplate diff --git a/SwitchboardVotePlugin/SwitchboardIdl.ts b/SwitchboardVotePlugin/SwitchboardIdl.ts index 1120a8bd4c..4e1eac7ded 100644 --- a/SwitchboardVotePlugin/SwitchboardIdl.ts +++ b/SwitchboardVotePlugin/SwitchboardIdl.ts @@ -1,9995 +1,9714 @@ export type Switchboard = { - "version": "0.1.0", - "name": "switchboard_v2", - "instructions": [ + version: '0.1.0' + name: 'switchboard_v2' + instructions: [ { - "name": "aggregatorAddJob", - "accounts": [ + name: 'aggregatorAddJob' + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority' + isMut: false + isSigner: true }, { - "name": "job", - "isMut": true, - "isSigner": false + name: 'job' + isMut: true + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "AggregatorAddJobParams" + name: 'params' + type: { + defined: 'AggregatorAddJobParams' } } ] }, { - "name": "aggregatorInit", - "accounts": [ + name: 'aggregatorInit' + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": false + name: 'authority' + isMut: false + isSigner: false }, { - "name": "queue", - "isMut": false, - "isSigner": false + name: 'queue' + isMut: false + isSigner: false }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "AggregatorInitParams" + name: 'params' + type: { + defined: 'AggregatorInitParams' } } ] }, { - "name": "aggregatorLock", - "accounts": [ + name: 'aggregatorLock' + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": true, - "isSigner": true + name: 'authority' + isMut: true + isSigner: true } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "AggregatorLockParams" + name: 'params' + type: { + defined: 'AggregatorLockParams' } } ] }, { - "name": "aggregatorOpenRound", - "accounts": [ + name: 'aggregatorOpenRound' + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator' + isMut: true + isSigner: false }, { - "name": "lease", - "isMut": true, - "isSigner": false + name: 'lease' + isMut: true + isSigner: false }, { - "name": "oracleQueue", - "isMut": true, - "isSigner": false + name: 'oracleQueue' + isMut: true + isSigner: false }, { - "name": "queueAuthority", - "isMut": false, - "isSigner": false + name: 'queueAuthority' + isMut: false + isSigner: false }, { - "name": "permission", - "isMut": true, - "isSigner": false + name: 'permission' + isMut: true + isSigner: false }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow' + isMut: true + isSigner: false }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState' + isMut: false + isSigner: false }, { - "name": "payoutWallet", - "isMut": true, - "isSigner": false + name: 'payoutWallet' + isMut: true + isSigner: false }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram' + isMut: false + isSigner: false }, { - "name": "dataBuffer", - "isMut": false, - "isSigner": false + name: 'dataBuffer' + isMut: false + isSigner: false }, { - "name": "mint", - "isMut": false, - "isSigner": false + name: 'mint' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "AggregatorOpenRoundParams" + name: 'params' + type: { + defined: 'AggregatorOpenRoundParams' } } ] }, { - "name": "aggregatorRemoveJob", - "accounts": [ + name: 'aggregatorRemoveJob' + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority' + isMut: false + isSigner: true }, { - "name": "job", - "isMut": true, - "isSigner": false + name: 'job' + isMut: true + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "AggregatorRemoveJobParams" + name: 'params' + type: { + defined: 'AggregatorRemoveJobParams' } } ] }, { - "name": "aggregatorSaveResult", - "accounts": [ + name: 'aggregatorSaveResult' + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator' + isMut: true + isSigner: false }, { - "name": "oracle", - "isMut": true, - "isSigner": false + name: 'oracle' + isMut: true + isSigner: false }, { - "name": "oracleAuthority", - "isMut": false, - "isSigner": true + name: 'oracleAuthority' + isMut: false + isSigner: true }, { - "name": "oracleQueue", - "isMut": false, - "isSigner": false + name: 'oracleQueue' + isMut: false + isSigner: false }, { - "name": "queueAuthority", - "isMut": false, - "isSigner": false + name: 'queueAuthority' + isMut: false + isSigner: false }, { - "name": "feedPermission", - "isMut": true, - "isSigner": false + name: 'feedPermission' + isMut: true + isSigner: false }, { - "name": "oraclePermission", - "isMut": false, - "isSigner": false + name: 'oraclePermission' + isMut: false + isSigner: false }, { - "name": "lease", - "isMut": true, - "isSigner": false + name: 'lease' + isMut: true + isSigner: false }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow' + isMut: true + isSigner: false }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram' + isMut: false + isSigner: false }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState' + isMut: false + isSigner: false }, { - "name": "historyBuffer", - "isMut": true, - "isSigner": false + name: 'historyBuffer' + isMut: true + isSigner: false }, { - "name": "mint", - "isMut": false, - "isSigner": false + name: 'mint' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSaveResultParams" + name: 'params' + type: { + defined: 'AggregatorSaveResultParams' } } ] }, { - "name": "aggregatorSetAuthority", - "accounts": [ + name: 'aggregatorSetAuthority' + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority' + isMut: false + isSigner: true }, { - "name": "newAuthority", - "isMut": false, - "isSigner": false + name: 'newAuthority' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSetAuthorityParams" + name: 'params' + type: { + defined: 'AggregatorSetAuthorityParams' } } ] }, { - "name": "aggregatorSetBatchSize", - "accounts": [ + name: 'aggregatorSetBatchSize' + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority' + isMut: false + isSigner: true } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSetBatchSizeParams" + name: 'params' + type: { + defined: 'AggregatorSetBatchSizeParams' } } ] }, { - "name": "aggregatorSetHistoryBuffer", - "accounts": [ + name: 'aggregatorSetHistoryBuffer' + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority' + isMut: false + isSigner: true }, { - "name": "buffer", - "isMut": true, - "isSigner": false + name: 'buffer' + isMut: true + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSetHistoryBufferParams" + name: 'params' + type: { + defined: 'AggregatorSetHistoryBufferParams' } } ] }, { - "name": "aggregatorSetMinJobs", - "accounts": [ + name: 'aggregatorSetMinJobs' + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority' + isMut: false + isSigner: true } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSetMinJobsParams" + name: 'params' + type: { + defined: 'AggregatorSetMinJobsParams' } } ] }, { - "name": "aggregatorSetMinOracles", - "accounts": [ + name: 'aggregatorSetMinOracles' + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority' + isMut: false + isSigner: true } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSetMinOraclesParams" + name: 'params' + type: { + defined: 'AggregatorSetMinOraclesParams' } } ] }, { - "name": "aggregatorSetQueue", - "accounts": [ + name: 'aggregatorSetQueue' + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority' + isMut: false + isSigner: true }, { - "name": "queue", - "isMut": false, - "isSigner": false + name: 'queue' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSetQueueParams" + name: 'params' + type: { + defined: 'AggregatorSetQueueParams' } } ] }, { - "name": "aggregatorSetUpdateInterval", - "accounts": [ + name: 'aggregatorSetUpdateInterval' + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority' + isMut: false + isSigner: true } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSetUpdateIntervalParams" + name: 'params' + type: { + defined: 'AggregatorSetUpdateIntervalParams' } } ] }, { - "name": "aggregatorSetVarianceThreshold", - "accounts": [ + name: 'aggregatorSetVarianceThreshold' + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority' + isMut: false + isSigner: true } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSetVarianceThresholdParams" + name: 'params' + type: { + defined: 'AggregatorSetVarianceThresholdParams' } } ] }, { - "name": "crankInit", - "accounts": [ + name: 'crankInit' + accounts: [ { - "name": "crank", - "isMut": true, - "isSigner": true + name: 'crank' + isMut: true + isSigner: true }, { - "name": "queue", - "isMut": false, - "isSigner": false + name: 'queue' + isMut: false + isSigner: false }, { - "name": "buffer", - "isMut": true, - "isSigner": false + name: 'buffer' + isMut: true + isSigner: false }, { - "name": "payer", - "isMut": true, - "isSigner": false + name: 'payer' + isMut: true + isSigner: false }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false + name: 'systemProgram' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "CrankInitParams" + name: 'params' + type: { + defined: 'CrankInitParams' } } ] }, { - "name": "crankPop", - "accounts": [ + name: 'crankPop' + accounts: [ { - "name": "crank", - "isMut": true, - "isSigner": false + name: 'crank' + isMut: true + isSigner: false }, { - "name": "oracleQueue", - "isMut": true, - "isSigner": false + name: 'oracleQueue' + isMut: true + isSigner: false }, { - "name": "queueAuthority", - "isMut": false, - "isSigner": false + name: 'queueAuthority' + isMut: false + isSigner: false }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState' + isMut: false + isSigner: false }, { - "name": "payoutWallet", - "isMut": true, - "isSigner": false + name: 'payoutWallet' + isMut: true + isSigner: false }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram' + isMut: false + isSigner: false }, { - "name": "crankDataBuffer", - "isMut": true, - "isSigner": false + name: 'crankDataBuffer' + isMut: true + isSigner: false }, { - "name": "queueDataBuffer", - "isMut": false, - "isSigner": false + name: 'queueDataBuffer' + isMut: false + isSigner: false }, { - "name": "mint", - "isMut": false, - "isSigner": false + name: 'mint' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "CrankPopParams" + name: 'params' + type: { + defined: 'CrankPopParams' } } ] }, { - "name": "crankPush", - "accounts": [ + name: 'crankPush' + accounts: [ { - "name": "crank", - "isMut": true, - "isSigner": false + name: 'crank' + isMut: true + isSigner: false }, { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator' + isMut: true + isSigner: false }, { - "name": "oracleQueue", - "isMut": true, - "isSigner": false + name: 'oracleQueue' + isMut: true + isSigner: false }, { - "name": "queueAuthority", - "isMut": false, - "isSigner": false + name: 'queueAuthority' + isMut: false + isSigner: false }, { - "name": "permission", - "isMut": false, - "isSigner": false + name: 'permission' + isMut: false + isSigner: false }, { - "name": "lease", - "isMut": true, - "isSigner": false + name: 'lease' + isMut: true + isSigner: false }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow' + isMut: true + isSigner: false }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState' + isMut: false + isSigner: false }, { - "name": "dataBuffer", - "isMut": true, - "isSigner": false + name: 'dataBuffer' + isMut: true + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "CrankPushParams" + name: 'params' + type: { + defined: 'CrankPushParams' } } ] }, { - "name": "jobInit", - "accounts": [ + name: 'jobInit' + accounts: [ { - "name": "job", - "isMut": true, - "isSigner": false + name: 'job' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": false + name: 'authority' + isMut: false + isSigner: false }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "JobInitParams" + name: 'params' + type: { + defined: 'JobInitParams' } } ] }, { - "name": "leaseExtend", - "accounts": [ + name: 'leaseExtend' + accounts: [ { - "name": "lease", - "isMut": true, - "isSigner": false + name: 'lease' + isMut: true + isSigner: false }, { - "name": "aggregator", - "isMut": false, - "isSigner": false + name: 'aggregator' + isMut: false + isSigner: false }, { - "name": "queue", - "isMut": false, - "isSigner": false + name: 'queue' + isMut: false + isSigner: false }, { - "name": "funder", - "isMut": true, - "isSigner": false + name: 'funder' + isMut: true + isSigner: false }, { - "name": "owner", - "isMut": true, - "isSigner": true + name: 'owner' + isMut: true + isSigner: true }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow' + isMut: true + isSigner: false }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram' + isMut: false + isSigner: false }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState' + isMut: false + isSigner: false }, { - "name": "mint", - "isMut": false, - "isSigner": false + name: 'mint' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "LeaseExtendParams" + name: 'params' + type: { + defined: 'LeaseExtendParams' } } ] }, { - "name": "leaseInit", - "accounts": [ + name: 'leaseInit' + accounts: [ { - "name": "lease", - "isMut": true, - "isSigner": false + name: 'lease' + isMut: true + isSigner: false }, { - "name": "queue", - "isMut": true, - "isSigner": false + name: 'queue' + isMut: true + isSigner: false }, { - "name": "aggregator", - "isMut": false, - "isSigner": false + name: 'aggregator' + isMut: false + isSigner: false }, { - "name": "funder", - "isMut": true, - "isSigner": false + name: 'funder' + isMut: true + isSigner: false }, { - "name": "payer", - "isMut": true, - "isSigner": true + name: 'payer' + isMut: true + isSigner: true }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false + name: 'systemProgram' + isMut: false + isSigner: false }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram' + isMut: false + isSigner: false }, { - "name": "owner", - "isMut": true, - "isSigner": true + name: 'owner' + isMut: true + isSigner: true }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow' + isMut: true + isSigner: false }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState' + isMut: false + isSigner: false }, { - "name": "mint", - "isMut": false, - "isSigner": false + name: 'mint' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "LeaseInitParams" + name: 'params' + type: { + defined: 'LeaseInitParams' } } ] }, { - "name": "leaseSetAuthority", - "accounts": [ + name: 'leaseSetAuthority' + accounts: [ { - "name": "lease", - "isMut": true, - "isSigner": false + name: 'lease' + isMut: true + isSigner: false }, { - "name": "withdrawAuthority", - "isMut": false, - "isSigner": true + name: 'withdrawAuthority' + isMut: false + isSigner: true }, { - "name": "newAuthority", - "isMut": false, - "isSigner": false + name: 'newAuthority' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "LeaseSetAuthorityParams" + name: 'params' + type: { + defined: 'LeaseSetAuthorityParams' } } ] }, { - "name": "leaseWithdraw", - "accounts": [ + name: 'leaseWithdraw' + accounts: [ { - "name": "lease", - "isMut": true, - "isSigner": false + name: 'lease' + isMut: true + isSigner: false }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow' + isMut: true + isSigner: false }, { - "name": "aggregator", - "isMut": false, - "isSigner": false + name: 'aggregator' + isMut: false + isSigner: false }, { - "name": "queue", - "isMut": false, - "isSigner": false + name: 'queue' + isMut: false + isSigner: false }, { - "name": "withdrawAuthority", - "isMut": false, - "isSigner": true + name: 'withdrawAuthority' + isMut: false + isSigner: true }, { - "name": "withdrawAccount", - "isMut": true, - "isSigner": false + name: 'withdrawAccount' + isMut: true + isSigner: false }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram' + isMut: false + isSigner: false }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState' + isMut: false + isSigner: false }, { - "name": "mint", - "isMut": false, - "isSigner": false + name: 'mint' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "LeaseWithdrawParams" + name: 'params' + type: { + defined: 'LeaseWithdrawParams' } } ] }, { - "name": "oracleHeartbeat", - "accounts": [ + name: 'oracleHeartbeat' + accounts: [ { - "name": "oracle", - "isMut": true, - "isSigner": false + name: 'oracle' + isMut: true + isSigner: false }, { - "name": "oracleAuthority", - "isMut": false, - "isSigner": true + name: 'oracleAuthority' + isMut: false + isSigner: true }, { - "name": "tokenAccount", - "isMut": false, - "isSigner": false + name: 'tokenAccount' + isMut: false + isSigner: false }, { - "name": "gcOracle", - "isMut": true, - "isSigner": false + name: 'gcOracle' + isMut: true + isSigner: false }, { - "name": "oracleQueue", - "isMut": true, - "isSigner": false + name: 'oracleQueue' + isMut: true + isSigner: false }, { - "name": "permission", - "isMut": false, - "isSigner": false + name: 'permission' + isMut: false + isSigner: false }, { - "name": "dataBuffer", - "isMut": true, - "isSigner": false + name: 'dataBuffer' + isMut: true + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "OracleHeartbeatParams" + name: 'params' + type: { + defined: 'OracleHeartbeatParams' } } ] }, { - "name": "oracleInit", - "accounts": [ + name: 'oracleInit' + accounts: [ { - "name": "oracle", - "isMut": true, - "isSigner": false + name: 'oracle' + isMut: true + isSigner: false }, { - "name": "oracleAuthority", - "isMut": false, - "isSigner": false + name: 'oracleAuthority' + isMut: false + isSigner: false }, { - "name": "wallet", - "isMut": false, - "isSigner": false + name: 'wallet' + isMut: false + isSigner: false }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState' + isMut: false + isSigner: false }, { - "name": "queue", - "isMut": false, - "isSigner": false + name: 'queue' + isMut: false + isSigner: false }, { - "name": "payer", - "isMut": true, - "isSigner": false + name: 'payer' + isMut: true + isSigner: false }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false + name: 'systemProgram' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "OracleInitParams" + name: 'params' + type: { + defined: 'OracleInitParams' } } ] }, { - "name": "oracleQueueInit", - "accounts": [ + name: 'oracleQueueInit' + accounts: [ { - "name": "oracleQueue", - "isMut": true, - "isSigner": true + name: 'oracleQueue' + isMut: true + isSigner: true }, { - "name": "authority", - "isMut": false, - "isSigner": false + name: 'authority' + isMut: false + isSigner: false }, { - "name": "buffer", - "isMut": true, - "isSigner": false + name: 'buffer' + isMut: true + isSigner: false }, { - "name": "payer", - "isMut": true, - "isSigner": false + name: 'payer' + isMut: true + isSigner: false }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false + name: 'systemProgram' + isMut: false + isSigner: false }, { - "name": "mint", - "isMut": false, - "isSigner": false + name: 'mint' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "OracleQueueInitParams" + name: 'params' + type: { + defined: 'OracleQueueInitParams' } } ] }, { - "name": "oracleQueueSetRewards", - "accounts": [ + name: 'oracleQueueSetRewards' + accounts: [ { - "name": "queue", - "isMut": true, - "isSigner": false + name: 'queue' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority' + isMut: false + isSigner: true } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "OracleQueueSetRewardsParams" + name: 'params' + type: { + defined: 'OracleQueueSetRewardsParams' } } ] }, { - "name": "oracleQueueVrfConfig", - "accounts": [ + name: 'oracleQueueVrfConfig' + accounts: [ { - "name": "queue", - "isMut": true, - "isSigner": false + name: 'queue' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority' + isMut: false + isSigner: true } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "OracleQueueVrfConfigParams" + name: 'params' + type: { + defined: 'OracleQueueVrfConfigParams' } } ] }, { - "name": "oracleWithdraw", - "accounts": [ + name: 'oracleWithdraw' + accounts: [ { - "name": "oracle", - "isMut": true, - "isSigner": false + name: 'oracle' + isMut: true + isSigner: false }, { - "name": "oracleAuthority", - "isMut": false, - "isSigner": true + name: 'oracleAuthority' + isMut: false + isSigner: true }, { - "name": "tokenAccount", - "isMut": true, - "isSigner": false + name: 'tokenAccount' + isMut: true + isSigner: false }, { - "name": "withdrawAccount", - "isMut": true, - "isSigner": false + name: 'withdrawAccount' + isMut: true + isSigner: false }, { - "name": "oracleQueue", - "isMut": true, - "isSigner": false + name: 'oracleQueue' + isMut: true + isSigner: false }, { - "name": "permission", - "isMut": true, - "isSigner": false + name: 'permission' + isMut: true + isSigner: false }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram' + isMut: false + isSigner: false }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState' + isMut: false + isSigner: false }, { - "name": "payer", - "isMut": true, - "isSigner": true + name: 'payer' + isMut: true + isSigner: true }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false + name: 'systemProgram' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "OracleWithdrawParams" + name: 'params' + type: { + defined: 'OracleWithdrawParams' } } ] }, { - "name": "permissionInit", - "accounts": [ + name: 'permissionInit' + accounts: [ { - "name": "permission", - "isMut": true, - "isSigner": false + name: 'permission' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": false + name: 'authority' + isMut: false + isSigner: false }, { - "name": "granter", - "isMut": false, - "isSigner": false + name: 'granter' + isMut: false + isSigner: false }, { - "name": "grantee", - "isMut": false, - "isSigner": false + name: 'grantee' + isMut: false + isSigner: false }, { - "name": "payer", - "isMut": true, - "isSigner": true + name: 'payer' + isMut: true + isSigner: true }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false + name: 'systemProgram' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "PermissionInitParams" + name: 'params' + type: { + defined: 'PermissionInitParams' } } ] }, { - "name": "permissionSet", - "accounts": [ + name: 'permissionSet' + accounts: [ { - "name": "permission", - "isMut": true, - "isSigner": false + name: 'permission' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority' + isMut: false + isSigner: true } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "PermissionSetParams" + name: 'params' + type: { + defined: 'PermissionSetParams' } } ] }, { - "name": "permissionSetVoterWeight", - "accounts": [ + name: 'permissionSetVoterWeight' + accounts: [ { - "name": "permission", - "isMut": false, - "isSigner": false + name: 'permission' + isMut: false + isSigner: false }, { - "name": "permissionAuthority", - "isMut": false, - "isSigner": false + name: 'permissionAuthority' + isMut: false + isSigner: false }, { - "name": "oracle", - "isMut": false, - "isSigner": false + name: 'oracle' + isMut: false + isSigner: false }, { - "name": "oracleAuthority", - "isMut": false, - "isSigner": false + name: 'oracleAuthority' + isMut: false + isSigner: false }, { - "name": "payer", - "isMut": true, - "isSigner": true + name: 'payer' + isMut: true + isSigner: true }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false + name: 'systemProgram' + isMut: false + isSigner: false }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState' + isMut: false + isSigner: false }, { - "name": "govProgram", - "isMut": false, - "isSigner": false + name: 'govProgram' + isMut: false + isSigner: false }, { - "name": "daoMint", - "isMut": false, - "isSigner": false + name: 'daoMint' + isMut: false + isSigner: false }, { - "name": "spawnRecord", - "isMut": true, - "isSigner": false + name: 'spawnRecord' + isMut: true + isSigner: false }, { - "name": "voterWeight", - "isMut": true, - "isSigner": false + name: 'voterWeight' + isMut: true + isSigner: false }, { - "name": "tokenOwnerRecord", - "isMut": true, - "isSigner": false + name: 'tokenOwnerRecord' + isMut: true + isSigner: false }, { - "name": "realm", - "isMut": false, - "isSigner": false + name: 'realm' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "PermissionSetVoterWeightParams" + name: 'params' + type: { + defined: 'PermissionSetVoterWeightParams' } } ] }, { - "name": "programConfig", - "accounts": [ + name: 'programConfig' + accounts: [ { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority' + isMut: false + isSigner: true }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState' + isMut: false + isSigner: false }, { - "name": "daoMint", - "isMut": false, - "isSigner": false + name: 'daoMint' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "ProgramConfigParams" + name: 'params' + type: { + defined: 'ProgramConfigParams' } } ] }, { - "name": "programInit", - "accounts": [ + name: 'programInit' + accounts: [ { - "name": "state", - "isMut": true, - "isSigner": false + name: 'state' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": false + name: 'authority' + isMut: false + isSigner: false }, { - "name": "tokenMint", - "isMut": true, - "isSigner": false + name: 'tokenMint' + isMut: true + isSigner: false }, { - "name": "vault", - "isMut": true, - "isSigner": false + name: 'vault' + isMut: true + isSigner: false }, { - "name": "payer", - "isMut": true, - "isSigner": false + name: 'payer' + isMut: true + isSigner: false }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false + name: 'systemProgram' + isMut: false + isSigner: false }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram' + isMut: false + isSigner: false }, { - "name": "daoMint", - "isMut": false, - "isSigner": false + name: 'daoMint' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "ProgramInitParams" + name: 'params' + type: { + defined: 'ProgramInitParams' } } ] }, { - "name": "vaultTransfer", - "accounts": [ + name: 'vaultTransfer' + accounts: [ { - "name": "state", - "isMut": false, - "isSigner": false + name: 'state' + isMut: false + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority' + isMut: false + isSigner: true }, { - "name": "to", - "isMut": true, - "isSigner": false + name: 'to' + isMut: true + isSigner: false }, { - "name": "vault", - "isMut": true, - "isSigner": false + name: 'vault' + isMut: true + isSigner: false }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "VaultTransferParams" + name: 'params' + type: { + defined: 'VaultTransferParams' } } ] }, { - "name": "vrfInit", - "accounts": [ + name: 'vrfInit' + accounts: [ { - "name": "vrf", - "isMut": true, - "isSigner": false + name: 'vrf' + isMut: true + isSigner: false }, { - "name": "authority", - "isMut": false, - "isSigner": false + name: 'authority' + isMut: false + isSigner: false }, { - "name": "oracleQueue", - "isMut": false, - "isSigner": false + name: 'oracleQueue' + isMut: false + isSigner: false }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow' + isMut: true + isSigner: false }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState' + isMut: false + isSigner: false }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "VrfInitParams" + name: 'params' + type: { + defined: 'VrfInitParams' } } ] }, { - "name": "vrfProve", - "accounts": [ + name: 'vrfProve' + accounts: [ { - "name": "vrf", - "isMut": true, - "isSigner": false + name: 'vrf' + isMut: true + isSigner: false }, { - "name": "oracle", - "isMut": false, - "isSigner": false + name: 'oracle' + isMut: false + isSigner: false }, { - "name": "randomnessProducer", - "isMut": false, - "isSigner": true + name: 'randomnessProducer' + isMut: false + isSigner: true } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "VrfProveParams" + name: 'params' + type: { + defined: 'VrfProveParams' } } ] }, { - "name": "vrfProveAndVerify", - "accounts": [ + name: 'vrfProveAndVerify' + accounts: [ { - "name": "vrf", - "isMut": true, - "isSigner": false + name: 'vrf' + isMut: true + isSigner: false }, { - "name": "callbackPid", - "isMut": false, - "isSigner": false + name: 'callbackPid' + isMut: false + isSigner: false }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram' + isMut: false + isSigner: false }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow' + isMut: true + isSigner: false }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState' + isMut: false + isSigner: false }, { - "name": "oracle", - "isMut": false, - "isSigner": false + name: 'oracle' + isMut: false + isSigner: false }, { - "name": "oracleAuthority", - "isMut": false, - "isSigner": true + name: 'oracleAuthority' + isMut: false + isSigner: true }, { - "name": "oracleWallet", - "isMut": true, - "isSigner": false + name: 'oracleWallet' + isMut: true + isSigner: false }, { - "name": "instructionsSysvar", - "isMut": false, - "isSigner": false + name: 'instructionsSysvar' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "VrfProveAndVerifyParams" + name: 'params' + type: { + defined: 'VrfProveAndVerifyParams' } } ] }, { - "name": "vrfRequestRandomness", - "accounts": [ + name: 'vrfRequestRandomness' + accounts: [ { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority' + isMut: false + isSigner: true }, { - "name": "vrf", - "isMut": true, - "isSigner": false + name: 'vrf' + isMut: true + isSigner: false }, { - "name": "oracleQueue", - "isMut": true, - "isSigner": false + name: 'oracleQueue' + isMut: true + isSigner: false }, { - "name": "queueAuthority", - "isMut": false, - "isSigner": false + name: 'queueAuthority' + isMut: false + isSigner: false }, { - "name": "dataBuffer", - "isMut": false, - "isSigner": false + name: 'dataBuffer' + isMut: false + isSigner: false }, { - "name": "permission", - "isMut": true, - "isSigner": false + name: 'permission' + isMut: true + isSigner: false }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow' + isMut: true + isSigner: false }, { - "name": "payerWallet", - "isMut": true, - "isSigner": false + name: 'payerWallet' + isMut: true + isSigner: false }, { - "name": "payerAuthority", - "isMut": false, - "isSigner": true + name: 'payerAuthority' + isMut: false + isSigner: true }, { - "name": "recentBlockhashes", - "isMut": false, - "isSigner": false + name: 'recentBlockhashes' + isMut: false + isSigner: false }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState' + isMut: false + isSigner: false }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "VrfRequestRandomnessParams" + name: 'params' + type: { + defined: 'VrfRequestRandomnessParams' } } ] }, { - "name": "vrfVerify", - "accounts": [ + name: 'vrfVerify' + accounts: [ { - "name": "vrf", - "isMut": true, - "isSigner": false + name: 'vrf' + isMut: true + isSigner: false }, { - "name": "callbackPid", - "isMut": false, - "isSigner": false + name: 'callbackPid' + isMut: false + isSigner: false }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram' + isMut: false + isSigner: false }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow' + isMut: true + isSigner: false }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState' + isMut: false + isSigner: false }, { - "name": "oracle", - "isMut": false, - "isSigner": false + name: 'oracle' + isMut: false + isSigner: false }, { - "name": "oracleAuthority", - "isMut": false, - "isSigner": false + name: 'oracleAuthority' + isMut: false + isSigner: false }, { - "name": "oracleWallet", - "isMut": true, - "isSigner": false + name: 'oracleWallet' + isMut: true + isSigner: false }, { - "name": "instructionsSysvar", - "isMut": false, - "isSigner": false + name: 'instructionsSysvar' + isMut: false + isSigner: false } - ], - "args": [ + ] + args: [ { - "name": "params", - "type": { - "defined": "VrfVerifyParams" + name: 'params' + type: { + defined: 'VrfVerifyParams' } } ] } - ], - "accounts": [ + ] + accounts: [ { - "name": "SbState", - "type": { - "kind": "struct", - "fields": [ + name: 'SbState' + type: { + kind: 'struct' + fields: [ { - "name": "authority", - "type": "publicKey" + name: 'authority' + type: 'publicKey' }, { - "name": "tokenMint", - "type": "publicKey" + name: 'tokenMint' + type: 'publicKey' }, { - "name": "tokenVault", - "type": "publicKey" + name: 'tokenVault' + type: 'publicKey' }, { - "name": "daoMint", - "type": "publicKey" + name: 'daoMint' + type: 'publicKey' }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 992 - ] + name: 'ebuf' + type: { + array: ['u8', 992] } } ] } }, { - "name": "AggregatorAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorAccountData' + type: { + kind: 'struct' + fields: [ { - "name": "name", - "type": { - "array": [ - "u8", - 32 - ] + name: 'name' + type: { + array: ['u8', 32] } }, { - "name": "metadata", - "type": { - "array": [ - "u8", - 128 - ] + name: 'metadata' + type: { + array: ['u8', 128] } }, { - "name": "reserved1", - "type": { - "array": [ - "u8", - 32 - ] + name: 'reserved1' + type: { + array: ['u8', 32] } }, { - "name": "queuePubkey", - "type": "publicKey" + name: 'queuePubkey' + type: 'publicKey' }, { - "name": "oracleRequestBatchSize", - "type": "u32" + name: 'oracleRequestBatchSize' + type: 'u32' }, { - "name": "minOracleResults", - "type": "u32" + name: 'minOracleResults' + type: 'u32' }, { - "name": "minJobResults", - "type": "u32" + name: 'minJobResults' + type: 'u32' }, { - "name": "minUpdateDelaySeconds", - "type": "u32" + name: 'minUpdateDelaySeconds' + type: 'u32' }, { - "name": "startAfter", - "type": "i64" + name: 'startAfter' + type: 'i64' }, { - "name": "varianceThreshold", - "type": { - "defined": "SwitchboardDecimal" + name: 'varianceThreshold' + type: { + defined: 'SwitchboardDecimal' } }, { - "name": "forceReportPeriod", - "type": "i64" + name: 'forceReportPeriod' + type: 'i64' }, { - "name": "expiration", - "type": "i64" + name: 'expiration' + type: 'i64' }, { - "name": "consecutiveFailureCount", - "type": "u64" + name: 'consecutiveFailureCount' + type: 'u64' }, { - "name": "nextAllowedUpdateTime", - "type": "i64" + name: 'nextAllowedUpdateTime' + type: 'i64' }, { - "name": "isLocked", - "type": "bool" + name: 'isLocked' + type: 'bool' }, { - "name": "crankPubkey", - "type": "publicKey" + name: 'crankPubkey' + type: 'publicKey' }, { - "name": "latestConfirmedRound", - "type": { - "defined": "AggregatorRound" + name: 'latestConfirmedRound' + type: { + defined: 'AggregatorRound' } }, { - "name": "currentRound", - "type": { - "defined": "AggregatorRound" + name: 'currentRound' + type: { + defined: 'AggregatorRound' } }, { - "name": "jobPubkeysData", - "type": { - "array": [ - "publicKey", - 16 - ] + name: 'jobPubkeysData' + type: { + array: ['publicKey', 16] } }, { - "name": "jobHashes", - "type": { - "array": [ + name: 'jobHashes' + type: { + array: [ { - "defined": "Hash" + defined: 'Hash' }, 16 ] } }, { - "name": "jobPubkeysSize", - "type": "u32" + name: 'jobPubkeysSize' + type: 'u32' }, { - "name": "jobsChecksum", - "type": { - "array": [ - "u8", - 32 - ] + name: 'jobsChecksum' + type: { + array: ['u8', 32] } }, { - "name": "authority", - "type": "publicKey" + name: 'authority' + type: 'publicKey' }, { - "name": "historyBuffer", - "type": "publicKey" + name: 'historyBuffer' + type: 'publicKey' }, { - "name": "previousConfirmedRoundResult", - "type": { - "defined": "SwitchboardDecimal" + name: 'previousConfirmedRoundResult' + type: { + defined: 'SwitchboardDecimal' } }, { - "name": "previousConfirmedRoundSlot", - "type": "u64" + name: 'previousConfirmedRoundSlot' + type: 'u64' }, { - "name": "disableCrank", - "type": "bool" + name: 'disableCrank' + type: 'bool' }, { - "name": "jobWeights", - "type": { - "array": [ - "u8", - 16 - ] + name: 'jobWeights' + type: { + array: ['u8', 16] } }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 147 - ] + name: 'ebuf' + type: { + array: ['u8', 147] } } ] } }, { - "name": "PermissionAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'PermissionAccountData' + type: { + kind: 'struct' + fields: [ { - "name": "authority", - "type": "publicKey" + name: 'authority' + type: 'publicKey' }, { - "name": "permissions", - "type": "u32" + name: 'permissions' + type: 'u32' }, { - "name": "granter", - "type": "publicKey" + name: 'granter' + type: 'publicKey' }, { - "name": "grantee", - "type": "publicKey" + name: 'grantee' + type: 'publicKey' }, { - "name": "expiration", - "type": "i64" + name: 'expiration' + type: 'i64' }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 256 - ] + name: 'ebuf' + type: { + array: ['u8', 256] } } ] } }, { - "name": "RealmSpawnRecordAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'RealmSpawnRecordAccountData' + type: { + kind: 'struct' + fields: [ { - "name": "ebuf", - "type": { - "array": [ - "u8", - 256 - ] + name: 'ebuf' + type: { + array: ['u8', 256] } } ] } }, { - "name": "LeaseAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'LeaseAccountData' + type: { + kind: 'struct' + fields: [ { - "name": "escrow", - "type": "publicKey" + name: 'escrow' + type: 'publicKey' }, { - "name": "queue", - "type": "publicKey" + name: 'queue' + type: 'publicKey' }, { - "name": "aggregator", - "type": "publicKey" + name: 'aggregator' + type: 'publicKey' }, { - "name": "tokenProgram", - "type": "publicKey" + name: 'tokenProgram' + type: 'publicKey' }, { - "name": "isActive", - "type": "bool" + name: 'isActive' + type: 'bool' }, { - "name": "crankRowCount", - "type": "u32" + name: 'crankRowCount' + type: 'u32' }, { - "name": "createdAt", - "type": "i64" + name: 'createdAt' + type: 'i64' }, { - "name": "updateCount", - "type": "u128" + name: 'updateCount' + type: 'u128' }, { - "name": "withdrawAuthority", - "type": "publicKey" + name: 'withdrawAuthority' + type: 'publicKey' }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 256 - ] + name: 'ebuf' + type: { + array: ['u8', 256] } } ] } }, { - "name": "OracleQueueAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleQueueAccountData' + type: { + kind: 'struct' + fields: [ { - "name": "name", - "type": { - "array": [ - "u8", - 32 - ] + name: 'name' + type: { + array: ['u8', 32] } }, { - "name": "metadata", - "type": { - "array": [ - "u8", - 64 - ] + name: 'metadata' + type: { + array: ['u8', 64] } }, { - "name": "authority", - "type": "publicKey" + name: 'authority' + type: 'publicKey' }, { - "name": "oracleTimeout", - "type": "u32" + name: 'oracleTimeout' + type: 'u32' }, { - "name": "reward", - "type": "u64" + name: 'reward' + type: 'u64' }, { - "name": "minStake", - "type": "u64" + name: 'minStake' + type: 'u64' }, { - "name": "slashingEnabled", - "type": "bool" + name: 'slashingEnabled' + type: 'bool' }, { - "name": "varianceToleranceMultiplier", - "type": { - "defined": "SwitchboardDecimal" + name: 'varianceToleranceMultiplier' + type: { + defined: 'SwitchboardDecimal' } }, { - "name": "feedProbationPeriod", - "type": "u32" + name: 'feedProbationPeriod' + type: 'u32' }, { - "name": "currIdx", - "type": "u32" + name: 'currIdx' + type: 'u32' }, { - "name": "size", - "type": "u32" + name: 'size' + type: 'u32' }, { - "name": "gcIdx", - "type": "u32" + name: 'gcIdx' + type: 'u32' }, { - "name": "consecutiveFeedFailureLimit", - "type": "u64" + name: 'consecutiveFeedFailureLimit' + type: 'u64' }, { - "name": "consecutiveOracleFailureLimit", - "type": "u64" + name: 'consecutiveOracleFailureLimit' + type: 'u64' }, { - "name": "unpermissionedFeedsEnabled", - "type": "bool" + name: 'unpermissionedFeedsEnabled' + type: 'bool' }, { - "name": "unpermissionedVrfEnabled", - "type": "bool" + name: 'unpermissionedVrfEnabled' + type: 'bool' }, { - "name": "curatorRewardCut", - "type": { - "defined": "SwitchboardDecimal" + name: 'curatorRewardCut' + type: { + defined: 'SwitchboardDecimal' } }, { - "name": "lockLeaseFunding", - "type": "bool" + name: 'lockLeaseFunding' + type: 'bool' }, { - "name": "mint", - "type": "publicKey" + name: 'mint' + type: 'publicKey' }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 969 - ] + name: 'ebuf' + type: { + array: ['u8', 969] } }, { - "name": "maxSize", - "type": "u32" + name: 'maxSize' + type: 'u32' }, { - "name": "dataBuffer", - "type": "publicKey" + name: 'dataBuffer' + type: 'publicKey' } ] } }, { - "name": "CrankAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'CrankAccountData' + type: { + kind: 'struct' + fields: [ { - "name": "name", - "type": { - "array": [ - "u8", - 32 - ] + name: 'name' + type: { + array: ['u8', 32] } }, { - "name": "metadata", - "type": { - "array": [ - "u8", - 64 - ] + name: 'metadata' + type: { + array: ['u8', 64] } }, { - "name": "queuePubkey", - "type": "publicKey" + name: 'queuePubkey' + type: 'publicKey' }, { - "name": "pqSize", - "type": "u32" + name: 'pqSize' + type: 'u32' }, { - "name": "maxRows", - "type": "u32" + name: 'maxRows' + type: 'u32' }, { - "name": "jitterModifier", - "type": "u8" + name: 'jitterModifier' + type: 'u8' }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 255 - ] + name: 'ebuf' + type: { + array: ['u8', 255] } }, { - "name": "dataBuffer", - "type": "publicKey" + name: 'dataBuffer' + type: 'publicKey' } ] } }, { - "name": "OracleAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleAccountData' + type: { + kind: 'struct' + fields: [ { - "name": "name", - "type": { - "array": [ - "u8", - 32 - ] + name: 'name' + type: { + array: ['u8', 32] } }, { - "name": "metadata", - "type": { - "array": [ - "u8", - 128 - ] + name: 'metadata' + type: { + array: ['u8', 128] } }, { - "name": "oracleAuthority", - "type": "publicKey" + name: 'oracleAuthority' + type: 'publicKey' }, { - "name": "lastHeartbeat", - "type": "i64" + name: 'lastHeartbeat' + type: 'i64' }, { - "name": "numInUse", - "type": "u32" + name: 'numInUse' + type: 'u32' }, { - "name": "tokenAccount", - "type": "publicKey" + name: 'tokenAccount' + type: 'publicKey' }, { - "name": "queuePubkey", - "type": "publicKey" + name: 'queuePubkey' + type: 'publicKey' }, { - "name": "metrics", - "type": { - "defined": "OracleMetrics" + name: 'metrics' + type: { + defined: 'OracleMetrics' } }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 256 - ] + name: 'ebuf' + type: { + array: ['u8', 256] } } ] } }, { - "name": "JobAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'JobAccountData' + type: { + kind: 'struct' + fields: [ { - "name": "name", - "type": { - "array": [ - "u8", - 32 - ] + name: 'name' + type: { + array: ['u8', 32] } }, { - "name": "metadata", - "type": { - "array": [ - "u8", - 64 - ] + name: 'metadata' + type: { + array: ['u8', 64] } }, { - "name": "authority", - "type": "publicKey" + name: 'authority' + type: 'publicKey' }, { - "name": "expiration", - "type": "i64" + name: 'expiration' + type: 'i64' }, { - "name": "hash", - "type": { - "array": [ - "u8", - 32 - ] + name: 'hash' + type: { + array: ['u8', 32] } }, { - "name": "data", - "type": "bytes" + name: 'data' + type: 'bytes' }, { - "name": "referenceCount", - "type": "u32" + name: 'referenceCount' + type: 'u32' }, { - "name": "totalSpent", - "type": "u64" + name: 'totalSpent' + type: 'u64' }, { - "name": "createdAt", - "type": "i64" + name: 'createdAt' + type: 'i64' } ] } }, { - "name": "VrfAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'VrfAccountData' + type: { + kind: 'struct' + fields: [ { - "name": "status", - "type": { - "defined": "VrfStatus" + name: 'status' + type: { + defined: 'VrfStatus' } }, { - "name": "counter", - "type": "u128" + name: 'counter' + type: 'u128' }, { - "name": "authority", - "type": "publicKey" + name: 'authority' + type: 'publicKey' }, { - "name": "oracleQueue", - "type": "publicKey" + name: 'oracleQueue' + type: 'publicKey' }, { - "name": "escrow", - "type": "publicKey" + name: 'escrow' + type: 'publicKey' }, { - "name": "callback", - "type": { - "defined": "CallbackZC" + name: 'callback' + type: { + defined: 'CallbackZC' } }, { - "name": "batchSize", - "type": "u32" + name: 'batchSize' + type: 'u32' }, { - "name": "builders", - "type": { - "array": [ + name: 'builders' + type: { + array: [ { - "defined": "VrfBuilder" + defined: 'VrfBuilder' }, 8 ] } }, { - "name": "buildersLen", - "type": "u32" + name: 'buildersLen' + type: 'u32' }, { - "name": "testMode", - "type": "bool" + name: 'testMode' + type: 'bool' }, { - "name": "currentRound", - "type": { - "defined": "VrfRound" + name: 'currentRound' + type: { + defined: 'VrfRound' } }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 1024 - ] + name: 'ebuf' + type: { + array: ['u8', 1024] } } ] } } - ], - "types": [ + ] + types: [ { - "name": "AggregatorAddJobParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorAddJobParams' + type: { + kind: 'struct' + fields: [ { - "name": "weight", - "type": { - "option": "u8" + name: 'weight' + type: { + option: 'u8' } } ] } }, { - "name": "AggregatorInitParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorInitParams' + type: { + kind: 'struct' + fields: [ { - "name": "name", - "type": { - "array": [ - "u8", - 32 - ] + name: 'name' + type: { + array: ['u8', 32] } }, { - "name": "metadata", - "type": { - "array": [ - "u8", - 128 - ] + name: 'metadata' + type: { + array: ['u8', 128] } }, { - "name": "batchSize", - "type": "u32" + name: 'batchSize' + type: 'u32' }, { - "name": "minOracleResults", - "type": "u32" + name: 'minOracleResults' + type: 'u32' }, { - "name": "minJobResults", - "type": "u32" + name: 'minJobResults' + type: 'u32' }, { - "name": "minUpdateDelaySeconds", - "type": "u32" + name: 'minUpdateDelaySeconds' + type: 'u32' }, { - "name": "startAfter", - "type": "i64" + name: 'startAfter' + type: 'i64' }, { - "name": "varianceThreshold", - "type": { - "defined": "BorshDecimal" + name: 'varianceThreshold' + type: { + defined: 'BorshDecimal' } }, { - "name": "forceReportPeriod", - "type": "i64" + name: 'forceReportPeriod' + type: 'i64' }, { - "name": "expiration", - "type": "i64" + name: 'expiration' + type: 'i64' }, { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' }, { - "name": "disableCrank", - "type": "bool" + name: 'disableCrank' + type: 'bool' } ] } }, { - "name": "AggregatorLockParams", - "type": { - "kind": "struct", - "fields": [] + name: 'AggregatorLockParams' + type: { + kind: 'struct' + fields: [] } }, { - "name": "AggregatorOpenRoundParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorOpenRoundParams' + type: { + kind: 'struct' + fields: [ { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' }, { - "name": "leaseBump", - "type": "u8" + name: 'leaseBump' + type: 'u8' }, { - "name": "permissionBump", - "type": "u8" + name: 'permissionBump' + type: 'u8' }, { - "name": "jitter", - "type": "u8" + name: 'jitter' + type: 'u8' } ] } }, { - "name": "AggregatorRemoveJobParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorRemoveJobParams' + type: { + kind: 'struct' + fields: [ { - "name": "jobIdx", - "type": "u32" + name: 'jobIdx' + type: 'u32' } ] } }, { - "name": "AggregatorSaveResultParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorSaveResultParams' + type: { + kind: 'struct' + fields: [ { - "name": "oracleIdx", - "type": "u32" + name: 'oracleIdx' + type: 'u32' }, { - "name": "error", - "type": "bool" + name: 'error' + type: 'bool' }, { - "name": "value", - "type": { - "defined": "BorshDecimal" + name: 'value' + type: { + defined: 'BorshDecimal' } }, { - "name": "jobsChecksum", - "type": { - "array": [ - "u8", - 32 - ] + name: 'jobsChecksum' + type: { + array: ['u8', 32] } }, { - "name": "minResponse", - "type": { - "defined": "BorshDecimal" + name: 'minResponse' + type: { + defined: 'BorshDecimal' } }, { - "name": "maxResponse", - "type": { - "defined": "BorshDecimal" + name: 'maxResponse' + type: { + defined: 'BorshDecimal' } }, { - "name": "feedPermissionBump", - "type": "u8" + name: 'feedPermissionBump' + type: 'u8' }, { - "name": "oraclePermissionBump", - "type": "u8" + name: 'oraclePermissionBump' + type: 'u8' }, { - "name": "leaseBump", - "type": "u8" + name: 'leaseBump' + type: 'u8' }, { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' } ] } }, { - "name": "AggregatorSetAuthorityParams", - "type": { - "kind": "struct", - "fields": [] + name: 'AggregatorSetAuthorityParams' + type: { + kind: 'struct' + fields: [] } }, { - "name": "AggregatorSetBatchSizeParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorSetBatchSizeParams' + type: { + kind: 'struct' + fields: [ { - "name": "batchSize", - "type": "u32" + name: 'batchSize' + type: 'u32' } ] } }, { - "name": "AggregatorSetHistoryBufferParams", - "type": { - "kind": "struct", - "fields": [] + name: 'AggregatorSetHistoryBufferParams' + type: { + kind: 'struct' + fields: [] } }, { - "name": "AggregatorSetMinJobsParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorSetMinJobsParams' + type: { + kind: 'struct' + fields: [ { - "name": "minJobResults", - "type": "u32" + name: 'minJobResults' + type: 'u32' } ] } }, { - "name": "AggregatorSetMinOraclesParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorSetMinOraclesParams' + type: { + kind: 'struct' + fields: [ { - "name": "minOracleResults", - "type": "u32" + name: 'minOracleResults' + type: 'u32' } ] } }, { - "name": "AggregatorSetQueueParams", - "type": { - "kind": "struct", - "fields": [] + name: 'AggregatorSetQueueParams' + type: { + kind: 'struct' + fields: [] } }, { - "name": "AggregatorSetUpdateIntervalParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorSetUpdateIntervalParams' + type: { + kind: 'struct' + fields: [ { - "name": "newInterval", - "type": "u32" + name: 'newInterval' + type: 'u32' } ] } }, { - "name": "AggregatorSetVarianceThresholdParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorSetVarianceThresholdParams' + type: { + kind: 'struct' + fields: [ { - "name": "varianceThreshold", - "type": { - "defined": "BorshDecimal" + name: 'varianceThreshold' + type: { + defined: 'BorshDecimal' } } ] } }, { - "name": "CrankInitParams", - "type": { - "kind": "struct", - "fields": [ + name: 'CrankInitParams' + type: { + kind: 'struct' + fields: [ { - "name": "name", - "type": "bytes" + name: 'name' + type: 'bytes' }, { - "name": "metadata", - "type": "bytes" + name: 'metadata' + type: 'bytes' }, { - "name": "crankSize", - "type": "u32" + name: 'crankSize' + type: 'u32' } ] } }, { - "name": "CrankPopParams", - "type": { - "kind": "struct", - "fields": [ + name: 'CrankPopParams' + type: { + kind: 'struct' + fields: [ { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' }, { - "name": "leaseBumps", - "type": "bytes" + name: 'leaseBumps' + type: 'bytes' }, { - "name": "permissionBumps", - "type": "bytes" + name: 'permissionBumps' + type: 'bytes' }, { - "name": "nonce", - "type": { - "option": "u32" + name: 'nonce' + type: { + option: 'u32' } }, { - "name": "failOpenOnAccountMismatch", - "type": { - "option": "bool" + name: 'failOpenOnAccountMismatch' + type: { + option: 'bool' } } ] } }, { - "name": "CrankPushParams", - "type": { - "kind": "struct", - "fields": [ + name: 'CrankPushParams' + type: { + kind: 'struct' + fields: [ { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' }, { - "name": "permissionBump", - "type": "u8" + name: 'permissionBump' + type: 'u8' } ] } }, { - "name": "JobInitParams", - "type": { - "kind": "struct", - "fields": [ + name: 'JobInitParams' + type: { + kind: 'struct' + fields: [ { - "name": "name", - "type": { - "array": [ - "u8", - 32 - ] + name: 'name' + type: { + array: ['u8', 32] } }, { - "name": "expiration", - "type": "i64" + name: 'expiration' + type: 'i64' }, { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' }, { - "name": "data", - "type": "bytes" + name: 'data' + type: 'bytes' } ] } }, { - "name": "LeaseExtendParams", - "type": { - "kind": "struct", - "fields": [ + name: 'LeaseExtendParams' + type: { + kind: 'struct' + fields: [ { - "name": "loadAmount", - "type": "u64" + name: 'loadAmount' + type: 'u64' }, { - "name": "leaseBump", - "type": "u8" + name: 'leaseBump' + type: 'u8' }, { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' }, { - "name": "walletBumps", - "type": "bytes" + name: 'walletBumps' + type: 'bytes' } ] } }, { - "name": "LeaseInitParams", - "type": { - "kind": "struct", - "fields": [ + name: 'LeaseInitParams' + type: { + kind: 'struct' + fields: [ { - "name": "loadAmount", - "type": "u64" + name: 'loadAmount' + type: 'u64' }, { - "name": "withdrawAuthority", - "type": "publicKey" + name: 'withdrawAuthority' + type: 'publicKey' }, { - "name": "leaseBump", - "type": "u8" + name: 'leaseBump' + type: 'u8' }, { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' }, { - "name": "walletBumps", - "type": "bytes" + name: 'walletBumps' + type: 'bytes' } ] } }, { - "name": "LeaseSetAuthorityParams", - "type": { - "kind": "struct", - "fields": [] + name: 'LeaseSetAuthorityParams' + type: { + kind: 'struct' + fields: [] } }, { - "name": "LeaseWithdrawParams", - "type": { - "kind": "struct", - "fields": [ + name: 'LeaseWithdrawParams' + type: { + kind: 'struct' + fields: [ { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' }, { - "name": "leaseBump", - "type": "u8" + name: 'leaseBump' + type: 'u8' }, { - "name": "amount", - "type": "u64" + name: 'amount' + type: 'u64' } ] } }, { - "name": "OracleHeartbeatParams", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleHeartbeatParams' + type: { + kind: 'struct' + fields: [ { - "name": "permissionBump", - "type": "u8" + name: 'permissionBump' + type: 'u8' } ] } }, { - "name": "OracleInitParams", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleInitParams' + type: { + kind: 'struct' + fields: [ { - "name": "name", - "type": "bytes" + name: 'name' + type: 'bytes' }, { - "name": "metadata", - "type": "bytes" + name: 'metadata' + type: 'bytes' }, { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' }, { - "name": "oracleBump", - "type": "u8" + name: 'oracleBump' + type: 'u8' } ] } }, { - "name": "OracleQueueInitParams", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleQueueInitParams' + type: { + kind: 'struct' + fields: [ { - "name": "name", - "type": { - "array": [ - "u8", - 32 - ] + name: 'name' + type: { + array: ['u8', 32] } }, { - "name": "metadata", - "type": { - "array": [ - "u8", - 64 - ] + name: 'metadata' + type: { + array: ['u8', 64] } }, { - "name": "reward", - "type": "u64" + name: 'reward' + type: 'u64' }, { - "name": "minStake", - "type": "u64" + name: 'minStake' + type: 'u64' }, { - "name": "feedProbationPeriod", - "type": "u32" + name: 'feedProbationPeriod' + type: 'u32' }, { - "name": "oracleTimeout", - "type": "u32" + name: 'oracleTimeout' + type: 'u32' }, { - "name": "slashingEnabled", - "type": "bool" + name: 'slashingEnabled' + type: 'bool' }, { - "name": "varianceToleranceMultiplier", - "type": { - "defined": "BorshDecimal" + name: 'varianceToleranceMultiplier' + type: { + defined: 'BorshDecimal' } }, { - "name": "consecutiveFeedFailureLimit", - "type": "u64" + name: 'consecutiveFeedFailureLimit' + type: 'u64' }, { - "name": "consecutiveOracleFailureLimit", - "type": "u64" + name: 'consecutiveOracleFailureLimit' + type: 'u64' }, { - "name": "queueSize", - "type": "u32" + name: 'queueSize' + type: 'u32' }, { - "name": "unpermissionedFeeds", - "type": "bool" + name: 'unpermissionedFeeds' + type: 'bool' }, { - "name": "unpermissionedVrf", - "type": "bool" + name: 'unpermissionedVrf' + type: 'bool' } ] } }, { - "name": "OracleQueueSetRewardsParams", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleQueueSetRewardsParams' + type: { + kind: 'struct' + fields: [ { - "name": "rewards", - "type": "u64" + name: 'rewards' + type: 'u64' } ] } }, { - "name": "OracleQueueVrfConfigParams", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleQueueVrfConfigParams' + type: { + kind: 'struct' + fields: [ { - "name": "unpermissionedVrfEnabled", - "type": "bool" + name: 'unpermissionedVrfEnabled' + type: 'bool' } ] } }, { - "name": "OracleWithdrawParams", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleWithdrawParams' + type: { + kind: 'struct' + fields: [ { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' }, { - "name": "permissionBump", - "type": "u8" + name: 'permissionBump' + type: 'u8' }, { - "name": "amount", - "type": "u64" + name: 'amount' + type: 'u64' } ] } }, { - "name": "PermissionInitParams", - "type": { - "kind": "struct", - "fields": [] + name: 'PermissionInitParams' + type: { + kind: 'struct' + fields: [] } }, { - "name": "PermissionSetParams", - "type": { - "kind": "struct", - "fields": [ + name: 'PermissionSetParams' + type: { + kind: 'struct' + fields: [ { - "name": "permission", - "type": { - "defined": "SwitchboardPermission" + name: 'permission' + type: { + defined: 'SwitchboardPermission' } }, { - "name": "enable", - "type": "bool" + name: 'enable' + type: 'bool' } ] } }, { - "name": "PermissionSetVoterWeightParams", - "type": { - "kind": "struct", - "fields": [ + name: 'PermissionSetVoterWeightParams' + type: { + kind: 'struct' + fields: [ { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' } ] } }, { - "name": "ProgramConfigParams", - "type": { - "kind": "struct", - "fields": [ + name: 'ProgramConfigParams' + type: { + kind: 'struct' + fields: [ { - "name": "token", - "type": "publicKey" + name: 'token' + type: 'publicKey' }, { - "name": "bump", - "type": "u8" + name: 'bump' + type: 'u8' }, { - "name": "daoMint", - "type": "publicKey" + name: 'daoMint' + type: 'publicKey' } ] } }, { - "name": "ProgramInitParams", - "type": { - "kind": "struct", - "fields": [ + name: 'ProgramInitParams' + type: { + kind: 'struct' + fields: [ { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' } ] } }, { - "name": "VaultTransferParams", - "type": { - "kind": "struct", - "fields": [ + name: 'VaultTransferParams' + type: { + kind: 'struct' + fields: [ { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' }, { - "name": "amount", - "type": "u64" + name: 'amount' + type: 'u64' } ] } }, { - "name": "VrfInitParams", - "type": { - "kind": "struct", - "fields": [ + name: 'VrfInitParams' + type: { + kind: 'struct' + fields: [ { - "name": "callback", - "type": { - "defined": "Callback" + name: 'callback' + type: { + defined: 'Callback' } }, { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' } ] } }, { - "name": "VrfProveParams", - "type": { - "kind": "struct", - "fields": [ + name: 'VrfProveParams' + type: { + kind: 'struct' + fields: [ { - "name": "proof", - "type": "bytes" + name: 'proof' + type: 'bytes' }, { - "name": "idx", - "type": "u32" + name: 'idx' + type: 'u32' } ] } }, { - "name": "VrfProveAndVerifyParams", - "type": { - "kind": "struct", - "fields": [ + name: 'VrfProveAndVerifyParams' + type: { + kind: 'struct' + fields: [ { - "name": "nonce", - "type": { - "option": "u32" + name: 'nonce' + type: { + option: 'u32' } }, { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' }, { - "name": "idx", - "type": "u32" + name: 'idx' + type: 'u32' }, { - "name": "proof", - "type": "bytes" + name: 'proof' + type: 'bytes' } ] } }, { - "name": "VrfRequestRandomnessParams", - "type": { - "kind": "struct", - "fields": [ + name: 'VrfRequestRandomnessParams' + type: { + kind: 'struct' + fields: [ { - "name": "permissionBump", - "type": "u8" + name: 'permissionBump' + type: 'u8' }, { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' } ] } }, { - "name": "VrfVerifyParams", - "type": { - "kind": "struct", - "fields": [ + name: 'VrfVerifyParams' + type: { + kind: 'struct' + fields: [ { - "name": "nonce", - "type": { - "option": "u32" + name: 'nonce' + type: { + option: 'u32' } }, { - "name": "stateBump", - "type": "u8" + name: 'stateBump' + type: 'u8' }, { - "name": "idx", - "type": "u32" + name: 'idx' + type: 'u32' } ] } }, { - "name": "Hash", - "type": { - "kind": "struct", - "fields": [ + name: 'Hash' + type: { + kind: 'struct' + fields: [ { - "name": "data", - "type": { - "array": [ - "u8", - 32 - ] + name: 'data' + type: { + array: ['u8', 32] } } ] } }, { - "name": "AggregatorRound", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorRound' + type: { + kind: 'struct' + fields: [ { - "name": "numSuccess", - "type": "u32" + name: 'numSuccess' + type: 'u32' }, { - "name": "numError", - "type": "u32" + name: 'numError' + type: 'u32' }, { - "name": "isClosed", - "type": "bool" + name: 'isClosed' + type: 'bool' }, { - "name": "roundOpenSlot", - "type": "u64" + name: 'roundOpenSlot' + type: 'u64' }, { - "name": "roundOpenTimestamp", - "type": "i64" + name: 'roundOpenTimestamp' + type: 'i64' }, { - "name": "result", - "type": { - "defined": "SwitchboardDecimal" + name: 'result' + type: { + defined: 'SwitchboardDecimal' } }, { - "name": "stdDeviation", - "type": { - "defined": "SwitchboardDecimal" + name: 'stdDeviation' + type: { + defined: 'SwitchboardDecimal' } }, { - "name": "minResponse", - "type": { - "defined": "SwitchboardDecimal" + name: 'minResponse' + type: { + defined: 'SwitchboardDecimal' } }, { - "name": "maxResponse", - "type": { - "defined": "SwitchboardDecimal" + name: 'maxResponse' + type: { + defined: 'SwitchboardDecimal' } }, { - "name": "oraclePubkeysData", - "type": { - "array": [ - "publicKey", - 16 - ] + name: 'oraclePubkeysData' + type: { + array: ['publicKey', 16] } }, { - "name": "mediansData", - "type": { - "array": [ + name: 'mediansData' + type: { + array: [ { - "defined": "SwitchboardDecimal" + defined: 'SwitchboardDecimal' }, 16 ] } }, { - "name": "currentPayout", - "type": { - "array": [ - "i64", - 16 - ] + name: 'currentPayout' + type: { + array: ['i64', 16] } }, { - "name": "mediansFulfilled", - "type": { - "array": [ - "bool", - 16 - ] + name: 'mediansFulfilled' + type: { + array: ['bool', 16] } }, { - "name": "errorsFulfilled", - "type": { - "array": [ - "bool", - 16 - ] + name: 'errorsFulfilled' + type: { + array: ['bool', 16] } } ] } }, { - "name": "AggregatorHistoryRow", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorHistoryRow' + type: { + kind: 'struct' + fields: [ { - "name": "timestamp", - "type": "i64" + name: 'timestamp' + type: 'i64' }, { - "name": "value", - "type": { - "defined": "SwitchboardDecimal" + name: 'value' + type: { + defined: 'SwitchboardDecimal' } } ] } }, { - "name": "SwitchboardDecimal", - "type": { - "kind": "struct", - "fields": [ + name: 'SwitchboardDecimal' + type: { + kind: 'struct' + fields: [ { - "name": "mantissa", - "type": "i128" + name: 'mantissa' + type: 'i128' }, { - "name": "scale", - "type": "u32" + name: 'scale' + type: 'u32' } ] } }, { - "name": "CrankRow", - "type": { - "kind": "struct", - "fields": [ + name: 'CrankRow' + type: { + kind: 'struct' + fields: [ { - "name": "pubkey", - "type": "publicKey" + name: 'pubkey' + type: 'publicKey' }, { - "name": "nextTimestamp", - "type": "i64" + name: 'nextTimestamp' + type: 'i64' } ] } }, { - "name": "OracleMetrics", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleMetrics' + type: { + kind: 'struct' + fields: [ { - "name": "consecutiveSuccess", - "type": "u64" + name: 'consecutiveSuccess' + type: 'u64' }, { - "name": "consecutiveError", - "type": "u64" + name: 'consecutiveError' + type: 'u64' }, { - "name": "consecutiveDisagreement", - "type": "u64" + name: 'consecutiveDisagreement' + type: 'u64' }, { - "name": "consecutiveLateResponse", - "type": "u64" + name: 'consecutiveLateResponse' + type: 'u64' }, { - "name": "consecutiveFailure", - "type": "u64" + name: 'consecutiveFailure' + type: 'u64' }, { - "name": "totalSuccess", - "type": "u128" + name: 'totalSuccess' + type: 'u128' }, { - "name": "totalError", - "type": "u128" + name: 'totalError' + type: 'u128' }, { - "name": "totalDisagreement", - "type": "u128" + name: 'totalDisagreement' + type: 'u128' }, { - "name": "totalLateResponse", - "type": "u128" + name: 'totalLateResponse' + type: 'u128' } ] } }, { - "name": "BorshDecimal", - "type": { - "kind": "struct", - "fields": [ + name: 'BorshDecimal' + type: { + kind: 'struct' + fields: [ { - "name": "mantissa", - "type": "i128" + name: 'mantissa' + type: 'i128' }, { - "name": "scale", - "type": "u32" + name: 'scale' + type: 'u32' } ] } }, { - "name": "EcvrfProofZC", - "type": { - "kind": "struct", - "fields": [ + name: 'EcvrfProofZC' + type: { + kind: 'struct' + fields: [ { - "name": "gamma", - "type": { - "defined": "EdwardsPointZC" + name: 'gamma' + type: { + defined: 'EdwardsPointZC' } }, { - "name": "c", - "type": { - "defined": "Scalar" + name: 'c' + type: { + defined: 'Scalar' } }, { - "name": "s", - "type": { - "defined": "Scalar" + name: 's' + type: { + defined: 'Scalar' } } ] } }, { - "name": "Scalar", - "type": { - "kind": "struct", - "fields": [ + name: 'Scalar' + type: { + kind: 'struct' + fields: [ { - "name": "bytes", - "type": { - "array": [ - "u8", - 32 - ] + name: 'bytes' + type: { + array: ['u8', 32] } } ] } }, { - "name": "FieldElementZC", - "type": { - "kind": "struct", - "fields": [ + name: 'FieldElementZC' + type: { + kind: 'struct' + fields: [ { - "name": "bytes", - "type": { - "array": [ - "u64", - 5 - ] + name: 'bytes' + type: { + array: ['u64', 5] } } ] } }, { - "name": "CompletedPointZC", - "type": { - "kind": "struct", - "fields": [ + name: 'CompletedPointZC' + type: { + kind: 'struct' + fields: [ { - "name": "x", - "type": { - "defined": "FieldElementZC" + name: 'x' + type: { + defined: 'FieldElementZC' } }, { - "name": "y", - "type": { - "defined": "FieldElementZC" + name: 'y' + type: { + defined: 'FieldElementZC' } }, { - "name": "z", - "type": { - "defined": "FieldElementZC" + name: 'z' + type: { + defined: 'FieldElementZC' } }, { - "name": "t", - "type": { - "defined": "FieldElementZC" + name: 't' + type: { + defined: 'FieldElementZC' } } ] } }, { - "name": "EdwardsPointZC", - "type": { - "kind": "struct", - "fields": [ + name: 'EdwardsPointZC' + type: { + kind: 'struct' + fields: [ { - "name": "x", - "type": { - "defined": "FieldElementZC" + name: 'x' + type: { + defined: 'FieldElementZC' } }, { - "name": "y", - "type": { - "defined": "FieldElementZC" + name: 'y' + type: { + defined: 'FieldElementZC' } }, { - "name": "z", - "type": { - "defined": "FieldElementZC" + name: 'z' + type: { + defined: 'FieldElementZC' } }, { - "name": "t", - "type": { - "defined": "FieldElementZC" + name: 't' + type: { + defined: 'FieldElementZC' } } ] } }, { - "name": "ProjectivePointZC", - "type": { - "kind": "struct", - "fields": [ + name: 'ProjectivePointZC' + type: { + kind: 'struct' + fields: [ { - "name": "x", - "type": { - "defined": "FieldElementZC" + name: 'x' + type: { + defined: 'FieldElementZC' } }, { - "name": "y", - "type": { - "defined": "FieldElementZC" + name: 'y' + type: { + defined: 'FieldElementZC' } }, { - "name": "z", - "type": { - "defined": "FieldElementZC" + name: 'z' + type: { + defined: 'FieldElementZC' } } ] } }, { - "name": "EcvrfIntermediate", - "type": { - "kind": "struct", - "fields": [ + name: 'EcvrfIntermediate' + type: { + kind: 'struct' + fields: [ { - "name": "r", - "type": { - "defined": "FieldElementZC" + name: 'r' + type: { + defined: 'FieldElementZC' } }, { - "name": "nS", - "type": { - "defined": "FieldElementZC" + name: 'nS' + type: { + defined: 'FieldElementZC' } }, { - "name": "d", - "type": { - "defined": "FieldElementZC" + name: 'd' + type: { + defined: 'FieldElementZC' } }, { - "name": "t13", - "type": { - "defined": "FieldElementZC" + name: 't13' + type: { + defined: 'FieldElementZC' } }, { - "name": "t15", - "type": { - "defined": "FieldElementZC" + name: 't15' + type: { + defined: 'FieldElementZC' } } ] } }, { - "name": "VrfBuilder", - "type": { - "kind": "struct", - "fields": [ + name: 'VrfBuilder' + type: { + kind: 'struct' + fields: [ { - "name": "producer", - "type": "publicKey" + name: 'producer' + type: 'publicKey' }, { - "name": "status", - "type": { - "defined": "VrfStatus" + name: 'status' + type: { + defined: 'VrfStatus' } }, { - "name": "reprProof", - "type": { - "array": [ - "u8", - 80 - ] + name: 'reprProof' + type: { + array: ['u8', 80] } }, { - "name": "proof", - "type": { - "defined": "EcvrfProofZC" + name: 'proof' + type: { + defined: 'EcvrfProofZC' } }, { - "name": "yPoint", - "type": "publicKey" + name: 'yPoint' + type: 'publicKey' }, { - "name": "stage", - "type": "u32" + name: 'stage' + type: 'u32' }, { - "name": "stage1Out", - "type": { - "defined": "EcvrfIntermediate" + name: 'stage1Out' + type: { + defined: 'EcvrfIntermediate' } }, { - "name": "r1", - "type": { - "defined": "EdwardsPointZC" + name: 'r1' + type: { + defined: 'EdwardsPointZC' } }, { - "name": "r2", - "type": { - "defined": "EdwardsPointZC" + name: 'r2' + type: { + defined: 'EdwardsPointZC' } }, { - "name": "stage3Out", - "type": { - "defined": "EcvrfIntermediate" + name: 'stage3Out' + type: { + defined: 'EcvrfIntermediate' } }, { - "name": "hPoint", - "type": { - "defined": "EdwardsPointZC" + name: 'hPoint' + type: { + defined: 'EdwardsPointZC' } }, { - "name": "sReduced", - "type": { - "defined": "Scalar" + name: 'sReduced' + type: { + defined: 'Scalar' } }, { - "name": "yPointBuilder", - "type": { - "array": [ + name: 'yPointBuilder' + type: { + array: [ { - "defined": "FieldElementZC" + defined: 'FieldElementZC' }, 3 ] } }, { - "name": "yRistrettoPoint", - "type": { - "defined": "EdwardsPointZC" + name: 'yRistrettoPoint' + type: { + defined: 'EdwardsPointZC' } }, { - "name": "mulRound", - "type": "u8" + name: 'mulRound' + type: 'u8' }, { - "name": "hashPointsRound", - "type": "u8" + name: 'hashPointsRound' + type: 'u8' }, { - "name": "mulTmp1", - "type": { - "defined": "CompletedPointZC" + name: 'mulTmp1' + type: { + defined: 'CompletedPointZC' } }, { - "name": "uPoint1", - "type": { - "defined": "EdwardsPointZC" + name: 'uPoint1' + type: { + defined: 'EdwardsPointZC' } }, { - "name": "uPoint2", - "type": { - "defined": "EdwardsPointZC" + name: 'uPoint2' + type: { + defined: 'EdwardsPointZC' } }, { - "name": "vPoint1", - "type": { - "defined": "EdwardsPointZC" + name: 'vPoint1' + type: { + defined: 'EdwardsPointZC' } }, { - "name": "vPoint2", - "type": { - "defined": "EdwardsPointZC" + name: 'vPoint2' + type: { + defined: 'EdwardsPointZC' } }, { - "name": "uPoint", - "type": { - "defined": "EdwardsPointZC" + name: 'uPoint' + type: { + defined: 'EdwardsPointZC' } }, { - "name": "vPoint", - "type": { - "defined": "EdwardsPointZC" + name: 'vPoint' + type: { + defined: 'EdwardsPointZC' } }, { - "name": "u1", - "type": { - "defined": "FieldElementZC" + name: 'u1' + type: { + defined: 'FieldElementZC' } }, { - "name": "u2", - "type": { - "defined": "FieldElementZC" + name: 'u2' + type: { + defined: 'FieldElementZC' } }, { - "name": "invertee", - "type": { - "defined": "FieldElementZC" + name: 'invertee' + type: { + defined: 'FieldElementZC' } }, { - "name": "y", - "type": { - "defined": "FieldElementZC" + name: 'y' + type: { + defined: 'FieldElementZC' } }, { - "name": "z", - "type": { - "defined": "FieldElementZC" + name: 'z' + type: { + defined: 'FieldElementZC' } }, { - "name": "p1Bytes", - "type": { - "array": [ - "u8", - 32 - ] + name: 'p1Bytes' + type: { + array: ['u8', 32] } }, { - "name": "p2Bytes", - "type": { - "array": [ - "u8", - 32 - ] + name: 'p2Bytes' + type: { + array: ['u8', 32] } }, { - "name": "p3Bytes", - "type": { - "array": [ - "u8", - 32 - ] + name: 'p3Bytes' + type: { + array: ['u8', 32] } }, { - "name": "p4Bytes", - "type": { - "array": [ - "u8", - 32 - ] + name: 'p4Bytes' + type: { + array: ['u8', 32] } }, { - "name": "cPrimeHashbuf", - "type": { - "array": [ - "u8", - 16 - ] + name: 'cPrimeHashbuf' + type: { + array: ['u8', 16] } }, { - "name": "m1", - "type": { - "defined": "FieldElementZC" + name: 'm1' + type: { + defined: 'FieldElementZC' } }, { - "name": "m2", - "type": { - "defined": "FieldElementZC" + name: 'm2' + type: { + defined: 'FieldElementZC' } }, { - "name": "txRemaining", - "type": "u32" + name: 'txRemaining' + type: 'u32' }, { - "name": "verified", - "type": "bool" + name: 'verified' + type: 'bool' }, { - "name": "result", - "type": { - "array": [ - "u8", - 32 - ] + name: 'result' + type: { + array: ['u8', 32] } } ] } }, { - "name": "AccountMetaZC", - "type": { - "kind": "struct", - "fields": [ + name: 'AccountMetaZC' + type: { + kind: 'struct' + fields: [ { - "name": "pubkey", - "type": "publicKey" + name: 'pubkey' + type: 'publicKey' }, { - "name": "isSigner", - "type": "bool" + name: 'isSigner' + type: 'bool' }, { - "name": "isWritable", - "type": "bool" + name: 'isWritable' + type: 'bool' } ] } }, { - "name": "AccountMetaBorsh", - "type": { - "kind": "struct", - "fields": [ + name: 'AccountMetaBorsh' + type: { + kind: 'struct' + fields: [ { - "name": "pubkey", - "type": "publicKey" + name: 'pubkey' + type: 'publicKey' }, { - "name": "isSigner", - "type": "bool" + name: 'isSigner' + type: 'bool' }, { - "name": "isWritable", - "type": "bool" + name: 'isWritable' + type: 'bool' } ] } }, { - "name": "CallbackZC", - "type": { - "kind": "struct", - "fields": [ + name: 'CallbackZC' + type: { + kind: 'struct' + fields: [ { - "name": "programId", - "type": "publicKey" + name: 'programId' + type: 'publicKey' }, { - "name": "accounts", - "type": { - "array": [ + name: 'accounts' + type: { + array: [ { - "defined": "AccountMetaZC" + defined: 'AccountMetaZC' }, 32 ] } }, { - "name": "accountsLen", - "type": "u32" + name: 'accountsLen' + type: 'u32' }, { - "name": "ixData", - "type": { - "array": [ - "u8", - 1024 - ] + name: 'ixData' + type: { + array: ['u8', 1024] } }, { - "name": "ixDataLen", - "type": "u32" + name: 'ixDataLen' + type: 'u32' } ] } }, { - "name": "Callback", - "type": { - "kind": "struct", - "fields": [ + name: 'Callback' + type: { + kind: 'struct' + fields: [ { - "name": "programId", - "type": "publicKey" + name: 'programId' + type: 'publicKey' }, { - "name": "accounts", - "type": { - "vec": { - "defined": "AccountMetaBorsh" + name: 'accounts' + type: { + vec: { + defined: 'AccountMetaBorsh' } } }, { - "name": "ixData", - "type": "bytes" + name: 'ixData' + type: 'bytes' } ] } }, { - "name": "VrfRound", - "type": { - "kind": "struct", - "fields": [ + name: 'VrfRound' + type: { + kind: 'struct' + fields: [ { - "name": "alpha", - "type": { - "array": [ - "u8", - 256 - ] + name: 'alpha' + type: { + array: ['u8', 256] } }, { - "name": "alphaLen", - "type": "u32" + name: 'alphaLen' + type: 'u32' }, { - "name": "requestSlot", - "type": "u64" + name: 'requestSlot' + type: 'u64' }, { - "name": "requestTimestamp", - "type": "i64" + name: 'requestTimestamp' + type: 'i64' }, { - "name": "result", - "type": { - "array": [ - "u8", - 32 - ] + name: 'result' + type: { + array: ['u8', 32] } }, { - "name": "numVerified", - "type": "u32" + name: 'numVerified' + type: 'u32' }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 256 - ] + name: 'ebuf' + type: { + array: ['u8', 256] } } ] } }, { - "name": "Lanes", - "type": { - "kind": "enum", - "variants": [ + name: 'Lanes' + type: { + kind: 'enum' + variants: [ { - "name": "C" + name: 'C' }, { - "name": "D" + name: 'D' }, { - "name": "AB" + name: 'AB' }, { - "name": "AC" + name: 'AC' }, { - "name": "CD" + name: 'CD' }, { - "name": "AD" + name: 'AD' }, { - "name": "BC" + name: 'BC' }, { - "name": "ABCD" + name: 'ABCD' } ] } }, { - "name": "Shuffle", - "type": { - "kind": "enum", - "variants": [ + name: 'Shuffle' + type: { + kind: 'enum' + variants: [ { - "name": "AAAA" + name: 'AAAA' }, { - "name": "BBBB" + name: 'BBBB' }, { - "name": "CACA" + name: 'CACA' }, { - "name": "DBBD" + name: 'DBBD' }, { - "name": "ADDA" + name: 'ADDA' }, { - "name": "CBCB" + name: 'CBCB' }, { - "name": "ABAB" + name: 'ABAB' }, { - "name": "BADC" + name: 'BADC' }, { - "name": "BACD" + name: 'BACD' }, { - "name": "ABDC" + name: 'ABDC' } ] } }, { - "name": "Shuffle", - "type": { - "kind": "enum", - "variants": [ + name: 'Shuffle' + type: { + kind: 'enum' + variants: [ { - "name": "AAAA" + name: 'AAAA' }, { - "name": "BBBB" + name: 'BBBB' }, { - "name": "BADC" + name: 'BADC' }, { - "name": "BACD" + name: 'BACD' }, { - "name": "ADDA" + name: 'ADDA' }, { - "name": "CBCB" + name: 'CBCB' }, { - "name": "ABDC" + name: 'ABDC' }, { - "name": "ABAB" + name: 'ABAB' }, { - "name": "DBBD" + name: 'DBBD' }, { - "name": "CACA" + name: 'CACA' } ] } }, { - "name": "Lanes", - "type": { - "kind": "enum", - "variants": [ + name: 'Lanes' + type: { + kind: 'enum' + variants: [ { - "name": "D" + name: 'D' }, { - "name": "C" + name: 'C' }, { - "name": "AB" + name: 'AB' }, { - "name": "AC" + name: 'AC' }, { - "name": "AD" + name: 'AD' }, { - "name": "BCD" + name: 'BCD' } ] } }, { - "name": "Error", - "type": { - "kind": "enum", - "variants": [ + name: 'Error' + type: { + kind: 'enum' + variants: [ { - "name": "InvalidPublicKey" + name: 'InvalidPublicKey' }, { - "name": "SerializationError", - "fields": [ + name: 'SerializationError' + fields: [ { - "defined": "bincode::Error" + defined: 'bincode::Error' } ] }, { - "name": "DeserializationError", - "fields": [ + name: 'DeserializationError' + fields: [ { - "defined": "bincode::Error" + defined: 'bincode::Error' } ] }, { - "name": "InvalidDataError" + name: 'InvalidDataError' } ] } }, { - "name": "SwitchboardPermission", - "type": { - "kind": "enum", - "variants": [ + name: 'SwitchboardPermission' + type: { + kind: 'enum' + variants: [ { - "name": "PermitOracleHeartbeat" + name: 'PermitOracleHeartbeat' }, { - "name": "PermitOracleQueueUsage" + name: 'PermitOracleQueueUsage' }, { - "name": "PermitVrfRequests" + name: 'PermitVrfRequests' } ] } }, { - "name": "OracleResponseType", - "type": { - "kind": "enum", - "variants": [ + name: 'OracleResponseType' + type: { + kind: 'enum' + variants: [ { - "name": "TypeSuccess" + name: 'TypeSuccess' }, { - "name": "TypeError" + name: 'TypeError' }, { - "name": "TypeDisagreement" + name: 'TypeDisagreement' }, { - "name": "TypeNoResponse" + name: 'TypeNoResponse' } ] } }, { - "name": "VrfStatus", - "type": { - "kind": "enum", - "variants": [ + name: 'VrfStatus' + type: { + kind: 'enum' + variants: [ { - "name": "StatusNone" + name: 'StatusNone' }, { - "name": "StatusRequesting" + name: 'StatusRequesting' }, { - "name": "StatusVerifying" + name: 'StatusVerifying' }, { - "name": "StatusVerified" + name: 'StatusVerified' }, { - "name": "StatusCallbackSuccess" + name: 'StatusCallbackSuccess' }, { - "name": "StatusVerifyFailure" + name: 'StatusVerifyFailure' } ] } } - ], - "events": [ + ] + events: [ { - "name": "AggregatorInitEvent", - "fields": [ + name: 'AggregatorInitEvent' + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false + name: 'feedPubkey' + type: 'publicKey' + index: false } ] }, { - "name": "VrfRequestRandomnessEvent", - "fields": [ + name: 'VrfRequestRandomnessEvent' + fields: [ { - "name": "vrfPubkey", - "type": "publicKey", - "index": true + name: 'vrfPubkey' + type: 'publicKey' + index: true }, { - "name": "oraclePubkeys", - "type": { - "vec": "publicKey" - }, - "index": false + name: 'oraclePubkeys' + type: { + vec: 'publicKey' + } + index: false }, { - "name": "loadAmount", - "type": "u64", - "index": false + name: 'loadAmount' + type: 'u64' + index: false }, { - "name": "existingAmount", - "type": "u64", - "index": false + name: 'existingAmount' + type: 'u64' + index: false } ] }, { - "name": "VrfRequestEvent", - "fields": [ + name: 'VrfRequestEvent' + fields: [ { - "name": "vrfPubkey", - "type": "publicKey", - "index": true + name: 'vrfPubkey' + type: 'publicKey' + index: true }, { - "name": "oraclePubkeys", - "type": { - "vec": "publicKey" - }, - "index": false + name: 'oraclePubkeys' + type: { + vec: 'publicKey' + } + index: false } ] }, { - "name": "VrfProveEvent", - "fields": [ + name: 'VrfProveEvent' + fields: [ { - "name": "vrfPubkey", - "type": "publicKey", - "index": true + name: 'vrfPubkey' + type: 'publicKey' + index: true }, { - "name": "oraclePubkey", - "type": "publicKey", - "index": true + name: 'oraclePubkey' + type: 'publicKey' + index: true }, { - "name": "authorityPubkey", - "type": "publicKey", - "index": false + name: 'authorityPubkey' + type: 'publicKey' + index: false } ] }, { - "name": "VrfVerifyEvent", - "fields": [ + name: 'VrfVerifyEvent' + fields: [ { - "name": "vrfPubkey", - "type": "publicKey", - "index": true + name: 'vrfPubkey' + type: 'publicKey' + index: true }, { - "name": "oraclePubkey", - "type": "publicKey", - "index": true + name: 'oraclePubkey' + type: 'publicKey' + index: true }, { - "name": "authorityPubkey", - "type": "publicKey", - "index": false + name: 'authorityPubkey' + type: 'publicKey' + index: false }, { - "name": "amount", - "type": "u64", - "index": false + name: 'amount' + type: 'u64' + index: false } ] }, { - "name": "VrfCallbackPerformedEvent", - "fields": [ + name: 'VrfCallbackPerformedEvent' + fields: [ { - "name": "vrfPubkey", - "type": "publicKey", - "index": true + name: 'vrfPubkey' + type: 'publicKey' + index: true }, { - "name": "oraclePubkey", - "type": "publicKey", - "index": true + name: 'oraclePubkey' + type: 'publicKey' + index: true }, { - "name": "amount", - "type": "u64", - "index": false + name: 'amount' + type: 'u64' + index: false } ] }, { - "name": "AggregatorOpenRoundEvent", - "fields": [ + name: 'AggregatorOpenRoundEvent' + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false + name: 'feedPubkey' + type: 'publicKey' + index: false }, { - "name": "oraclePubkeys", - "type": { - "vec": "publicKey" - }, - "index": false + name: 'oraclePubkeys' + type: { + vec: 'publicKey' + } + index: false }, { - "name": "jobPubkeys", - "type": { - "vec": "publicKey" - }, - "index": false + name: 'jobPubkeys' + type: { + vec: 'publicKey' + } + index: false }, { - "name": "remainingFunds", - "type": "u64", - "index": false + name: 'remainingFunds' + type: 'u64' + index: false }, { - "name": "queueAuthority", - "type": "publicKey", - "index": false + name: 'queueAuthority' + type: 'publicKey' + index: false } ] }, { - "name": "AggregatorValueUpdateEvent", - "fields": [ + name: 'AggregatorValueUpdateEvent' + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false + name: 'feedPubkey' + type: 'publicKey' + index: false }, { - "name": "value", - "type": { - "defined": "BorshDecimal" - }, - "index": false + name: 'value' + type: { + defined: 'BorshDecimal' + } + index: false }, { - "name": "slot", - "type": "u64", - "index": false + name: 'slot' + type: 'u64' + index: false }, { - "name": "timestamp", - "type": "i64", - "index": false + name: 'timestamp' + type: 'i64' + index: false }, { - "name": "oraclePubkeys", - "type": { - "vec": "publicKey" - }, - "index": false + name: 'oraclePubkeys' + type: { + vec: 'publicKey' + } + index: false }, { - "name": "oracleValues", - "type": { - "vec": { - "defined": "BorshDecimal" + name: 'oracleValues' + type: { + vec: { + defined: 'BorshDecimal' } - }, - "index": false + } + index: false } ] }, { - "name": "OracleRewardEvent", - "fields": [ + name: 'OracleRewardEvent' + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false + name: 'feedPubkey' + type: 'publicKey' + index: false }, { - "name": "leasePubkey", - "type": "publicKey", - "index": false + name: 'leasePubkey' + type: 'publicKey' + index: false }, { - "name": "oraclePubkey", - "type": "publicKey", - "index": false + name: 'oraclePubkey' + type: 'publicKey' + index: false }, { - "name": "walletPubkey", - "type": "publicKey", - "index": false + name: 'walletPubkey' + type: 'publicKey' + index: false }, { - "name": "amount", - "type": "u64", - "index": false + name: 'amount' + type: 'u64' + index: false }, { - "name": "roundSlot", - "type": "u64", - "index": false + name: 'roundSlot' + type: 'u64' + index: false }, { - "name": "timestamp", - "type": "i64", - "index": false + name: 'timestamp' + type: 'i64' + index: false } ] }, { - "name": "OracleWithdrawEvent", - "fields": [ + name: 'OracleWithdrawEvent' + fields: [ { - "name": "oraclePubkey", - "type": "publicKey", - "index": false + name: 'oraclePubkey' + type: 'publicKey' + index: false }, { - "name": "walletPubkey", - "type": "publicKey", - "index": false + name: 'walletPubkey' + type: 'publicKey' + index: false }, { - "name": "destinationWallet", - "type": "publicKey", - "index": false + name: 'destinationWallet' + type: 'publicKey' + index: false }, { - "name": "previousAmount", - "type": "u64", - "index": false + name: 'previousAmount' + type: 'u64' + index: false }, { - "name": "newAmount", - "type": "u64", - "index": false + name: 'newAmount' + type: 'u64' + index: false }, { - "name": "timestamp", - "type": "i64", - "index": false + name: 'timestamp' + type: 'i64' + index: false } ] }, { - "name": "LeaseWithdrawEvent", - "fields": [ + name: 'LeaseWithdrawEvent' + fields: [ { - "name": "leasePubkey", - "type": "publicKey", - "index": false + name: 'leasePubkey' + type: 'publicKey' + index: false }, { - "name": "walletPubkey", - "type": "publicKey", - "index": false + name: 'walletPubkey' + type: 'publicKey' + index: false }, { - "name": "previousAmount", - "type": "u64", - "index": false + name: 'previousAmount' + type: 'u64' + index: false }, { - "name": "newAmount", - "type": "u64", - "index": false + name: 'newAmount' + type: 'u64' + index: false }, { - "name": "timestamp", - "type": "i64", - "index": false + name: 'timestamp' + type: 'i64' + index: false } ] }, { - "name": "OracleSlashEvent", - "fields": [ + name: 'OracleSlashEvent' + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false + name: 'feedPubkey' + type: 'publicKey' + index: false }, { - "name": "leasePubkey", - "type": "publicKey", - "index": false + name: 'leasePubkey' + type: 'publicKey' + index: false }, { - "name": "oraclePubkey", - "type": "publicKey", - "index": false + name: 'oraclePubkey' + type: 'publicKey' + index: false }, { - "name": "walletPubkey", - "type": "publicKey", - "index": false + name: 'walletPubkey' + type: 'publicKey' + index: false }, { - "name": "amount", - "type": "u64", - "index": false + name: 'amount' + type: 'u64' + index: false }, { - "name": "roundSlot", - "type": "u64", - "index": false + name: 'roundSlot' + type: 'u64' + index: false }, { - "name": "timestamp", - "type": "i64", - "index": false + name: 'timestamp' + type: 'i64' + index: false } ] }, { - "name": "LeaseFundEvent", - "fields": [ + name: 'LeaseFundEvent' + fields: [ { - "name": "leasePubkey", - "type": "publicKey", - "index": false + name: 'leasePubkey' + type: 'publicKey' + index: false }, { - "name": "funder", - "type": "publicKey", - "index": false + name: 'funder' + type: 'publicKey' + index: false }, { - "name": "amount", - "type": "u64", - "index": false + name: 'amount' + type: 'u64' + index: false }, { - "name": "timestamp", - "type": "i64", - "index": false + name: 'timestamp' + type: 'i64' + index: false } ] }, { - "name": "ProbationBrokenEvent", - "fields": [ + name: 'ProbationBrokenEvent' + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false + name: 'feedPubkey' + type: 'publicKey' + index: false }, { - "name": "queuePubkey", - "type": "publicKey", - "index": false + name: 'queuePubkey' + type: 'publicKey' + index: false }, { - "name": "timestamp", - "type": "i64", - "index": false + name: 'timestamp' + type: 'i64' + index: false } ] }, { - "name": "FeedPermissionRevokedEvent", - "fields": [ + name: 'FeedPermissionRevokedEvent' + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false + name: 'feedPubkey' + type: 'publicKey' + index: false }, { - "name": "timestamp", - "type": "i64", - "index": false + name: 'timestamp' + type: 'i64' + index: false } ] }, { - "name": "GarbageCollectFailureEvent", - "fields": [ + name: 'GarbageCollectFailureEvent' + fields: [ { - "name": "queuePubkey", - "type": "publicKey", - "index": false + name: 'queuePubkey' + type: 'publicKey' + index: false } ] }, { - "name": "OracleBootedEvent", - "fields": [ + name: 'OracleBootedEvent' + fields: [ { - "name": "queuePubkey", - "type": "publicKey", - "index": false + name: 'queuePubkey' + type: 'publicKey' + index: false }, { - "name": "oraclePubkey", - "type": "publicKey", - "index": false + name: 'oraclePubkey' + type: 'publicKey' + index: false } ] }, { - "name": "CrankLeaseInsufficientFundsEvent", - "fields": [ + name: 'CrankLeaseInsufficientFundsEvent' + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false + name: 'feedPubkey' + type: 'publicKey' + index: false }, { - "name": "leasePubkey", - "type": "publicKey", - "index": false + name: 'leasePubkey' + type: 'publicKey' + index: false } ] }, { - "name": "CrankPopExpectedFailureEvent", - "fields": [ + name: 'CrankPopExpectedFailureEvent' + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false + name: 'feedPubkey' + type: 'publicKey' + index: false }, { - "name": "leasePubkey", - "type": "publicKey", - "index": false + name: 'leasePubkey' + type: 'publicKey' + index: false } ] } - ], - "errors": [ + ] + errors: [ { - "code": 6000, - "name": "ArrayOperationError", - "msg": "Illegal operation on a Switchboard array." + code: 6000 + name: 'ArrayOperationError' + msg: 'Illegal operation on a Switchboard array.' }, { - "code": 6001, - "name": "QueueOperationError", - "msg": "Illegal operation on a Switchboard queue." + code: 6001 + name: 'QueueOperationError' + msg: 'Illegal operation on a Switchboard queue.' }, { - "code": 6002, - "name": "IncorrectProgramOwnerError", - "msg": "An account required to be owned by the program has a different owner." + code: 6002 + name: 'IncorrectProgramOwnerError' + msg: 'An account required to be owned by the program has a different owner.' }, { - "code": 6003, - "name": "InvalidAggregatorRound", - "msg": "Aggregator is not currently populated with a valid round." + code: 6003 + name: 'InvalidAggregatorRound' + msg: 'Aggregator is not currently populated with a valid round.' }, { - "code": 6004, - "name": "TooManyAggregatorJobs", - "msg": "Aggregator cannot fit any more jobs." + code: 6004 + name: 'TooManyAggregatorJobs' + msg: 'Aggregator cannot fit any more jobs.' }, { - "code": 6005, - "name": "AggregatorCurrentRoundClosed", - "msg": "Aggregator's current round is closed. No results are being accepted." + code: 6005 + name: 'AggregatorCurrentRoundClosed' + msg: "Aggregator's current round is closed. No results are being accepted." }, { - "code": 6006, - "name": "AggregatorInvalidSaveResult", - "msg": "Aggregator received an invalid save result instruction." + code: 6006 + name: 'AggregatorInvalidSaveResult' + msg: 'Aggregator received an invalid save result instruction.' }, { - "code": 6007, - "name": "InvalidStrDecimalConversion", - "msg": "Failed to convert string to decimal format." + code: 6007 + name: 'InvalidStrDecimalConversion' + msg: 'Failed to convert string to decimal format.' }, { - "code": 6008, - "name": "AccountLoaderMissingSignature", - "msg": "AccountLoader account is missing a required signature." + code: 6008 + name: 'AccountLoaderMissingSignature' + msg: 'AccountLoader account is missing a required signature.' }, { - "code": 6009, - "name": "MissingRequiredSignature", - "msg": "Account is missing a required signature." + code: 6009 + name: 'MissingRequiredSignature' + msg: 'Account is missing a required signature.' }, { - "code": 6010, - "name": "ArrayOverflowError", - "msg": "The attempted action will overflow a zero-copy account array." + code: 6010 + name: 'ArrayOverflowError' + msg: 'The attempted action will overflow a zero-copy account array.' }, { - "code": 6011, - "name": "ArrayUnderflowError", - "msg": "The attempted action will underflow a zero-copy account array." + code: 6011 + name: 'ArrayUnderflowError' + msg: 'The attempted action will underflow a zero-copy account array.' }, { - "code": 6012, - "name": "PubkeyNotFoundError", - "msg": "The queried public key was not found." + code: 6012 + name: 'PubkeyNotFoundError' + msg: 'The queried public key was not found.' }, { - "code": 6013, - "name": "AggregatorIllegalRoundOpenCall", - "msg": "Aggregator round open called too early." + code: 6013 + name: 'AggregatorIllegalRoundOpenCall' + msg: 'Aggregator round open called too early.' }, { - "code": 6014, - "name": "AggregatorIllegalRoundCloseCall", - "msg": "Aggregator round close called too early." + code: 6014 + name: 'AggregatorIllegalRoundCloseCall' + msg: 'Aggregator round close called too early.' }, { - "code": 6015, - "name": "AggregatorClosedError", - "msg": "Aggregator is closed. Illegal action." + code: 6015 + name: 'AggregatorClosedError' + msg: 'Aggregator is closed. Illegal action.' }, { - "code": 6016, - "name": "IllegalOracleIdxError", - "msg": "Illegal oracle index." + code: 6016 + name: 'IllegalOracleIdxError' + msg: 'Illegal oracle index.' }, { - "code": 6017, - "name": "OracleAlreadyRespondedError", - "msg": "The provided oracle has already responded this round." + code: 6017 + name: 'OracleAlreadyRespondedError' + msg: 'The provided oracle has already responded this round.' }, { - "code": 6018, - "name": "ProtoDeserializeError", - "msg": "Failed to deserialize protocol buffer." + code: 6018 + name: 'ProtoDeserializeError' + msg: 'Failed to deserialize protocol buffer.' }, { - "code": 6019, - "name": "UnauthorizedStateUpdateError", - "msg": "Unauthorized program state modification attempted." + code: 6019 + name: 'UnauthorizedStateUpdateError' + msg: 'Unauthorized program state modification attempted.' }, { - "code": 6020, - "name": "MissingOracleAccountsError", - "msg": "Not enough oracle accounts provided to closeRounds." + code: 6020 + name: 'MissingOracleAccountsError' + msg: 'Not enough oracle accounts provided to closeRounds.' }, { - "code": 6021, - "name": "OracleMismatchError", - "msg": "An unexpected oracle account was provided for the transaction." + code: 6021 + name: 'OracleMismatchError' + msg: 'An unexpected oracle account was provided for the transaction.' }, { - "code": 6022, - "name": "CrankMaxCapacityError", - "msg": "Attempted to push to a Crank that's at capacity" + code: 6022 + name: 'CrankMaxCapacityError' + msg: "Attempted to push to a Crank that's at capacity" }, { - "code": 6023, - "name": "AggregatorLeaseInsufficientFunds", - "msg": "Aggregator update call attempted but attached lease has insufficient funds." + code: 6023 + name: 'AggregatorLeaseInsufficientFunds' + msg: 'Aggregator update call attempted but attached lease has insufficient funds.' }, { - "code": 6024, - "name": "IncorrectTokenAccountMint", - "msg": "The provided token account does not point to the Switchboard token mint." + code: 6024 + name: 'IncorrectTokenAccountMint' + msg: 'The provided token account does not point to the Switchboard token mint.' }, { - "code": 6025, - "name": "InvalidEscrowAccount", - "msg": "An invalid escrow account was provided." + code: 6025 + name: 'InvalidEscrowAccount' + msg: 'An invalid escrow account was provided.' }, { - "code": 6026, - "name": "CrankEmptyError", - "msg": "Crank empty. Pop failed." + code: 6026 + name: 'CrankEmptyError' + msg: 'Crank empty. Pop failed.' }, { - "code": 6027, - "name": "PdaDeriveError", - "msg": "Failed to derive a PDA from the provided seed." + code: 6027 + name: 'PdaDeriveError' + msg: 'Failed to derive a PDA from the provided seed.' }, { - "code": 6028, - "name": "AggregatorAccountNotFound", - "msg": "Aggregator account missing from provided account list." + code: 6028 + name: 'AggregatorAccountNotFound' + msg: 'Aggregator account missing from provided account list.' }, { - "code": 6029, - "name": "PermissionAccountNotFound", - "msg": "Permission account missing from provided account list." + code: 6029 + name: 'PermissionAccountNotFound' + msg: 'Permission account missing from provided account list.' }, { - "code": 6030, - "name": "LeaseAccountDeriveFailure", - "msg": "Failed to derive a lease account." + code: 6030 + name: 'LeaseAccountDeriveFailure' + msg: 'Failed to derive a lease account.' }, { - "code": 6031, - "name": "PermissionAccountDeriveFailure", - "msg": "Failed to derive a permission account." + code: 6031 + name: 'PermissionAccountDeriveFailure' + msg: 'Failed to derive a permission account.' }, { - "code": 6032, - "name": "EscrowAccountNotFound", - "msg": "Escrow account missing from provided account list." + code: 6032 + name: 'EscrowAccountNotFound' + msg: 'Escrow account missing from provided account list.' }, { - "code": 6033, - "name": "LeaseAccountNotFound", - "msg": "Lease account missing from provided account list." + code: 6033 + name: 'LeaseAccountNotFound' + msg: 'Lease account missing from provided account list.' }, { - "code": 6034, - "name": "DecimalConversionError", - "msg": "Decimal conversion method failed." + code: 6034 + name: 'DecimalConversionError' + msg: 'Decimal conversion method failed.' }, { - "code": 6035, - "name": "PermissionDenied", - "msg": "Permission account is missing required flags for the given action." + code: 6035 + name: 'PermissionDenied' + msg: 'Permission account is missing required flags for the given action.' }, { - "code": 6036, - "name": "QueueAtCapacity", - "msg": "Oracle queue is at lease capacity." + code: 6036 + name: 'QueueAtCapacity' + msg: 'Oracle queue is at lease capacity.' }, { - "code": 6037, - "name": "ExcessiveCrankRowsError", - "msg": "Data feed is already pushed on a crank." + code: 6037 + name: 'ExcessiveCrankRowsError' + msg: 'Data feed is already pushed on a crank.' }, { - "code": 6038, - "name": "AggregatorLockedError", - "msg": "Aggregator is locked, no setting modifications or job additions allowed." + code: 6038 + name: 'AggregatorLockedError' + msg: 'Aggregator is locked, no setting modifications or job additions allowed.' }, { - "code": 6039, - "name": "AggregatorInvalidBatchSizeError", - "msg": "Aggregator invalid batch size." + code: 6039 + name: 'AggregatorInvalidBatchSizeError' + msg: 'Aggregator invalid batch size.' }, { - "code": 6040, - "name": "AggregatorJobChecksumMismatch", - "msg": "Oracle provided an incorrect aggregator job checksum." + code: 6040 + name: 'AggregatorJobChecksumMismatch' + msg: 'Oracle provided an incorrect aggregator job checksum.' }, { - "code": 6041, - "name": "IntegerOverflowError", - "msg": "An integer overflow occurred." + code: 6041 + name: 'IntegerOverflowError' + msg: 'An integer overflow occurred.' }, { - "code": 6042, - "name": "InvalidUpdatePeriodError", - "msg": "Minimum update period is 5 seconds." + code: 6042 + name: 'InvalidUpdatePeriodError' + msg: 'Minimum update period is 5 seconds.' }, { - "code": 6043, - "name": "NoResultsError", - "msg": "Aggregator round evaluation attempted with no results." + code: 6043 + name: 'NoResultsError' + msg: 'Aggregator round evaluation attempted with no results.' }, { - "code": 6044, - "name": "InvalidExpirationError", - "msg": "An expiration constraint was broken." + code: 6044 + name: 'InvalidExpirationError' + msg: 'An expiration constraint was broken.' }, { - "code": 6045, - "name": "InsufficientStakeError", - "msg": "An account provided insufficient stake for action." + code: 6045 + name: 'InsufficientStakeError' + msg: 'An account provided insufficient stake for action.' }, { - "code": 6046, - "name": "LeaseInactiveError", - "msg": "The provided lease account is not active." + code: 6046 + name: 'LeaseInactiveError' + msg: 'The provided lease account is not active.' }, { - "code": 6047, - "name": "NoAggregatorJobsFound", - "msg": "No jobs are currently included in the aggregator." + code: 6047 + name: 'NoAggregatorJobsFound' + msg: 'No jobs are currently included in the aggregator.' }, { - "code": 6048, - "name": "IntegerUnderflowError", - "msg": "An integer underflow occurred." + code: 6048 + name: 'IntegerUnderflowError' + msg: 'An integer underflow occurred.' }, { - "code": 6049, - "name": "OracleQueueMismatch", - "msg": "An invalid oracle queue account was provided." + code: 6049 + name: 'OracleQueueMismatch' + msg: 'An invalid oracle queue account was provided.' }, { - "code": 6050, - "name": "OracleWalletMismatchError", - "msg": "An unexpected oracle wallet account was provided for the transaction." + code: 6050 + name: 'OracleWalletMismatchError' + msg: 'An unexpected oracle wallet account was provided for the transaction.' }, { - "code": 6051, - "name": "InvalidBufferAccountError", - "msg": "An invalid buffer account was provided." + code: 6051 + name: 'InvalidBufferAccountError' + msg: 'An invalid buffer account was provided.' }, { - "code": 6052, - "name": "InsufficientOracleQueueError", - "msg": "Insufficient oracle queue size." + code: 6052 + name: 'InsufficientOracleQueueError' + msg: 'Insufficient oracle queue size.' }, { - "code": 6053, - "name": "InvalidAuthorityError", - "msg": "Invalid authority account provided." + code: 6053 + name: 'InvalidAuthorityError' + msg: 'Invalid authority account provided.' }, { - "code": 6054, - "name": "InvalidTokenAccountMintError", - "msg": "A provided token wallet is associated with an incorrect mint." + code: 6054 + name: 'InvalidTokenAccountMintError' + msg: 'A provided token wallet is associated with an incorrect mint.' }, { - "code": 6055, - "name": "ExcessiveLeaseWithdrawlError", - "msg": "You must leave enough funds to perform at least 1 update in the lease." + code: 6055 + name: 'ExcessiveLeaseWithdrawlError' + msg: 'You must leave enough funds to perform at least 1 update in the lease.' }, { - "code": 6056, - "name": "InvalideHistoryAccountError", - "msg": "Invalid history account provided." + code: 6056 + name: 'InvalideHistoryAccountError' + msg: 'Invalid history account provided.' }, { - "code": 6057, - "name": "InvalidLeaseAccountEscrowError", - "msg": "Invalid lease account escrow." + code: 6057 + name: 'InvalidLeaseAccountEscrowError' + msg: 'Invalid lease account escrow.' }, { - "code": 6058, - "name": "InvalidCrankAccountError", - "msg": "Invalid crank provided." + code: 6058 + name: 'InvalidCrankAccountError' + msg: 'Invalid crank provided.' }, { - "code": 6059, - "name": "CrankNoElementsReadyError", - "msg": "No elements ready to be popped." + code: 6059 + name: 'CrankNoElementsReadyError' + msg: 'No elements ready to be popped.' }, { - "code": 6060, - "name": "IndexOutOfBoundsError", - "msg": "Index out of bounds" + code: 6060 + name: 'IndexOutOfBoundsError' + msg: 'Index out of bounds' }, { - "code": 6061, - "name": "VrfInvalidRequestError", - "msg": "Invalid vrf request params" + code: 6061 + name: 'VrfInvalidRequestError' + msg: 'Invalid vrf request params' }, { - "code": 6062, - "name": "VrfInvalidProofSubmissionError", - "msg": "Vrf proof failed to verify" + code: 6062 + name: 'VrfInvalidProofSubmissionError' + msg: 'Vrf proof failed to verify' }, { - "code": 6063, - "name": "VrfVerifyError", - "msg": "Error in verifying vrf proof." + code: 6063 + name: 'VrfVerifyError' + msg: 'Error in verifying vrf proof.' }, { - "code": 6064, - "name": "VrfCallbackError", - "msg": "Vrf callback function failed." + code: 6064 + name: 'VrfCallbackError' + msg: 'Vrf callback function failed.' }, { - "code": 6065, - "name": "VrfCallbackParamsError", - "msg": "Invalid vrf callback params provided." + code: 6065 + name: 'VrfCallbackParamsError' + msg: 'Invalid vrf callback params provided.' }, { - "code": 6066, - "name": "VrfCallbackAlreadyCalledError", - "msg": "Vrf callback has already been triggered." + code: 6066 + name: 'VrfCallbackAlreadyCalledError' + msg: 'Vrf callback has already been triggered.' }, { - "code": 6067, - "name": "VrfInvalidPubkeyError", - "msg": "The provided pubkey is invalid to use in ecvrf proofs" + code: 6067 + name: 'VrfInvalidPubkeyError' + msg: 'The provided pubkey is invalid to use in ecvrf proofs' }, { - "code": 6068, - "name": "VrfTooManyVerifyCallsError", - "msg": "Number of required verify calls exceeded" + code: 6068 + name: 'VrfTooManyVerifyCallsError' + msg: 'Number of required verify calls exceeded' }, { - "code": 6069, - "name": "VrfRequestAlreadyLaunchedError", - "msg": "Vrf request is already pending" + code: 6069 + name: 'VrfRequestAlreadyLaunchedError' + msg: 'Vrf request is already pending' }, { - "code": 6070, - "name": "VrfInsufficientVerificationError", - "msg": "Insufficient amount of proofs collected for VRF callback" + code: 6070 + name: 'VrfInsufficientVerificationError' + msg: 'Insufficient amount of proofs collected for VRF callback' }, { - "code": 6071, - "name": "InvalidVrfProducerError", - "msg": "An incorrect oracle attempted to submit a proof" + code: 6071 + name: 'InvalidVrfProducerError' + msg: 'An incorrect oracle attempted to submit a proof' }, { - "code": 6072, - "name": "InvalidGovernancePidError", - "msg": "Invalid SPLGovernance Account Supplied" + code: 6072 + name: 'InvalidGovernancePidError' + msg: 'Invalid SPLGovernance Account Supplied' }, { - "code": 6073, - "name": "InvalidGovernanceAccountError", - "msg": "An Invalid Governance Account was supplied" + code: 6073 + name: 'InvalidGovernanceAccountError' + msg: 'An Invalid Governance Account was supplied' }, { - "code": 6074, - "name": "MissingOptionalAccount", - "msg": "Expected an optional account" + code: 6074 + name: 'MissingOptionalAccount' + msg: 'Expected an optional account' }, { - "code": 6075, - "name": "InvalidSpawnRecordOwner", - "msg": "Invalid Owner for Spawn Record" + code: 6075 + name: 'InvalidSpawnRecordOwner' + msg: 'Invalid Owner for Spawn Record' }, { - "code": 6076, - "name": "NoopError", - "msg": "Noop error" + code: 6076 + name: 'NoopError' + msg: 'Noop error' }, { - "code": 6077, - "name": "MissingRequiredAccountsError", - "msg": "A required instruction account was not included" + code: 6077 + name: 'MissingRequiredAccountsError' + msg: 'A required instruction account was not included' }, { - "code": 6078, - "name": "InvalidMintError", - "msg": "Invalid mint account passed for instruction" + code: 6078 + name: 'InvalidMintError' + msg: 'Invalid mint account passed for instruction' }, { - "code": 6079, - "name": "InvalidTokenAccountKeyError", - "msg": "An invalid token account was passed into the instruction" + code: 6079 + name: 'InvalidTokenAccountKeyError' + msg: 'An invalid token account was passed into the instruction' }, { - "code": 6080, - "name": "InvalidJobAccountError", - "msg": "" + code: 6080 + name: 'InvalidJobAccountError' + msg: '' } ] } export const IDL: Switchboard = { - "version": "0.1.0", - "name": "switchboard_v2", - "instructions": [ + version: '0.1.0', + name: 'switchboard_v2', + instructions: [ { - "name": "aggregatorAddJob", - "accounts": [ + name: 'aggregatorAddJob', + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority', + isMut: false, + isSigner: true, }, { - "name": "job", - "isMut": true, - "isSigner": false - } + name: 'job', + isMut: true, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "AggregatorAddJobParams" - } - } - ] + name: 'params', + type: { + defined: 'AggregatorAddJobParams', + }, + }, + ], }, { - "name": "aggregatorInit", - "accounts": [ + name: 'aggregatorInit', + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": false + name: 'authority', + isMut: false, + isSigner: false, }, { - "name": "queue", - "isMut": false, - "isSigner": false + name: 'queue', + isMut: false, + isSigner: false, }, { - "name": "programState", - "isMut": false, - "isSigner": false - } + name: 'programState', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "AggregatorInitParams" - } - } - ] + name: 'params', + type: { + defined: 'AggregatorInitParams', + }, + }, + ], }, { - "name": "aggregatorLock", - "accounts": [ + name: 'aggregatorLock', + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": true, - "isSigner": true - } + name: 'authority', + isMut: true, + isSigner: true, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "AggregatorLockParams" - } - } - ] + name: 'params', + type: { + defined: 'AggregatorLockParams', + }, + }, + ], }, { - "name": "aggregatorOpenRound", - "accounts": [ + name: 'aggregatorOpenRound', + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator', + isMut: true, + isSigner: false, }, { - "name": "lease", - "isMut": true, - "isSigner": false + name: 'lease', + isMut: true, + isSigner: false, }, { - "name": "oracleQueue", - "isMut": true, - "isSigner": false + name: 'oracleQueue', + isMut: true, + isSigner: false, }, { - "name": "queueAuthority", - "isMut": false, - "isSigner": false + name: 'queueAuthority', + isMut: false, + isSigner: false, }, { - "name": "permission", - "isMut": true, - "isSigner": false + name: 'permission', + isMut: true, + isSigner: false, }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow', + isMut: true, + isSigner: false, }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState', + isMut: false, + isSigner: false, }, { - "name": "payoutWallet", - "isMut": true, - "isSigner": false + name: 'payoutWallet', + isMut: true, + isSigner: false, }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram', + isMut: false, + isSigner: false, }, { - "name": "dataBuffer", - "isMut": false, - "isSigner": false + name: 'dataBuffer', + isMut: false, + isSigner: false, }, { - "name": "mint", - "isMut": false, - "isSigner": false - } + name: 'mint', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "AggregatorOpenRoundParams" - } - } - ] + name: 'params', + type: { + defined: 'AggregatorOpenRoundParams', + }, + }, + ], }, { - "name": "aggregatorRemoveJob", - "accounts": [ + name: 'aggregatorRemoveJob', + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority', + isMut: false, + isSigner: true, }, { - "name": "job", - "isMut": true, - "isSigner": false - } + name: 'job', + isMut: true, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "AggregatorRemoveJobParams" - } - } - ] + name: 'params', + type: { + defined: 'AggregatorRemoveJobParams', + }, + }, + ], }, { - "name": "aggregatorSaveResult", - "accounts": [ + name: 'aggregatorSaveResult', + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator', + isMut: true, + isSigner: false, }, { - "name": "oracle", - "isMut": true, - "isSigner": false + name: 'oracle', + isMut: true, + isSigner: false, }, { - "name": "oracleAuthority", - "isMut": false, - "isSigner": true + name: 'oracleAuthority', + isMut: false, + isSigner: true, }, { - "name": "oracleQueue", - "isMut": false, - "isSigner": false + name: 'oracleQueue', + isMut: false, + isSigner: false, }, { - "name": "queueAuthority", - "isMut": false, - "isSigner": false + name: 'queueAuthority', + isMut: false, + isSigner: false, }, { - "name": "feedPermission", - "isMut": true, - "isSigner": false + name: 'feedPermission', + isMut: true, + isSigner: false, }, { - "name": "oraclePermission", - "isMut": false, - "isSigner": false + name: 'oraclePermission', + isMut: false, + isSigner: false, }, { - "name": "lease", - "isMut": true, - "isSigner": false + name: 'lease', + isMut: true, + isSigner: false, }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow', + isMut: true, + isSigner: false, }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram', + isMut: false, + isSigner: false, }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState', + isMut: false, + isSigner: false, }, { - "name": "historyBuffer", - "isMut": true, - "isSigner": false + name: 'historyBuffer', + isMut: true, + isSigner: false, }, { - "name": "mint", - "isMut": false, - "isSigner": false - } + name: 'mint', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSaveResultParams" - } - } - ] + name: 'params', + type: { + defined: 'AggregatorSaveResultParams', + }, + }, + ], }, { - "name": "aggregatorSetAuthority", - "accounts": [ + name: 'aggregatorSetAuthority', + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority', + isMut: false, + isSigner: true, }, { - "name": "newAuthority", - "isMut": false, - "isSigner": false - } + name: 'newAuthority', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSetAuthorityParams" - } - } - ] + name: 'params', + type: { + defined: 'AggregatorSetAuthorityParams', + }, + }, + ], }, { - "name": "aggregatorSetBatchSize", - "accounts": [ + name: 'aggregatorSetBatchSize', + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": true - } + name: 'authority', + isMut: false, + isSigner: true, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSetBatchSizeParams" - } - } - ] + name: 'params', + type: { + defined: 'AggregatorSetBatchSizeParams', + }, + }, + ], }, { - "name": "aggregatorSetHistoryBuffer", - "accounts": [ + name: 'aggregatorSetHistoryBuffer', + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority', + isMut: false, + isSigner: true, }, { - "name": "buffer", - "isMut": true, - "isSigner": false - } + name: 'buffer', + isMut: true, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSetHistoryBufferParams" - } - } - ] + name: 'params', + type: { + defined: 'AggregatorSetHistoryBufferParams', + }, + }, + ], }, { - "name": "aggregatorSetMinJobs", - "accounts": [ + name: 'aggregatorSetMinJobs', + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": true - } + name: 'authority', + isMut: false, + isSigner: true, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSetMinJobsParams" - } - } - ] + name: 'params', + type: { + defined: 'AggregatorSetMinJobsParams', + }, + }, + ], }, { - "name": "aggregatorSetMinOracles", - "accounts": [ + name: 'aggregatorSetMinOracles', + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": true - } + name: 'authority', + isMut: false, + isSigner: true, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSetMinOraclesParams" - } - } - ] + name: 'params', + type: { + defined: 'AggregatorSetMinOraclesParams', + }, + }, + ], }, { - "name": "aggregatorSetQueue", - "accounts": [ + name: 'aggregatorSetQueue', + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority', + isMut: false, + isSigner: true, }, { - "name": "queue", - "isMut": false, - "isSigner": false - } + name: 'queue', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSetQueueParams" - } - } - ] + name: 'params', + type: { + defined: 'AggregatorSetQueueParams', + }, + }, + ], }, { - "name": "aggregatorSetUpdateInterval", - "accounts": [ + name: 'aggregatorSetUpdateInterval', + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": true - } + name: 'authority', + isMut: false, + isSigner: true, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSetUpdateIntervalParams" - } - } - ] + name: 'params', + type: { + defined: 'AggregatorSetUpdateIntervalParams', + }, + }, + ], }, { - "name": "aggregatorSetVarianceThreshold", - "accounts": [ + name: 'aggregatorSetVarianceThreshold', + accounts: [ { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": true - } + name: 'authority', + isMut: false, + isSigner: true, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "AggregatorSetVarianceThresholdParams" - } - } - ] + name: 'params', + type: { + defined: 'AggregatorSetVarianceThresholdParams', + }, + }, + ], }, { - "name": "crankInit", - "accounts": [ + name: 'crankInit', + accounts: [ { - "name": "crank", - "isMut": true, - "isSigner": true + name: 'crank', + isMut: true, + isSigner: true, }, { - "name": "queue", - "isMut": false, - "isSigner": false + name: 'queue', + isMut: false, + isSigner: false, }, { - "name": "buffer", - "isMut": true, - "isSigner": false + name: 'buffer', + isMut: true, + isSigner: false, }, { - "name": "payer", - "isMut": true, - "isSigner": false + name: 'payer', + isMut: true, + isSigner: false, }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } + name: 'systemProgram', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "CrankInitParams" - } - } - ] + name: 'params', + type: { + defined: 'CrankInitParams', + }, + }, + ], }, { - "name": "crankPop", - "accounts": [ + name: 'crankPop', + accounts: [ { - "name": "crank", - "isMut": true, - "isSigner": false + name: 'crank', + isMut: true, + isSigner: false, }, { - "name": "oracleQueue", - "isMut": true, - "isSigner": false + name: 'oracleQueue', + isMut: true, + isSigner: false, }, { - "name": "queueAuthority", - "isMut": false, - "isSigner": false + name: 'queueAuthority', + isMut: false, + isSigner: false, }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState', + isMut: false, + isSigner: false, }, { - "name": "payoutWallet", - "isMut": true, - "isSigner": false + name: 'payoutWallet', + isMut: true, + isSigner: false, }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram', + isMut: false, + isSigner: false, }, { - "name": "crankDataBuffer", - "isMut": true, - "isSigner": false + name: 'crankDataBuffer', + isMut: true, + isSigner: false, }, { - "name": "queueDataBuffer", - "isMut": false, - "isSigner": false + name: 'queueDataBuffer', + isMut: false, + isSigner: false, }, { - "name": "mint", - "isMut": false, - "isSigner": false - } + name: 'mint', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "CrankPopParams" - } - } - ] + name: 'params', + type: { + defined: 'CrankPopParams', + }, + }, + ], }, { - "name": "crankPush", - "accounts": [ + name: 'crankPush', + accounts: [ { - "name": "crank", - "isMut": true, - "isSigner": false + name: 'crank', + isMut: true, + isSigner: false, }, { - "name": "aggregator", - "isMut": true, - "isSigner": false + name: 'aggregator', + isMut: true, + isSigner: false, }, { - "name": "oracleQueue", - "isMut": true, - "isSigner": false + name: 'oracleQueue', + isMut: true, + isSigner: false, }, { - "name": "queueAuthority", - "isMut": false, - "isSigner": false + name: 'queueAuthority', + isMut: false, + isSigner: false, }, { - "name": "permission", - "isMut": false, - "isSigner": false + name: 'permission', + isMut: false, + isSigner: false, }, { - "name": "lease", - "isMut": true, - "isSigner": false + name: 'lease', + isMut: true, + isSigner: false, }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow', + isMut: true, + isSigner: false, }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState', + isMut: false, + isSigner: false, }, { - "name": "dataBuffer", - "isMut": true, - "isSigner": false - } + name: 'dataBuffer', + isMut: true, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "CrankPushParams" - } - } - ] + name: 'params', + type: { + defined: 'CrankPushParams', + }, + }, + ], }, { - "name": "jobInit", - "accounts": [ + name: 'jobInit', + accounts: [ { - "name": "job", - "isMut": true, - "isSigner": false + name: 'job', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": false + name: 'authority', + isMut: false, + isSigner: false, }, { - "name": "programState", - "isMut": false, - "isSigner": false - } + name: 'programState', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "JobInitParams" - } - } - ] + name: 'params', + type: { + defined: 'JobInitParams', + }, + }, + ], }, { - "name": "leaseExtend", - "accounts": [ + name: 'leaseExtend', + accounts: [ { - "name": "lease", - "isMut": true, - "isSigner": false + name: 'lease', + isMut: true, + isSigner: false, }, { - "name": "aggregator", - "isMut": false, - "isSigner": false + name: 'aggregator', + isMut: false, + isSigner: false, }, { - "name": "queue", - "isMut": false, - "isSigner": false + name: 'queue', + isMut: false, + isSigner: false, }, { - "name": "funder", - "isMut": true, - "isSigner": false + name: 'funder', + isMut: true, + isSigner: false, }, { - "name": "owner", - "isMut": true, - "isSigner": true + name: 'owner', + isMut: true, + isSigner: true, }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow', + isMut: true, + isSigner: false, }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram', + isMut: false, + isSigner: false, }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState', + isMut: false, + isSigner: false, }, { - "name": "mint", - "isMut": false, - "isSigner": false - } + name: 'mint', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "LeaseExtendParams" - } - } - ] + name: 'params', + type: { + defined: 'LeaseExtendParams', + }, + }, + ], }, { - "name": "leaseInit", - "accounts": [ + name: 'leaseInit', + accounts: [ { - "name": "lease", - "isMut": true, - "isSigner": false + name: 'lease', + isMut: true, + isSigner: false, }, { - "name": "queue", - "isMut": true, - "isSigner": false + name: 'queue', + isMut: true, + isSigner: false, }, { - "name": "aggregator", - "isMut": false, - "isSigner": false + name: 'aggregator', + isMut: false, + isSigner: false, }, { - "name": "funder", - "isMut": true, - "isSigner": false + name: 'funder', + isMut: true, + isSigner: false, }, { - "name": "payer", - "isMut": true, - "isSigner": true + name: 'payer', + isMut: true, + isSigner: true, }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false + name: 'systemProgram', + isMut: false, + isSigner: false, }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram', + isMut: false, + isSigner: false, }, { - "name": "owner", - "isMut": true, - "isSigner": true + name: 'owner', + isMut: true, + isSigner: true, }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow', + isMut: true, + isSigner: false, }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState', + isMut: false, + isSigner: false, }, { - "name": "mint", - "isMut": false, - "isSigner": false - } + name: 'mint', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "LeaseInitParams" - } - } - ] + name: 'params', + type: { + defined: 'LeaseInitParams', + }, + }, + ], }, { - "name": "leaseSetAuthority", - "accounts": [ + name: 'leaseSetAuthority', + accounts: [ { - "name": "lease", - "isMut": true, - "isSigner": false + name: 'lease', + isMut: true, + isSigner: false, }, { - "name": "withdrawAuthority", - "isMut": false, - "isSigner": true + name: 'withdrawAuthority', + isMut: false, + isSigner: true, }, { - "name": "newAuthority", - "isMut": false, - "isSigner": false - } + name: 'newAuthority', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "LeaseSetAuthorityParams" - } - } - ] + name: 'params', + type: { + defined: 'LeaseSetAuthorityParams', + }, + }, + ], }, { - "name": "leaseWithdraw", - "accounts": [ + name: 'leaseWithdraw', + accounts: [ { - "name": "lease", - "isMut": true, - "isSigner": false + name: 'lease', + isMut: true, + isSigner: false, }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow', + isMut: true, + isSigner: false, }, { - "name": "aggregator", - "isMut": false, - "isSigner": false + name: 'aggregator', + isMut: false, + isSigner: false, }, { - "name": "queue", - "isMut": false, - "isSigner": false + name: 'queue', + isMut: false, + isSigner: false, }, { - "name": "withdrawAuthority", - "isMut": false, - "isSigner": true + name: 'withdrawAuthority', + isMut: false, + isSigner: true, }, { - "name": "withdrawAccount", - "isMut": true, - "isSigner": false + name: 'withdrawAccount', + isMut: true, + isSigner: false, }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram', + isMut: false, + isSigner: false, }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState', + isMut: false, + isSigner: false, }, { - "name": "mint", - "isMut": false, - "isSigner": false - } + name: 'mint', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "LeaseWithdrawParams" - } - } - ] + name: 'params', + type: { + defined: 'LeaseWithdrawParams', + }, + }, + ], }, { - "name": "oracleHeartbeat", - "accounts": [ + name: 'oracleHeartbeat', + accounts: [ { - "name": "oracle", - "isMut": true, - "isSigner": false + name: 'oracle', + isMut: true, + isSigner: false, }, { - "name": "oracleAuthority", - "isMut": false, - "isSigner": true + name: 'oracleAuthority', + isMut: false, + isSigner: true, }, { - "name": "tokenAccount", - "isMut": false, - "isSigner": false + name: 'tokenAccount', + isMut: false, + isSigner: false, }, { - "name": "gcOracle", - "isMut": true, - "isSigner": false + name: 'gcOracle', + isMut: true, + isSigner: false, }, { - "name": "oracleQueue", - "isMut": true, - "isSigner": false + name: 'oracleQueue', + isMut: true, + isSigner: false, }, { - "name": "permission", - "isMut": false, - "isSigner": false + name: 'permission', + isMut: false, + isSigner: false, }, { - "name": "dataBuffer", - "isMut": true, - "isSigner": false - } + name: 'dataBuffer', + isMut: true, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "OracleHeartbeatParams" - } - } - ] + name: 'params', + type: { + defined: 'OracleHeartbeatParams', + }, + }, + ], }, { - "name": "oracleInit", - "accounts": [ + name: 'oracleInit', + accounts: [ { - "name": "oracle", - "isMut": true, - "isSigner": false + name: 'oracle', + isMut: true, + isSigner: false, }, { - "name": "oracleAuthority", - "isMut": false, - "isSigner": false + name: 'oracleAuthority', + isMut: false, + isSigner: false, }, { - "name": "wallet", - "isMut": false, - "isSigner": false + name: 'wallet', + isMut: false, + isSigner: false, }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState', + isMut: false, + isSigner: false, }, { - "name": "queue", - "isMut": false, - "isSigner": false + name: 'queue', + isMut: false, + isSigner: false, }, { - "name": "payer", - "isMut": true, - "isSigner": false + name: 'payer', + isMut: true, + isSigner: false, }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } + name: 'systemProgram', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "OracleInitParams" - } - } - ] + name: 'params', + type: { + defined: 'OracleInitParams', + }, + }, + ], }, { - "name": "oracleQueueInit", - "accounts": [ + name: 'oracleQueueInit', + accounts: [ { - "name": "oracleQueue", - "isMut": true, - "isSigner": true + name: 'oracleQueue', + isMut: true, + isSigner: true, }, { - "name": "authority", - "isMut": false, - "isSigner": false + name: 'authority', + isMut: false, + isSigner: false, }, { - "name": "buffer", - "isMut": true, - "isSigner": false + name: 'buffer', + isMut: true, + isSigner: false, }, { - "name": "payer", - "isMut": true, - "isSigner": false + name: 'payer', + isMut: true, + isSigner: false, }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false + name: 'systemProgram', + isMut: false, + isSigner: false, }, { - "name": "mint", - "isMut": false, - "isSigner": false - } + name: 'mint', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "OracleQueueInitParams" - } - } - ] + name: 'params', + type: { + defined: 'OracleQueueInitParams', + }, + }, + ], }, { - "name": "oracleQueueSetRewards", - "accounts": [ + name: 'oracleQueueSetRewards', + accounts: [ { - "name": "queue", - "isMut": true, - "isSigner": false + name: 'queue', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": true - } + name: 'authority', + isMut: false, + isSigner: true, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "OracleQueueSetRewardsParams" - } - } - ] + name: 'params', + type: { + defined: 'OracleQueueSetRewardsParams', + }, + }, + ], }, { - "name": "oracleQueueVrfConfig", - "accounts": [ + name: 'oracleQueueVrfConfig', + accounts: [ { - "name": "queue", - "isMut": true, - "isSigner": false + name: 'queue', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": true - } + name: 'authority', + isMut: false, + isSigner: true, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "OracleQueueVrfConfigParams" - } - } - ] + name: 'params', + type: { + defined: 'OracleQueueVrfConfigParams', + }, + }, + ], }, { - "name": "oracleWithdraw", - "accounts": [ + name: 'oracleWithdraw', + accounts: [ { - "name": "oracle", - "isMut": true, - "isSigner": false + name: 'oracle', + isMut: true, + isSigner: false, }, { - "name": "oracleAuthority", - "isMut": false, - "isSigner": true + name: 'oracleAuthority', + isMut: false, + isSigner: true, }, { - "name": "tokenAccount", - "isMut": true, - "isSigner": false + name: 'tokenAccount', + isMut: true, + isSigner: false, }, { - "name": "withdrawAccount", - "isMut": true, - "isSigner": false + name: 'withdrawAccount', + isMut: true, + isSigner: false, }, { - "name": "oracleQueue", - "isMut": true, - "isSigner": false + name: 'oracleQueue', + isMut: true, + isSigner: false, }, { - "name": "permission", - "isMut": true, - "isSigner": false + name: 'permission', + isMut: true, + isSigner: false, }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram', + isMut: false, + isSigner: false, }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState', + isMut: false, + isSigner: false, }, { - "name": "payer", - "isMut": true, - "isSigner": true + name: 'payer', + isMut: true, + isSigner: true, }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } + name: 'systemProgram', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "OracleWithdrawParams" - } - } - ] + name: 'params', + type: { + defined: 'OracleWithdrawParams', + }, + }, + ], }, { - "name": "permissionInit", - "accounts": [ + name: 'permissionInit', + accounts: [ { - "name": "permission", - "isMut": true, - "isSigner": false + name: 'permission', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": false + name: 'authority', + isMut: false, + isSigner: false, }, { - "name": "granter", - "isMut": false, - "isSigner": false + name: 'granter', + isMut: false, + isSigner: false, }, { - "name": "grantee", - "isMut": false, - "isSigner": false + name: 'grantee', + isMut: false, + isSigner: false, }, { - "name": "payer", - "isMut": true, - "isSigner": true + name: 'payer', + isMut: true, + isSigner: true, }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } + name: 'systemProgram', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "PermissionInitParams" - } - } - ] + name: 'params', + type: { + defined: 'PermissionInitParams', + }, + }, + ], }, { - "name": "permissionSet", - "accounts": [ + name: 'permissionSet', + accounts: [ { - "name": "permission", - "isMut": true, - "isSigner": false + name: 'permission', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": true - } + name: 'authority', + isMut: false, + isSigner: true, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "PermissionSetParams" - } - } - ] + name: 'params', + type: { + defined: 'PermissionSetParams', + }, + }, + ], }, { - "name": "permissionSetVoterWeight", - "accounts": [ + name: 'permissionSetVoterWeight', + accounts: [ { - "name": "permission", - "isMut": false, - "isSigner": false + name: 'permission', + isMut: false, + isSigner: false, }, { - "name": "permissionAuthority", - "isMut": false, - "isSigner": false + name: 'permissionAuthority', + isMut: false, + isSigner: false, }, { - "name": "oracle", - "isMut": false, - "isSigner": false + name: 'oracle', + isMut: false, + isSigner: false, }, { - "name": "oracleAuthority", - "isMut": false, - "isSigner": false + name: 'oracleAuthority', + isMut: false, + isSigner: false, }, { - "name": "payer", - "isMut": true, - "isSigner": true + name: 'payer', + isMut: true, + isSigner: true, }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false + name: 'systemProgram', + isMut: false, + isSigner: false, }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState', + isMut: false, + isSigner: false, }, { - "name": "govProgram", - "isMut": false, - "isSigner": false + name: 'govProgram', + isMut: false, + isSigner: false, }, { - "name": "daoMint", - "isMut": false, - "isSigner": false + name: 'daoMint', + isMut: false, + isSigner: false, }, { - "name": "spawnRecord", - "isMut": true, - "isSigner": false + name: 'spawnRecord', + isMut: true, + isSigner: false, }, { - "name": "voterWeight", - "isMut": true, - "isSigner": false + name: 'voterWeight', + isMut: true, + isSigner: false, }, { - "name": "tokenOwnerRecord", - "isMut": true, - "isSigner": false + name: 'tokenOwnerRecord', + isMut: true, + isSigner: false, }, { - "name": "realm", - "isMut": false, - "isSigner": false - } + name: 'realm', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "PermissionSetVoterWeightParams" - } - } - ] + name: 'params', + type: { + defined: 'PermissionSetVoterWeightParams', + }, + }, + ], }, { - "name": "programConfig", - "accounts": [ + name: 'programConfig', + accounts: [ { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority', + isMut: false, + isSigner: true, }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState', + isMut: false, + isSigner: false, }, { - "name": "daoMint", - "isMut": false, - "isSigner": false - } + name: 'daoMint', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "ProgramConfigParams" - } - } - ] + name: 'params', + type: { + defined: 'ProgramConfigParams', + }, + }, + ], }, { - "name": "programInit", - "accounts": [ + name: 'programInit', + accounts: [ { - "name": "state", - "isMut": true, - "isSigner": false + name: 'state', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": false + name: 'authority', + isMut: false, + isSigner: false, }, { - "name": "tokenMint", - "isMut": true, - "isSigner": false + name: 'tokenMint', + isMut: true, + isSigner: false, }, { - "name": "vault", - "isMut": true, - "isSigner": false + name: 'vault', + isMut: true, + isSigner: false, }, { - "name": "payer", - "isMut": true, - "isSigner": false + name: 'payer', + isMut: true, + isSigner: false, }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false + name: 'systemProgram', + isMut: false, + isSigner: false, }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram', + isMut: false, + isSigner: false, }, { - "name": "daoMint", - "isMut": false, - "isSigner": false - } + name: 'daoMint', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "ProgramInitParams" - } - } - ] + name: 'params', + type: { + defined: 'ProgramInitParams', + }, + }, + ], }, { - "name": "vaultTransfer", - "accounts": [ + name: 'vaultTransfer', + accounts: [ { - "name": "state", - "isMut": false, - "isSigner": false + name: 'state', + isMut: false, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority', + isMut: false, + isSigner: true, }, { - "name": "to", - "isMut": true, - "isSigner": false + name: 'to', + isMut: true, + isSigner: false, }, { - "name": "vault", - "isMut": true, - "isSigner": false + name: 'vault', + isMut: true, + isSigner: false, }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - } + name: 'tokenProgram', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "VaultTransferParams" - } - } - ] + name: 'params', + type: { + defined: 'VaultTransferParams', + }, + }, + ], }, { - "name": "vrfInit", - "accounts": [ + name: 'vrfInit', + accounts: [ { - "name": "vrf", - "isMut": true, - "isSigner": false + name: 'vrf', + isMut: true, + isSigner: false, }, { - "name": "authority", - "isMut": false, - "isSigner": false + name: 'authority', + isMut: false, + isSigner: false, }, { - "name": "oracleQueue", - "isMut": false, - "isSigner": false + name: 'oracleQueue', + isMut: false, + isSigner: false, }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow', + isMut: true, + isSigner: false, }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState', + isMut: false, + isSigner: false, }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - } + name: 'tokenProgram', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "VrfInitParams" - } - } - ] + name: 'params', + type: { + defined: 'VrfInitParams', + }, + }, + ], }, { - "name": "vrfProve", - "accounts": [ + name: 'vrfProve', + accounts: [ { - "name": "vrf", - "isMut": true, - "isSigner": false + name: 'vrf', + isMut: true, + isSigner: false, }, { - "name": "oracle", - "isMut": false, - "isSigner": false + name: 'oracle', + isMut: false, + isSigner: false, }, { - "name": "randomnessProducer", - "isMut": false, - "isSigner": true - } + name: 'randomnessProducer', + isMut: false, + isSigner: true, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "VrfProveParams" - } - } - ] + name: 'params', + type: { + defined: 'VrfProveParams', + }, + }, + ], }, { - "name": "vrfProveAndVerify", - "accounts": [ + name: 'vrfProveAndVerify', + accounts: [ { - "name": "vrf", - "isMut": true, - "isSigner": false + name: 'vrf', + isMut: true, + isSigner: false, }, { - "name": "callbackPid", - "isMut": false, - "isSigner": false + name: 'callbackPid', + isMut: false, + isSigner: false, }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram', + isMut: false, + isSigner: false, }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow', + isMut: true, + isSigner: false, }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState', + isMut: false, + isSigner: false, }, { - "name": "oracle", - "isMut": false, - "isSigner": false + name: 'oracle', + isMut: false, + isSigner: false, }, { - "name": "oracleAuthority", - "isMut": false, - "isSigner": true + name: 'oracleAuthority', + isMut: false, + isSigner: true, }, { - "name": "oracleWallet", - "isMut": true, - "isSigner": false + name: 'oracleWallet', + isMut: true, + isSigner: false, }, { - "name": "instructionsSysvar", - "isMut": false, - "isSigner": false - } + name: 'instructionsSysvar', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "VrfProveAndVerifyParams" - } - } - ] + name: 'params', + type: { + defined: 'VrfProveAndVerifyParams', + }, + }, + ], }, { - "name": "vrfRequestRandomness", - "accounts": [ + name: 'vrfRequestRandomness', + accounts: [ { - "name": "authority", - "isMut": false, - "isSigner": true + name: 'authority', + isMut: false, + isSigner: true, }, { - "name": "vrf", - "isMut": true, - "isSigner": false + name: 'vrf', + isMut: true, + isSigner: false, }, { - "name": "oracleQueue", - "isMut": true, - "isSigner": false + name: 'oracleQueue', + isMut: true, + isSigner: false, }, { - "name": "queueAuthority", - "isMut": false, - "isSigner": false + name: 'queueAuthority', + isMut: false, + isSigner: false, }, { - "name": "dataBuffer", - "isMut": false, - "isSigner": false + name: 'dataBuffer', + isMut: false, + isSigner: false, }, { - "name": "permission", - "isMut": true, - "isSigner": false + name: 'permission', + isMut: true, + isSigner: false, }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow', + isMut: true, + isSigner: false, }, { - "name": "payerWallet", - "isMut": true, - "isSigner": false + name: 'payerWallet', + isMut: true, + isSigner: false, }, { - "name": "payerAuthority", - "isMut": false, - "isSigner": true + name: 'payerAuthority', + isMut: false, + isSigner: true, }, { - "name": "recentBlockhashes", - "isMut": false, - "isSigner": false + name: 'recentBlockhashes', + isMut: false, + isSigner: false, }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState', + isMut: false, + isSigner: false, }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false - } + name: 'tokenProgram', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "VrfRequestRandomnessParams" - } - } - ] + name: 'params', + type: { + defined: 'VrfRequestRandomnessParams', + }, + }, + ], }, { - "name": "vrfVerify", - "accounts": [ + name: 'vrfVerify', + accounts: [ { - "name": "vrf", - "isMut": true, - "isSigner": false + name: 'vrf', + isMut: true, + isSigner: false, }, { - "name": "callbackPid", - "isMut": false, - "isSigner": false + name: 'callbackPid', + isMut: false, + isSigner: false, }, { - "name": "tokenProgram", - "isMut": false, - "isSigner": false + name: 'tokenProgram', + isMut: false, + isSigner: false, }, { - "name": "escrow", - "isMut": true, - "isSigner": false + name: 'escrow', + isMut: true, + isSigner: false, }, { - "name": "programState", - "isMut": false, - "isSigner": false + name: 'programState', + isMut: false, + isSigner: false, }, { - "name": "oracle", - "isMut": false, - "isSigner": false + name: 'oracle', + isMut: false, + isSigner: false, }, { - "name": "oracleAuthority", - "isMut": false, - "isSigner": false + name: 'oracleAuthority', + isMut: false, + isSigner: false, }, { - "name": "oracleWallet", - "isMut": true, - "isSigner": false + name: 'oracleWallet', + isMut: true, + isSigner: false, }, { - "name": "instructionsSysvar", - "isMut": false, - "isSigner": false - } + name: 'instructionsSysvar', + isMut: false, + isSigner: false, + }, ], - "args": [ + args: [ { - "name": "params", - "type": { - "defined": "VrfVerifyParams" - } - } - ] - } + name: 'params', + type: { + defined: 'VrfVerifyParams', + }, + }, + ], + }, ], - "accounts": [ + accounts: [ { - "name": "SbState", - "type": { - "kind": "struct", - "fields": [ + name: 'SbState', + type: { + kind: 'struct', + fields: [ { - "name": "authority", - "type": "publicKey" + name: 'authority', + type: 'publicKey', }, { - "name": "tokenMint", - "type": "publicKey" + name: 'tokenMint', + type: 'publicKey', }, { - "name": "tokenVault", - "type": "publicKey" + name: 'tokenVault', + type: 'publicKey', }, { - "name": "daoMint", - "type": "publicKey" + name: 'daoMint', + type: 'publicKey', }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 992 - ] - } - } - ] - } + name: 'ebuf', + type: { + array: ['u8', 992], + }, + }, + ], + }, }, { - "name": "AggregatorAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorAccountData', + type: { + kind: 'struct', + fields: [ { - "name": "name", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'name', + type: { + array: ['u8', 32], + }, }, { - "name": "metadata", - "type": { - "array": [ - "u8", - 128 - ] - } + name: 'metadata', + type: { + array: ['u8', 128], + }, }, { - "name": "reserved1", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'reserved1', + type: { + array: ['u8', 32], + }, }, { - "name": "queuePubkey", - "type": "publicKey" + name: 'queuePubkey', + type: 'publicKey', }, { - "name": "oracleRequestBatchSize", - "type": "u32" + name: 'oracleRequestBatchSize', + type: 'u32', }, { - "name": "minOracleResults", - "type": "u32" + name: 'minOracleResults', + type: 'u32', }, { - "name": "minJobResults", - "type": "u32" + name: 'minJobResults', + type: 'u32', }, { - "name": "minUpdateDelaySeconds", - "type": "u32" + name: 'minUpdateDelaySeconds', + type: 'u32', }, { - "name": "startAfter", - "type": "i64" + name: 'startAfter', + type: 'i64', }, { - "name": "varianceThreshold", - "type": { - "defined": "SwitchboardDecimal" - } + name: 'varianceThreshold', + type: { + defined: 'SwitchboardDecimal', + }, }, { - "name": "forceReportPeriod", - "type": "i64" + name: 'forceReportPeriod', + type: 'i64', }, { - "name": "expiration", - "type": "i64" + name: 'expiration', + type: 'i64', }, { - "name": "consecutiveFailureCount", - "type": "u64" + name: 'consecutiveFailureCount', + type: 'u64', }, { - "name": "nextAllowedUpdateTime", - "type": "i64" + name: 'nextAllowedUpdateTime', + type: 'i64', }, { - "name": "isLocked", - "type": "bool" + name: 'isLocked', + type: 'bool', }, { - "name": "crankPubkey", - "type": "publicKey" + name: 'crankPubkey', + type: 'publicKey', }, { - "name": "latestConfirmedRound", - "type": { - "defined": "AggregatorRound" - } + name: 'latestConfirmedRound', + type: { + defined: 'AggregatorRound', + }, }, { - "name": "currentRound", - "type": { - "defined": "AggregatorRound" - } + name: 'currentRound', + type: { + defined: 'AggregatorRound', + }, }, { - "name": "jobPubkeysData", - "type": { - "array": [ - "publicKey", - 16 - ] - } + name: 'jobPubkeysData', + type: { + array: ['publicKey', 16], + }, }, { - "name": "jobHashes", - "type": { - "array": [ + name: 'jobHashes', + type: { + array: [ { - "defined": "Hash" + defined: 'Hash', }, - 16 - ] - } + 16, + ], + }, }, { - "name": "jobPubkeysSize", - "type": "u32" + name: 'jobPubkeysSize', + type: 'u32', }, { - "name": "jobsChecksum", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'jobsChecksum', + type: { + array: ['u8', 32], + }, }, { - "name": "authority", - "type": "publicKey" + name: 'authority', + type: 'publicKey', }, { - "name": "historyBuffer", - "type": "publicKey" + name: 'historyBuffer', + type: 'publicKey', }, { - "name": "previousConfirmedRoundResult", - "type": { - "defined": "SwitchboardDecimal" - } + name: 'previousConfirmedRoundResult', + type: { + defined: 'SwitchboardDecimal', + }, }, { - "name": "previousConfirmedRoundSlot", - "type": "u64" + name: 'previousConfirmedRoundSlot', + type: 'u64', }, { - "name": "disableCrank", - "type": "bool" + name: 'disableCrank', + type: 'bool', }, { - "name": "jobWeights", - "type": { - "array": [ - "u8", - 16 - ] - } + name: 'jobWeights', + type: { + array: ['u8', 16], + }, }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 147 - ] - } - } - ] - } + name: 'ebuf', + type: { + array: ['u8', 147], + }, + }, + ], + }, }, { - "name": "PermissionAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'PermissionAccountData', + type: { + kind: 'struct', + fields: [ { - "name": "authority", - "type": "publicKey" + name: 'authority', + type: 'publicKey', }, { - "name": "permissions", - "type": "u32" + name: 'permissions', + type: 'u32', }, { - "name": "granter", - "type": "publicKey" + name: 'granter', + type: 'publicKey', }, { - "name": "grantee", - "type": "publicKey" + name: 'grantee', + type: 'publicKey', }, { - "name": "expiration", - "type": "i64" + name: 'expiration', + type: 'i64', }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 256 - ] - } - } - ] - } + name: 'ebuf', + type: { + array: ['u8', 256], + }, + }, + ], + }, }, { - "name": "RealmSpawnRecordAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'RealmSpawnRecordAccountData', + type: { + kind: 'struct', + fields: [ { - "name": "ebuf", - "type": { - "array": [ - "u8", - 256 - ] - } - } - ] - } + name: 'ebuf', + type: { + array: ['u8', 256], + }, + }, + ], + }, }, { - "name": "LeaseAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'LeaseAccountData', + type: { + kind: 'struct', + fields: [ { - "name": "escrow", - "type": "publicKey" + name: 'escrow', + type: 'publicKey', }, { - "name": "queue", - "type": "publicKey" + name: 'queue', + type: 'publicKey', }, { - "name": "aggregator", - "type": "publicKey" + name: 'aggregator', + type: 'publicKey', }, { - "name": "tokenProgram", - "type": "publicKey" + name: 'tokenProgram', + type: 'publicKey', }, { - "name": "isActive", - "type": "bool" + name: 'isActive', + type: 'bool', }, { - "name": "crankRowCount", - "type": "u32" + name: 'crankRowCount', + type: 'u32', }, { - "name": "createdAt", - "type": "i64" + name: 'createdAt', + type: 'i64', }, { - "name": "updateCount", - "type": "u128" + name: 'updateCount', + type: 'u128', }, { - "name": "withdrawAuthority", - "type": "publicKey" + name: 'withdrawAuthority', + type: 'publicKey', }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 256 - ] - } - } - ] - } + name: 'ebuf', + type: { + array: ['u8', 256], + }, + }, + ], + }, }, { - "name": "OracleQueueAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleQueueAccountData', + type: { + kind: 'struct', + fields: [ { - "name": "name", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'name', + type: { + array: ['u8', 32], + }, }, { - "name": "metadata", - "type": { - "array": [ - "u8", - 64 - ] - } + name: 'metadata', + type: { + array: ['u8', 64], + }, }, { - "name": "authority", - "type": "publicKey" + name: 'authority', + type: 'publicKey', }, { - "name": "oracleTimeout", - "type": "u32" + name: 'oracleTimeout', + type: 'u32', }, { - "name": "reward", - "type": "u64" + name: 'reward', + type: 'u64', }, { - "name": "minStake", - "type": "u64" + name: 'minStake', + type: 'u64', }, { - "name": "slashingEnabled", - "type": "bool" + name: 'slashingEnabled', + type: 'bool', }, { - "name": "varianceToleranceMultiplier", - "type": { - "defined": "SwitchboardDecimal" - } + name: 'varianceToleranceMultiplier', + type: { + defined: 'SwitchboardDecimal', + }, }, { - "name": "feedProbationPeriod", - "type": "u32" + name: 'feedProbationPeriod', + type: 'u32', }, { - "name": "currIdx", - "type": "u32" + name: 'currIdx', + type: 'u32', }, { - "name": "size", - "type": "u32" + name: 'size', + type: 'u32', }, { - "name": "gcIdx", - "type": "u32" + name: 'gcIdx', + type: 'u32', }, { - "name": "consecutiveFeedFailureLimit", - "type": "u64" + name: 'consecutiveFeedFailureLimit', + type: 'u64', }, { - "name": "consecutiveOracleFailureLimit", - "type": "u64" + name: 'consecutiveOracleFailureLimit', + type: 'u64', }, { - "name": "unpermissionedFeedsEnabled", - "type": "bool" + name: 'unpermissionedFeedsEnabled', + type: 'bool', }, { - "name": "unpermissionedVrfEnabled", - "type": "bool" + name: 'unpermissionedVrfEnabled', + type: 'bool', }, { - "name": "curatorRewardCut", - "type": { - "defined": "SwitchboardDecimal" - } + name: 'curatorRewardCut', + type: { + defined: 'SwitchboardDecimal', + }, }, { - "name": "lockLeaseFunding", - "type": "bool" + name: 'lockLeaseFunding', + type: 'bool', }, { - "name": "mint", - "type": "publicKey" + name: 'mint', + type: 'publicKey', }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 969 - ] - } + name: 'ebuf', + type: { + array: ['u8', 969], + }, }, { - "name": "maxSize", - "type": "u32" + name: 'maxSize', + type: 'u32', }, { - "name": "dataBuffer", - "type": "publicKey" - } - ] - } + name: 'dataBuffer', + type: 'publicKey', + }, + ], + }, }, { - "name": "CrankAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'CrankAccountData', + type: { + kind: 'struct', + fields: [ { - "name": "name", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'name', + type: { + array: ['u8', 32], + }, }, { - "name": "metadata", - "type": { - "array": [ - "u8", - 64 - ] - } + name: 'metadata', + type: { + array: ['u8', 64], + }, }, { - "name": "queuePubkey", - "type": "publicKey" + name: 'queuePubkey', + type: 'publicKey', }, { - "name": "pqSize", - "type": "u32" + name: 'pqSize', + type: 'u32', }, { - "name": "maxRows", - "type": "u32" + name: 'maxRows', + type: 'u32', }, { - "name": "jitterModifier", - "type": "u8" + name: 'jitterModifier', + type: 'u8', }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 255 - ] - } + name: 'ebuf', + type: { + array: ['u8', 255], + }, }, { - "name": "dataBuffer", - "type": "publicKey" - } - ] - } + name: 'dataBuffer', + type: 'publicKey', + }, + ], + }, }, { - "name": "OracleAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleAccountData', + type: { + kind: 'struct', + fields: [ { - "name": "name", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'name', + type: { + array: ['u8', 32], + }, }, { - "name": "metadata", - "type": { - "array": [ - "u8", - 128 - ] - } + name: 'metadata', + type: { + array: ['u8', 128], + }, }, { - "name": "oracleAuthority", - "type": "publicKey" + name: 'oracleAuthority', + type: 'publicKey', }, { - "name": "lastHeartbeat", - "type": "i64" + name: 'lastHeartbeat', + type: 'i64', }, { - "name": "numInUse", - "type": "u32" + name: 'numInUse', + type: 'u32', }, { - "name": "tokenAccount", - "type": "publicKey" + name: 'tokenAccount', + type: 'publicKey', }, { - "name": "queuePubkey", - "type": "publicKey" + name: 'queuePubkey', + type: 'publicKey', }, { - "name": "metrics", - "type": { - "defined": "OracleMetrics" - } + name: 'metrics', + type: { + defined: 'OracleMetrics', + }, }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 256 - ] - } - } - ] - } + name: 'ebuf', + type: { + array: ['u8', 256], + }, + }, + ], + }, }, { - "name": "JobAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'JobAccountData', + type: { + kind: 'struct', + fields: [ { - "name": "name", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'name', + type: { + array: ['u8', 32], + }, }, { - "name": "metadata", - "type": { - "array": [ - "u8", - 64 - ] - } + name: 'metadata', + type: { + array: ['u8', 64], + }, }, { - "name": "authority", - "type": "publicKey" + name: 'authority', + type: 'publicKey', }, { - "name": "expiration", - "type": "i64" + name: 'expiration', + type: 'i64', }, { - "name": "hash", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'hash', + type: { + array: ['u8', 32], + }, }, { - "name": "data", - "type": "bytes" + name: 'data', + type: 'bytes', }, { - "name": "referenceCount", - "type": "u32" + name: 'referenceCount', + type: 'u32', }, { - "name": "totalSpent", - "type": "u64" + name: 'totalSpent', + type: 'u64', }, { - "name": "createdAt", - "type": "i64" - } - ] - } + name: 'createdAt', + type: 'i64', + }, + ], + }, }, { - "name": "VrfAccountData", - "type": { - "kind": "struct", - "fields": [ + name: 'VrfAccountData', + type: { + kind: 'struct', + fields: [ { - "name": "status", - "type": { - "defined": "VrfStatus" - } + name: 'status', + type: { + defined: 'VrfStatus', + }, }, { - "name": "counter", - "type": "u128" + name: 'counter', + type: 'u128', }, { - "name": "authority", - "type": "publicKey" + name: 'authority', + type: 'publicKey', }, { - "name": "oracleQueue", - "type": "publicKey" + name: 'oracleQueue', + type: 'publicKey', }, { - "name": "escrow", - "type": "publicKey" + name: 'escrow', + type: 'publicKey', }, { - "name": "callback", - "type": { - "defined": "CallbackZC" - } + name: 'callback', + type: { + defined: 'CallbackZC', + }, }, { - "name": "batchSize", - "type": "u32" + name: 'batchSize', + type: 'u32', }, { - "name": "builders", - "type": { - "array": [ + name: 'builders', + type: { + array: [ { - "defined": "VrfBuilder" + defined: 'VrfBuilder', }, - 8 - ] - } + 8, + ], + }, }, { - "name": "buildersLen", - "type": "u32" + name: 'buildersLen', + type: 'u32', }, { - "name": "testMode", - "type": "bool" + name: 'testMode', + type: 'bool', }, { - "name": "currentRound", - "type": { - "defined": "VrfRound" - } + name: 'currentRound', + type: { + defined: 'VrfRound', + }, }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 1024 - ] - } - } - ] - } - } + name: 'ebuf', + type: { + array: ['u8', 1024], + }, + }, + ], + }, + }, ], - "types": [ + types: [ { - "name": "AggregatorAddJobParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorAddJobParams', + type: { + kind: 'struct', + fields: [ { - "name": "weight", - "type": { - "option": "u8" - } - } - ] - } + name: 'weight', + type: { + option: 'u8', + }, + }, + ], + }, }, { - "name": "AggregatorInitParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorInitParams', + type: { + kind: 'struct', + fields: [ { - "name": "name", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'name', + type: { + array: ['u8', 32], + }, }, { - "name": "metadata", - "type": { - "array": [ - "u8", - 128 - ] - } + name: 'metadata', + type: { + array: ['u8', 128], + }, }, { - "name": "batchSize", - "type": "u32" + name: 'batchSize', + type: 'u32', }, { - "name": "minOracleResults", - "type": "u32" + name: 'minOracleResults', + type: 'u32', }, { - "name": "minJobResults", - "type": "u32" + name: 'minJobResults', + type: 'u32', }, { - "name": "minUpdateDelaySeconds", - "type": "u32" + name: 'minUpdateDelaySeconds', + type: 'u32', }, { - "name": "startAfter", - "type": "i64" + name: 'startAfter', + type: 'i64', }, { - "name": "varianceThreshold", - "type": { - "defined": "BorshDecimal" - } + name: 'varianceThreshold', + type: { + defined: 'BorshDecimal', + }, }, { - "name": "forceReportPeriod", - "type": "i64" + name: 'forceReportPeriod', + type: 'i64', }, { - "name": "expiration", - "type": "i64" + name: 'expiration', + type: 'i64', }, { - "name": "stateBump", - "type": "u8" + name: 'stateBump', + type: 'u8', }, { - "name": "disableCrank", - "type": "bool" - } - ] - } + name: 'disableCrank', + type: 'bool', + }, + ], + }, }, { - "name": "AggregatorLockParams", - "type": { - "kind": "struct", - "fields": [] - } + name: 'AggregatorLockParams', + type: { + kind: 'struct', + fields: [], + }, }, { - "name": "AggregatorOpenRoundParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorOpenRoundParams', + type: { + kind: 'struct', + fields: [ { - "name": "stateBump", - "type": "u8" + name: 'stateBump', + type: 'u8', }, { - "name": "leaseBump", - "type": "u8" + name: 'leaseBump', + type: 'u8', }, { - "name": "permissionBump", - "type": "u8" + name: 'permissionBump', + type: 'u8', }, { - "name": "jitter", - "type": "u8" - } - ] - } + name: 'jitter', + type: 'u8', + }, + ], + }, }, { - "name": "AggregatorRemoveJobParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorRemoveJobParams', + type: { + kind: 'struct', + fields: [ { - "name": "jobIdx", - "type": "u32" - } - ] - } + name: 'jobIdx', + type: 'u32', + }, + ], + }, }, { - "name": "AggregatorSaveResultParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorSaveResultParams', + type: { + kind: 'struct', + fields: [ { - "name": "oracleIdx", - "type": "u32" + name: 'oracleIdx', + type: 'u32', }, { - "name": "error", - "type": "bool" + name: 'error', + type: 'bool', }, { - "name": "value", - "type": { - "defined": "BorshDecimal" - } + name: 'value', + type: { + defined: 'BorshDecimal', + }, }, { - "name": "jobsChecksum", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'jobsChecksum', + type: { + array: ['u8', 32], + }, }, { - "name": "minResponse", - "type": { - "defined": "BorshDecimal" - } + name: 'minResponse', + type: { + defined: 'BorshDecimal', + }, }, { - "name": "maxResponse", - "type": { - "defined": "BorshDecimal" - } + name: 'maxResponse', + type: { + defined: 'BorshDecimal', + }, }, { - "name": "feedPermissionBump", - "type": "u8" + name: 'feedPermissionBump', + type: 'u8', }, { - "name": "oraclePermissionBump", - "type": "u8" + name: 'oraclePermissionBump', + type: 'u8', }, { - "name": "leaseBump", - "type": "u8" + name: 'leaseBump', + type: 'u8', }, { - "name": "stateBump", - "type": "u8" - } - ] - } + name: 'stateBump', + type: 'u8', + }, + ], + }, }, { - "name": "AggregatorSetAuthorityParams", - "type": { - "kind": "struct", - "fields": [] - } + name: 'AggregatorSetAuthorityParams', + type: { + kind: 'struct', + fields: [], + }, }, { - "name": "AggregatorSetBatchSizeParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorSetBatchSizeParams', + type: { + kind: 'struct', + fields: [ { - "name": "batchSize", - "type": "u32" - } - ] - } + name: 'batchSize', + type: 'u32', + }, + ], + }, }, { - "name": "AggregatorSetHistoryBufferParams", - "type": { - "kind": "struct", - "fields": [] - } + name: 'AggregatorSetHistoryBufferParams', + type: { + kind: 'struct', + fields: [], + }, }, { - "name": "AggregatorSetMinJobsParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorSetMinJobsParams', + type: { + kind: 'struct', + fields: [ { - "name": "minJobResults", - "type": "u32" - } - ] - } + name: 'minJobResults', + type: 'u32', + }, + ], + }, }, { - "name": "AggregatorSetMinOraclesParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorSetMinOraclesParams', + type: { + kind: 'struct', + fields: [ { - "name": "minOracleResults", - "type": "u32" - } - ] - } + name: 'minOracleResults', + type: 'u32', + }, + ], + }, }, { - "name": "AggregatorSetQueueParams", - "type": { - "kind": "struct", - "fields": [] - } + name: 'AggregatorSetQueueParams', + type: { + kind: 'struct', + fields: [], + }, }, { - "name": "AggregatorSetUpdateIntervalParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorSetUpdateIntervalParams', + type: { + kind: 'struct', + fields: [ { - "name": "newInterval", - "type": "u32" - } - ] - } + name: 'newInterval', + type: 'u32', + }, + ], + }, }, { - "name": "AggregatorSetVarianceThresholdParams", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorSetVarianceThresholdParams', + type: { + kind: 'struct', + fields: [ { - "name": "varianceThreshold", - "type": { - "defined": "BorshDecimal" - } - } - ] - } + name: 'varianceThreshold', + type: { + defined: 'BorshDecimal', + }, + }, + ], + }, }, { - "name": "CrankInitParams", - "type": { - "kind": "struct", - "fields": [ + name: 'CrankInitParams', + type: { + kind: 'struct', + fields: [ { - "name": "name", - "type": "bytes" + name: 'name', + type: 'bytes', }, { - "name": "metadata", - "type": "bytes" + name: 'metadata', + type: 'bytes', }, { - "name": "crankSize", - "type": "u32" - } - ] - } + name: 'crankSize', + type: 'u32', + }, + ], + }, }, { - "name": "CrankPopParams", - "type": { - "kind": "struct", - "fields": [ + name: 'CrankPopParams', + type: { + kind: 'struct', + fields: [ { - "name": "stateBump", - "type": "u8" + name: 'stateBump', + type: 'u8', }, { - "name": "leaseBumps", - "type": "bytes" + name: 'leaseBumps', + type: 'bytes', }, { - "name": "permissionBumps", - "type": "bytes" + name: 'permissionBumps', + type: 'bytes', }, { - "name": "nonce", - "type": { - "option": "u32" - } + name: 'nonce', + type: { + option: 'u32', + }, }, { - "name": "failOpenOnAccountMismatch", - "type": { - "option": "bool" - } - } - ] - } + name: 'failOpenOnAccountMismatch', + type: { + option: 'bool', + }, + }, + ], + }, }, { - "name": "CrankPushParams", - "type": { - "kind": "struct", - "fields": [ + name: 'CrankPushParams', + type: { + kind: 'struct', + fields: [ { - "name": "stateBump", - "type": "u8" + name: 'stateBump', + type: 'u8', }, { - "name": "permissionBump", - "type": "u8" - } - ] - } + name: 'permissionBump', + type: 'u8', + }, + ], + }, }, { - "name": "JobInitParams", - "type": { - "kind": "struct", - "fields": [ + name: 'JobInitParams', + type: { + kind: 'struct', + fields: [ { - "name": "name", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'name', + type: { + array: ['u8', 32], + }, }, { - "name": "expiration", - "type": "i64" + name: 'expiration', + type: 'i64', }, { - "name": "stateBump", - "type": "u8" + name: 'stateBump', + type: 'u8', }, { - "name": "data", - "type": "bytes" - } - ] - } + name: 'data', + type: 'bytes', + }, + ], + }, }, { - "name": "LeaseExtendParams", - "type": { - "kind": "struct", - "fields": [ + name: 'LeaseExtendParams', + type: { + kind: 'struct', + fields: [ { - "name": "loadAmount", - "type": "u64" + name: 'loadAmount', + type: 'u64', }, { - "name": "leaseBump", - "type": "u8" + name: 'leaseBump', + type: 'u8', }, { - "name": "stateBump", - "type": "u8" + name: 'stateBump', + type: 'u8', }, { - "name": "walletBumps", - "type": "bytes" - } - ] - } + name: 'walletBumps', + type: 'bytes', + }, + ], + }, }, { - "name": "LeaseInitParams", - "type": { - "kind": "struct", - "fields": [ + name: 'LeaseInitParams', + type: { + kind: 'struct', + fields: [ { - "name": "loadAmount", - "type": "u64" + name: 'loadAmount', + type: 'u64', }, { - "name": "withdrawAuthority", - "type": "publicKey" + name: 'withdrawAuthority', + type: 'publicKey', }, { - "name": "leaseBump", - "type": "u8" + name: 'leaseBump', + type: 'u8', }, { - "name": "stateBump", - "type": "u8" + name: 'stateBump', + type: 'u8', }, { - "name": "walletBumps", - "type": "bytes" - } - ] - } + name: 'walletBumps', + type: 'bytes', + }, + ], + }, }, { - "name": "LeaseSetAuthorityParams", - "type": { - "kind": "struct", - "fields": [] - } + name: 'LeaseSetAuthorityParams', + type: { + kind: 'struct', + fields: [], + }, }, { - "name": "LeaseWithdrawParams", - "type": { - "kind": "struct", - "fields": [ + name: 'LeaseWithdrawParams', + type: { + kind: 'struct', + fields: [ { - "name": "stateBump", - "type": "u8" + name: 'stateBump', + type: 'u8', }, { - "name": "leaseBump", - "type": "u8" + name: 'leaseBump', + type: 'u8', }, { - "name": "amount", - "type": "u64" - } - ] - } + name: 'amount', + type: 'u64', + }, + ], + }, }, { - "name": "OracleHeartbeatParams", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleHeartbeatParams', + type: { + kind: 'struct', + fields: [ { - "name": "permissionBump", - "type": "u8" - } - ] - } + name: 'permissionBump', + type: 'u8', + }, + ], + }, }, { - "name": "OracleInitParams", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleInitParams', + type: { + kind: 'struct', + fields: [ { - "name": "name", - "type": "bytes" + name: 'name', + type: 'bytes', }, { - "name": "metadata", - "type": "bytes" + name: 'metadata', + type: 'bytes', }, { - "name": "stateBump", - "type": "u8" + name: 'stateBump', + type: 'u8', }, { - "name": "oracleBump", - "type": "u8" - } - ] - } + name: 'oracleBump', + type: 'u8', + }, + ], + }, }, { - "name": "OracleQueueInitParams", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleQueueInitParams', + type: { + kind: 'struct', + fields: [ { - "name": "name", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'name', + type: { + array: ['u8', 32], + }, }, { - "name": "metadata", - "type": { - "array": [ - "u8", - 64 - ] - } + name: 'metadata', + type: { + array: ['u8', 64], + }, }, { - "name": "reward", - "type": "u64" + name: 'reward', + type: 'u64', }, { - "name": "minStake", - "type": "u64" + name: 'minStake', + type: 'u64', }, { - "name": "feedProbationPeriod", - "type": "u32" + name: 'feedProbationPeriod', + type: 'u32', }, { - "name": "oracleTimeout", - "type": "u32" + name: 'oracleTimeout', + type: 'u32', }, { - "name": "slashingEnabled", - "type": "bool" + name: 'slashingEnabled', + type: 'bool', }, { - "name": "varianceToleranceMultiplier", - "type": { - "defined": "BorshDecimal" - } + name: 'varianceToleranceMultiplier', + type: { + defined: 'BorshDecimal', + }, }, { - "name": "consecutiveFeedFailureLimit", - "type": "u64" + name: 'consecutiveFeedFailureLimit', + type: 'u64', }, { - "name": "consecutiveOracleFailureLimit", - "type": "u64" + name: 'consecutiveOracleFailureLimit', + type: 'u64', }, { - "name": "queueSize", - "type": "u32" + name: 'queueSize', + type: 'u32', }, { - "name": "unpermissionedFeeds", - "type": "bool" + name: 'unpermissionedFeeds', + type: 'bool', }, { - "name": "unpermissionedVrf", - "type": "bool" - } - ] - } + name: 'unpermissionedVrf', + type: 'bool', + }, + ], + }, }, { - "name": "OracleQueueSetRewardsParams", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleQueueSetRewardsParams', + type: { + kind: 'struct', + fields: [ { - "name": "rewards", - "type": "u64" - } - ] - } + name: 'rewards', + type: 'u64', + }, + ], + }, }, { - "name": "OracleQueueVrfConfigParams", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleQueueVrfConfigParams', + type: { + kind: 'struct', + fields: [ { - "name": "unpermissionedVrfEnabled", - "type": "bool" - } - ] - } + name: 'unpermissionedVrfEnabled', + type: 'bool', + }, + ], + }, }, { - "name": "OracleWithdrawParams", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleWithdrawParams', + type: { + kind: 'struct', + fields: [ { - "name": "stateBump", - "type": "u8" + name: 'stateBump', + type: 'u8', }, { - "name": "permissionBump", - "type": "u8" + name: 'permissionBump', + type: 'u8', }, { - "name": "amount", - "type": "u64" - } - ] - } + name: 'amount', + type: 'u64', + }, + ], + }, }, { - "name": "PermissionInitParams", - "type": { - "kind": "struct", - "fields": [] - } + name: 'PermissionInitParams', + type: { + kind: 'struct', + fields: [], + }, }, { - "name": "PermissionSetParams", - "type": { - "kind": "struct", - "fields": [ + name: 'PermissionSetParams', + type: { + kind: 'struct', + fields: [ { - "name": "permission", - "type": { - "defined": "SwitchboardPermission" - } + name: 'permission', + type: { + defined: 'SwitchboardPermission', + }, }, { - "name": "enable", - "type": "bool" - } - ] - } + name: 'enable', + type: 'bool', + }, + ], + }, }, { - "name": "PermissionSetVoterWeightParams", - "type": { - "kind": "struct", - "fields": [ + name: 'PermissionSetVoterWeightParams', + type: { + kind: 'struct', + fields: [ { - "name": "stateBump", - "type": "u8" - } - ] - } + name: 'stateBump', + type: 'u8', + }, + ], + }, }, { - "name": "ProgramConfigParams", - "type": { - "kind": "struct", - "fields": [ + name: 'ProgramConfigParams', + type: { + kind: 'struct', + fields: [ { - "name": "token", - "type": "publicKey" + name: 'token', + type: 'publicKey', }, { - "name": "bump", - "type": "u8" + name: 'bump', + type: 'u8', }, { - "name": "daoMint", - "type": "publicKey" - } - ] - } + name: 'daoMint', + type: 'publicKey', + }, + ], + }, }, { - "name": "ProgramInitParams", - "type": { - "kind": "struct", - "fields": [ + name: 'ProgramInitParams', + type: { + kind: 'struct', + fields: [ { - "name": "stateBump", - "type": "u8" - } - ] - } + name: 'stateBump', + type: 'u8', + }, + ], + }, }, { - "name": "VaultTransferParams", - "type": { - "kind": "struct", - "fields": [ + name: 'VaultTransferParams', + type: { + kind: 'struct', + fields: [ { - "name": "stateBump", - "type": "u8" + name: 'stateBump', + type: 'u8', }, { - "name": "amount", - "type": "u64" - } - ] - } + name: 'amount', + type: 'u64', + }, + ], + }, }, { - "name": "VrfInitParams", - "type": { - "kind": "struct", - "fields": [ + name: 'VrfInitParams', + type: { + kind: 'struct', + fields: [ { - "name": "callback", - "type": { - "defined": "Callback" - } + name: 'callback', + type: { + defined: 'Callback', + }, }, { - "name": "stateBump", - "type": "u8" - } - ] - } + name: 'stateBump', + type: 'u8', + }, + ], + }, }, { - "name": "VrfProveParams", - "type": { - "kind": "struct", - "fields": [ + name: 'VrfProveParams', + type: { + kind: 'struct', + fields: [ { - "name": "proof", - "type": "bytes" + name: 'proof', + type: 'bytes', }, { - "name": "idx", - "type": "u32" - } - ] - } + name: 'idx', + type: 'u32', + }, + ], + }, }, { - "name": "VrfProveAndVerifyParams", - "type": { - "kind": "struct", - "fields": [ + name: 'VrfProveAndVerifyParams', + type: { + kind: 'struct', + fields: [ { - "name": "nonce", - "type": { - "option": "u32" - } + name: 'nonce', + type: { + option: 'u32', + }, }, { - "name": "stateBump", - "type": "u8" + name: 'stateBump', + type: 'u8', }, { - "name": "idx", - "type": "u32" + name: 'idx', + type: 'u32', }, { - "name": "proof", - "type": "bytes" - } - ] - } + name: 'proof', + type: 'bytes', + }, + ], + }, }, { - "name": "VrfRequestRandomnessParams", - "type": { - "kind": "struct", - "fields": [ + name: 'VrfRequestRandomnessParams', + type: { + kind: 'struct', + fields: [ { - "name": "permissionBump", - "type": "u8" + name: 'permissionBump', + type: 'u8', }, { - "name": "stateBump", - "type": "u8" - } - ] - } + name: 'stateBump', + type: 'u8', + }, + ], + }, }, { - "name": "VrfVerifyParams", - "type": { - "kind": "struct", - "fields": [ + name: 'VrfVerifyParams', + type: { + kind: 'struct', + fields: [ { - "name": "nonce", - "type": { - "option": "u32" - } + name: 'nonce', + type: { + option: 'u32', + }, }, { - "name": "stateBump", - "type": "u8" + name: 'stateBump', + type: 'u8', }, { - "name": "idx", - "type": "u32" - } - ] - } + name: 'idx', + type: 'u32', + }, + ], + }, }, { - "name": "Hash", - "type": { - "kind": "struct", - "fields": [ + name: 'Hash', + type: { + kind: 'struct', + fields: [ { - "name": "data", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] - } + name: 'data', + type: { + array: ['u8', 32], + }, + }, + ], + }, }, { - "name": "AggregatorRound", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorRound', + type: { + kind: 'struct', + fields: [ { - "name": "numSuccess", - "type": "u32" + name: 'numSuccess', + type: 'u32', }, { - "name": "numError", - "type": "u32" + name: 'numError', + type: 'u32', }, { - "name": "isClosed", - "type": "bool" + name: 'isClosed', + type: 'bool', }, { - "name": "roundOpenSlot", - "type": "u64" + name: 'roundOpenSlot', + type: 'u64', }, { - "name": "roundOpenTimestamp", - "type": "i64" + name: 'roundOpenTimestamp', + type: 'i64', }, { - "name": "result", - "type": { - "defined": "SwitchboardDecimal" - } + name: 'result', + type: { + defined: 'SwitchboardDecimal', + }, }, { - "name": "stdDeviation", - "type": { - "defined": "SwitchboardDecimal" - } + name: 'stdDeviation', + type: { + defined: 'SwitchboardDecimal', + }, }, { - "name": "minResponse", - "type": { - "defined": "SwitchboardDecimal" - } + name: 'minResponse', + type: { + defined: 'SwitchboardDecimal', + }, }, { - "name": "maxResponse", - "type": { - "defined": "SwitchboardDecimal" - } + name: 'maxResponse', + type: { + defined: 'SwitchboardDecimal', + }, }, { - "name": "oraclePubkeysData", - "type": { - "array": [ - "publicKey", - 16 - ] - } + name: 'oraclePubkeysData', + type: { + array: ['publicKey', 16], + }, }, { - "name": "mediansData", - "type": { - "array": [ + name: 'mediansData', + type: { + array: [ { - "defined": "SwitchboardDecimal" + defined: 'SwitchboardDecimal', }, - 16 - ] - } + 16, + ], + }, }, { - "name": "currentPayout", - "type": { - "array": [ - "i64", - 16 - ] - } + name: 'currentPayout', + type: { + array: ['i64', 16], + }, }, { - "name": "mediansFulfilled", - "type": { - "array": [ - "bool", - 16 - ] - } + name: 'mediansFulfilled', + type: { + array: ['bool', 16], + }, }, { - "name": "errorsFulfilled", - "type": { - "array": [ - "bool", - 16 - ] - } - } - ] - } + name: 'errorsFulfilled', + type: { + array: ['bool', 16], + }, + }, + ], + }, }, { - "name": "AggregatorHistoryRow", - "type": { - "kind": "struct", - "fields": [ + name: 'AggregatorHistoryRow', + type: { + kind: 'struct', + fields: [ { - "name": "timestamp", - "type": "i64" + name: 'timestamp', + type: 'i64', }, { - "name": "value", - "type": { - "defined": "SwitchboardDecimal" - } - } - ] - } + name: 'value', + type: { + defined: 'SwitchboardDecimal', + }, + }, + ], + }, }, { - "name": "SwitchboardDecimal", - "type": { - "kind": "struct", - "fields": [ + name: 'SwitchboardDecimal', + type: { + kind: 'struct', + fields: [ { - "name": "mantissa", - "type": "i128" + name: 'mantissa', + type: 'i128', }, { - "name": "scale", - "type": "u32" - } - ] - } + name: 'scale', + type: 'u32', + }, + ], + }, }, { - "name": "CrankRow", - "type": { - "kind": "struct", - "fields": [ + name: 'CrankRow', + type: { + kind: 'struct', + fields: [ { - "name": "pubkey", - "type": "publicKey" + name: 'pubkey', + type: 'publicKey', }, { - "name": "nextTimestamp", - "type": "i64" - } - ] - } + name: 'nextTimestamp', + type: 'i64', + }, + ], + }, }, { - "name": "OracleMetrics", - "type": { - "kind": "struct", - "fields": [ + name: 'OracleMetrics', + type: { + kind: 'struct', + fields: [ { - "name": "consecutiveSuccess", - "type": "u64" + name: 'consecutiveSuccess', + type: 'u64', }, { - "name": "consecutiveError", - "type": "u64" + name: 'consecutiveError', + type: 'u64', }, { - "name": "consecutiveDisagreement", - "type": "u64" + name: 'consecutiveDisagreement', + type: 'u64', }, { - "name": "consecutiveLateResponse", - "type": "u64" + name: 'consecutiveLateResponse', + type: 'u64', }, { - "name": "consecutiveFailure", - "type": "u64" + name: 'consecutiveFailure', + type: 'u64', }, { - "name": "totalSuccess", - "type": "u128" + name: 'totalSuccess', + type: 'u128', }, { - "name": "totalError", - "type": "u128" + name: 'totalError', + type: 'u128', }, { - "name": "totalDisagreement", - "type": "u128" + name: 'totalDisagreement', + type: 'u128', }, { - "name": "totalLateResponse", - "type": "u128" - } - ] - } + name: 'totalLateResponse', + type: 'u128', + }, + ], + }, }, { - "name": "BorshDecimal", - "type": { - "kind": "struct", - "fields": [ + name: 'BorshDecimal', + type: { + kind: 'struct', + fields: [ { - "name": "mantissa", - "type": "i128" + name: 'mantissa', + type: 'i128', }, { - "name": "scale", - "type": "u32" - } - ] - } + name: 'scale', + type: 'u32', + }, + ], + }, }, { - "name": "EcvrfProofZC", - "type": { - "kind": "struct", - "fields": [ + name: 'EcvrfProofZC', + type: { + kind: 'struct', + fields: [ { - "name": "gamma", - "type": { - "defined": "EdwardsPointZC" - } + name: 'gamma', + type: { + defined: 'EdwardsPointZC', + }, }, { - "name": "c", - "type": { - "defined": "Scalar" - } + name: 'c', + type: { + defined: 'Scalar', + }, }, { - "name": "s", - "type": { - "defined": "Scalar" - } - } - ] - } + name: 's', + type: { + defined: 'Scalar', + }, + }, + ], + }, }, { - "name": "Scalar", - "type": { - "kind": "struct", - "fields": [ + name: 'Scalar', + type: { + kind: 'struct', + fields: [ { - "name": "bytes", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] - } + name: 'bytes', + type: { + array: ['u8', 32], + }, + }, + ], + }, }, { - "name": "FieldElementZC", - "type": { - "kind": "struct", - "fields": [ + name: 'FieldElementZC', + type: { + kind: 'struct', + fields: [ { - "name": "bytes", - "type": { - "array": [ - "u64", - 5 - ] - } - } - ] - } + name: 'bytes', + type: { + array: ['u64', 5], + }, + }, + ], + }, }, { - "name": "CompletedPointZC", - "type": { - "kind": "struct", - "fields": [ + name: 'CompletedPointZC', + type: { + kind: 'struct', + fields: [ { - "name": "x", - "type": { - "defined": "FieldElementZC" - } + name: 'x', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "y", - "type": { - "defined": "FieldElementZC" - } + name: 'y', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "z", - "type": { - "defined": "FieldElementZC" - } + name: 'z', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "t", - "type": { - "defined": "FieldElementZC" - } - } - ] - } + name: 't', + type: { + defined: 'FieldElementZC', + }, + }, + ], + }, }, { - "name": "EdwardsPointZC", - "type": { - "kind": "struct", - "fields": [ + name: 'EdwardsPointZC', + type: { + kind: 'struct', + fields: [ { - "name": "x", - "type": { - "defined": "FieldElementZC" - } + name: 'x', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "y", - "type": { - "defined": "FieldElementZC" - } + name: 'y', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "z", - "type": { - "defined": "FieldElementZC" - } + name: 'z', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "t", - "type": { - "defined": "FieldElementZC" - } - } - ] - } + name: 't', + type: { + defined: 'FieldElementZC', + }, + }, + ], + }, }, { - "name": "ProjectivePointZC", - "type": { - "kind": "struct", - "fields": [ + name: 'ProjectivePointZC', + type: { + kind: 'struct', + fields: [ { - "name": "x", - "type": { - "defined": "FieldElementZC" - } + name: 'x', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "y", - "type": { - "defined": "FieldElementZC" - } + name: 'y', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "z", - "type": { - "defined": "FieldElementZC" - } - } - ] - } + name: 'z', + type: { + defined: 'FieldElementZC', + }, + }, + ], + }, }, { - "name": "EcvrfIntermediate", - "type": { - "kind": "struct", - "fields": [ + name: 'EcvrfIntermediate', + type: { + kind: 'struct', + fields: [ { - "name": "r", - "type": { - "defined": "FieldElementZC" - } + name: 'r', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "nS", - "type": { - "defined": "FieldElementZC" - } + name: 'nS', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "d", - "type": { - "defined": "FieldElementZC" - } + name: 'd', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "t13", - "type": { - "defined": "FieldElementZC" - } + name: 't13', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "t15", - "type": { - "defined": "FieldElementZC" - } - } - ] - } + name: 't15', + type: { + defined: 'FieldElementZC', + }, + }, + ], + }, }, { - "name": "VrfBuilder", - "type": { - "kind": "struct", - "fields": [ + name: 'VrfBuilder', + type: { + kind: 'struct', + fields: [ { - "name": "producer", - "type": "publicKey" + name: 'producer', + type: 'publicKey', }, { - "name": "status", - "type": { - "defined": "VrfStatus" - } + name: 'status', + type: { + defined: 'VrfStatus', + }, }, { - "name": "reprProof", - "type": { - "array": [ - "u8", - 80 - ] - } + name: 'reprProof', + type: { + array: ['u8', 80], + }, }, { - "name": "proof", - "type": { - "defined": "EcvrfProofZC" - } + name: 'proof', + type: { + defined: 'EcvrfProofZC', + }, }, { - "name": "yPoint", - "type": "publicKey" + name: 'yPoint', + type: 'publicKey', }, { - "name": "stage", - "type": "u32" + name: 'stage', + type: 'u32', }, { - "name": "stage1Out", - "type": { - "defined": "EcvrfIntermediate" - } + name: 'stage1Out', + type: { + defined: 'EcvrfIntermediate', + }, }, { - "name": "r1", - "type": { - "defined": "EdwardsPointZC" - } + name: 'r1', + type: { + defined: 'EdwardsPointZC', + }, }, { - "name": "r2", - "type": { - "defined": "EdwardsPointZC" - } + name: 'r2', + type: { + defined: 'EdwardsPointZC', + }, }, { - "name": "stage3Out", - "type": { - "defined": "EcvrfIntermediate" - } + name: 'stage3Out', + type: { + defined: 'EcvrfIntermediate', + }, }, { - "name": "hPoint", - "type": { - "defined": "EdwardsPointZC" - } + name: 'hPoint', + type: { + defined: 'EdwardsPointZC', + }, }, { - "name": "sReduced", - "type": { - "defined": "Scalar" - } + name: 'sReduced', + type: { + defined: 'Scalar', + }, }, { - "name": "yPointBuilder", - "type": { - "array": [ + name: 'yPointBuilder', + type: { + array: [ { - "defined": "FieldElementZC" + defined: 'FieldElementZC', }, - 3 - ] - } + 3, + ], + }, }, { - "name": "yRistrettoPoint", - "type": { - "defined": "EdwardsPointZC" - } + name: 'yRistrettoPoint', + type: { + defined: 'EdwardsPointZC', + }, }, { - "name": "mulRound", - "type": "u8" + name: 'mulRound', + type: 'u8', }, { - "name": "hashPointsRound", - "type": "u8" + name: 'hashPointsRound', + type: 'u8', }, { - "name": "mulTmp1", - "type": { - "defined": "CompletedPointZC" - } + name: 'mulTmp1', + type: { + defined: 'CompletedPointZC', + }, }, { - "name": "uPoint1", - "type": { - "defined": "EdwardsPointZC" - } + name: 'uPoint1', + type: { + defined: 'EdwardsPointZC', + }, }, { - "name": "uPoint2", - "type": { - "defined": "EdwardsPointZC" - } + name: 'uPoint2', + type: { + defined: 'EdwardsPointZC', + }, }, { - "name": "vPoint1", - "type": { - "defined": "EdwardsPointZC" - } + name: 'vPoint1', + type: { + defined: 'EdwardsPointZC', + }, }, { - "name": "vPoint2", - "type": { - "defined": "EdwardsPointZC" - } + name: 'vPoint2', + type: { + defined: 'EdwardsPointZC', + }, }, { - "name": "uPoint", - "type": { - "defined": "EdwardsPointZC" - } + name: 'uPoint', + type: { + defined: 'EdwardsPointZC', + }, }, { - "name": "vPoint", - "type": { - "defined": "EdwardsPointZC" - } + name: 'vPoint', + type: { + defined: 'EdwardsPointZC', + }, }, { - "name": "u1", - "type": { - "defined": "FieldElementZC" - } + name: 'u1', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "u2", - "type": { - "defined": "FieldElementZC" - } + name: 'u2', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "invertee", - "type": { - "defined": "FieldElementZC" - } + name: 'invertee', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "y", - "type": { - "defined": "FieldElementZC" - } + name: 'y', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "z", - "type": { - "defined": "FieldElementZC" - } + name: 'z', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "p1Bytes", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'p1Bytes', + type: { + array: ['u8', 32], + }, }, { - "name": "p2Bytes", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'p2Bytes', + type: { + array: ['u8', 32], + }, }, { - "name": "p3Bytes", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'p3Bytes', + type: { + array: ['u8', 32], + }, }, { - "name": "p4Bytes", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'p4Bytes', + type: { + array: ['u8', 32], + }, }, { - "name": "cPrimeHashbuf", - "type": { - "array": [ - "u8", - 16 - ] - } + name: 'cPrimeHashbuf', + type: { + array: ['u8', 16], + }, }, { - "name": "m1", - "type": { - "defined": "FieldElementZC" - } + name: 'm1', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "m2", - "type": { - "defined": "FieldElementZC" - } + name: 'm2', + type: { + defined: 'FieldElementZC', + }, }, { - "name": "txRemaining", - "type": "u32" + name: 'txRemaining', + type: 'u32', }, { - "name": "verified", - "type": "bool" + name: 'verified', + type: 'bool', }, { - "name": "result", - "type": { - "array": [ - "u8", - 32 - ] - } - } - ] - } + name: 'result', + type: { + array: ['u8', 32], + }, + }, + ], + }, }, { - "name": "AccountMetaZC", - "type": { - "kind": "struct", - "fields": [ + name: 'AccountMetaZC', + type: { + kind: 'struct', + fields: [ { - "name": "pubkey", - "type": "publicKey" + name: 'pubkey', + type: 'publicKey', }, { - "name": "isSigner", - "type": "bool" + name: 'isSigner', + type: 'bool', }, { - "name": "isWritable", - "type": "bool" - } - ] - } + name: 'isWritable', + type: 'bool', + }, + ], + }, }, { - "name": "AccountMetaBorsh", - "type": { - "kind": "struct", - "fields": [ + name: 'AccountMetaBorsh', + type: { + kind: 'struct', + fields: [ { - "name": "pubkey", - "type": "publicKey" + name: 'pubkey', + type: 'publicKey', }, { - "name": "isSigner", - "type": "bool" + name: 'isSigner', + type: 'bool', }, { - "name": "isWritable", - "type": "bool" - } - ] - } + name: 'isWritable', + type: 'bool', + }, + ], + }, }, { - "name": "CallbackZC", - "type": { - "kind": "struct", - "fields": [ + name: 'CallbackZC', + type: { + kind: 'struct', + fields: [ { - "name": "programId", - "type": "publicKey" + name: 'programId', + type: 'publicKey', }, { - "name": "accounts", - "type": { - "array": [ + name: 'accounts', + type: { + array: [ { - "defined": "AccountMetaZC" + defined: 'AccountMetaZC', }, - 32 - ] - } + 32, + ], + }, }, { - "name": "accountsLen", - "type": "u32" + name: 'accountsLen', + type: 'u32', }, { - "name": "ixData", - "type": { - "array": [ - "u8", - 1024 - ] - } + name: 'ixData', + type: { + array: ['u8', 1024], + }, }, { - "name": "ixDataLen", - "type": "u32" - } - ] - } + name: 'ixDataLen', + type: 'u32', + }, + ], + }, }, { - "name": "Callback", - "type": { - "kind": "struct", - "fields": [ + name: 'Callback', + type: { + kind: 'struct', + fields: [ { - "name": "programId", - "type": "publicKey" + name: 'programId', + type: 'publicKey', }, { - "name": "accounts", - "type": { - "vec": { - "defined": "AccountMetaBorsh" - } - } + name: 'accounts', + type: { + vec: { + defined: 'AccountMetaBorsh', + }, + }, }, { - "name": "ixData", - "type": "bytes" - } - ] - } + name: 'ixData', + type: 'bytes', + }, + ], + }, }, { - "name": "VrfRound", - "type": { - "kind": "struct", - "fields": [ + name: 'VrfRound', + type: { + kind: 'struct', + fields: [ { - "name": "alpha", - "type": { - "array": [ - "u8", - 256 - ] - } + name: 'alpha', + type: { + array: ['u8', 256], + }, }, { - "name": "alphaLen", - "type": "u32" + name: 'alphaLen', + type: 'u32', }, { - "name": "requestSlot", - "type": "u64" + name: 'requestSlot', + type: 'u64', }, { - "name": "requestTimestamp", - "type": "i64" + name: 'requestTimestamp', + type: 'i64', }, { - "name": "result", - "type": { - "array": [ - "u8", - 32 - ] - } + name: 'result', + type: { + array: ['u8', 32], + }, }, { - "name": "numVerified", - "type": "u32" + name: 'numVerified', + type: 'u32', }, { - "name": "ebuf", - "type": { - "array": [ - "u8", - 256 - ] - } - } - ] - } + name: 'ebuf', + type: { + array: ['u8', 256], + }, + }, + ], + }, }, { - "name": "Lanes", - "type": { - "kind": "enum", - "variants": [ + name: 'Lanes', + type: { + kind: 'enum', + variants: [ { - "name": "C" + name: 'C', }, { - "name": "D" + name: 'D', }, { - "name": "AB" + name: 'AB', }, { - "name": "AC" + name: 'AC', }, { - "name": "CD" + name: 'CD', }, { - "name": "AD" + name: 'AD', }, { - "name": "BC" + name: 'BC', }, { - "name": "ABCD" - } - ] - } + name: 'ABCD', + }, + ], + }, }, { - "name": "Shuffle", - "type": { - "kind": "enum", - "variants": [ + name: 'Shuffle', + type: { + kind: 'enum', + variants: [ { - "name": "AAAA" + name: 'AAAA', }, { - "name": "BBBB" + name: 'BBBB', }, { - "name": "CACA" + name: 'CACA', }, { - "name": "DBBD" + name: 'DBBD', }, { - "name": "ADDA" + name: 'ADDA', }, { - "name": "CBCB" + name: 'CBCB', }, { - "name": "ABAB" + name: 'ABAB', }, { - "name": "BADC" + name: 'BADC', }, { - "name": "BACD" + name: 'BACD', }, { - "name": "ABDC" - } - ] - } + name: 'ABDC', + }, + ], + }, }, { - "name": "Shuffle", - "type": { - "kind": "enum", - "variants": [ + name: 'Shuffle', + type: { + kind: 'enum', + variants: [ { - "name": "AAAA" + name: 'AAAA', }, { - "name": "BBBB" + name: 'BBBB', }, { - "name": "BADC" + name: 'BADC', }, { - "name": "BACD" + name: 'BACD', }, { - "name": "ADDA" + name: 'ADDA', }, { - "name": "CBCB" + name: 'CBCB', }, { - "name": "ABDC" + name: 'ABDC', }, { - "name": "ABAB" + name: 'ABAB', }, { - "name": "DBBD" + name: 'DBBD', }, { - "name": "CACA" - } - ] - } + name: 'CACA', + }, + ], + }, }, { - "name": "Lanes", - "type": { - "kind": "enum", - "variants": [ + name: 'Lanes', + type: { + kind: 'enum', + variants: [ { - "name": "D" + name: 'D', }, { - "name": "C" + name: 'C', }, { - "name": "AB" + name: 'AB', }, { - "name": "AC" + name: 'AC', }, { - "name": "AD" + name: 'AD', }, { - "name": "BCD" - } - ] - } + name: 'BCD', + }, + ], + }, }, { - "name": "Error", - "type": { - "kind": "enum", - "variants": [ + name: 'Error', + type: { + kind: 'enum', + variants: [ { - "name": "InvalidPublicKey" + name: 'InvalidPublicKey', }, { - "name": "SerializationError", - "fields": [ + name: 'SerializationError', + fields: [ { - "defined": "bincode::Error" - } - ] + defined: 'bincode::Error', + }, + ], }, { - "name": "DeserializationError", - "fields": [ + name: 'DeserializationError', + fields: [ { - "defined": "bincode::Error" - } - ] + defined: 'bincode::Error', + }, + ], }, { - "name": "InvalidDataError" - } - ] - } + name: 'InvalidDataError', + }, + ], + }, }, { - "name": "SwitchboardPermission", - "type": { - "kind": "enum", - "variants": [ + name: 'SwitchboardPermission', + type: { + kind: 'enum', + variants: [ { - "name": "PermitOracleHeartbeat" + name: 'PermitOracleHeartbeat', }, { - "name": "PermitOracleQueueUsage" + name: 'PermitOracleQueueUsage', }, { - "name": "PermitVrfRequests" - } - ] - } + name: 'PermitVrfRequests', + }, + ], + }, }, { - "name": "OracleResponseType", - "type": { - "kind": "enum", - "variants": [ + name: 'OracleResponseType', + type: { + kind: 'enum', + variants: [ { - "name": "TypeSuccess" + name: 'TypeSuccess', }, { - "name": "TypeError" + name: 'TypeError', }, { - "name": "TypeDisagreement" + name: 'TypeDisagreement', }, { - "name": "TypeNoResponse" - } - ] - } + name: 'TypeNoResponse', + }, + ], + }, }, { - "name": "VrfStatus", - "type": { - "kind": "enum", - "variants": [ + name: 'VrfStatus', + type: { + kind: 'enum', + variants: [ { - "name": "StatusNone" + name: 'StatusNone', }, { - "name": "StatusRequesting" + name: 'StatusRequesting', }, { - "name": "StatusVerifying" + name: 'StatusVerifying', }, { - "name": "StatusVerified" + name: 'StatusVerified', }, { - "name": "StatusCallbackSuccess" + name: 'StatusCallbackSuccess', }, { - "name": "StatusVerifyFailure" - } - ] - } - } + name: 'StatusVerifyFailure', + }, + ], + }, + }, ], - "events": [ + events: [ { - "name": "AggregatorInitEvent", - "fields": [ + name: 'AggregatorInitEvent', + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false - } - ] + name: 'feedPubkey', + type: 'publicKey', + index: false, + }, + ], }, { - "name": "VrfRequestRandomnessEvent", - "fields": [ + name: 'VrfRequestRandomnessEvent', + fields: [ { - "name": "vrfPubkey", - "type": "publicKey", - "index": true + name: 'vrfPubkey', + type: 'publicKey', + index: true, }, { - "name": "oraclePubkeys", - "type": { - "vec": "publicKey" + name: 'oraclePubkeys', + type: { + vec: 'publicKey', }, - "index": false + index: false, }, { - "name": "loadAmount", - "type": "u64", - "index": false + name: 'loadAmount', + type: 'u64', + index: false, }, { - "name": "existingAmount", - "type": "u64", - "index": false - } - ] + name: 'existingAmount', + type: 'u64', + index: false, + }, + ], }, { - "name": "VrfRequestEvent", - "fields": [ + name: 'VrfRequestEvent', + fields: [ { - "name": "vrfPubkey", - "type": "publicKey", - "index": true + name: 'vrfPubkey', + type: 'publicKey', + index: true, }, { - "name": "oraclePubkeys", - "type": { - "vec": "publicKey" + name: 'oraclePubkeys', + type: { + vec: 'publicKey', }, - "index": false - } - ] + index: false, + }, + ], }, { - "name": "VrfProveEvent", - "fields": [ + name: 'VrfProveEvent', + fields: [ { - "name": "vrfPubkey", - "type": "publicKey", - "index": true + name: 'vrfPubkey', + type: 'publicKey', + index: true, }, { - "name": "oraclePubkey", - "type": "publicKey", - "index": true + name: 'oraclePubkey', + type: 'publicKey', + index: true, }, { - "name": "authorityPubkey", - "type": "publicKey", - "index": false - } - ] + name: 'authorityPubkey', + type: 'publicKey', + index: false, + }, + ], }, { - "name": "VrfVerifyEvent", - "fields": [ + name: 'VrfVerifyEvent', + fields: [ { - "name": "vrfPubkey", - "type": "publicKey", - "index": true + name: 'vrfPubkey', + type: 'publicKey', + index: true, }, { - "name": "oraclePubkey", - "type": "publicKey", - "index": true + name: 'oraclePubkey', + type: 'publicKey', + index: true, }, { - "name": "authorityPubkey", - "type": "publicKey", - "index": false + name: 'authorityPubkey', + type: 'publicKey', + index: false, }, { - "name": "amount", - "type": "u64", - "index": false - } - ] + name: 'amount', + type: 'u64', + index: false, + }, + ], }, { - "name": "VrfCallbackPerformedEvent", - "fields": [ + name: 'VrfCallbackPerformedEvent', + fields: [ { - "name": "vrfPubkey", - "type": "publicKey", - "index": true + name: 'vrfPubkey', + type: 'publicKey', + index: true, }, { - "name": "oraclePubkey", - "type": "publicKey", - "index": true + name: 'oraclePubkey', + type: 'publicKey', + index: true, }, { - "name": "amount", - "type": "u64", - "index": false - } - ] + name: 'amount', + type: 'u64', + index: false, + }, + ], }, { - "name": "AggregatorOpenRoundEvent", - "fields": [ + name: 'AggregatorOpenRoundEvent', + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false + name: 'feedPubkey', + type: 'publicKey', + index: false, }, { - "name": "oraclePubkeys", - "type": { - "vec": "publicKey" + name: 'oraclePubkeys', + type: { + vec: 'publicKey', }, - "index": false + index: false, }, { - "name": "jobPubkeys", - "type": { - "vec": "publicKey" + name: 'jobPubkeys', + type: { + vec: 'publicKey', }, - "index": false + index: false, }, { - "name": "remainingFunds", - "type": "u64", - "index": false + name: 'remainingFunds', + type: 'u64', + index: false, }, { - "name": "queueAuthority", - "type": "publicKey", - "index": false - } - ] + name: 'queueAuthority', + type: 'publicKey', + index: false, + }, + ], }, { - "name": "AggregatorValueUpdateEvent", - "fields": [ + name: 'AggregatorValueUpdateEvent', + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false + name: 'feedPubkey', + type: 'publicKey', + index: false, }, { - "name": "value", - "type": { - "defined": "BorshDecimal" + name: 'value', + type: { + defined: 'BorshDecimal', }, - "index": false + index: false, }, { - "name": "slot", - "type": "u64", - "index": false + name: 'slot', + type: 'u64', + index: false, }, { - "name": "timestamp", - "type": "i64", - "index": false + name: 'timestamp', + type: 'i64', + index: false, }, { - "name": "oraclePubkeys", - "type": { - "vec": "publicKey" + name: 'oraclePubkeys', + type: { + vec: 'publicKey', }, - "index": false + index: false, }, { - "name": "oracleValues", - "type": { - "vec": { - "defined": "BorshDecimal" - } + name: 'oracleValues', + type: { + vec: { + defined: 'BorshDecimal', + }, }, - "index": false - } - ] + index: false, + }, + ], }, { - "name": "OracleRewardEvent", - "fields": [ + name: 'OracleRewardEvent', + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false + name: 'feedPubkey', + type: 'publicKey', + index: false, }, { - "name": "leasePubkey", - "type": "publicKey", - "index": false + name: 'leasePubkey', + type: 'publicKey', + index: false, }, { - "name": "oraclePubkey", - "type": "publicKey", - "index": false + name: 'oraclePubkey', + type: 'publicKey', + index: false, }, { - "name": "walletPubkey", - "type": "publicKey", - "index": false + name: 'walletPubkey', + type: 'publicKey', + index: false, }, { - "name": "amount", - "type": "u64", - "index": false + name: 'amount', + type: 'u64', + index: false, }, { - "name": "roundSlot", - "type": "u64", - "index": false + name: 'roundSlot', + type: 'u64', + index: false, }, { - "name": "timestamp", - "type": "i64", - "index": false - } - ] + name: 'timestamp', + type: 'i64', + index: false, + }, + ], }, { - "name": "OracleWithdrawEvent", - "fields": [ + name: 'OracleWithdrawEvent', + fields: [ { - "name": "oraclePubkey", - "type": "publicKey", - "index": false + name: 'oraclePubkey', + type: 'publicKey', + index: false, }, { - "name": "walletPubkey", - "type": "publicKey", - "index": false + name: 'walletPubkey', + type: 'publicKey', + index: false, }, { - "name": "destinationWallet", - "type": "publicKey", - "index": false + name: 'destinationWallet', + type: 'publicKey', + index: false, }, { - "name": "previousAmount", - "type": "u64", - "index": false + name: 'previousAmount', + type: 'u64', + index: false, }, { - "name": "newAmount", - "type": "u64", - "index": false + name: 'newAmount', + type: 'u64', + index: false, }, { - "name": "timestamp", - "type": "i64", - "index": false - } - ] + name: 'timestamp', + type: 'i64', + index: false, + }, + ], }, { - "name": "LeaseWithdrawEvent", - "fields": [ + name: 'LeaseWithdrawEvent', + fields: [ { - "name": "leasePubkey", - "type": "publicKey", - "index": false + name: 'leasePubkey', + type: 'publicKey', + index: false, }, { - "name": "walletPubkey", - "type": "publicKey", - "index": false + name: 'walletPubkey', + type: 'publicKey', + index: false, }, { - "name": "previousAmount", - "type": "u64", - "index": false + name: 'previousAmount', + type: 'u64', + index: false, }, { - "name": "newAmount", - "type": "u64", - "index": false + name: 'newAmount', + type: 'u64', + index: false, }, { - "name": "timestamp", - "type": "i64", - "index": false - } - ] + name: 'timestamp', + type: 'i64', + index: false, + }, + ], }, { - "name": "OracleSlashEvent", - "fields": [ + name: 'OracleSlashEvent', + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false + name: 'feedPubkey', + type: 'publicKey', + index: false, }, { - "name": "leasePubkey", - "type": "publicKey", - "index": false + name: 'leasePubkey', + type: 'publicKey', + index: false, }, { - "name": "oraclePubkey", - "type": "publicKey", - "index": false + name: 'oraclePubkey', + type: 'publicKey', + index: false, }, { - "name": "walletPubkey", - "type": "publicKey", - "index": false + name: 'walletPubkey', + type: 'publicKey', + index: false, }, { - "name": "amount", - "type": "u64", - "index": false + name: 'amount', + type: 'u64', + index: false, }, { - "name": "roundSlot", - "type": "u64", - "index": false + name: 'roundSlot', + type: 'u64', + index: false, }, { - "name": "timestamp", - "type": "i64", - "index": false - } - ] + name: 'timestamp', + type: 'i64', + index: false, + }, + ], }, { - "name": "LeaseFundEvent", - "fields": [ + name: 'LeaseFundEvent', + fields: [ { - "name": "leasePubkey", - "type": "publicKey", - "index": false + name: 'leasePubkey', + type: 'publicKey', + index: false, }, { - "name": "funder", - "type": "publicKey", - "index": false + name: 'funder', + type: 'publicKey', + index: false, }, { - "name": "amount", - "type": "u64", - "index": false + name: 'amount', + type: 'u64', + index: false, }, { - "name": "timestamp", - "type": "i64", - "index": false - } - ] + name: 'timestamp', + type: 'i64', + index: false, + }, + ], }, { - "name": "ProbationBrokenEvent", - "fields": [ + name: 'ProbationBrokenEvent', + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false + name: 'feedPubkey', + type: 'publicKey', + index: false, }, { - "name": "queuePubkey", - "type": "publicKey", - "index": false + name: 'queuePubkey', + type: 'publicKey', + index: false, }, { - "name": "timestamp", - "type": "i64", - "index": false - } - ] + name: 'timestamp', + type: 'i64', + index: false, + }, + ], }, { - "name": "FeedPermissionRevokedEvent", - "fields": [ + name: 'FeedPermissionRevokedEvent', + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false + name: 'feedPubkey', + type: 'publicKey', + index: false, }, { - "name": "timestamp", - "type": "i64", - "index": false - } - ] + name: 'timestamp', + type: 'i64', + index: false, + }, + ], }, { - "name": "GarbageCollectFailureEvent", - "fields": [ + name: 'GarbageCollectFailureEvent', + fields: [ { - "name": "queuePubkey", - "type": "publicKey", - "index": false - } - ] + name: 'queuePubkey', + type: 'publicKey', + index: false, + }, + ], }, { - "name": "OracleBootedEvent", - "fields": [ + name: 'OracleBootedEvent', + fields: [ { - "name": "queuePubkey", - "type": "publicKey", - "index": false + name: 'queuePubkey', + type: 'publicKey', + index: false, }, { - "name": "oraclePubkey", - "type": "publicKey", - "index": false - } - ] + name: 'oraclePubkey', + type: 'publicKey', + index: false, + }, + ], }, { - "name": "CrankLeaseInsufficientFundsEvent", - "fields": [ + name: 'CrankLeaseInsufficientFundsEvent', + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false + name: 'feedPubkey', + type: 'publicKey', + index: false, }, { - "name": "leasePubkey", - "type": "publicKey", - "index": false - } - ] + name: 'leasePubkey', + type: 'publicKey', + index: false, + }, + ], }, { - "name": "CrankPopExpectedFailureEvent", - "fields": [ + name: 'CrankPopExpectedFailureEvent', + fields: [ { - "name": "feedPubkey", - "type": "publicKey", - "index": false + name: 'feedPubkey', + type: 'publicKey', + index: false, }, { - "name": "leasePubkey", - "type": "publicKey", - "index": false - } - ] - } + name: 'leasePubkey', + type: 'publicKey', + index: false, + }, + ], + }, ], - "errors": [ + errors: [ { - "code": 6000, - "name": "ArrayOperationError", - "msg": "Illegal operation on a Switchboard array." + code: 6000, + name: 'ArrayOperationError', + msg: 'Illegal operation on a Switchboard array.', }, { - "code": 6001, - "name": "QueueOperationError", - "msg": "Illegal operation on a Switchboard queue." + code: 6001, + name: 'QueueOperationError', + msg: 'Illegal operation on a Switchboard queue.', }, { - "code": 6002, - "name": "IncorrectProgramOwnerError", - "msg": "An account required to be owned by the program has a different owner." + code: 6002, + name: 'IncorrectProgramOwnerError', + msg: + 'An account required to be owned by the program has a different owner.', }, { - "code": 6003, - "name": "InvalidAggregatorRound", - "msg": "Aggregator is not currently populated with a valid round." + code: 6003, + name: 'InvalidAggregatorRound', + msg: 'Aggregator is not currently populated with a valid round.', }, { - "code": 6004, - "name": "TooManyAggregatorJobs", - "msg": "Aggregator cannot fit any more jobs." + code: 6004, + name: 'TooManyAggregatorJobs', + msg: 'Aggregator cannot fit any more jobs.', }, { - "code": 6005, - "name": "AggregatorCurrentRoundClosed", - "msg": "Aggregator's current round is closed. No results are being accepted." + code: 6005, + name: 'AggregatorCurrentRoundClosed', + msg: + "Aggregator's current round is closed. No results are being accepted.", }, { - "code": 6006, - "name": "AggregatorInvalidSaveResult", - "msg": "Aggregator received an invalid save result instruction." + code: 6006, + name: 'AggregatorInvalidSaveResult', + msg: 'Aggregator received an invalid save result instruction.', }, { - "code": 6007, - "name": "InvalidStrDecimalConversion", - "msg": "Failed to convert string to decimal format." + code: 6007, + name: 'InvalidStrDecimalConversion', + msg: 'Failed to convert string to decimal format.', }, { - "code": 6008, - "name": "AccountLoaderMissingSignature", - "msg": "AccountLoader account is missing a required signature." + code: 6008, + name: 'AccountLoaderMissingSignature', + msg: 'AccountLoader account is missing a required signature.', }, { - "code": 6009, - "name": "MissingRequiredSignature", - "msg": "Account is missing a required signature." + code: 6009, + name: 'MissingRequiredSignature', + msg: 'Account is missing a required signature.', }, { - "code": 6010, - "name": "ArrayOverflowError", - "msg": "The attempted action will overflow a zero-copy account array." + code: 6010, + name: 'ArrayOverflowError', + msg: 'The attempted action will overflow a zero-copy account array.', }, { - "code": 6011, - "name": "ArrayUnderflowError", - "msg": "The attempted action will underflow a zero-copy account array." + code: 6011, + name: 'ArrayUnderflowError', + msg: 'The attempted action will underflow a zero-copy account array.', }, { - "code": 6012, - "name": "PubkeyNotFoundError", - "msg": "The queried public key was not found." + code: 6012, + name: 'PubkeyNotFoundError', + msg: 'The queried public key was not found.', }, { - "code": 6013, - "name": "AggregatorIllegalRoundOpenCall", - "msg": "Aggregator round open called too early." + code: 6013, + name: 'AggregatorIllegalRoundOpenCall', + msg: 'Aggregator round open called too early.', }, { - "code": 6014, - "name": "AggregatorIllegalRoundCloseCall", - "msg": "Aggregator round close called too early." + code: 6014, + name: 'AggregatorIllegalRoundCloseCall', + msg: 'Aggregator round close called too early.', }, { - "code": 6015, - "name": "AggregatorClosedError", - "msg": "Aggregator is closed. Illegal action." + code: 6015, + name: 'AggregatorClosedError', + msg: 'Aggregator is closed. Illegal action.', }, { - "code": 6016, - "name": "IllegalOracleIdxError", - "msg": "Illegal oracle index." + code: 6016, + name: 'IllegalOracleIdxError', + msg: 'Illegal oracle index.', }, { - "code": 6017, - "name": "OracleAlreadyRespondedError", - "msg": "The provided oracle has already responded this round." + code: 6017, + name: 'OracleAlreadyRespondedError', + msg: 'The provided oracle has already responded this round.', }, { - "code": 6018, - "name": "ProtoDeserializeError", - "msg": "Failed to deserialize protocol buffer." + code: 6018, + name: 'ProtoDeserializeError', + msg: 'Failed to deserialize protocol buffer.', }, { - "code": 6019, - "name": "UnauthorizedStateUpdateError", - "msg": "Unauthorized program state modification attempted." + code: 6019, + name: 'UnauthorizedStateUpdateError', + msg: 'Unauthorized program state modification attempted.', }, { - "code": 6020, - "name": "MissingOracleAccountsError", - "msg": "Not enough oracle accounts provided to closeRounds." + code: 6020, + name: 'MissingOracleAccountsError', + msg: 'Not enough oracle accounts provided to closeRounds.', }, { - "code": 6021, - "name": "OracleMismatchError", - "msg": "An unexpected oracle account was provided for the transaction." + code: 6021, + name: 'OracleMismatchError', + msg: 'An unexpected oracle account was provided for the transaction.', }, { - "code": 6022, - "name": "CrankMaxCapacityError", - "msg": "Attempted to push to a Crank that's at capacity" + code: 6022, + name: 'CrankMaxCapacityError', + msg: "Attempted to push to a Crank that's at capacity", }, { - "code": 6023, - "name": "AggregatorLeaseInsufficientFunds", - "msg": "Aggregator update call attempted but attached lease has insufficient funds." + code: 6023, + name: 'AggregatorLeaseInsufficientFunds', + msg: + 'Aggregator update call attempted but attached lease has insufficient funds.', }, { - "code": 6024, - "name": "IncorrectTokenAccountMint", - "msg": "The provided token account does not point to the Switchboard token mint." + code: 6024, + name: 'IncorrectTokenAccountMint', + msg: + 'The provided token account does not point to the Switchboard token mint.', }, { - "code": 6025, - "name": "InvalidEscrowAccount", - "msg": "An invalid escrow account was provided." + code: 6025, + name: 'InvalidEscrowAccount', + msg: 'An invalid escrow account was provided.', }, { - "code": 6026, - "name": "CrankEmptyError", - "msg": "Crank empty. Pop failed." + code: 6026, + name: 'CrankEmptyError', + msg: 'Crank empty. Pop failed.', }, { - "code": 6027, - "name": "PdaDeriveError", - "msg": "Failed to derive a PDA from the provided seed." + code: 6027, + name: 'PdaDeriveError', + msg: 'Failed to derive a PDA from the provided seed.', }, { - "code": 6028, - "name": "AggregatorAccountNotFound", - "msg": "Aggregator account missing from provided account list." + code: 6028, + name: 'AggregatorAccountNotFound', + msg: 'Aggregator account missing from provided account list.', }, { - "code": 6029, - "name": "PermissionAccountNotFound", - "msg": "Permission account missing from provided account list." + code: 6029, + name: 'PermissionAccountNotFound', + msg: 'Permission account missing from provided account list.', }, { - "code": 6030, - "name": "LeaseAccountDeriveFailure", - "msg": "Failed to derive a lease account." + code: 6030, + name: 'LeaseAccountDeriveFailure', + msg: 'Failed to derive a lease account.', }, { - "code": 6031, - "name": "PermissionAccountDeriveFailure", - "msg": "Failed to derive a permission account." + code: 6031, + name: 'PermissionAccountDeriveFailure', + msg: 'Failed to derive a permission account.', }, { - "code": 6032, - "name": "EscrowAccountNotFound", - "msg": "Escrow account missing from provided account list." + code: 6032, + name: 'EscrowAccountNotFound', + msg: 'Escrow account missing from provided account list.', }, { - "code": 6033, - "name": "LeaseAccountNotFound", - "msg": "Lease account missing from provided account list." + code: 6033, + name: 'LeaseAccountNotFound', + msg: 'Lease account missing from provided account list.', }, { - "code": 6034, - "name": "DecimalConversionError", - "msg": "Decimal conversion method failed." + code: 6034, + name: 'DecimalConversionError', + msg: 'Decimal conversion method failed.', }, { - "code": 6035, - "name": "PermissionDenied", - "msg": "Permission account is missing required flags for the given action." + code: 6035, + name: 'PermissionDenied', + msg: 'Permission account is missing required flags for the given action.', }, { - "code": 6036, - "name": "QueueAtCapacity", - "msg": "Oracle queue is at lease capacity." + code: 6036, + name: 'QueueAtCapacity', + msg: 'Oracle queue is at lease capacity.', }, { - "code": 6037, - "name": "ExcessiveCrankRowsError", - "msg": "Data feed is already pushed on a crank." + code: 6037, + name: 'ExcessiveCrankRowsError', + msg: 'Data feed is already pushed on a crank.', }, { - "code": 6038, - "name": "AggregatorLockedError", - "msg": "Aggregator is locked, no setting modifications or job additions allowed." + code: 6038, + name: 'AggregatorLockedError', + msg: + 'Aggregator is locked, no setting modifications or job additions allowed.', }, { - "code": 6039, - "name": "AggregatorInvalidBatchSizeError", - "msg": "Aggregator invalid batch size." + code: 6039, + name: 'AggregatorInvalidBatchSizeError', + msg: 'Aggregator invalid batch size.', }, { - "code": 6040, - "name": "AggregatorJobChecksumMismatch", - "msg": "Oracle provided an incorrect aggregator job checksum." + code: 6040, + name: 'AggregatorJobChecksumMismatch', + msg: 'Oracle provided an incorrect aggregator job checksum.', }, { - "code": 6041, - "name": "IntegerOverflowError", - "msg": "An integer overflow occurred." + code: 6041, + name: 'IntegerOverflowError', + msg: 'An integer overflow occurred.', }, { - "code": 6042, - "name": "InvalidUpdatePeriodError", - "msg": "Minimum update period is 5 seconds." + code: 6042, + name: 'InvalidUpdatePeriodError', + msg: 'Minimum update period is 5 seconds.', }, { - "code": 6043, - "name": "NoResultsError", - "msg": "Aggregator round evaluation attempted with no results." + code: 6043, + name: 'NoResultsError', + msg: 'Aggregator round evaluation attempted with no results.', }, { - "code": 6044, - "name": "InvalidExpirationError", - "msg": "An expiration constraint was broken." + code: 6044, + name: 'InvalidExpirationError', + msg: 'An expiration constraint was broken.', }, { - "code": 6045, - "name": "InsufficientStakeError", - "msg": "An account provided insufficient stake for action." + code: 6045, + name: 'InsufficientStakeError', + msg: 'An account provided insufficient stake for action.', }, { - "code": 6046, - "name": "LeaseInactiveError", - "msg": "The provided lease account is not active." + code: 6046, + name: 'LeaseInactiveError', + msg: 'The provided lease account is not active.', }, { - "code": 6047, - "name": "NoAggregatorJobsFound", - "msg": "No jobs are currently included in the aggregator." + code: 6047, + name: 'NoAggregatorJobsFound', + msg: 'No jobs are currently included in the aggregator.', }, { - "code": 6048, - "name": "IntegerUnderflowError", - "msg": "An integer underflow occurred." + code: 6048, + name: 'IntegerUnderflowError', + msg: 'An integer underflow occurred.', }, { - "code": 6049, - "name": "OracleQueueMismatch", - "msg": "An invalid oracle queue account was provided." + code: 6049, + name: 'OracleQueueMismatch', + msg: 'An invalid oracle queue account was provided.', }, { - "code": 6050, - "name": "OracleWalletMismatchError", - "msg": "An unexpected oracle wallet account was provided for the transaction." + code: 6050, + name: 'OracleWalletMismatchError', + msg: + 'An unexpected oracle wallet account was provided for the transaction.', }, { - "code": 6051, - "name": "InvalidBufferAccountError", - "msg": "An invalid buffer account was provided." + code: 6051, + name: 'InvalidBufferAccountError', + msg: 'An invalid buffer account was provided.', }, { - "code": 6052, - "name": "InsufficientOracleQueueError", - "msg": "Insufficient oracle queue size." + code: 6052, + name: 'InsufficientOracleQueueError', + msg: 'Insufficient oracle queue size.', }, { - "code": 6053, - "name": "InvalidAuthorityError", - "msg": "Invalid authority account provided." + code: 6053, + name: 'InvalidAuthorityError', + msg: 'Invalid authority account provided.', }, { - "code": 6054, - "name": "InvalidTokenAccountMintError", - "msg": "A provided token wallet is associated with an incorrect mint." + code: 6054, + name: 'InvalidTokenAccountMintError', + msg: 'A provided token wallet is associated with an incorrect mint.', }, { - "code": 6055, - "name": "ExcessiveLeaseWithdrawlError", - "msg": "You must leave enough funds to perform at least 1 update in the lease." + code: 6055, + name: 'ExcessiveLeaseWithdrawlError', + msg: + 'You must leave enough funds to perform at least 1 update in the lease.', }, { - "code": 6056, - "name": "InvalideHistoryAccountError", - "msg": "Invalid history account provided." + code: 6056, + name: 'InvalideHistoryAccountError', + msg: 'Invalid history account provided.', }, { - "code": 6057, - "name": "InvalidLeaseAccountEscrowError", - "msg": "Invalid lease account escrow." + code: 6057, + name: 'InvalidLeaseAccountEscrowError', + msg: 'Invalid lease account escrow.', }, { - "code": 6058, - "name": "InvalidCrankAccountError", - "msg": "Invalid crank provided." + code: 6058, + name: 'InvalidCrankAccountError', + msg: 'Invalid crank provided.', }, { - "code": 6059, - "name": "CrankNoElementsReadyError", - "msg": "No elements ready to be popped." + code: 6059, + name: 'CrankNoElementsReadyError', + msg: 'No elements ready to be popped.', }, { - "code": 6060, - "name": "IndexOutOfBoundsError", - "msg": "Index out of bounds" + code: 6060, + name: 'IndexOutOfBoundsError', + msg: 'Index out of bounds', }, { - "code": 6061, - "name": "VrfInvalidRequestError", - "msg": "Invalid vrf request params" + code: 6061, + name: 'VrfInvalidRequestError', + msg: 'Invalid vrf request params', }, { - "code": 6062, - "name": "VrfInvalidProofSubmissionError", - "msg": "Vrf proof failed to verify" + code: 6062, + name: 'VrfInvalidProofSubmissionError', + msg: 'Vrf proof failed to verify', }, { - "code": 6063, - "name": "VrfVerifyError", - "msg": "Error in verifying vrf proof." + code: 6063, + name: 'VrfVerifyError', + msg: 'Error in verifying vrf proof.', }, { - "code": 6064, - "name": "VrfCallbackError", - "msg": "Vrf callback function failed." + code: 6064, + name: 'VrfCallbackError', + msg: 'Vrf callback function failed.', }, { - "code": 6065, - "name": "VrfCallbackParamsError", - "msg": "Invalid vrf callback params provided." + code: 6065, + name: 'VrfCallbackParamsError', + msg: 'Invalid vrf callback params provided.', }, { - "code": 6066, - "name": "VrfCallbackAlreadyCalledError", - "msg": "Vrf callback has already been triggered." + code: 6066, + name: 'VrfCallbackAlreadyCalledError', + msg: 'Vrf callback has already been triggered.', }, { - "code": 6067, - "name": "VrfInvalidPubkeyError", - "msg": "The provided pubkey is invalid to use in ecvrf proofs" + code: 6067, + name: 'VrfInvalidPubkeyError', + msg: 'The provided pubkey is invalid to use in ecvrf proofs', }, { - "code": 6068, - "name": "VrfTooManyVerifyCallsError", - "msg": "Number of required verify calls exceeded" + code: 6068, + name: 'VrfTooManyVerifyCallsError', + msg: 'Number of required verify calls exceeded', }, { - "code": 6069, - "name": "VrfRequestAlreadyLaunchedError", - "msg": "Vrf request is already pending" + code: 6069, + name: 'VrfRequestAlreadyLaunchedError', + msg: 'Vrf request is already pending', }, { - "code": 6070, - "name": "VrfInsufficientVerificationError", - "msg": "Insufficient amount of proofs collected for VRF callback" + code: 6070, + name: 'VrfInsufficientVerificationError', + msg: 'Insufficient amount of proofs collected for VRF callback', }, { - "code": 6071, - "name": "InvalidVrfProducerError", - "msg": "An incorrect oracle attempted to submit a proof" + code: 6071, + name: 'InvalidVrfProducerError', + msg: 'An incorrect oracle attempted to submit a proof', }, { - "code": 6072, - "name": "InvalidGovernancePidError", - "msg": "Invalid SPLGovernance Account Supplied" + code: 6072, + name: 'InvalidGovernancePidError', + msg: 'Invalid SPLGovernance Account Supplied', }, { - "code": 6073, - "name": "InvalidGovernanceAccountError", - "msg": "An Invalid Governance Account was supplied" + code: 6073, + name: 'InvalidGovernanceAccountError', + msg: 'An Invalid Governance Account was supplied', }, { - "code": 6074, - "name": "MissingOptionalAccount", - "msg": "Expected an optional account" + code: 6074, + name: 'MissingOptionalAccount', + msg: 'Expected an optional account', }, { - "code": 6075, - "name": "InvalidSpawnRecordOwner", - "msg": "Invalid Owner for Spawn Record" + code: 6075, + name: 'InvalidSpawnRecordOwner', + msg: 'Invalid Owner for Spawn Record', }, { - "code": 6076, - "name": "NoopError", - "msg": "Noop error" + code: 6076, + name: 'NoopError', + msg: 'Noop error', }, { - "code": 6077, - "name": "MissingRequiredAccountsError", - "msg": "A required instruction account was not included" + code: 6077, + name: 'MissingRequiredAccountsError', + msg: 'A required instruction account was not included', }, { - "code": 6078, - "name": "InvalidMintError", - "msg": "Invalid mint account passed for instruction" + code: 6078, + name: 'InvalidMintError', + msg: 'Invalid mint account passed for instruction', }, { - "code": 6079, - "name": "InvalidTokenAccountKeyError", - "msg": "An invalid token account was passed into the instruction" + code: 6079, + name: 'InvalidTokenAccountKeyError', + msg: 'An invalid token account was passed into the instruction', }, { - "code": 6080, - "name": "InvalidJobAccountError", - "msg": "" - } - ] + code: 6080, + name: 'InvalidJobAccountError', + msg: '', + }, + ], } diff --git a/SwitchboardVotePlugin/SwitchboardQueueVoterClient.ts b/SwitchboardVotePlugin/SwitchboardQueueVoterClient.ts index 3ee86adcc8..dc04d5454d 100644 --- a/SwitchboardVotePlugin/SwitchboardQueueVoterClient.ts +++ b/SwitchboardVotePlugin/SwitchboardQueueVoterClient.ts @@ -9,15 +9,15 @@ export const SWITCHBOARD_ID = new PublicKey( export const SWITCHBOARD_ADDIN_ID = new PublicKey( 'B4EDDdMh5CmB6B9DeMmZmFvRzEgyHR5zWktf6httcMk6' -); +) export const SWITCHBOARD_GRANT_AUTHORITY = new PublicKey( '5wD32vPTeBk3UJfTCQUpa4KbrHZ5xxc8f4eLnqTPNW8L' -); +) export const SWITCHBOARD_REVOKE_AUTHORITY = new PublicKey( '9rkK8T8wnYXZ1SSC6g2ZhbnyL5K5v546XSbNJv7og87b' -); +) export const QUEUE_LIST: PublicKey[] = [ new PublicKey('7QN4mJo9U58XMeHEyfY6ckKxAkVLkqVtcWjwgNU6xaE'), @@ -41,19 +41,17 @@ export class SwitchboardQueueVoterClient { } } -export async function grantPermissionTx ( - program: Program, +export async function grantPermissionTx( + program: Program, grantAuthority: PublicKey, switchboardProgram: PublicKey, - permission: PublicKey, + permission: PublicKey ): Promise { - console.log("IN GRANT FUNC"); + console.log('IN GRANT FUNC') const [addinState] = await PublicKey.findProgramAddress( - [ - Buffer.from('state'), - ], - program.programId, - ); + [Buffer.from('state')], + program.programId + ) return await program.methods .grantPermission() @@ -61,26 +59,23 @@ export async function grantPermissionTx ( state: addinState, grantAuthority: grantAuthority, switchboardProgram: switchboardProgram, - permission: permission + permission: permission, }) - .transaction(); - + .transaction() } -export async function revokePermissionTx ( - program: Program, +export async function revokePermissionTx( + program: Program, revokeAuthority: PublicKey, switchboardProgram: PublicKey, - permission: PublicKey, + permission: PublicKey ): Promise { - console.log("IN REVOKE FUNC"); + console.log('IN REVOKE FUNC') const [addinState] = await PublicKey.findProgramAddress( - [ - Buffer.from('state'), - ], - program.programId, - ); + [Buffer.from('state')], + program.programId + ) return await program.methods .revokePermission() @@ -88,8 +83,7 @@ export async function revokePermissionTx ( state: addinState, revokeAuthority: revokeAuthority, switchboardProgram: switchboardProgram, - permission: permission + permission: permission, }) - .transaction(); - + .transaction() } diff --git a/SwitchboardVotePlugin/gameofnodes.json b/SwitchboardVotePlugin/gameofnodes.json index e3e675330b..4008bed3d8 100644 --- a/SwitchboardVotePlugin/gameofnodes.json +++ b/SwitchboardVotePlugin/gameofnodes.json @@ -198,10 +198,7 @@ { "name": "ebuf", "type": { - "array": [ - "u8", - 256 - ] + "array": ["u8", 256] } } ] @@ -218,4 +215,4 @@ "metadata": { "address": "B4EDDdMh5CmB6B9DeMmZmFvRzEgyHR5zWktf6httcMk6" } -} \ No newline at end of file +} diff --git a/SwitchboardVotePlugin/store/switchboardStore.ts b/SwitchboardVotePlugin/store/switchboardStore.ts index d02ed8eac1..546114a91a 100644 --- a/SwitchboardVotePlugin/store/switchboardStore.ts +++ b/SwitchboardVotePlugin/store/switchboardStore.ts @@ -13,7 +13,10 @@ interface SwitchboardPluginStore extends State { setVotingPower: (votingPower: BN) => void setIsLoading: (val: boolean) => void setOracleKeys: (keys: Array, votingClient: VotingClient) => void - setInstructions: (instructions: Array, votingClient: VotingClient) => void + setInstructions: ( + instructions: Array, + votingClient: VotingClient + ) => void } const defaultState = { @@ -39,13 +42,13 @@ const useSwitchboardPluginStore = create( }) }, setOracleKeys: (oracleKeys, votingClient) => { - votingClient._setOracles(oracleKeys); + votingClient._setOracles(oracleKeys) set((s) => { s.state.oracleKeys = oracleKeys }) }, setInstructions: (instructions, votingClient) => { - votingClient._setInstructions(instructions); + votingClient._setInstructions(instructions) set((s) => { s.state.instructions = instructions }) diff --git a/SwitchboardVotePlugin/switchboard_v2.json b/SwitchboardVotePlugin/switchboard_v2.json index 146f162867..0809111d32 100644 --- a/SwitchboardVotePlugin/switchboard_v2.json +++ b/SwitchboardVotePlugin/switchboard_v2.json @@ -1857,10 +1857,7 @@ { "name": "ebuf", "type": { - "array": [ - "u8", - 992 - ] + "array": ["u8", 992] } } ] @@ -1888,28 +1885,19 @@ { "name": "name", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { "name": "metadata", "type": { - "array": [ - "u8", - 128 - ] + "array": ["u8", 128] } }, { "name": "reserved1", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { @@ -1981,10 +1969,7 @@ { "name": "jobPubkeysData", "type": { - "array": [ - "publicKey", - 16 - ] + "array": ["publicKey", 16] } }, { @@ -2005,10 +1990,7 @@ { "name": "jobsChecksum", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { @@ -2036,19 +2018,13 @@ { "name": "jobWeights", "type": { - "array": [ - "u8", - 16 - ] + "array": ["u8", 16] } }, { "name": "ebuf", "type": { - "array": [ - "u8", - 147 - ] + "array": ["u8", 147] } } ] @@ -2082,10 +2058,7 @@ { "name": "ebuf", "type": { - "array": [ - "u8", - 256 - ] + "array": ["u8", 256] } } ] @@ -2099,10 +2072,7 @@ { "name": "ebuf", "type": { - "array": [ - "u8", - 256 - ] + "array": ["u8", 256] } } ] @@ -2152,10 +2122,7 @@ { "name": "ebuf", "type": { - "array": [ - "u8", - 256 - ] + "array": ["u8", 256] } } ] @@ -2169,19 +2136,13 @@ { "name": "name", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { "name": "metadata", "type": { - "array": [ - "u8", - 64 - ] + "array": ["u8", 64] } }, { @@ -2263,10 +2224,7 @@ { "name": "ebuf", "type": { - "array": [ - "u8", - 968 - ] + "array": ["u8", 968] } }, { @@ -2288,19 +2246,13 @@ { "name": "name", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { "name": "metadata", "type": { - "array": [ - "u8", - 64 - ] + "array": ["u8", 64] } }, { @@ -2322,10 +2274,7 @@ { "name": "ebuf", "type": { - "array": [ - "u8", - 255 - ] + "array": ["u8", 255] } }, { @@ -2343,19 +2292,13 @@ { "name": "name", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { "name": "metadata", "type": { - "array": [ - "u8", - 128 - ] + "array": ["u8", 128] } }, { @@ -2387,10 +2330,7 @@ { "name": "ebuf", "type": { - "array": [ - "u8", - 256 - ] + "array": ["u8", 256] } } ] @@ -2404,19 +2344,13 @@ { "name": "name", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { "name": "metadata", "type": { - "array": [ - "u8", - 64 - ] + "array": ["u8", 64] } }, { @@ -2430,10 +2364,7 @@ { "name": "hash", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { @@ -2520,10 +2451,7 @@ { "name": "ebuf", "type": { - "array": [ - "u8", - 1024 - ] + "array": ["u8", 1024] } } ] @@ -2537,10 +2465,7 @@ { "name": "name", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { @@ -2562,10 +2487,7 @@ { "name": "jobHash", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { @@ -2619,19 +2541,13 @@ { "name": "name", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { "name": "metadata", "type": { - "array": [ - "u8", - 128 - ] + "array": ["u8", 128] } }, { @@ -2744,10 +2660,7 @@ { "name": "jobsChecksum", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { @@ -2884,10 +2797,7 @@ { "name": "name", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { @@ -3017,10 +2927,7 @@ { "name": "name", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { @@ -3161,19 +3068,13 @@ { "name": "name", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { "name": "metadata", "type": { - "array": [ - "u8", - 64 - ] + "array": ["u8", 64] } }, { @@ -3514,10 +3415,7 @@ { "name": "bytes", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } } ] @@ -3531,10 +3429,7 @@ { "name": "bytes", "type": { - "array": [ - "u64", - 5 - ] + "array": ["u64", 5] } } ] @@ -3676,10 +3571,7 @@ { "name": "data", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } } ] @@ -3737,10 +3629,7 @@ { "name": "oraclePubkeysData", "type": { - "array": [ - "publicKey", - 16 - ] + "array": ["publicKey", 16] } }, { @@ -3757,28 +3646,19 @@ { "name": "currentPayout", "type": { - "array": [ - "i64", - 16 - ] + "array": ["i64", 16] } }, { "name": "mediansFulfilled", "type": { - "array": [ - "bool", - 16 - ] + "array": ["bool", 16] } }, { "name": "errorsFulfilled", "type": { - "array": [ - "bool", - 16 - ] + "array": ["bool", 16] } } ] @@ -3896,10 +3776,7 @@ { "name": "reprProof", "type": { - "array": [ - "u8", - 80 - ] + "array": ["u8", 80] } }, { @@ -4052,46 +3929,31 @@ { "name": "p1Bytes", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { "name": "p2Bytes", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { "name": "p3Bytes", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { "name": "p4Bytes", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { "name": "cPrimeHashbuf", "type": { - "array": [ - "u8", - 16 - ] + "array": ["u8", 16] } }, { @@ -4117,10 +3979,7 @@ { "name": "result", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } } ] @@ -4193,10 +4052,7 @@ { "name": "ixData", "type": { - "array": [ - "u8", - 1024 - ] + "array": ["u8", 1024] } }, { @@ -4214,10 +4070,7 @@ { "name": "alpha", "type": { - "array": [ - "u8", - 256 - ] + "array": ["u8", 256] } }, { @@ -4235,10 +4088,7 @@ { "name": "result", "type": { - "array": [ - "u8", - 32 - ] + "array": ["u8", 32] } }, { @@ -4248,10 +4098,7 @@ { "name": "ebuf", "type": { - "array": [ - "u8", - 256 - ] + "array": ["u8", 256] } } ] @@ -5466,4 +5313,4 @@ "metadata": { "address": "7PMP6yE6qb3XzBQr5TK2GhuruYayZzBnT8U92ySaLESC" } -} \ No newline at end of file +} diff --git a/VoteStakeRegistry/tools/deposits.ts b/VoteStakeRegistry/tools/deposits.ts index b17beaea03..0153b5ecd4 100644 --- a/VoteStakeRegistry/tools/deposits.ts +++ b/VoteStakeRegistry/tools/deposits.ts @@ -1,8 +1,5 @@ import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client' -import { - BN, - EventParser, -} from '@project-serum/anchor' +import { BN, EventParser } from '@project-serum/anchor' import { ProgramAccount, Realm, diff --git a/actions/castVote.ts b/actions/castVote.ts index 445546c22a..fad78907ad 100644 --- a/actions/castVote.ts +++ b/actions/castVote.ts @@ -1,6 +1,7 @@ import { Keypair, Transaction, TransactionInstruction } from '@solana/web3.js' import { ChatMessageBody, + getGovernanceProgramVersion, GOVERNANCE_CHAT_PROGRAM_ID, Proposal, Realm, @@ -41,12 +42,10 @@ export async function castVote( // Explicitly request the version before making RPC calls to work around race conditions in resolving // the version for RealmInfo - /*const programVersion = await getGovernanceProgramVersion( + const programVersion = await getGovernanceProgramVersion( connection, programId - )*/ - - const programVersion = 2; + ) //will run only if any plugin is connected with realm const plugin = await votingPlugin?.withCastPluginVote( diff --git a/actions/createProposal.ts b/actions/createProposal.ts index 2f9dfff911..bfebb51a90 100644 --- a/actions/createProposal.ts +++ b/actions/createProposal.ts @@ -6,6 +6,7 @@ import { } from '@solana/web3.js' import { + getGovernanceProgramVersion, getInstructionDataFromBase64, getSignatoryRecordAddress, Governance, @@ -93,12 +94,10 @@ export const createProposal = async ( // the version for RealmInfo // Changed this because it is misbehaving on my local validator setup. - /*const programVersion = await getGovernanceProgramVersion( + const programVersion = await getGovernanceProgramVersion( connection, programId - )*/ - - const programVersion = 2; + ) // V2 Approve/Deny configuration const voteType = VoteType.SINGLE_CHOICE diff --git a/actions/switchboardRefreshVoterWeight.ts b/actions/switchboardRefreshVoterWeight.ts index a1030e06f2..dadd3e88d7 100644 --- a/actions/switchboardRefreshVoterWeight.ts +++ b/actions/switchboardRefreshVoterWeight.ts @@ -1,27 +1,21 @@ -import { - Transaction, -} from '@solana/web3.js' -import {sendTransaction} from '@utils/send' +import { Transaction } from '@solana/web3.js' +import { sendTransaction } from '@utils/send' export const sbRefreshWeight = async ( voterWeightInstructions, connection, wallet ) => { - /*const voterWeightInstructions = useSwitchboardPluginStore((s) => s.state.instructions); const connection = useWalletStore((s) => s.connection) const wallet = useWalletStore((s) => s.current)*/ - const transaction = new Transaction().add( - voterWeightInstructions - ); + const transaction = new Transaction().add(voterWeightInstructions) await sendTransaction({ transaction: transaction, wallet: wallet, signers: [], connection: connection.current, - }); - + }) } diff --git a/components/TokenBalance/SwitchboardPermissionCard.tsx b/components/TokenBalance/SwitchboardPermissionCard.tsx index 15d1d7f483..7d89dd876a 100644 --- a/components/TokenBalance/SwitchboardPermissionCard.tsx +++ b/components/TokenBalance/SwitchboardPermissionCard.tsx @@ -4,24 +4,26 @@ import Button from '@components/Button' import { ChevronRightIcon } from '@heroicons/react/outline' import useQueryContext from '@hooks/useQueryContext' import useRealm from '@hooks/useRealm' -import { - getTokenOwnerRecordAddress, -} from '@solana/spl-governance' +import { getTokenOwnerRecordAddress } from '@solana/spl-governance' import Link from 'next/link' import { useState, useEffect } from 'react' import useWalletStore from 'stores/useWalletStore' import useSwitchboardPluginStore from 'SwitchboardVotePlugin/store/switchboardStore' -import { sbRefreshWeight } from '../../actions/switchboardRefreshVoterWeight' +import { sbRefreshWeight } from '../../actions/switchboardRefreshVoterWeight' const SwitchboardPermissionCard = () => { const { fmtUrlWithCluster } = useQueryContext() const connected = useWalletStore((s) => s.connected) const wallet = useWalletStore((s) => s.current) - const switchboardVoterWeight = useSwitchboardPluginStore((s) => s.state.votingPower) - const switchboardRefreshInstructions = useSwitchboardPluginStore((s) => s.state.instructions) - console.log("sbis:"); - console.log(); + const switchboardVoterWeight = useSwitchboardPluginStore( + (s) => s.state.votingPower + ) + const switchboardRefreshInstructions = useSwitchboardPluginStore( + (s) => s.state.instructions + ) + console.log('sbis:') + console.log() const [tokenOwnerRecordPk, setTokenOwneRecordPk] = useState('') const { realm, symbol } = useRealm() @@ -29,7 +31,7 @@ const SwitchboardPermissionCard = () => { useEffect(() => { const getTokenOwnerRecord = async () => { - const defaultMint = realm!.account.communityMint; + const defaultMint = realm!.account.communityMint const tokenOwnerRecordAddress = await getTokenOwnerRecordAddress( realm!.owner, realm!.pubkey, @@ -64,26 +66,24 @@ const SwitchboardPermissionCard = () => {
- { - (() => { - console.log(switchboardVoterWeight); - console.log(`does it equal zero: ${switchboardVoterWeight.isZero()}`); + {(() => { + console.log(switchboardVoterWeight) + console.log(`does it equal zero: ${switchboardVoterWeight.isZero()}`) if (switchboardVoterWeight.isZero()) { - return (You do not have voting rights) - } - else { - return (You have voting rights!) + return You do not have voting rights + } else { + return You have voting rights! } - })() - } + })()}
- + ) } diff --git a/components/TokenBalance/TokenBalanceCardWrapper.tsx b/components/TokenBalance/TokenBalanceCardWrapper.tsx index dcfbcdab2b..24fda795c6 100644 --- a/components/TokenBalance/TokenBalanceCardWrapper.tsx +++ b/components/TokenBalance/TokenBalanceCardWrapper.tsx @@ -70,10 +70,8 @@ const TokenBalanceCardWrapper = ({ (!ownTokenRecord || ownTokenRecord.account.governingTokenDepositAmount.isZero()) ) { - console.log("IS SWITCHBOARD MODE"); - return ( - - ) + console.log('IS SWITCHBOARD MODE') + return } //Default return diff --git a/hooks/useRealm.tsx b/hooks/useRealm.tsx index 67618fcc72..e03cd2de16 100644 --- a/hooks/useRealm.tsx +++ b/hooks/useRealm.tsx @@ -251,7 +251,7 @@ const getVoterWeight = ( nftVotingPower: BN, sbVotingPower: BN, pythVotingPower: BN, - ownCouncilTokenRecord: ProgramAccount | undefined, + ownCouncilTokenRecord: ProgramAccount | undefined ) => { if (currentPluginPk) { if (vsrPluginsPks.includes(currentPluginPk.toBase58())) { diff --git a/hooks/useVotingPlugins.ts b/hooks/useVotingPlugins.ts index ba569f24c0..3cf24396f0 100644 --- a/hooks/useVotingPlugins.ts +++ b/hooks/useVotingPlugins.ts @@ -6,20 +6,23 @@ import { Metadata } from '@metaplex-foundation/mpl-token-metadata' import { PublicKey, TransactionInstruction } from '@solana/web3.js' import useNftPluginStore from 'NftVotePlugin/store/nftPluginStore' import useSwitchboardPluginStore from 'SwitchboardVotePlugin/store/switchboardStore' -import { SWITCHBOARD_ID, SWITCHBOARD_ADDIN_ID } from 'SwitchboardVotePlugin/SwitchboardQueueVoterClient' +import { + SWITCHBOARD_ID, + SWITCHBOARD_ADDIN_ID, +} from 'SwitchboardVotePlugin/SwitchboardQueueVoterClient' import useVotePluginsClientStore from 'stores/useVotePluginsClientStore' import { getMaxVoterWeightRecord, getVoterWeightRecord, getGovernanceAccount, - Governance + Governance, } from '@solana/spl-governance' import { getNftMaxVoterWeightRecord } from 'NftVotePlugin/sdk/accounts' import { notify } from '@utils/notifications' import * as anchor from '@project-serum/anchor' import * as sbv2 from '@switchboard-xyz/switchboard-v2' -import sbIdl from 'SwitchboardVotePlugin/switchboard_v2.json'; -import gonIdl from 'SwitchboardVotePlugin/gameofnodes.json'; +import sbIdl from 'SwitchboardVotePlugin/switchboard_v2.json' +import gonIdl from 'SwitchboardVotePlugin/gameofnodes.json' import { LOCALNET_STAKING_ADDRESS as PYTH_LOCALNET_STAKING_ADDRESS, @@ -34,9 +37,7 @@ export const nftPluginsPks: string[] = [ 'GnftV5kLjd67tvHpNGyodwWveEKivz3ZWvvE3Z4xi2iw', ] -export const switchboardPluginsPks: string[] = [ - SWITCHBOARD_ADDIN_ID.toBase58() -] +export const switchboardPluginsPks: string[] = [SWITCHBOARD_ADDIN_ID.toBase58()] export const pythPluginsPks: string[] = [ PYTH_LOCALNET_STAKING_ADDRESS.toBase58(), @@ -59,7 +60,12 @@ export function useVotingPlugins() { setMaxVoterWeight, setIsLoadingNfts, } = useNftPluginStore() - const { setIsLoading, setVotingPower, setOracleKeys, setInstructions } = useSwitchboardPluginStore() + const { + setIsLoading, + setVotingPower, + setOracleKeys, + setInstructions, + } = useSwitchboardPluginStore() const wallet = useWalletStore((s) => s.current) const connection = useWalletStore((s) => s.connection) @@ -132,7 +138,10 @@ export function useVotingPlugins() { idl = sbIdl as anchor.Idl } - let addinIdl = await anchor.Program.fetchIdl(SWITCHBOARD_ADDIN_ID, provider) + let addinIdl = await anchor.Program.fetchIdl( + SWITCHBOARD_ADDIN_ID, + provider + ) if (!addinIdl) { addinIdl = gonIdl as anchor.Idl } @@ -149,67 +158,70 @@ export function useVotingPlugins() { provider ) - const allOracles = await switchboardProgram.account.oracleAccountData.all(); - const oData = allOracles.map(({publicKey, account}) => { + const allOracles = await switchboardProgram.account.oracleAccountData.all() + const oData = allOracles.map(({ publicKey, account }) => { return { oracleData: account as any, oracle: publicKey, } - }); - - const myNodesForRealm: PublicKey[] = []; - const setVoterWeightInstructions: TransactionInstruction[] = []; + }) + + const myNodesForRealm: PublicKey[] = [] + const setVoterWeightInstructions: TransactionInstruction[] = [] for (const { oracle, oracleData } of oData) { if (!wallet || !wallet.publicKey || !realm || !oData) { continue } - const queuePk = oracleData.queuePubkey as PublicKey; + const queuePk = oracleData.queuePubkey as PublicKey const [addinState] = await PublicKey.findProgramAddress( - [ - Buffer.from('state'), - ], - addinProgram.programId, - ); + [Buffer.from('state')], + addinProgram.programId + ) - const addinStateData = await addinProgram.account.state.fetch(addinState); - const queue = await switchboardProgram.account.oracleQueueAccountData.fetch(queuePk); - const queueAuthority = queue.authority as PublicKey; - const grantAuthority = addinStateData.grantAuthority as PublicKey; + const addinStateData = await addinProgram.account.state.fetch( + addinState + ) + const queue = await switchboardProgram.account.oracleQueueAccountData.fetch( + queuePk + ) + const queueAuthority = queue.authority as PublicKey + const grantAuthority = addinStateData.grantAuthority as PublicKey try { - const g = await getGovernanceAccount(provider.connection, grantAuthority, Governance); + const g = await getGovernanceAccount( + provider.connection, + grantAuthority, + Governance + ) if ( g.account.realm.equals(realm.pubkey) && oracleData.oracleAuthority.equals(wallet.publicKey) ) { - myNodesForRealm.push(oracle); + myNodesForRealm.push(oracle) const [p] = sbv2.PermissionAccount.fromSeed( switchboardProgram, queueAuthority, queuePk, oracle - ); + ) const ix = await p.setVoterWeightTx({ - govProgram: realm.owner, + govProgram: realm.owner, pubkeySigner: wallet.publicKey, addinProgram: addinProgram, realm: realm.pubkey, - }); + }) - setVoterWeightInstructions.push( - ix.instructions[0] - ); + setVoterWeightInstructions.push(ix.instructions[0]) } - } - catch (e) { - console.log(e); + } catch (e) { + console.log(e) } } - setOracleKeys(myNodesForRealm, currentClient); - setInstructions(setVoterWeightInstructions, currentClient); + setOracleKeys(myNodesForRealm, currentClient) + setInstructions(setVoterWeightInstructions, currentClient) try { const [ @@ -231,17 +243,14 @@ export function useVotingPlugins() { // 'no sb governance' setVotingPower(new anchor.BN(0)) } - } - catch (e) { - console.log("Couldn't get voter weight record. Setting to zero."); + } catch (e) { + console.log("Couldn't get voter weight record. Setting to zero.") setVotingPower(new anchor.BN(0)) } + } catch (e) { + console.log("Couldn't get VWR") + console.log(e) } - catch(e) { - console.log("Couldn't get VWR"); - console.log(e); - } - } catch (e) { console.log(e) notify({ diff --git a/models/voteWeights.ts b/models/voteWeights.ts index ba01f5b1d8..0d24a6b73f 100644 --- a/models/voteWeights.ts +++ b/models/voteWeights.ts @@ -330,9 +330,7 @@ export class SwitchboardQueueVoteWeight implements VoterWeightInterface { // Checks if the voter has any voting weight hasAnyWeight() { - return ( - !this.votingPower.isZero() - ) + return !this.votingPower.isZero() } // Returns first available tokenRecord @@ -349,7 +347,7 @@ export class SwitchboardQueueVoteWeight implements VoterWeightInterface { ) } hasMinCouncilWeight(_minCouncilWeight: BN) { - return false + return false } canCreateProposal(_config: GovernanceConfig) { @@ -389,7 +387,7 @@ export class SwitchboardQueueVoteWeight implements VoterWeightInterface { getTokenRecordToCreateProposal(_config: GovernanceConfig) { if (this.communityTokenRecord !== undefined) { - return this.communityTokenRecord; + return this.communityTokenRecord } throw new Error('Not enough vote weight to create proposal') } diff --git a/pages/dao/[symbol]/proposal/components/NewProposalBtn.tsx b/pages/dao/[symbol]/proposal/components/NewProposalBtn.tsx index 00bd92e6e1..851bce8452 100644 --- a/pages/dao/[symbol]/proposal/components/NewProposalBtn.tsx +++ b/pages/dao/[symbol]/proposal/components/NewProposalBtn.tsx @@ -34,7 +34,9 @@ const NewProposalBtn = () => { ? 'Connect your wallet to create new proposal' : governanceItems.length === 0 ? 'There is no governance configuration to create a new proposal' - : !governanceItems.some((g) => ownVoterWeight.canCreateProposal(g.account.config)) + : !governanceItems.some((g) => + ownVoterWeight.canCreateProposal(g.account.config) + ) ? "You don't have enough governance power to create a new proposal" : toManyCommunityOutstandingProposalsForUser ? 'Too many community outstanding proposals. You need to finalize them before creating a new one.' diff --git a/pages/dao/[symbol]/proposal/components/instructions/Switchboard/AdmitOracle.tsx b/pages/dao/[symbol]/proposal/components/instructions/Switchboard/AdmitOracle.tsx index 92b137be84..5eabae47b3 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Switchboard/AdmitOracle.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Switchboard/AdmitOracle.tsx @@ -1,25 +1,23 @@ import React, { useContext, useEffect, useState } from 'react' -import { +import { ProgramAccount, serializeInstructionToBase64, Governance, - getGovernance + getGovernance, } from '@solana/spl-governance' -import { - SwitchboardAdmitOracleForm -} from '@utils/uiTypes/proposalCreationTypes' +import { SwitchboardAdmitOracleForm } from '@utils/uiTypes/proposalCreationTypes' import { PublicKey } from '@solana/web3.js' import Input from '@components/inputs/Input' import * as sbv2 from '@switchboard-xyz/switchboard-v2' import useWalletStore from 'stores/useWalletStore' import * as anchor from '@project-serum/anchor' -import sbIdl from 'SwitchboardVotePlugin/switchboard_v2.json'; -import gonIdl from 'SwitchboardVotePlugin/gameofnodes.json'; -import { - SWITCHBOARD_ID, - SWITCHBOARD_ADDIN_ID, +import sbIdl from 'SwitchboardVotePlugin/switchboard_v2.json' +import gonIdl from 'SwitchboardVotePlugin/gameofnodes.json' +import { + SWITCHBOARD_ID, + SWITCHBOARD_ADDIN_ID, SWITCHBOARD_GRANT_AUTHORITY, - grantPermissionTx + grantPermissionTx, } from 'SwitchboardVotePlugin/SwitchboardQueueVoterClient' import { NewProposalContext } from '../../../new' import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' @@ -31,127 +29,130 @@ const SwitchboardAdmitOracle = ({ index: number _governance: ProgramAccount | null }) => { - - const [form, setForm] = useState({oraclePubkey: undefined, queuePubkey: undefined}) + const [form, setForm] = useState({ + oraclePubkey: undefined, + queuePubkey: undefined, + }) const connection = useWalletStore((s) => s.connection) const wallet = useWalletStore((s) => s.current) const { handleSetInstructions } = useContext(NewProposalContext) useEffect(() => { - - handleSetInstructions({ - governedAccount: SWITCHBOARD_GRANT_AUTHORITY, - getInstruction, - }, index) - - }, [form]); + handleSetInstructions( + { + governedAccount: SWITCHBOARD_GRANT_AUTHORITY, + getInstruction, + }, + index + ) + }, [form]) async function getInstruction(): Promise { + const options = anchor.AnchorProvider.defaultOptions() + const provider = new anchor.AnchorProvider( + connection.current, + (wallet as unknown) as anchor.Wallet, + options + ) - const options = anchor.AnchorProvider.defaultOptions() - const provider = new anchor.AnchorProvider( - connection.current, - (wallet as unknown) as anchor.Wallet, - options - ) + const switchboardProgram = new anchor.Program( + sbIdl as anchor.Idl, + SWITCHBOARD_ID, + provider + ) - const switchboardProgram = new anchor.Program( - sbIdl as anchor.Idl, - SWITCHBOARD_ID, - provider - ) + const addinProgram = new anchor.Program( + gonIdl as anchor.Idl, + SWITCHBOARD_ADDIN_ID, + provider + ) - const addinProgram = new anchor.Program( - gonIdl as anchor.Idl, - SWITCHBOARD_ADDIN_ID, - provider - ) + const [addinState] = await PublicKey.findProgramAddress( + [Buffer.from('state')], + addinProgram.programId + ) - const [addinState] = await PublicKey.findProgramAddress( - [ - Buffer.from('state'), - ], - addinProgram.programId, - ); - - let qPk; - if (form === undefined) { - qPk = PublicKey.default - } - else { - qPk = form.queuePubkey - } - let oPk; - if (form === undefined) { - oPk = PublicKey.default - } - else { - oPk = form.oraclePubkey - } - const p = sbv2.PermissionAccount.fromSeed( - switchboardProgram, - addinState, - new PublicKey(qPk), - new PublicKey(oPk), - )[0]; - console.log("P:"); - console.log(p); + let qPk + if (form === undefined) { + qPk = PublicKey.default + } else { + qPk = form.queuePubkey + } + let oPk + if (form === undefined) { + oPk = PublicKey.default + } else { + oPk = form.oraclePubkey + } + const p = sbv2.PermissionAccount.fromSeed( + switchboardProgram, + addinState, + new PublicKey(qPk), + new PublicKey(oPk) + )[0] + console.log('P:') + console.log(p) - const grantTx = await grantPermissionTx( - addinProgram, - SWITCHBOARD_GRANT_AUTHORITY, - SWITCHBOARD_ID, - p.publicKey - ); + const grantTx = await grantPermissionTx( + addinProgram, + SWITCHBOARD_GRANT_AUTHORITY, + SWITCHBOARD_ID, + p.publicKey + ) - const gov = await getGovernance(connection.current, SWITCHBOARD_GRANT_AUTHORITY); - return { - serializedInstruction: serializeInstructionToBase64(grantTx.instructions[0]), - isValid: true, - governance: gov, - }; + const gov = await getGovernance( + connection.current, + SWITCHBOARD_GRANT_AUTHORITY + ) + return { + serializedInstruction: serializeInstructionToBase64( + grantTx.instructions[0] + ), + isValid: true, + governance: gov, } + } return ( <> - { - let oPk; + { + let oPk if (form === undefined) { oPk = PublicKey.default - } - else { + } else { oPk = form.oraclePubkey } return oPk - })() - } - onChange={(text) => { - setForm({ ...form, ['oraclePubkey']: new PublicKey(text.target.value) }); - }} - /> - { - let qPk; + })()} + onChange={(text) => { + setForm({ + ...form, + ['oraclePubkey']: new PublicKey(text.target.value), + }) + }} + /> + { + let qPk if (form === undefined) { qPk = PublicKey.default - } - else { + } else { qPk = form.queuePubkey } return qPk - })() - } - onChange={(text) => { - setForm({ ...form, ['queuePubkey']: new PublicKey(text.target.value) }) - }} - /> + })()} + onChange={(text) => { + setForm({ + ...form, + ['queuePubkey']: new PublicKey(text.target.value), + }) + }} + /> ) } diff --git a/pages/dao/[symbol]/proposal/components/instructions/Switchboard/RevokeOracle.tsx b/pages/dao/[symbol]/proposal/components/instructions/Switchboard/RevokeOracle.tsx index 6329c64def..d78c76f557 100644 --- a/pages/dao/[symbol]/proposal/components/instructions/Switchboard/RevokeOracle.tsx +++ b/pages/dao/[symbol]/proposal/components/instructions/Switchboard/RevokeOracle.tsx @@ -1,32 +1,30 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ import React, { useContext, useEffect, useState } from 'react' //import { ForesightHasMarketId } from '@utils/uiTypes/proposalCreationTypes' -import { +import { ProgramAccount, serializeInstructionToBase64, Governance, - getGovernance + getGovernance, } from '@solana/spl-governance' /*import { governance as foresightGov, utils, consts, } from '@foresight-tmp/foresight-sdk'*/ -import { - SwitchboardRevokeOracleForm -} from '@utils/uiTypes/proposalCreationTypes' +import { SwitchboardRevokeOracleForm } from '@utils/uiTypes/proposalCreationTypes' import { PublicKey } from '@solana/web3.js' import Input from '@components/inputs/Input' import * as sbv2 from '@switchboard-xyz/switchboard-v2' import useWalletStore from 'stores/useWalletStore' import * as anchor from '@project-serum/anchor' -import sbIdl from 'SwitchboardVotePlugin/switchboard_v2.json'; -import gonIdl from 'SwitchboardVotePlugin/gameofnodes.json'; -import { - SWITCHBOARD_ID, - SWITCHBOARD_ADDIN_ID, +import sbIdl from 'SwitchboardVotePlugin/switchboard_v2.json' +import gonIdl from 'SwitchboardVotePlugin/gameofnodes.json' +import { + SWITCHBOARD_ID, + SWITCHBOARD_ADDIN_ID, SWITCHBOARD_REVOKE_AUTHORITY, - revokePermissionTx + revokePermissionTx, } from 'SwitchboardVotePlugin/SwitchboardQueueVoterClient' import { NewProposalContext } from '../../../new' import { UiInstruction } from '@utils/uiTypes/proposalCreationTypes' @@ -38,105 +36,114 @@ const SwitchboardRevokeOracle = ({ index: number _governance: ProgramAccount | null }) => { - - const [form, setForm] = useState({oraclePubkey: undefined, queuePubkey: undefined}) + const [form, setForm] = useState({ + oraclePubkey: undefined, + queuePubkey: undefined, + }) const connection = useWalletStore((s) => s.connection) const wallet = useWalletStore((s) => s.current) const { handleSetInstructions } = useContext(NewProposalContext) useEffect(() => { - - handleSetInstructions({ - governedAccount: SWITCHBOARD_REVOKE_AUTHORITY, - getInstruction, - }, index) - - }, [form]); + handleSetInstructions( + { + governedAccount: SWITCHBOARD_REVOKE_AUTHORITY, + getInstruction, + }, + index + ) + }, [form]) async function getInstruction(): Promise { + const options = anchor.AnchorProvider.defaultOptions() + const provider = new anchor.AnchorProvider( + connection.current, + (wallet as unknown) as anchor.Wallet, + options + ) + + const switchboardProgram = new anchor.Program( + sbIdl as anchor.Idl, + SWITCHBOARD_ID, + provider + ) + + const addinProgram = new anchor.Program( + gonIdl as anchor.Idl, + SWITCHBOARD_ADDIN_ID, + provider + ) + + const [addinState] = await PublicKey.findProgramAddress( + [Buffer.from('state')], + addinProgram.programId + ) + + let qPk + if (form === undefined) { + qPk = PublicKey.default + } else { + qPk = form.queuePubkey + } + let oPk + if (form === undefined) { + oPk = PublicKey.default + } else { + oPk = form.oraclePubkey + } - const options = anchor.AnchorProvider.defaultOptions() - const provider = new anchor.AnchorProvider( - connection.current, - (wallet as unknown) as anchor.Wallet, - options - ) - - const switchboardProgram = new anchor.Program( - sbIdl as anchor.Idl, - SWITCHBOARD_ID, - provider - ) - - const addinProgram = new anchor.Program( - gonIdl as anchor.Idl, - SWITCHBOARD_ADDIN_ID, - provider - ) - - const [addinState] = await PublicKey.findProgramAddress( - [ - Buffer.from('state'), - ], - addinProgram.programId, - ); - - let qPk; - if (form === undefined) { - qPk = PublicKey.default - } - else { - qPk = form.queuePubkey - } - let oPk; - if (form === undefined) { - oPk = PublicKey.default - } - else { - oPk = form.oraclePubkey - } - - const p = sbv2.PermissionAccount.fromSeed( - switchboardProgram, - addinState, - new PublicKey(qPk), - new PublicKey(oPk), - )[0]; - - const revokeTx = await revokePermissionTx( - addinProgram, - SWITCHBOARD_REVOKE_AUTHORITY, - SWITCHBOARD_ID, - p.publicKey - ); - - const gov = await getGovernance(connection.current, SWITCHBOARD_REVOKE_AUTHORITY); - return { - serializedInstruction: serializeInstructionToBase64(revokeTx.instructions[0]), - isValid: true, - governance: gov, - }; + const p = sbv2.PermissionAccount.fromSeed( + switchboardProgram, + addinState, + new PublicKey(qPk), + new PublicKey(oPk) + )[0] + + const revokeTx = await revokePermissionTx( + addinProgram, + SWITCHBOARD_REVOKE_AUTHORITY, + SWITCHBOARD_ID, + p.publicKey + ) + + const gov = await getGovernance( + connection.current, + SWITCHBOARD_REVOKE_AUTHORITY + ) + return { + serializedInstruction: serializeInstructionToBase64( + revokeTx.instructions[0] + ), + isValid: true, + governance: gov, } + } return ( <> - { - setForm({ ...form, ['oraclePubkey']: new PublicKey(text.target.value) }); - //setGovernance(); - }} - /> - { - setForm({ ...form, ['queuePubkey']: new PublicKey(text.target.value) }) - }} - /> + { + setForm({ + ...form, + ['oraclePubkey']: new PublicKey(text.target.value), + }) + //setGovernance(); + }} + /> + { + setForm({ + ...form, + ['queuePubkey']: new PublicKey(text.target.value), + }) + }} + /> ) } diff --git a/pages/dao/[symbol]/proposal/new.tsx b/pages/dao/[symbol]/proposal/new.tsx index 3cb6fa9a79..ceabd66c1a 100644 --- a/pages/dao/[symbol]/proposal/new.tsx +++ b/pages/dao/[symbol]/proposal/new.tsx @@ -265,14 +265,13 @@ const New = () => { selectedGovernance = (await fetchRealmGovernance( governance.pubkey )) as ProgramAccount - } - else { + } else { selectedGovernance = (await fetchRealmGovernance( governance )) as ProgramAccount } - console.log("creating proposal with args:"); + console.log('creating proposal with args:') console.log({ title: form.title, description: form.description, @@ -280,7 +279,7 @@ const New = () => { instructionsData, voteByCouncil, isDraft, - }); + }) proposalAddress = await handleCreateProposal({ title: form.title, description: form.description, @@ -296,8 +295,8 @@ const New = () => { router.push(url) } catch (ex) { - console.log("Notifying:"); - console.log(ex); + console.log('Notifying:') + console.log(ex) notify({ type: 'error', message: `${ex}` }) } } else { @@ -311,7 +310,7 @@ const New = () => { }, [instructionsData[0].governedAccount?.pubkey]) useEffect(() => { - console.log("this useeffect was called..."); + console.log('this useeffect was called...') const governedAccount = extractGovernanceAccountFromInstructionsData( instructionsData ) @@ -320,8 +319,8 @@ const New = () => { }, [instructionsData]) const getCurrentInstruction = ({ typeId, idx }) => { - console.log("IN GET CURRENT INSTRUCTION:"); - console.log(typeId); + console.log('IN GET CURRENT INSTRUCTION:') + console.log(typeId) switch (typeId) { case Instructions.Transfer: return ( @@ -369,7 +368,6 @@ const New = () => { case Instructions.WithdrawFromGoblinGold: return - case Instructions.SwitchboardAdmitOracle: return case Instructions.SwitchboardRevokeOracle: @@ -658,7 +656,8 @@ const New = () => {
Add transaction diff --git a/utils/uiTypes/VotePlugin.ts b/utils/uiTypes/VotePlugin.ts index ad62da8183..e0ee662e0a 100644 --- a/utils/uiTypes/VotePlugin.ts +++ b/utils/uiTypes/VotePlugin.ts @@ -1,7 +1,10 @@ import { VsrClient } from '@blockworks-foundation/voter-stake-registry-client' import { Metadata } from '@metaplex-foundation/mpl-token-metadata' import { NftVoterClient } from '@solana/governance-program-library' -import { SwitchboardQueueVoterClient, SWITCHBOARD_ADDIN_ID } from '../../SwitchboardVotePlugin/SwitchboardQueueVoterClient' +import { + SwitchboardQueueVoterClient, + SWITCHBOARD_ADDIN_ID, +} from '../../SwitchboardVotePlugin/SwitchboardQueueVoterClient' import { ProgramAccount, Realm, @@ -32,7 +35,12 @@ type UpdateVoterWeightRecordTypes = | 'signOffProposal' export interface VotingClientProps { - client: VsrClient | NftVoterClient | SwitchboardQueueVoterClient | PythClient | undefined + client: + | VsrClient + | NftVoterClient + | SwitchboardQueueVoterClient + | PythClient + | undefined realm: ProgramAccount | undefined walletPk: PublicKey | null | undefined } @@ -71,7 +79,12 @@ interface ProgramAddresses { //Abstract for common functions that plugins will implement export class VotingClient { - client: VsrClient | NftVoterClient | SwitchboardQueueVoterClient | PythClient | undefined + client: + | VsrClient + | NftVoterClient + | SwitchboardQueueVoterClient + | PythClient + | undefined realm: ProgramAccount | undefined walletPk: PublicKey | null | undefined votingNfts: NFTWithMeta[] @@ -202,16 +215,11 @@ export class VotingClient { } } if (this.client instanceof SwitchboardQueueVoterClient) { - instructions.push( - this.instructions[0] - ) + instructions.push(this.instructions[0]) const [vwr] = await PublicKey.findProgramAddress( - [ - Buffer.from('VoterWeightRecord'), - this.oracles[0].toBytes(), - ], - SWITCHBOARD_ADDIN_ID, - ); + [Buffer.from('VoterWeightRecord'), this.oracles[0].toBytes()], + SWITCHBOARD_ADDIN_ID + ) return { voterWeightPk: vwr, maxVoterWeightRecord: undefined } } }