Use ERC-XXX syntax (#4730)

Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: ernestognw <ernestognw@gmail.com>
This commit is contained in:
Renan Souza
2023-11-23 05:18:04 +00:00
committed by GitHub
parent bf75bccaea
commit 7bd2b2aaf6
96 changed files with 282 additions and 282 deletions

View File

@ -14,7 +14,7 @@ const { clockFromReceipt } = require('../helpers/time');
const { expectRevertCustomError } = require('../helpers/customError');
const { shouldSupportInterfaces } = require('../utils/introspection/SupportsInterface.behavior');
const { shouldBehaveLikeEIP6372 } = require('./utils/EIP6372.behavior');
const { shouldBehaveLikeERC6372 } = require('./utils/ERC6372.behavior');
const { ZERO_BYTES32 } = require('@openzeppelin/test-helpers/src/constants');
const Governor = artifacts.require('$GovernorMock');
@ -84,7 +84,7 @@ contract('Governor', function (accounts) {
});
shouldSupportInterfaces(['ERC165', 'ERC1155Receiver', 'Governor']);
shouldBehaveLikeEIP6372(mode);
shouldBehaveLikeERC6372(mode);
it('deployment check', async function () {
expect(await this.mock.name()).to.be.equal(name);

View File

@ -1,7 +1,7 @@
const { clock } = require('../../helpers/time');
function shouldBehaveLikeEIP6372(mode = 'blocknumber') {
describe('should implement EIP6372', function () {
function shouldBehaveLikeERC6372(mode = 'blocknumber') {
describe('should implement ERC6372', function () {
beforeEach(async function () {
this.mock = this.mock ?? this.token ?? this.votes;
});
@ -19,5 +19,5 @@ function shouldBehaveLikeEIP6372(mode = 'blocknumber') {
}
module.exports = {
shouldBehaveLikeEIP6372,
shouldBehaveLikeERC6372,
};

View File

@ -6,7 +6,7 @@ const { fromRpcSig } = require('ethereumjs-util');
const ethSigUtil = require('eth-sig-util');
const Wallet = require('ethereumjs-wallet').default;
const { shouldBehaveLikeEIP6372 } = require('./EIP6372.behavior');
const { shouldBehaveLikeERC6372 } = require('./ERC6372.behavior');
const {
getDomain,
domainType,
@ -26,7 +26,7 @@ const buildAndSignDelegation = (contract, message, pk) =>
.then(data => fromRpcSig(ethSigUtil.signTypedMessage(pk, { data })));
function shouldBehaveLikeVotes(accounts, tokens, { mode = 'blocknumber', fungible = true }) {
shouldBehaveLikeEIP6372(mode);
shouldBehaveLikeERC6372(mode);
const getWeight = token => web3.utils.toBN(fungible ? token : 1);