Migrate EIP712 to ethersjs (#4750)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com> Co-authored-by: ernestognw <ernestognw@gmail.com>
This commit is contained in:
@ -10,7 +10,12 @@ const Wallet = require('ethereumjs-wallet').default;
|
||||
|
||||
const ERC20Permit = artifacts.require('$ERC20Permit');
|
||||
|
||||
const { Permit, getDomain, domainType, domainSeparator } = require('../../../helpers/eip712');
|
||||
const {
|
||||
types: { Permit },
|
||||
getDomain,
|
||||
domainType,
|
||||
domainSeparator,
|
||||
} = require('../../../helpers/eip712');
|
||||
const { getChainId } = require('../../../helpers/chainid');
|
||||
const { expectRevertCustomError } = require('../../../helpers/customError');
|
||||
|
||||
|
||||
@ -10,16 +10,14 @@ const ethSigUtil = require('eth-sig-util');
|
||||
const Wallet = require('ethereumjs-wallet').default;
|
||||
|
||||
const { batchInBlock } = require('../../../helpers/txpool');
|
||||
const { getDomain, domainType } = require('../../../helpers/eip712');
|
||||
const {
|
||||
getDomain,
|
||||
domainType,
|
||||
types: { Delegation },
|
||||
} = require('../../../helpers/eip712');
|
||||
const { clock, clockFromReceipt } = require('../../../helpers/time');
|
||||
const { expectRevertCustomError } = require('../../../helpers/customError');
|
||||
|
||||
const Delegation = [
|
||||
{ name: 'delegatee', type: 'address' },
|
||||
{ name: 'nonce', type: 'uint256' },
|
||||
{ name: 'expiry', type: 'uint256' },
|
||||
];
|
||||
|
||||
const MODES = {
|
||||
blocknumber: artifacts.require('$ERC20Votes'),
|
||||
timestamp: artifacts.require('$ERC20VotesTimestampMock'),
|
||||
|
||||
Reference in New Issue
Block a user