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:
@ -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);
|
||||
|
||||
@ -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,
|
||||
};
|
||||
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user