Skip to content

Commit a504580

Browse files
committed
add constants checks
1 parent dcd5ade commit a504580

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

test/account/utils/draft-ERC7579Utils.test.js

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ const { ethers } = require('hardhat');
22
const { expect } = require('chai');
33
const { loadFixture } = require('@nomicfoundation/hardhat-network-helpers');
44
const {
5+
CALL_TYPE_CALL,
6+
CALL_TYPE_BATCH,
7+
CALL_TYPE_DELEGATE,
58
EXEC_TYPE_DEFAULT,
69
EXEC_TYPE_TRY,
710
encodeSingle,
811
encodeBatch,
912
encodeDelegate,
10-
CALL_TYPE_CALL,
11-
CALL_TYPE_BATCH,
12-
CALL_TYPE_DELEGATE,
1313
encodeMode,
1414
} = require('../../helpers/erc7579');
1515
const { selector } = require('../../helpers/methods');
@@ -30,6 +30,14 @@ describe('ERC7579Utils', function () {
3030
Object.assign(this, await loadFixture(fixture));
3131
});
3232

33+
it('constants', async function () {
34+
await expect(this.utils.$CALLTYPE_SINGLE()).to.eventually.equal(CALL_TYPE_CALL);
35+
await expect(this.utils.$CALLTYPE_BATCH()).to.eventually.equal(CALL_TYPE_BATCH);
36+
await expect(this.utils.$CALLTYPE_DELEGATECALL()).to.eventually.equal(CALL_TYPE_DELEGATE);
37+
await expect(this.utils.$EXECTYPE_DEFAULT()).to.eventually.equal(EXEC_TYPE_DEFAULT);
38+
await expect(this.utils.$EXECTYPE_TRY()).to.eventually.equal(EXEC_TYPE_TRY);
39+
});
40+
3341
describe('execSingle', function () {
3442
it('calls the target with value', async function () {
3543
const value = 0x012;

0 commit comments

Comments
 (0)