public static async Task <long> GetCurrentTermNumber( this ContractTester <DPoSContractTestAElfModule> contractTester) { var result = await contractTester.ExecuteConsensusContractMethodWithMiningAsync(nameof(ConsensusContract .GetCurrentTermNumber), new Empty()); return(SInt64Value.Parser.ParseFrom(result.ReturnValue).Value); }
public static async Task <Round> GetCurrentRoundInformationAsync( this ContractTester <DPoSContractTestAElfModule> contractTester) { var result = await contractTester.ExecuteConsensusContractMethodWithMiningAsync(nameof(ConsensusContract .GetCurrentRoundInformation), new Empty()); return(Round.Parser.ParseFrom(result.ReturnValue)); }
public static async Task SetBlockchainAgeAsync(this ContractTester <DPoSContractTestAElfModule> starter, long age) { await starter.ExecuteConsensusContractMethodWithMiningAsync(nameof(ConsensusContract.SetBlockchainAge), new SInt64Value() { Value = age }); }
public static async Task <TransactionResult> Vote(this ContractTester <DPoSContractTestAElfModule> voter, string publicKey, long amount, int lockTime) { return(await voter.ExecuteConsensusContractMethodWithMiningAsync(nameof(ConsensusContract.Vote), new VoteInput() { CandidatePublicKey = publicKey, Amount = amount, LockTime = lockTime })); }