@q-dev/q-js-sdk
Version:
Typescript Library to interact with Q System Contracts
43 lines (42 loc) • 2.34 kB
TypeScript
import type { ContractTransaction, BigNumberish } from 'ethers';
import { BaseVotingWeightInfo, QNonPayableTx, VotingDelegationInfo, VotingLockInfo, SignerOrProvider } from '../../types';
import { VotingWeightProxy } from '../../ethers-contracts/VotingWeightProxy';
import { SystemContractInstance } from '../SystemContractInstance';
/**
* Voting weight proxy instance to interact with Voting weight proxy contract.
* See [onchain documentation](@system-contracts-repo/@network/VotingWeightProxy/) for more details.
* An instance of this class for a deployed network can be obtained via {@link ContractRegistryInstance.votingWeightProxy}
*/
export declare class VotingWeightProxyInstance extends SystemContractInstance<VotingWeightProxy> {
static readonly registryKey = "governance.votingWeightProxy";
static readonly abi = "VotingWeightProxy.json";
constructor(signerOrProvider: SignerOrProvider, address: string);
/**
* [External documentation](@system-contracts-repo/@network/VotingWeightProxy/#announcenewvotingagent)
*/
announceNewVotingAgent(newVotingAgentAddr: string, txOptions?: QNonPayableTx): Promise<ContractTransaction>;
/**
* [External documentation](@system-contracts-repo/@network/VotingWeightProxy/#setnewvotingagent)
*/
setNewVotingAgent(txOptions?: QNonPayableTx): Promise<ContractTransaction>;
/**
* [External documentation](@system-contracts-repo/@network/VotingWeightProxy/#getbasevotingweightinfo)
*/
getBaseVotingWeightInfo(address: string, votingEndTime: BigNumberish): Promise<BaseVotingWeightInfo>;
/**
* [External documentation](@system-contracts-repo/@network/VotingWeightProxy/#delegationinfos)
*/
getDelegationInfo(address: string): Promise<VotingDelegationInfo>;
/**
* [External documentation](@system-contracts-repo/@network/VotingWeightProxy/#getlockedamount)
*/
getLockedAmount(address: string): Promise<string>;
/**
* [External documentation](@system-contracts-repo/@network/VotingWeightProxy/#getlockinfo)
*/
getLockInfo(tokenLockSource: string, who: string): Promise<VotingLockInfo>;
/**
* [External documentation](@system-contracts-repo/@network/VotingWeightProxy/#getvotingweight)
*/
getVotingWeight(address: string, votingEndTime: string): Promise<string>;
}