Working tree is now the canonical repo. Off-chain play-money + trustless on-chain (FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution, mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
26 lines
809 B
JavaScript
26 lines
809 B
JavaScript
const { expectRevert } = require('@openzeppelin/test-helpers');
|
|
|
|
const { shouldSupportInterfaces } = require('./SupportsInterface.behavior');
|
|
|
|
const ERC165Mock = artifacts.require('ERC165StorageMock');
|
|
|
|
contract('ERC165Storage', function (accounts) {
|
|
beforeEach(async function () {
|
|
this.mock = await ERC165Mock.new();
|
|
});
|
|
|
|
it('register interface', async function () {
|
|
expect(await this.mock.supportsInterface('0x00000001')).to.be.equal(false);
|
|
await this.mock.registerInterface('0x00000001');
|
|
expect(await this.mock.supportsInterface('0x00000001')).to.be.equal(true);
|
|
});
|
|
|
|
it('does not allow 0xffffffff', async function () {
|
|
await expectRevert(this.mock.registerInterface('0xffffffff'), 'ERC165: invalid interface id');
|
|
});
|
|
|
|
shouldSupportInterfaces([
|
|
'ERC165',
|
|
]);
|
|
});
|