Strike Docs
Search…
Get Prior Votes
Gets the prior number of votes for an account at a specific block number. The block number passed must be a finalized block or the function will revert.
STRK
1
function getPriorVotes(address account, uint blockNumber) returns (uint96)
Copied!
    account: Address of the account in which to retrieve the prior number of votes.
    blockNumber: The block number at which to retrieve the prior number of votes.
    RETURN: The number of prior votes.
Solidity
1
Strk strk = Strk(0x123...); // contract address
2
uint priorVotes = strk.getPriorVotes(account, blockNumber);
Copied!
Web3 1.2.6
1
const priorVotes = await strk.methods.getPriorVotes(account, blockNumber).call();
Copied!
Last modified 8mo ago
Copy link