@ardier16/q-js-sdk
Version:
Typescript Library to interact with Q System Contracts
44 lines (43 loc) • 2.3 kB
TypeScript
import Web3 from 'web3';
import { TransactionReceipt } from 'web3-eth/types';
import { BaseVotingWeightInfo, QNonPayableTx, VotingDelegationInfo, VotingLockInfo } from '../../types';
import { VotingWeightProxy } from '../../web3-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(web3: Web3, address: string);
/**
* [External documentation](@system-contracts-repo/@network/VotingWeightProxy/#announcenewvotingagent)
*/
announceNewVotingAgent(newVotingAgentAddr: string, txOptions?: QNonPayableTx): Promise<TransactionReceipt>;
/**
* [External documentation](@system-contracts-repo/@network/VotingWeightProxy/#setnewvotingagent)
*/
setNewVotingAgent(txOptions?: QNonPayableTx): Promise<TransactionReceipt>;
/**
* [External documentation](@system-contracts-repo/@network/VotingWeightProxy/#getbasevotingweightinfo)
*/
getBaseVotingWeightInfo(address: string, votingEndTime: string): 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>;
}