From 0d2dede8a6f1e38aa1d967657bd11a403233b10b Mon Sep 17 00:00:00 2001 From: lthiery Date: Thu, 24 Aug 2023 10:18:43 -0700 Subject: [PATCH] renegerate IDLs --- idl/helium_entity_manager.json | 677 +++++++++++++++++++-------------- idl/helium_sub_daos.json | 85 ++++- idl/lazy_distributor.json | 2 +- idl/mobile_entity_manager.json | 12 +- idl/rewards_oracle.json | 78 +++- idl/voter_stake_registry.json | 463 ++++++++++++++-------- 6 files changed, 863 insertions(+), 454 deletions(-) diff --git a/idl/helium_entity_manager.json b/idl/helium_entity_manager.json index 6889f04..b949327 100644 --- a/idl/helium_entity_manager.json +++ b/idl/helium_entity_manager.json @@ -1,5 +1,5 @@ { - "version": "0.1.0", + "version": "0.1.4", "name": "helium_entity_manager", "instructions": [ { @@ -1057,164 +1057,6 @@ ], "args": [] }, - { - "name": "genesisIssueHotspotV0", - "accounts": [ - { - "name": "lazySigner", - "isMut": true, - "isSigner": true, - "pda": { - "seeds": [ - { - "kind": "const", - "type": "string", - "value": "lazy_signer" - }, - { - "kind": "const", - "type": "string", - "value": "nJWGUMOK" - } - ] - } - }, - { - "name": "collection", - "isMut": false, - "isSigner": false - }, - { - "name": "collectionMetadata", - "isMut": true, - "isSigner": false - }, - { - "name": "collectionMasterEdition", - "isMut": false, - "isSigner": false - }, - { - "name": "maker", - "isMut": false, - "isSigner": false, - "relations": [ - "collection", - "merkle_tree" - ] - }, - { - "name": "rewardableEntityConfig", - "isMut": false, - "isSigner": false, - "docs": [ - "Not passing it as an arg because lookup table will compress this to 1 byte." - ] - }, - { - "name": "entityCreator", - "isMut": false, - "isSigner": false, - "pda": { - "seeds": [ - { - "kind": "const", - "type": "string", - "value": "entity_creator" - }, - { - "kind": "account", - "type": "publicKey", - "account": "DaoV0", - "path": "dao" - } - ] - } - }, - { - "name": "dao", - "isMut": false, - "isSigner": false - }, - { - "name": "keyToAsset", - "isMut": true, - "isSigner": false - }, - { - "name": "info", - "isMut": true, - "isSigner": false - }, - { - "name": "treeAuthority", - "isMut": true, - "isSigner": false - }, - { - "name": "recipient", - "isMut": false, - "isSigner": false - }, - { - "name": "merkleTree", - "isMut": true, - "isSigner": false - }, - { - "name": "bubblegumSigner", - "isMut": false, - "isSigner": false, - "pda": { - "seeds": [ - { - "kind": "const", - "type": "string", - "value": "collection_cpi" - } - ], - "programId": { - "kind": "account", - "type": "publicKey", - "path": "bubblegum_program" - } - } - }, - { - "name": "tokenMetadataProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "logWrapper", - "isMut": false, - "isSigner": false - }, - { - "name": "bubblegumProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "compressionProgram", - "isMut": false, - "isSigner": false - }, - { - "name": "systemProgram", - "isMut": false, - "isSigner": false - } - ], - "args": [ - { - "name": "args", - "type": { - "defined": "GenesisIssueHotspotArgsV0" - } - } - ] - }, { "name": "onboardIotHotspotV0", "accounts": [ @@ -1319,7 +1161,7 @@ }, { "name": "subDao", - "isMut": false, + "isMut": true, "isSigner": false, "relations": [ "dao" @@ -1382,6 +1224,11 @@ "name": "systemProgram", "isMut": false, "isSigner": false + }, + { + "name": "heliumSubDaosProgram", + "isMut": false, + "isSigner": false } ], "args": [ @@ -1497,7 +1344,7 @@ }, { "name": "subDao", - "isMut": false, + "isMut": true, "isSigner": false, "relations": [ "dao" @@ -1560,6 +1407,11 @@ "name": "systemProgram", "isMut": false, "isSigner": false + }, + { + "name": "heliumSubDaosProgram", + "isMut": false, + "isSigner": false } ], "args": [ @@ -2607,7 +2459,7 @@ }, { "name": "subDao", - "isMut": false, + "isMut": true, "isSigner": false, "relations": [ "dao" @@ -2670,6 +2522,11 @@ "name": "systemProgram", "isMut": false, "isSigner": false + }, + { + "name": "heliumSubDaosProgram", + "isMut": false, + "isSigner": false } ], "args": [ @@ -2782,7 +2639,7 @@ "args": [] }, { - "name": "updateProgramTreeV0", + "name": "tempRepairIotOperationsFund", "accounts": [ { "name": "payer", @@ -2790,61 +2647,57 @@ "isSigner": true }, { - "name": "programApprover", + "name": "authority", "isMut": false, "isSigner": true }, { - "name": "programApproval", + "name": "dao", "isMut": false, - "isSigner": false - }, - { - "name": "newTreeAuthority", - "isMut": true, "isSigner": false, - "pda": { - "seeds": [ - { - "kind": "account", - "type": "publicKey", - "path": "new_merkle_tree" - } - ], - "programId": { - "kind": "account", - "type": "publicKey", - "path": "bubblegum_program" - } - } + "relations": [ + "authority" + ] }, { - "name": "newMerkleTree", + "name": "keyToAsset", "isMut": true, "isSigner": false - }, + } + ], + "args": [] + }, + { + "name": "setEntityActiveV0", + "accounts": [ { - "name": "treeCreator", + "name": "activeDeviceAuthority", "isMut": false, "isSigner": true }, { - "name": "logWrapper", + "name": "rewardableEntityConfig", "isMut": false, - "isSigner": false + "isSigner": false, + "relations": [ + "sub_dao" + ] }, { - "name": "systemProgram", - "isMut": false, - "isSigner": false + "name": "subDao", + "isMut": true, + "isSigner": false, + "relations": [ + "active_device_authority" + ] }, { - "name": "bubblegumProgram", - "isMut": false, + "name": "info", + "isMut": true, "isSigner": false }, { - "name": "compressionProgram", + "name": "heliumSubDaosProgram", "isMut": false, "isSigner": false } @@ -2853,44 +2706,313 @@ { "name": "args", "type": { - "defined": "UpdateProgramTreeArgsV0" + "defined": "SetEntityActiveArgsV0" } } ] }, { - "name": "tempRepairIotOperationsFund", + "name": "tempBackfillOnboardingFeesV0", "accounts": [ { - "name": "payer", - "isMut": true, + "name": "activeDeviceAuthority", + "isMut": false, "isSigner": true }, { - "name": "authority", + "name": "rewardableEntityConfig", "isMut": false, - "isSigner": true + "isSigner": false, + "relations": [ + "sub_dao" + ] + }, + { + "name": "subDao", + "isMut": true, + "isSigner": false, + "relations": [ + "active_device_authority", + "dao" + ] }, { "name": "dao", "isMut": false, + "isSigner": false + }, + { + "name": "keyToAsset", + "isMut": false, "isSigner": false, "relations": [ - "authority" + "dao" ] }, { - "name": "keyToAsset", + "name": "iotInfo", "isMut": true, "isSigner": false } ], "args": [] - } - ], - "accounts": [ + }, { - "name": "RewardableEntityConfigV0", + "name": "tempBackfillMobileInfoDataV0", + "accounts": [ + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "rewardableEntityConfig", + "isMut": false, + "isSigner": false, + "relations": [ + "sub_dao" + ] + }, + { + "name": "subDao", + "isMut": true, + "isSigner": false, + "relations": [ + "authority" + ] + }, + { + "name": "dao", + "isMut": false, + "isSigner": false + }, + { + "name": "keyToAsset", + "isMut": false, + "isSigner": false, + "relations": [ + "dao" + ] + }, + { + "name": "mobileInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "heliumSubDaosProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "tempPayMobileOnboardingFeeV0", + "accounts": [ + { + "name": "dcFeePayer", + "isMut": true, + "isSigner": true + }, + { + "name": "dcBurner", + "isMut": true, + "isSigner": false + }, + { + "name": "rewardableEntityConfig", + "isMut": false, + "isSigner": false, + "relations": [ + "sub_dao" + ] + }, + { + "name": "subDao", + "isMut": true, + "isSigner": false, + "relations": [ + "dao" + ] + }, + { + "name": "dao", + "isMut": false, + "isSigner": false, + "relations": [ + "dc_mint" + ] + }, + { + "name": "dcMint", + "isMut": true, + "isSigner": false + }, + { + "name": "dc", + "isMut": false, + "isSigner": false, + "pda": { + "seeds": [ + { + "kind": "const", + "type": "string", + "value": "dc" + }, + { + "kind": "account", + "type": "publicKey", + "account": "Mint", + "path": "dc_mint" + } + ], + "programId": { + "kind": "account", + "type": "publicKey", + "path": "data_credits_program" + } + }, + "relations": [ + "dc_mint" + ] + }, + { + "name": "keyToAsset", + "isMut": false, + "isSigner": false, + "relations": [ + "dao" + ] + }, + { + "name": "mobileInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "dataCreditsProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "associatedTokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "heliumSubDaosProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "tempUpdateIotOperationsFundMetadata", + "accounts": [ + { + "name": "payer", + "isMut": true, + "isSigner": true + }, + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "dao", + "isMut": false, + "isSigner": false, + "relations": [ + "authority" + ] + }, + { + "name": "entityCreator", + "isMut": false, + "isSigner": false, + "pda": { + "seeds": [ + { + "kind": "const", + "type": "string", + "value": "entity_creator" + }, + { + "kind": "account", + "type": "publicKey", + "account": "DaoV0", + "path": "dao" + } + ] + } + }, + { + "name": "mint", + "isMut": false, + "isSigner": false + }, + { + "name": "metadata", + "isMut": true, + "isSigner": false, + "pda": { + "seeds": [ + { + "kind": "const", + "type": "string", + "value": "metadata" + }, + { + "kind": "account", + "type": "publicKey", + "path": "token_metadata_program" + }, + { + "kind": "account", + "type": "publicKey", + "account": "Mint", + "path": "mint" + } + ], + "programId": { + "kind": "account", + "type": "publicKey", + "path": "token_metadata_program" + } + } + }, + { + "name": "tokenMetadataProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "TempUpdateIotOperationsFundMetadataArgs" + } + } + ] + } + ], + "accounts": [ + { + "name": "RewardableEntityConfigV0", "type": { "kind": "struct", "fields": [ @@ -3043,12 +3165,6 @@ { "name": "bumpSeed", "type": "u8" - }, - { - "name": "approvedMerkleTrees", - "type": { - "vec": "publicKey" - } } ] } @@ -3121,6 +3237,14 @@ { "name": "numLocationAsserts", "type": "u16" + }, + { + "name": "isActive", + "type": "bool" + }, + { + "name": "dcOnboardingFeePaid", + "type": "u64" } ] } @@ -3151,6 +3275,14 @@ { "name": "numLocationAsserts", "type": "u16" + }, + { + "name": "isActive", + "type": "bool" + }, + { + "name": "dcOnboardingFeePaid", + "type": "u64" } ] } @@ -3169,44 +3301,6 @@ ] } }, - { - "name": "GenesisIssueHotspotArgsV0", - "type": { - "kind": "struct", - "fields": [ - { - "name": "entityKey", - "type": "bytes" - }, - { - "name": "location", - "type": { - "option": "u64" - } - }, - { - "name": "elevation", - "type": { - "option": "i32" - } - }, - { - "name": "gain", - "type": { - "option": "i32" - } - }, - { - "name": "isFullHotspot", - "type": "bool" - }, - { - "name": "numLocationAsserts", - "type": "u16" - } - ] - } - }, { "name": "InitializeDataOnlyArgsV0", "type": { @@ -3518,6 +3612,22 @@ ] } }, + { + "name": "SetEntityActiveArgsV0", + "type": { + "kind": "struct", + "fields": [ + { + "name": "isActive", + "type": "bool" + }, + { + "name": "entityKey", + "type": "bytes" + } + ] + } + }, { "name": "SetMakerTreeArgsV0", "type": { @@ -3534,6 +3644,18 @@ ] } }, + { + "name": "TempUpdateIotOperationsFundMetadataArgs", + "type": { + "kind": "struct", + "fields": [ + { + "name": "metadataUrl", + "type": "string" + } + ] + } + }, { "name": "UpdateIotInfoArgsV0", "type": { @@ -3672,34 +3794,6 @@ ] } }, - { - "name": "UpdateProgramTreeArgsV0", - "type": { - "kind": "struct", - "fields": [ - { - "name": "maxDepth", - "type": "u32" - }, - { - "name": "maxBufferSize", - "type": "u32" - }, - { - "name": "approverSeeds", - "type": { - "vec": "bytes" - } - }, - { - "name": "oldMerkleTree", - "type": { - "option": "publicKey" - } - } - ] - } - }, { "name": "UpdateRewardableEntityConfigArgsV0", "type": { @@ -3824,6 +3918,31 @@ "code": 6008, "name": "InvalidSeeds", "msg": "Invalid seeds provided" + }, + { + "code": 6009, + "name": "InvalidSettings", + "msg": "Invalid settings provided" + }, + { + "code": 6010, + "name": "InvalidDcFee", + "msg": "Invalid DC fee" + }, + { + "code": 6011, + "name": "OnboardingFeeAlreadySet", + "msg": "Onboarding fee has already been set for this account" + }, + { + "code": 6012, + "name": "InvalidAccountAddress", + "msg": "Account doesn't matched expected address" + }, + { + "code": 6013, + "name": "InvalidSymbol", + "msg": "Invalid symbol, must be 'IOT' or 'MOBILE'" } ] } \ No newline at end of file diff --git a/idl/helium_sub_daos.json b/idl/helium_sub_daos.json index 762ac28..171482b 100644 --- a/idl/helium_sub_daos.json +++ b/idl/helium_sub_daos.json @@ -1,5 +1,5 @@ { - "version": "0.0.12", + "version": "0.0.15", "name": "helium_sub_daos", "instructions": [ { @@ -2043,6 +2043,51 @@ } ], "args": [] + }, + { + "name": "trackDcOnboardingFeesV0", + "accounts": [ + { + "name": "hemAuth", + "isMut": false, + "isSigner": true, + "pda": { + "seeds": [ + { + "kind": "const", + "type": "string", + "value": "rewardable_entity_config" + }, + { + "kind": "account", + "type": "publicKey", + "account": "SubDaoV0", + "path": "sub_dao" + }, + { + "kind": "arg", + "type": { + "defined": "TrackDcOnboardingFeesArgsV0" + }, + "path": "args.symbol" + } + ] + } + }, + { + "name": "subDao", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "TrackDcOnboardingFeesArgsV0" + } + } + ] } ], "accounts": [ @@ -2349,6 +2394,14 @@ { "name": "onboardingDataOnlyDcFee", "type": "u64" + }, + { + "name": "dcOnboardingFeesPaid", + "type": "u64" + }, + { + "name": "activeDeviceAuthority", + "type": "publicKey" } ] } @@ -2512,6 +2565,10 @@ { "name": "onboardingDataOnlyDcFee", "type": "u64" + }, + { + "name": "activeDeviceAuthority", + "type": "publicKey" } ] } @@ -2556,6 +2613,26 @@ ] } }, + { + "name": "TrackDcOnboardingFeesArgsV0", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "add", + "type": "bool" + }, + { + "name": "symbol", + "type": "string" + } + ] + } + }, { "name": "UpdateDaoArgsV0", "type": { @@ -2658,6 +2735,12 @@ "type": { "option": "u64" } + }, + { + "name": "activeDeviceAuthority", + "type": { + "option": "publicKey" + } } ] } diff --git a/idl/lazy_distributor.json b/idl/lazy_distributor.json index 150479a..0f7f837 100644 --- a/idl/lazy_distributor.json +++ b/idl/lazy_distributor.json @@ -1,5 +1,5 @@ { - "version": "0.0.1", + "version": "0.0.2", "name": "lazy_distributor", "instructions": [ { diff --git a/idl/mobile_entity_manager.json b/idl/mobile_entity_manager.json index 3b752b3..d6da02d 100644 --- a/idl/mobile_entity_manager.json +++ b/idl/mobile_entity_manager.json @@ -1,5 +1,5 @@ { - "version": "0.0.1", + "version": "0.0.2", "name": "mobile_entity_manager", "instructions": [ { @@ -712,11 +712,6 @@ "isMut": true, "isSigner": false }, - { - "name": "programApproval", - "isMut": false, - "isSigner": false - }, { "name": "treeConfig", "isMut": true, @@ -780,11 +775,6 @@ "name": "compressionProgram", "isMut": false, "isSigner": false - }, - { - "name": "heliumEntityManagerProgram", - "isMut": false, - "isSigner": false } ], "args": [ diff --git a/idl/rewards_oracle.json b/idl/rewards_oracle.json index 6943520..820ea36 100644 --- a/idl/rewards_oracle.json +++ b/idl/rewards_oracle.json @@ -1,5 +1,5 @@ { - "version": "0.1.0", + "version": "0.1.1", "name": "rewards_oracle", "instructions": [ { @@ -61,6 +61,66 @@ } } ] + }, + { + "name": "setCurrentRewardsWrapperV1", + "accounts": [ + { + "name": "oracle", + "isMut": true, + "isSigner": true + }, + { + "name": "lazyDistributor", + "isMut": false, + "isSigner": false + }, + { + "name": "recipient", + "isMut": true, + "isSigner": false, + "relations": [ + "lazy_distributor" + ] + }, + { + "name": "keyToAsset", + "isMut": false, + "isSigner": false + }, + { + "name": "oracleSigner", + "isMut": false, + "isSigner": false, + "pda": { + "seeds": [ + { + "kind": "const", + "type": "string", + "value": "oracle_signer" + } + ] + } + }, + { + "name": "lazyDistributorProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "SetCurrentRewardsWrapperArgsV1" + } + } + ] } ], "types": [ @@ -83,6 +143,22 @@ } ] } + }, + { + "name": "SetCurrentRewardsWrapperArgsV1", + "type": { + "kind": "struct", + "fields": [ + { + "name": "oracleIndex", + "type": "u16" + }, + { + "name": "currentRewards", + "type": "u64" + } + ] + } } ] } \ No newline at end of file diff --git a/idl/voter_stake_registry.json b/idl/voter_stake_registry.json index 172113c..51f8f7b 100644 --- a/idl/voter_stake_registry.json +++ b/idl/voter_stake_registry.json @@ -1,5 +1,5 @@ { - "version": "0.0.6", + "version": "0.0.7", "name": "voter_stake_registry", "instructions": [ { @@ -1235,61 +1235,299 @@ } ], "args": [] + }, + { + "name": "voteV0", + "accounts": [ + { + "name": "payer", + "isMut": true, + "isSigner": true + }, + { + "name": "marker", + "isMut": true, + "isSigner": false, + "pda": { + "seeds": [ + { + "kind": "const", + "type": "string", + "value": "marker" + }, + { + "kind": "account", + "type": "publicKey", + "account": "Mint", + "path": "mint" + }, + { + "kind": "account", + "type": "publicKey", + "account": "ProposalV0", + "path": "proposal" + } + ] + } + }, + { + "name": "registrar", + "isMut": false, + "isSigner": false + }, + { + "name": "voter", + "isMut": false, + "isSigner": true + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "relations": [ + "mint", + "registrar" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenAccount", + "isMut": false, + "isSigner": false + }, + { + "name": "proposal", + "isMut": true, + "isSigner": false, + "relations": [ + "proposal_config" + ] + }, + { + "name": "proposalConfig", + "isMut": false, + "isSigner": false, + "relations": [ + "on_vote_hook", + "state_controller" + ] + }, + { + "name": "stateController", + "isMut": true, + "isSigner": false + }, + { + "name": "onVoteHook", + "isMut": false, + "isSigner": false + }, + { + "name": "proposalProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "VoteArgsV0" + } + } + ] + }, + { + "name": "relinquishVoteV1", + "accounts": [ + { + "name": "refund", + "isMut": true, + "isSigner": false, + "docs": [ + "Account to receive sol refund if marker is closed" + ] + }, + { + "name": "marker", + "isMut": true, + "isSigner": false, + "pda": { + "seeds": [ + { + "kind": "const", + "type": "string", + "value": "marker" + }, + { + "kind": "account", + "type": "publicKey", + "account": "Mint", + "path": "mint" + }, + { + "kind": "account", + "type": "publicKey", + "account": "ProposalV0", + "path": "proposal" + } + ] + }, + "relations": [ + "registrar", + "mint" + ] + }, + { + "name": "registrar", + "isMut": false, + "isSigner": false + }, + { + "name": "voter", + "isMut": false, + "isSigner": true + }, + { + "name": "position", + "isMut": true, + "isSigner": false, + "relations": [ + "mint", + "registrar" + ] + }, + { + "name": "mint", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenAccount", + "isMut": false, + "isSigner": false + }, + { + "name": "proposal", + "isMut": true, + "isSigner": false, + "relations": [ + "proposal_config" + ] + }, + { + "name": "proposalConfig", + "isMut": false, + "isSigner": false, + "relations": [ + "on_vote_hook", + "state_controller" + ] + }, + { + "name": "stateController", + "isMut": true, + "isSigner": false + }, + { + "name": "onVoteHook", + "isMut": false, + "isSigner": false + }, + { + "name": "proposalProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "args", + "type": { + "defined": "RelinquishVoteArgsV1" + } + } + ] } ], "accounts": [ + { + "name": "VoteMarkerV0", + "type": { + "kind": "struct", + "fields": [ + { + "name": "voter", + "type": "publicKey" + }, + { + "name": "registrar", + "type": "publicKey" + }, + { + "name": "proposal", + "type": "publicKey" + }, + { + "name": "mint", + "type": "publicKey" + }, + { + "name": "choices", + "type": { + "vec": "u16" + } + }, + { + "name": "weight", + "type": "u128" + }, + { + "name": "bumpSeed", + "type": "u8" + } + ] + } + }, { "name": "MaxVoterWeightRecord", - "docs": [ - "MaxVoterWeightRecord account as defined in spl-governance-addin-api", - "It's redefined here without account_discriminator for Anchor to treat it as native account", - "", - "The account is used as an api interface to provide max voting power to the governance program from external addin contracts" - ], "type": { "kind": "struct", "fields": [ { "name": "realm", - "docs": [ - "The Realm the MaxVoterWeightRecord belongs to" - ], "type": "publicKey" }, { "name": "governingTokenMint", - "docs": [ - "Governing Token Mint the MaxVoterWeightRecord is associated with", - "Note: The addin can take deposits of any tokens and is not restricted to the community or council tokens only" - ], "type": "publicKey" }, { "name": "maxVoterWeight", - "docs": [ - "Max voter weight", - "The max voter weight provided by the addin for the given realm and governing_token_mint" - ], "type": "u64" }, { "name": "maxVoterWeightExpiry", - "docs": [ - "The slot when the max voting weight expires", - "It should be set to None if the weight never expires", - "If the max vote weight decays with time, for example for time locked based weights, then the expiry must be set", - "As a pattern Revise instruction to update the max weight should be invoked before governance instruction within the same transaction", - "and the expiry set to the current slot to provide up to date weight" - ], "type": { "option": "u64" } }, { "name": "reserved", - "docs": [ - "Reserved space for future versions" - ], "type": { "array": [ "u8", @@ -1302,34 +1540,19 @@ }, { "name": "NftVoteRecord", - "docs": [ - "Vote record indicating the given NFT voted on the Proposal", - "The PDA of the record is [\"nft-vote-record\",proposal,nft_mint]", - "It guarantees uniques and ensures the same NFT can't vote twice" - ], "type": { "kind": "struct", "fields": [ { "name": "proposal", - "docs": [ - "Proposal which was voted on" - ], "type": "publicKey" }, { "name": "nftMint", - "docs": [ - "The mint of the NFT which was used for the vote" - ], "type": "publicKey" }, { "name": "governingTokenOwner", - "docs": [ - "The voter who casted this vote", - "It's a Realm member pubkey corresponding to TokenOwnerRecord.governing_token_owner" - ], "type": "publicKey" } ] @@ -1356,13 +1579,6 @@ }, { "name": "amountDepositedNative", - "docs": [ - "Amount in deposited, in native currency. Withdraws of vested tokens", - "directly reduce this amount.", - "", - "This directly tracks the total amount added by the user. They may", - "never withdraw more than this amount." - ], "type": "u64" }, { @@ -1380,15 +1596,16 @@ { "name": "bumpSeed", "type": "u8" + }, + { + "name": "voteController", + "type": "publicKey" } ] } }, { "name": "Registrar", - "docs": [ - "Instance of a voting rights distributor." - ], "type": { "kind": "struct", "fields": [ @@ -1410,25 +1627,16 @@ }, { "name": "timeOffset", - "docs": [ - "Debug only: time offset, to allow tests to move forward in time." - ], "type": "i64" }, { "name": "positionUpdateAuthority", - "docs": [ - "Allows a program to wrap updates to the position (transfer or reset lockup)" - ], "type": { "option": "publicKey" } }, { "name": "collection", - "docs": [ - "Storage for voting mints and their configuration." - ], "type": "publicKey" }, { @@ -1470,66 +1678,33 @@ }, { "name": "VoterWeightRecord", - "docs": [ - "VoterWeightRecord account as defined in spl-governance-addin-api", - "It's redefined here without account_discriminator for Anchor to treat it as native account", - "", - "The account is used as an api interface to provide voting power to the governance program from external addin contracts" - ], "type": { "kind": "struct", "fields": [ { "name": "realm", - "docs": [ - "The Realm the VoterWeightRecord belongs to" - ], "type": "publicKey" }, { "name": "governingTokenMint", - "docs": [ - "Governing Token Mint the VoterWeightRecord is associated with", - "Note: The addin can take deposits of any tokens and is not restricted to the community or council tokens only" - ], "type": "publicKey" }, { "name": "governingTokenOwner", - "docs": [ - "The owner of the governing token and voter", - "This is the actual owner (voter) and corresponds to TokenOwnerRecord.governing_token_owner" - ], "type": "publicKey" }, { "name": "voterWeight", - "docs": [ - "Voter's weight", - "The weight of the voter provided by the addin for the given realm, governing_token_mint and governing_token_owner (voter)" - ], "type": "u64" }, { "name": "voterWeightExpiry", - "docs": [ - "The slot when the voting weight expires", - "It should be set to None if the weight never expires", - "If the voter weight decays with time, for example for time locked based weights, then the expiry must be set", - "As a common pattern Revise instruction to update the weight should be invoked before governance instruction within the same transaction", - "and the expiry set to the current slot to provide up to date weight" - ], "type": { "option": "u64" } }, { "name": "weightAction", - "docs": [ - "The governance action the voter's weight pertains to", - "It allows to provided voter's weight specific to the particular action the weight is evaluated for", - "When the action is provided then the governance program asserts the executing action is the same as specified by the addin" - ], "type": { "option": { "defined": "VoterWeightAction" @@ -1538,21 +1713,12 @@ }, { "name": "weightActionTarget", - "docs": [ - "The target the voter's weight action pertains to", - "It allows to provided voter's weight specific to the target the weight is evaluated for", - "For example when addin supplies weight to vote on a particular proposal then it must specify the proposal as the action target", - "When the target is provided then the governance program asserts the target is the same as specified by the addin" - ], "type": { "option": "publicKey" } }, { "name": "reserved", - "docs": [ - "Reserved space for future versions" - ], "type": { "array": [ "u8", @@ -1661,6 +1827,18 @@ ] } }, + { + "name": "RelinquishVoteArgsV1", + "type": { + "kind": "struct", + "fields": [ + { + "name": "choice", + "type": "u16" + } + ] + } + }, { "name": "ResetLockupArgsV0", "type": { @@ -1709,6 +1887,18 @@ ] } }, + { + "name": "VoteArgsV0", + "type": { + "kind": "struct", + "fields": [ + { + "name": "choice", + "type": "u16" + } + ] + } + }, { "name": "WithdrawArgsV0", "type": { @@ -1728,29 +1918,14 @@ "fields": [ { "name": "startTs", - "docs": [ - "Start of the lockup.", - "", - "Note, that if start_ts is in the future, the funds are nevertheless", - "locked up!", - "", - "Similarly vote power computations don't care about start_ts and always", - "assume the full interval from now to end_ts." - ], "type": "i64" }, { "name": "endTs", - "docs": [ - "End of the lockup." - ], "type": "i64" }, { "name": "kind", - "docs": [ - "Type of lockup." - ], "type": { "defined": "LockupKind" } @@ -1760,73 +1935,35 @@ }, { "name": "VotingMintConfigV0", - "docs": [ - "Exchange rate for an asset that can be used to mint voting rights.", - "", - "See documentation of configure_voting_mint for details on how", - "native token amounts convert to vote weight." - ], "type": { "kind": "struct", "fields": [ { "name": "mint", - "docs": [ - "Mint for this entry." - ], "type": "publicKey" }, { "name": "baselineVoteWeightScaledFactor", - "docs": [ - "Vote weight factor for all funds in the account, no matter if locked or not.", - "", - "In 1/SCALED_FACTOR_BASE units." - ], "type": "u64" }, { "name": "maxExtraLockupVoteWeightScaledFactor", - "docs": [ - "Maximum extra vote weight factor for lockups.", - "", - "This is the extra votes gained for lockups lasting lockup_saturation_secs or", - "longer. Shorter lockups receive only a fraction of the maximum extra vote weight,", - "based on lockup_time divided by lockup_saturation_secs.", - "", - "In 1/SCALED_FACTOR_BASE units." - ], "type": "u64" }, { "name": "genesisVotePowerMultiplier", - "docs": [ - "Genesis vote power multipliers for lockups.", - "", - "This is a multiplier applied to voting power for lockups created before", - "genesis_extra_lockup_expiration" - ], "type": "u8" }, { "name": "genesisVotePowerMultiplierExpirationTs", - "docs": [ - "Timestamp of when to stop applying the genesis_extra_lockup_vote_weight_scaled_factor" - ], "type": "i64" }, { "name": "lockupSaturationSecs", - "docs": [ - "Number of seconds of lockup needed to reach the maximum lockup bonus." - ], "type": "u64" }, { "name": "digitShift", - "docs": [ - "Number of digits to shift native amounts, applying a 10^digit_shift factor." - ], "type": "i8" } ] @@ -1851,10 +1988,6 @@ }, { "name": "VoterWeightAction", - "docs": [ - "VoterWeightAction enum as defined in spl-governance-addin-api", - "It's redefined here for Anchor to export it to IDL" - ], "type": { "kind": "enum", "variants": [ @@ -2167,6 +2300,14 @@ "code": 6057, "name": "SamePosition", "msg": "Cannot transfer to the same position" + }, + { + "code": 6058, + "name": "MaxChoicesExceeded" + }, + { + "code": 6059, + "name": "NoVoteForThisChoice" } ] } \ No newline at end of file