makeInterfaceId.test.js 567 B

1234567891011121314151617181920
  1. const { makeInterfaceId } = require('../makeInterfaceId');
  2. const OwnableInterfaceId = artifacts.require('OwnableInterfaceId');
  3. require('chai')
  4. .should();
  5. describe('makeInterfaceId', function () {
  6. it('calculates the EIP165 interface id from function signatures', async function () {
  7. const calculator = await OwnableInterfaceId.new();
  8. const ownableId = await calculator.getInterfaceId();
  9. makeInterfaceId([
  10. 'owner()',
  11. 'isOwner()',
  12. 'renounceOwnership()',
  13. 'transferOwnership(address)',
  14. ]).should.equal(ownableId);
  15. });
  16. });