We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22bcbf5 commit 583bdc4Copy full SHA for 583bdc4
packages/hardhat-core/test/internal/core/params/argumentTypes.ts
@@ -151,6 +151,10 @@ describe("argumentTypes", () => {
151
);
152
});
153
154
+ it("should work with bigint values with 'n' suffix", () => {
155
+ assert.equal(types.bigint.parse("arg", "0n"), BigInt(0));
156
+ });
157
+
158
it("should fail with incorrect values", () => {
159
expectHardhatError(
160
() => types.bigint.parse("arg", ""),
@@ -192,6 +196,10 @@ describe("argumentTypes", () => {
192
196
() => types.bigint.parse("arg", "1e0"),
193
197
ERRORS.ARGUMENTS.INVALID_VALUE_FOR_TYPE
194
198
199
+ expectHardhatError(
200
+ () => types.bigint.parse("arg", "0x0n"),
201
+ ERRORS.ARGUMENTS.INVALID_VALUE_FOR_TYPE
202
+ );
195
203
204
205
0 commit comments