Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor supports interface #4817

Merged
merged 2 commits into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/governance/Governor.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('Governor', function () {
);
});

shouldSupportInterfaces(['ERC165', 'ERC1155Receiver', 'Governor']);
shouldSupportInterfaces(['ERC1155Receiver', 'Governor']);
shouldBehaveLikeERC6372(mode);

it('deployment check', async function () {
Expand Down
2 changes: 1 addition & 1 deletion test/token/ERC1155/ERC1155.behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ function shouldBehaveLikeERC1155() {
});
});

shouldSupportInterfaces(['ERC165', 'ERC1155', 'ERC1155MetadataURI']);
shouldSupportInterfaces(['ERC1155', 'ERC1155MetadataURI']);
});
}

Expand Down
2 changes: 1 addition & 1 deletion test/token/ERC1155/utils/ERC1155Holder.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('ERC1155Holder', function () {
Object.assign(this, await loadFixture(fixture));
});

shouldSupportInterfaces(['ERC165', 'ERC1155Receiver']);
shouldSupportInterfaces(['ERC1155Receiver']);

it('receives ERC1155 tokens from a single ID', async function () {
await this.token.connect(this.owner).safeTransferFrom(this.owner, this.mock, ids[0], values[0], data);
Expand Down
2 changes: 1 addition & 1 deletion test/token/ERC721/ERC721.behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function shouldBehaveLikeERC721() {
Object.assign(this, { owner, newOwner, approved, operator, other });
});

shouldSupportInterfaces(['ERC165', 'ERC721']);
shouldSupportInterfaces(['ERC721']);

describe('with minted tokens', function () {
beforeEach(async function () {
Expand Down
2 changes: 1 addition & 1 deletion test/utils/introspection/ERC165.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ describe('ERC165', function () {
Object.assign(this, await loadFixture(fixture));
});

shouldSupportInterfaces(['ERC165']);
shouldSupportInterfaces();
});
4 changes: 3 additions & 1 deletion test/utils/introspection/SupportsInterface.behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ const SIGNATURES = {
const INTERFACE_IDS = mapValues(SIGNATURES, interfaceId);

function shouldSupportInterfaces(interfaces = []) {
interfaces = ['ERC165', ...interfaces];
RenanSouza2 marked this conversation as resolved.
Show resolved Hide resolved

describe('ERC165', function () {
beforeEach(function () {
this.contractUnderTest = this.mock || this.token || this.holder;
this.contractUnderTest = this.mock || this.token;
});

describe('when the interfaceId is supported', function () {
Expand Down
Loading