Improve encapsulation on ERCs (#1270)

* Improve encapsulation on ERC165

* Improve encapsulation on ERC20

* Improve encapsulation on ERC721

* Add tests, use standard getters

* fix tests

* Fix lint

* move interface ids to implementation contracts

* Do not prefix getters
This commit is contained in:
Leo Arias
2018-09-05 14:37:29 -06:00
committed by Francisco Giordano
parent 45c0c072d1
commit 7bb87237f3
12 changed files with 268 additions and 145 deletions

View File

@ -33,6 +33,12 @@ contract('TokenTimelock', function ([_, owner, beneficiary]) {
await this.token.mint(this.timelock.address, amount, { from: owner });
});
it('can get state', async function () {
(await this.timelock.token()).should.be.equal(this.token.address);
(await this.timelock.beneficiary()).should.be.equal(beneficiary);
(await this.timelock.releaseTime()).should.be.bignumber.equal(this.releaseTime);
});
it('cannot be released before time limit', async function () {
await expectThrow(this.timelock.release());
});