UNPKG

@vechain/vebetterdao-contracts

Version:

Open-source repository that houses the smart contracts powering the decentralized VeBetterDAO on the VeChain Thor blockchain.

68 lines (67 loc) 7.9 kB
import { B3TR, Emissions, GalaxyMember, StargateNFT, VeBetterPassport, XAllocationVoting, EmissionsV2, GalaxyMemberV5, GalaxyMemberV4, GalaxyMemberV3, GalaxyMemberV1, GalaxyMemberV2 } from "../../typechain-types"; import { BaseContract, ContractFactory, ContractTransactionResponse, AddressLike } from "ethers"; import { HardhatEthersSigner } from "@nomicfoundation/hardhat-ethers/signers"; import { getOrDeployContractInstances } from "./deploy"; export declare const waitForNextBlock: () => Promise<void>; export declare const moveBlocks: (blocks: number) => Promise<void>; type Contracts = Awaited<ReturnType<typeof getOrDeployContractInstances>>; export declare const getContractInstances: (overrides?: Partial<Contracts>) => Promise<NonNullable<Contracts>>; export declare const getRoundId: (contractToPassToMethods?: any) => Promise<string>; export declare const createProposal: (contractToCall: BaseContract, ContractFactory: ContractFactory, proposer: HardhatEthersSigner, description?: string, functionTocall?: string, values?: any[], roundId?: string | BigInt | number) => Promise<ContractTransactionResponse>; export declare const createGrantProposal: (proposer: HardhatEthersSigner, targets: string[], calldatas: any[], values: bigint[] | undefined, description: string, depositAmount: number, grantsReceiver: string, milestonesDetailsMetadataURI: string, contractToPassToMethods?: any, roundId?: string) => Promise<ContractTransactionResponse>; export declare const createMultiContractProposalGrant: (proposer: HardhatEthersSigner, calldatas: string[], values: bigint[], targets: string[], description: string, depositAmount: any, grantsReceiver: string, milestonesDetailsMetadataURI: string, roundId?: string, contractToPassToMethods?: any) => Promise<ContractTransactionResponse>; export declare const createProposalWithMultipleFunctionsAndExecuteItGrant: (proposer: HardhatEthersSigner, voter: HardhatEthersSigner, contractsToCall: BaseContract[], Contract: ContractFactory, description: string, functionsToCall: string[], args: any[][], depositAmount: any, grantsReceiver: string, milestonesDetailsMetadataURI: string, contractToPassToMethods?: any, roundId?: string) => Promise<{ proposalId: any; tx: ContractTransactionResponse; }>; export declare const createProposalWithMultipleFunctions: (proposer: HardhatEthersSigner, contractToCalls: BaseContract[], Contract: ContractFactory, description: string, functionsToCall: string[], args: any[], roundId?: string) => Promise<ContractTransactionResponse>; export declare const getProposalIdFromTx: (tx: ContractTransactionResponse, depositPayed?: boolean, contractToPassToMethods?: any) => Promise<any>; export declare const getProposalIdFromGrantsProposalTx: (tx: ContractTransactionResponse, contractToPassToMethods?: any) => Promise<any>; export declare const payDeposit: (proposalId: string, depositer: HardhatEthersSigner, contractToPassToMethods?: any) => Promise<void>; export declare const waitForVotingPeriodToEnd: (proposalId: number, contractToPassToMethods?: any) => Promise<void>; export declare const waitForRoundToEnd: (roundId: number | BigInt, xAllocationVoting?: XAllocationVoting) => Promise<void>; export declare const waitForCurrentRoundToEnd: (contractToPassToMethods?: any) => Promise<void>; export declare const waitForProposalToBeActive: (proposalId: number, contractToPassToMethods?: any) => Promise<bigint>; /** * Calls the timelock to see if the operation is ready * * @param proposalId the proposal id */ export declare const waitForQueuedProposalToBeReady: (proposalId: number) => Promise<void>; export declare const getVot3Tokens: (receiver: HardhatEthersSigner, amount: string, contractToPassToMethods?: any) => Promise<void>; export declare const updateGMMultipliers: () => Promise<void>; export declare const createProposalAndExecuteIt: (proposer: HardhatEthersSigner, voter: HardhatEthersSigner, contractToCall: BaseContract, Contract: ContractFactory, description: string, functionToCall: string, args?: any[], roundId?: string | bigint | number) => Promise<ContractTransactionResponse>; export declare const createProposalWithMultipleFunctionsAndExecuteIt: (proposer: HardhatEthersSigner, voter: HardhatEthersSigner, contractsToCall: BaseContract[], Contract: ContractFactory, description: string, functionsToCall: string[], args: any[][], roundId?: string) => Promise<void>; export declare const waitForBlock: (blockNumber: number) => Promise<void>; export declare const waitForNextCycle: (emission?: Emissions | EmissionsV2) => Promise<void>; /** * It will move to the desired cycle without actually distribute it. * E.g: we are in cycle 1 (distributed) and want to move to cycle 3 (not distributed) then we call this funciton with cycle 3 * and it will distribute the cycle 2 and stop before distributing the cycle 3 */ export declare const moveToCycle: (cycle: number, contractToPassToMethods?: any) => Promise<void>; export declare const voteOnApps: (apps: string[], voters: HardhatEthersSigner[], votes: Array<Array<bigint>>, roundId: bigint, xAllocationVoting?: XAllocationVoting, veBetterPassport?: VeBetterPassport) => Promise<void>; export declare const addAppsToAllocationVoting: (apps: string[], owner: HardhatEthersSigner) => Promise<string[]>; export declare const startNewAllocationRound: (contractToPassToMethods?: any) => Promise<number>; export declare const calculateBaseAllocationOffChain: (roundId: number) => Promise<bigint>; export declare const calculateVariableAppAllocationOffChain: (roundId: number, appId: string) => Promise<bigint>; export declare const calculateUnallocatedAppAllocationOffChain: (roundId: number, appId: string) => Promise<bigint>; export declare const participateInAllocationVoting: (user: HardhatEthersSigner, waitRoundToEnd?: boolean, endorser?: HardhatEthersSigner) => Promise<void>; export declare const participateInGovernanceVoting: (user: HardhatEthersSigner, admin: HardhatEthersSigner, contractToCall: BaseContract, Contract: ContractFactory, description: string, functionToCall: string, args?: any[], waitProposalToEnd?: boolean) => Promise<void>; export declare const bootstrapEmissions: (contractToPassToMethods?: any) => Promise<void>; export declare const bootstrapAndStartEmissions: (contractToPassToMethods?: any) => Promise<void>; export declare const upgradeNFTtoLevel: (tokenId: number, level: number, nft: GalaxyMember | GalaxyMemberV1 | GalaxyMemberV2 | GalaxyMemberV3 | GalaxyMemberV4 | GalaxyMemberV5, b3tr: B3TR, owner: HardhatEthersSigner, minter: HardhatEthersSigner) => Promise<void>; export declare const upgradeNFTtoNextLevel: (tokenId: number, nft: GalaxyMember | GalaxyMemberV1 | GalaxyMemberV2 | GalaxyMemberV3 | GalaxyMemberV4 | GalaxyMemberV5, b3tr: B3TR, owner: HardhatEthersSigner, minter: HardhatEthersSigner) => Promise<void>; /** * Helper function to get storage slots. * @param contractAddress The address of the contract. * @param initialSlots The initial storage slots. * @returns Array of storage slots. */ export declare const getStorageSlots: (contractAddress: AddressLike, ...initialSlots: bigint[]) => Promise<string[]>; export declare const mintLegacyNode: (level: number, owner: HardhatEthersSigner) => Promise<[string, bigint, boolean, boolean, bigint, bigint, bigint]>; export declare const delegateWithSignature: (veBetterPassport: VeBetterPassport, delegator: HardhatEthersSigner, delegatee: HardhatEthersSigner, deadlineFromNow: number) => Promise<void>; export declare const linkEntityToPassportWithSignature: (veBetterPassport: VeBetterPassport, passport: HardhatEthersSigner, entity: HardhatEthersSigner, deadlineFromNow: number) => Promise<void>; export declare const getTwoUniqueRandomIndices: (max: number) => number[]; export declare const getStargateNFTErrorsInterface: (_stargateNFTContract?: StargateNFT) => Promise<import("../../typechain-types").Errors>; export {};