Update docs

This commit is contained in:
github-actions
2022-11-08 14:30:45 +00:00
parent 1643a5673b
commit 6db3408885
193 changed files with 16530 additions and 45158 deletions

View File

@ -56,6 +56,19 @@ contract('ERC20Votes', function (accounts) {
);
});
it('recent checkpoints', async function () {
await this.token.delegate(holder, { from: holder });
for (let i = 0; i < 6; i++) {
await this.token.mint(holder, 1);
}
const block = await web3.eth.getBlockNumber();
expect(await this.token.numCheckpoints(holder)).to.be.bignumber.equal('6');
// recent
expect(await this.token.getPastVotes(holder, block - 1)).to.be.bignumber.equal('5');
// non-recent
expect(await this.token.getPastVotes(holder, block - 6)).to.be.bignumber.equal('0');
});
describe('set delegation', function () {
describe('call', function () {
it('delegation with balance', async function () {