diff --git a/.changeset/silent-beans-smell.md b/.changeset/silent-beans-smell.md new file mode 100644 index 00000000000..b85e0c686ce --- /dev/null +++ b/.changeset/silent-beans-smell.md @@ -0,0 +1,26 @@ +--- +"@fuel-ts/abi-coder": patch +"@fuel-ts/address": patch +"@fuel-ts/constants": patch +"@fuel-ts/contract": patch +"@fuel-ts/example-contract": patch +"fuels": patch +"@fuel-ts/hasher": patch +"@fuel-ts/hdwallet": patch +"@fuel-ts/interfaces": patch +"@fuel-ts/math": patch +"@fuel-ts/merkle": patch +"@fuel-ts/merkle-shared": patch +"@fuel-ts/merklesum": patch +"@fuel-ts/predicate": patch +"@fuel-ts/providers": patch +"@fuel-ts/script": patch +"@fuel-ts/signer": patch +"@fuel-ts/sparsemerkle": patch +"@fuel-ts/testcases": patch +"@fuel-ts/transactions": patch +"typechain-target-fuels": patch +"@fuel-ts/wallet": patch +--- + +Refactor to use bn.js instead of bigint. diff --git a/README.md b/README.md index bfc25238355..924f8aae5e4 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ console.log(new Wallet("0x0000...0000")); ## Calling Contracts ```ts -import { Wallet, Contract } from "fuels"; +import { Wallet, Contract, BigNumberish, BN } from "fuels"; import abi from "./abi.json"; const wallet = new Wallet("0x..."); // private key with coins @@ -86,7 +86,7 @@ const contract = new Contract(contractId, abi, wallet); // All contract methods are available under functions // with the correct types const { transactionId, value } = await contract.functions - .foo<[string], bigint>("bar") + .foo<[BigNumberish], BN>("bar") .call(); console.log(transactionId, value); diff --git a/docs/index.md b/docs/index.md index 541ff4e38ae..e59bd76bb68 100644 --- a/docs/index.md +++ b/docs/index.md @@ -53,7 +53,7 @@ console.log(new Wallet("0x0000...0000")); ## Calling Contracts ```ts -import { Wallet, Contract } from "fuels"; +import { Wallet, Contract, BigNumberish, BN } from "fuels"; import abi from "./abi.json"; const wallet = new Wallet("0x..."); // private key with coins @@ -63,7 +63,7 @@ const contract = new Contract(contractId, abi, wallet); // All contract methods are available under functions // with the correct types const { transactionId, value } = await contract.functions - .foo<[string], bigint>("bar") + .foo<[BigNumberish], BN>("bar") .call(); console.log(transactionId, value); diff --git a/packages/abi-coder/src/abi-coder.test.ts b/packages/abi-coder/src/abi-coder.test.ts index 984d35095fa..c6d3fc40203 100644 --- a/packages/abi-coder/src/abi-coder.test.ts +++ b/packages/abi-coder/src/abi-coder.test.ts @@ -1,4 +1,5 @@ import { hexlify } from '@ethersproject/bytes'; +import { bn, toHex } from '@fuel-ts/math'; import AbiCoder from './abi-coder'; import type { DecodedValue } from './coders/abstract-coder'; @@ -55,7 +56,7 @@ describe('AbiCoder', () => { }, ]; - const encoded = abiCoder.encode(types, [[1, 2, 3]]); + const encoded = abiCoder.encode(types, [[1, toHex(2), bn(3)]]); expect(hexlify(encoded)).toBe('0x000000000000000100000000000000020000000000000003'); }); @@ -150,16 +151,18 @@ describe('AbiCoder', () => { '0x0000000000000000000000000000000100000000000000010000000000000001000000000000000d00000000000000250000000000000025000000000000000d000000000000000d00000000000000250000000000000001' ); const decoded = abiCoder.decode(types, encoded) as DecodedValue[]; - expect(Array.from(decoded)).toEqual([ - { - foo: [true, true], - }, - true, - [ - { foo: 13n, bar: 37n }, - { bar: 13n, foo: 37n }, - ], - [{ foo: 13n, bar: 37n }, true], - ]); + expect(JSON.stringify(Array.from(decoded))).toEqual( + JSON.stringify([ + { + foo: [true, true], + }, + true, + [ + { foo: bn(13), bar: bn(37) }, + { foo: bn(37), bar: bn(13) }, + ], + [{ foo: bn(13), bar: bn(37) }, true], + ]) + ); }); }); diff --git a/packages/abi-coder/src/abi-coder.ts b/packages/abi-coder/src/abi-coder.ts index 8b9348523fe..982e7df7147 100644 --- a/packages/abi-coder/src/abi-coder.ts +++ b/packages/abi-coder/src/abi-coder.ts @@ -15,6 +15,7 @@ import OptionCoder from './coders/option'; import StringCoder from './coders/string'; import StructCoder from './coders/struct'; import TupleCoder from './coders/tuple'; +import U64Coder from './coders/u64'; import { arrayRegEx, enumRegEx, @@ -38,8 +39,9 @@ export default class AbiCoder { case 'u8': case 'u16': case 'u32': - case 'u64': return new NumberCoder(param.type); + case 'u64': + return new U64Coder(); case 'bool': return new BooleanCoder(); case 'byte': diff --git a/packages/abi-coder/src/coders/__snapshots__/coders.test.ts.snap b/packages/abi-coder/src/coders/__snapshots__/coders.test.ts.snap index a97487df431..d21a5b9cd1f 100644 --- a/packages/abi-coder/src/coders/__snapshots__/coders.test.ts.snap +++ b/packages/abi-coder/src/coders/__snapshots__/coders.test.ts.snap @@ -12,7 +12,7 @@ exports[`BooleanCoder as a boolean can encode false then decode false 1`] = `"0x exports[`BooleanCoder as a boolean can encode true then decode true 1`] = `"0x0000000000000001"`; -exports[`ByteCoder as a byte can encode "0x00" then decode 0 1`] = `"0x0000000000000000"`; +exports[`ByteCoder as a byte can encode "0x0" then decode 0 1`] = `"0x0000000000000000"`; exports[`ByteCoder as a byte can encode "0xff" then decode 255 1`] = `"0x00000000000000ff"`; @@ -24,46 +24,42 @@ exports[`EnumCoder as a [enum TestEnum; 4] can encode [[Object], [Object], [Obje exports[`EnumCoder as a enum TestEnum can encode {"a": true} then decode {"a": true} 1`] = `"0x00000000000000000000000000000001"`; -exports[`EnumCoder as a enum TestEnum can encode {"b": 1337} then decode {"b": 1337n} 1`] = `"0x00000000000000010000000000000539"`; +exports[`EnumCoder as a enum TestEnum can encode {"b": [BN]} then decode {"b": [BN]} 1`] = `"0x00000000000000010000000000000539"`; exports[`NumberCoder as a u8 can encode 0 then decode 0 1`] = `"0x0000000000000000"`; -exports[`NumberCoder as a u8 can encode 0n then decode 0 1`] = `"0x0000000000000000"`; - exports[`NumberCoder as a u8 can encode 255 then decode 255 1`] = `"0x00000000000000ff"`; -exports[`NumberCoder as a u8 can encode 255n then decode 255 1`] = `"0x00000000000000ff"`; - exports[`NumberCoder as a u16 can encode 0 then decode 0 1`] = `"0x0000000000000000"`; -exports[`NumberCoder as a u16 can encode 0n then decode 0 1`] = `"0x0000000000000000"`; - exports[`NumberCoder as a u16 can encode 65535 then decode 65535 1`] = `"0x000000000000ffff"`; -exports[`NumberCoder as a u16 can encode 65535n then decode 65535 1`] = `"0x000000000000ffff"`; - exports[`NumberCoder as a u32 can encode 0 then decode 0 1`] = `"0x0000000000000000"`; -exports[`NumberCoder as a u32 can encode 0n then decode 0 1`] = `"0x0000000000000000"`; - exports[`NumberCoder as a u32 can encode 4294967295 then decode 4294967295 1`] = `"0x00000000ffffffff"`; -exports[`NumberCoder as a u32 can encode 4294967295n then decode 4294967295 1`] = `"0x00000000ffffffff"`; +exports[`NumberCoder as a u64 can encode "0x64" then decode "0x64" 1`] = `"0x0000000000000064"`; + +exports[`NumberCoder as a u64 can encode "0xff" then decode "0xff" 1`] = `"0x00000000000000ff"`; -exports[`NumberCoder as a u64 can encode 0 then decode 0n 1`] = `"0x0000000000000000"`; +exports[`NumberCoder as a u64 can encode "0xffffffffffffffff" then decode "0xffffffffffffffff" 1`] = `"0xffffffffffffffff"`; -exports[`NumberCoder as a u64 can encode 0n then decode 0n 1`] = `"0x0000000000000000"`; +exports[`NumberCoder as a u64 can encode 0 then decode "0x0" 1`] = `"0x0000000000000000"`; -exports[`NumberCoder as a u64 can encode 18446744073709551615n then decode 18446744073709551615n 1`] = `"0xffffffffffffffff"`; +exports[`NumberCoder as a u64 can encode 65535 then decode "0xffff" 1`] = `"0x000000000000ffff"`; + +exports[`NumberCoder as a u64 can encode 4294967295 then decode "0xffffffff" 1`] = `"0x00000000ffffffff"`; exports[`StringCoder as a str[0] can encode "" then decode "" 1`] = `"0x"`; exports[`StringCoder as a str[255] can encode "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" then decode "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" 1`] = `"0x61616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616100"`; -exports[`StructCoder as a struct TestStruct can encode {"a": true, "b": 1337} then decode {"a": true, "b": 1337n} 1`] = `"0x00000000000000010000000000000539"`; +exports[`StructCoder as a struct TestStruct can encode {"a": true, "b": [BN]} then decode {"a": true, "b": [BN]} 1`] = `"0x00000000000000010000000000000539"`; + +exports[`StructCoder as a struct TestStruct can encode {"a": true, "b": 1337} then decode {"a": true, "b": [BN]} 1`] = `"0x00000000000000010000000000000539"`; exports[`StructCoder as a struct TestStruct can encode {} then decode {} 1`] = `"0x"`; exports[`TupleCoder as a () can encode [] then decode [] 1`] = `"0x"`; -exports[`TupleCoder as a (u64, u64) can encode [13, 37] then decode [13n, 37n] 1`] = `"0x000000000000000d0000000000000025"`; +exports[`TupleCoder as a (u64, u64) can encode [13, 37] then decode [[BN], [BN]] 1`] = `"0x000000000000000d0000000000000025"`; diff --git a/packages/abi-coder/src/coders/abstract-coder.ts b/packages/abi-coder/src/coders/abstract-coder.ts index 0c2ccc687b8..d1059737f91 100644 --- a/packages/abi-coder/src/coders/abstract-coder.ts +++ b/packages/abi-coder/src/coders/abstract-coder.ts @@ -1,15 +1,17 @@ import type { BytesLike } from '@ethersproject/bytes'; import { Logger } from '@ethersproject/logger'; +import type { BN } from '@fuel-ts/math'; const logger = new Logger(process.env.BUILD_VERSION || '~'); -type Primitive = string | number | boolean | bigint; +type Primitive = string | number | boolean; /** * The type of value you can provide to `Coder.encode` */ export type InputValue = | Primitive + | BN | BytesLike | InputValue[] | { [key: string]: InputValue } diff --git a/packages/abi-coder/src/coders/b256.ts b/packages/abi-coder/src/coders/b256.ts index 17a842c355f..958fa1d2c2e 100644 --- a/packages/abi-coder/src/coders/b256.ts +++ b/packages/abi-coder/src/coders/b256.ts @@ -1,5 +1,5 @@ -import { hexlify, arrayify } from '@ethersproject/bytes'; -import { toBigInt } from '@fuel-ts/math'; +import { arrayify } from '@ethersproject/bytes'; +import { bn, toHex } from '@fuel-ts/math'; import Coder from './abstract-coder'; @@ -23,14 +23,13 @@ export default class B256Coder extends Coder { decode(data: Uint8Array, offset: number): [string, number] { let bytes = data.slice(offset, offset + 32); - - if (toBigInt(bytes) === 0n) { + const decoded = bn(bytes); + if (decoded.isZero()) { bytes = new Uint8Array(32); } - if (bytes.length !== 32) { this.throwError('Invalid size for b256', bytes); } - return [hexlify(bytes), offset + 32]; + return [toHex(bytes, 32), offset + 32]; } } diff --git a/packages/abi-coder/src/coders/boolean.ts b/packages/abi-coder/src/coders/boolean.ts index 7fc320f7af6..152de67f31c 100644 --- a/packages/abi-coder/src/coders/boolean.ts +++ b/packages/abi-coder/src/coders/boolean.ts @@ -1,5 +1,4 @@ -import { zeroPad } from '@ethersproject/bytes'; -import { toArray, toBigInt } from '@fuel-ts/math'; +import { bn, toBytes } from '@fuel-ts/math'; import Coder from './abstract-coder'; @@ -12,7 +11,7 @@ export default class BooleanCoder extends Coder { let bytes; try { - bytes = toArray(value ? 1 : 0); + bytes = toBytes(value ? 1 : 0); } catch (error) { this.throwError('Invalid bool', value); } @@ -20,15 +19,15 @@ export default class BooleanCoder extends Coder { this.throwError('Invalid bool', value); } - return zeroPad(bytes, 8); + return toBytes(bytes, 8); } decode(data: Uint8Array, offset: number): [boolean, number] { - const bytes = toBigInt(data.slice(offset, offset + 8)); - if (bytes === 0n) { + const bytes = bn(data.slice(offset, offset + 8)); + if (bytes.isZero()) { return [false, offset + 8]; } - if (bytes !== 1n) { + if (!bytes.eq(bn(1))) { this.throwError('Invalid boolean value', bytes); } return [true, offset + 8]; diff --git a/packages/abi-coder/src/coders/byte.ts b/packages/abi-coder/src/coders/byte.ts index a45434c0b3b..98a41b8e86b 100644 --- a/packages/abi-coder/src/coders/byte.ts +++ b/packages/abi-coder/src/coders/byte.ts @@ -1,5 +1,4 @@ -import { zeroPad } from '@ethersproject/bytes'; -import { toArray, toBigInt } from '@fuel-ts/math'; +import { bn, toBytes } from '@fuel-ts/math'; import Coder from './abstract-coder'; @@ -12,21 +11,18 @@ export default class ByteCoder extends Coder { let bytes; try { - bytes = toArray(value); + bytes = toBytes(value, 1); } catch (error) { this.throwError('Invalid Byte', value); } - if (bytes.length > 1) { - this.throwError('Invalid Byte', value); - } - return zeroPad(bytes, 8); + return toBytes(bytes, 8); } decode(data: Uint8Array, offset: number): [number, number] { const bytes = data.slice(offset, offset + 8); - const value = toBigInt(bytes); - if (value > 255n) { + const value = bn(bytes); + if (value.gt(bn(255))) { this.throwError('Invalid Byte', value); } const byte = Number(value); diff --git a/packages/abi-coder/src/coders/coders.test.ts b/packages/abi-coder/src/coders/coders.test.ts index 6bb9917289f..5a9dd40285b 100644 --- a/packages/abi-coder/src/coders/coders.test.ts +++ b/packages/abi-coder/src/coders/coders.test.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/ban-ts-comment */ /* eslint-disable @typescript-eslint/no-explicit-any */ import { hexlify } from '@ethersproject/bytes'; -import { toHex } from '@fuel-ts/math'; +import { bn, toHex } from '@fuel-ts/math'; import type Coder from './abstract-coder'; import ArrayCoder from './array'; @@ -13,13 +13,14 @@ import NumberCoder from './number'; import StringCoder from './string'; import StructCoder from './struct'; import TupleCoder from './tuple'; +import U64Coder from './u64'; const B256_ZERO = '0x0000000000000000000000000000000000000000000000000000000000000000'; const B256 = '0xd5579c46dfcc7f18207013e65b44e4cb4e2c2298f4ac457ba8f82743f31e930b'; const U8_MAX = 2 ** 8 - 1; const U16_MAX = 2 ** 16 - 1; const U32_MAX = 2 ** 32 - 1; -const U64_MAX = 2n ** 64n - 1n; +const U64_MAX = bn(2).pow(64).sub(1); /** * Tests for implementations of Coder. @@ -92,8 +93,8 @@ const testCases = [ 'ByteCoder', [ // `string` inputs - [new ByteCoder(), toHex(0), 0], - [new ByteCoder(), toHex(U8_MAX), U8_MAX], + [new ByteCoder(), bn(0), 0], + [new ByteCoder(), bn(U8_MAX), U8_MAX], // `number` inputs [new ByteCoder(), 0, 0], [new ByteCoder(), U8_MAX, 255], @@ -102,7 +103,7 @@ const testCases = [ // Under [new ByteCoder(), -1, -1], // Over - [new ByteCoder(), toHex(U8_MAX + 1), U8_MAX + 1], + [new ByteCoder(), bn(U8_MAX + 1), U8_MAX + 1], [new ByteCoder(), U8_MAX + 1, U8_MAX + 1], // Wrong [new ByteCoder(), 'whoops', 'whoops'], @@ -112,40 +113,50 @@ const testCases = [ 'EnumCoder', [ [ - new EnumCoder('TestEnum', { a: new BooleanCoder(), b: new NumberCoder('u64') }), + new EnumCoder('TestEnum', { a: new BooleanCoder(), b: new U64Coder() }), { a: true }, { a: true }, ], [ - new EnumCoder('TestEnum', { a: new BooleanCoder(), b: new NumberCoder('u64') }), - { b: 1337 }, - { b: 1337n }, + new EnumCoder('TestEnum', { a: new BooleanCoder(), b: new U64Coder() }), + { b: bn(1337) }, + { b: bn(1337) }, ], [ new ArrayCoder( new EnumCoder('TestEnum', { - a: new NumberCoder('u64'), - b: new TupleCoder([new NumberCoder('u64'), new NumberCoder('u64')]), + a: new U64Coder(), + b: new TupleCoder([new U64Coder(), new U64Coder()]), }), 4 ), - [{ a: 1337 }, { b: [1337, 1337] }, { a: 1337 }, { b: [1337, 1337] }], - [{ a: 1337n }, { b: [1337n, 1337n] }, { a: 1337n }, { b: [1337n, 1337n] }], + [ + { a: bn(1337) }, + { b: [bn(1337), bn(1337)] }, + { a: bn(1337) }, + { b: [bn(1337), bn(1337)] }, + ], + [ + { a: bn(1337) }, + { b: [bn(1337), bn(1337)] }, + { a: bn(1337) }, + { b: [bn(1337), bn(1337)] }, + ], ], ], [ // Under - [new EnumCoder('TestEnum', { a: new BooleanCoder(), b: new NumberCoder('u64') }), {}, {}], + [new EnumCoder('TestEnum', { a: new BooleanCoder(), b: new U64Coder() }), {}, {}], // Over [ - new EnumCoder('TestEnum', { a: new BooleanCoder(), b: new NumberCoder('u64') }), - { a: true, b: 1337 }, - { a: true, b: 1337n }, + new EnumCoder('TestEnum', { a: new BooleanCoder(), b: new U64Coder() }), + { a: true, b: bn(1337) }, + { a: true, b: bn(1337) }, ], // Wrong [new EnumCoder('TestEnum', {}), {}, {}], [ - new EnumCoder('TestEnum', { a: new BooleanCoder(), b: new NumberCoder('u64') }), + new EnumCoder('TestEnum', { a: new BooleanCoder(), b: new U64Coder() }), { b: true }, { b: true }, ], @@ -161,28 +172,26 @@ const testCases = [ [new NumberCoder('u16'), U16_MAX, U16_MAX], [new NumberCoder('u32'), 0, 0], [new NumberCoder('u32'), U32_MAX, U32_MAX], - [new NumberCoder('u64'), 0, 0n], - // `bigint` inputs - [new NumberCoder('u8'), 0n, 0], - [new NumberCoder('u8'), BigInt(U8_MAX), U8_MAX], - [new NumberCoder('u16'), 0n, 0], - [new NumberCoder('u16'), BigInt(U16_MAX), U16_MAX], - [new NumberCoder('u32'), 0n, 0], - [new NumberCoder('u32'), BigInt(U32_MAX), U32_MAX], - [new NumberCoder('u64'), 0n, 0n], - [new NumberCoder('u64'), U64_MAX, U64_MAX], + + // `u64` BigNumberish inputs + [new U64Coder(), 0, bn(0)], + [new U64Coder(), toHex(100), bn(100)], + [new U64Coder(), bn(U8_MAX), bn(U8_MAX)], + [new U64Coder(), U16_MAX, bn(U16_MAX)], + [new U64Coder(), U32_MAX, bn(U32_MAX)], + [new U64Coder(), U64_MAX, U64_MAX], ], [ // Under [new NumberCoder('u8'), -1, -1], [new NumberCoder('u16'), -1, -1], [new NumberCoder('u32'), -1, -1], - [new NumberCoder('u64'), -1n, -1n], + [new U64Coder(), -1, -1], // Over [new NumberCoder('u8'), U8_MAX + 1, U8_MAX + 1], [new NumberCoder('u16'), U16_MAX + 1, U16_MAX + 1], [new NumberCoder('u32'), U32_MAX + 1, U32_MAX + 1], - [new NumberCoder('u64'), U64_MAX + 1n, U64_MAX + 1n], + [new U64Coder(), bn(U64_MAX.add(1)), bn(U64_MAX.add(1))], // Wrong [new NumberCoder('u8'), 'whoops', 'whoops'], ], @@ -208,15 +217,20 @@ const testCases = [ [ [new StructCoder('TestStruct', {}), {}, {}], [ - new StructCoder('TestStruct', { a: new BooleanCoder(), b: new NumberCoder('u64') }), + new StructCoder('TestStruct', { a: new BooleanCoder(), b: new U64Coder() }), { a: true, b: 1337 }, - { a: true, b: 1337n }, + { a: true, b: bn(1337) }, + ], + [ + new StructCoder('TestStruct', { a: new BooleanCoder(), b: new U64Coder() }), + { a: true, b: bn(1337) }, + { a: true, b: bn(1337) }, ], ], [ // Under [ - new StructCoder('TestStruct', { a: new BooleanCoder(), b: new NumberCoder('u64') }), + new StructCoder('TestStruct', { a: new BooleanCoder(), b: new U64Coder() }), { a: true }, { a: true }, ], @@ -225,27 +239,19 @@ const testCases = [ [ new StructCoder('TestStruct', { a: new BooleanCoder() }), { a: true, b: 1337 }, - { a: true, b: 1337n }, + { a: true, b: 1337 }, ], [new StructCoder('TestStruct', {}), { a: true }, { a: true }], // Wrong - [ - new StructCoder('TestStruct', { b: new NumberCoder('u64') }), - { b: U8_MAX + 1 }, - { b: U8_MAX + 1 }, - ], - [ - new StructCoder('TestStruct', { b: new NumberCoder('u64') }), - { b: 'whoops' }, - { b: 'whoops' }, - ], + [new StructCoder('TestStruct', { b: new U64Coder() }), { b: U8_MAX + 1 }, { b: U8_MAX + 1 }], + [new StructCoder('TestStruct', { b: new U64Coder() }), { b: 'whoops' }, { b: 'whoops' }], ], ], [ 'TupleCoder', [ [new TupleCoder([]), [], []], - [new TupleCoder([new NumberCoder('u64'), new NumberCoder('u64')]), [13, 37], [13n, 37n]], + [new TupleCoder([new U64Coder(), new U64Coder()]), [13, 37], [bn(13), bn(37)]], ], [ // Under @@ -272,7 +278,8 @@ describe.each(testCases)('%s', (coderName, goodCases, badCases) => { expect(hexlify(encoded)).toMatchSnapshot(); const [decoded, length] = coder.decode(encoded, 0); expect(length).toEqual(encoded.length); - expect(decoded).toEqual(output); + + expect(JSON.stringify(decoded)).toEqual(JSON.stringify(output)); }); it.each( badCases.map(([coder, input, output]): [string, any, any, Coder] => [ @@ -292,11 +299,11 @@ describe.each(testCases)('%s', (coderName, goodCases, badCases) => { describe('EnumCoder', () => { it('is typed correctly', () => { - const coder = new EnumCoder('TestEnum', { a: new BooleanCoder(), b: new NumberCoder('u64') }); + const coder = new EnumCoder('TestEnum', { a: new BooleanCoder(), b: new U64Coder() }); // Good expect(() => coder.encode({ a: true })).not.toThrow(); - expect(() => coder.encode({ b: 1337n })).not.toThrow(); + expect(() => coder.encode({ b: bn(1337) })).not.toThrow(); // Under expect(() => coder.encode( @@ -308,14 +315,14 @@ describe('EnumCoder', () => { expect(() => coder.encode( // @ts-expect-error - { a: true, b: 1337n } + { a: true, b: 1337 } ) ).toThrow(); // Wrong expect(() => coder.encode( // @ts-expect-error - { a: 1337n } + { a: 1337 } ) ).not.toThrow(); expect(() => @@ -323,7 +330,7 @@ describe('EnumCoder', () => { // @ts-expect-error { b: true } ) - ).not.toThrow(); + ).toThrow(); expect(() => coder.encode( // @ts-expect-error @@ -337,11 +344,11 @@ describe('StructCoder', () => { it('is typed correctly', () => { const coder = new StructCoder('TestStruct', { a: new BooleanCoder(), - b: new NumberCoder('u64'), + b: new U64Coder(), }); // Good - expect(() => coder.encode({ a: true, b: 1337n })).not.toThrow(); + expect(() => coder.encode({ a: true, b: bn(1337) })).not.toThrow(); // Under expect(() => coder.encode( @@ -358,21 +365,21 @@ describe('StructCoder', () => { expect(() => coder.encode( // @ts-expect-error - { b: 1337n } + { b: bn(1337) } ) - ).not.toThrow(); + ).toThrow(); // Over expect(() => coder.encode( // @ts-expect-error - { a: true, b: 1337n, c: false } + { a: true, b: bn(1337), c: false } ) ).not.toThrow(); // Wrong expect(() => coder.encode( // @ts-expect-error - { a: 1337n } + { a: 1337 } ) ).toThrow(); expect(() => @@ -380,7 +387,7 @@ describe('StructCoder', () => { // @ts-expect-error { b: true } ) - ).not.toThrow(); + ).toThrow(); expect(() => coder.encode( // @ts-expect-error @@ -392,13 +399,10 @@ describe('StructCoder', () => { describe('TupleCoder', () => { it('is typed correctly', () => { - const coder = new TupleCoder<[BooleanCoder, NumberCoder<'u64'>]>([ - new BooleanCoder(), - new NumberCoder('u64'), - ]); + const coder = new TupleCoder<[BooleanCoder, U64Coder]>([new BooleanCoder(), new U64Coder()]); // Good - expect(() => coder.encode([true, 1337n])).not.toThrow(); + expect(() => coder.encode([true, bn(1337)])).not.toThrow(); // Under expect(() => coder.encode( @@ -415,27 +419,27 @@ describe('TupleCoder', () => { expect(() => coder.encode( // @ts-expect-error - [1337n] + [bn(1337)] ) ).toThrow(); // Over expect(() => coder.encode( // @ts-expect-error - [true, 1337n, false] + [true, bn(1337), false] ) ).toThrow(); // Wrong expect(() => coder.encode( // @ts-expect-error - [1337n, true] + [bn(1337), true] ) - ).not.toThrow(); + ).toThrow(); expect(() => coder.encode( // @ts-expect-error - ['true', 1337n] + ['true', bn(1337)] ) ).not.toThrow(); expect(() => diff --git a/packages/abi-coder/src/coders/enum.ts b/packages/abi-coder/src/coders/enum.ts index bab7870aa8e..3bdd56b3e2f 100644 --- a/packages/abi-coder/src/coders/enum.ts +++ b/packages/abi-coder/src/coders/enum.ts @@ -1,9 +1,10 @@ import { concat } from '@ethersproject/bytes'; +import { toNumber } from '@fuel-ts/math'; import type { RequireExactlyOne } from 'type-fest'; import type { TypesOfCoder } from './abstract-coder'; import Coder from './abstract-coder'; -import NumberCoder from './number'; +import U64Coder from './u64'; export type InputValueOf> = RequireExactlyOne<{ [P in keyof TCoders]: TypesOfCoder['Input']; @@ -18,11 +19,11 @@ export default class EnumCoder> extends Co > { name: string; coders: TCoders; - #caseIndexCoder: NumberCoder<'u64'>; + #caseIndexCoder: U64Coder; #encodedValueSize: number; constructor(name: string, coders: TCoders) { - const caseIndexCoder = new NumberCoder('u64'); + const caseIndexCoder = new U64Coder(); const encodedValueSize = Object.values(coders).reduce( (max, coder) => Math.max(max, coder.encodedLength), 0 @@ -45,6 +46,7 @@ export default class EnumCoder> extends Co const valueCoder = this.coders[caseKey]; const caseIndex = Object.keys(this.coders).indexOf(caseKey); const encodedValue = valueCoder.encode(value[caseKey]); + const padding = new Uint8Array(this.#encodedValueSize - valueCoder.encodedLength); return concat([this.#caseIndexCoder.encode(caseIndex), padding, encodedValue]); } @@ -53,9 +55,9 @@ export default class EnumCoder> extends Co let newOffset = offset; let decoded; - [decoded, newOffset] = new NumberCoder('u64').decode(data, newOffset); - const caseIndex = decoded; - const caseKey = Object.keys(this.coders)[Number(caseIndex)]; + [decoded, newOffset] = new U64Coder().decode(data, newOffset); + const caseIndex = toNumber(decoded); + const caseKey = Object.keys(this.coders)[caseIndex]; if (!caseKey) { throw new Error(`Invalid caseIndex "${caseIndex}". Valid cases: ${Object.keys(this.coders)}`); } diff --git a/packages/abi-coder/src/coders/number.ts b/packages/abi-coder/src/coders/number.ts index 1ef840d757d..1a441a9afe3 100644 --- a/packages/abi-coder/src/coders/number.ts +++ b/packages/abi-coder/src/coders/number.ts @@ -1,22 +1,16 @@ -import { zeroPad } from '@ethersproject/bytes'; -import { toArray, toBigInt, toNumber } from '@fuel-ts/math'; +import { toNumber, toBytes } from '@fuel-ts/math'; import Coder from './abstract-coder'; -type NumberCoderType = 'u8' | 'u16' | 'u32' | 'u64'; +type NumberCoderType = 'u8' | 'u16' | 'u32'; -type ToDecodedType = TBaseType extends 'u64' ? bigint : number; - -export default class NumberCoder extends Coder< - number | bigint, - ToDecodedType -> { +export default class NumberCoder extends Coder { // This is to align the bits to the total bytes // See https://github.com/FuelLabs/fuel-specs/blob/master/specs/protocol/abi.md#unsigned-integers length: number; - baseType: TBaseType; + baseType: NumberCoderType; - constructor(baseType: TBaseType) { + constructor(baseType: NumberCoderType) { super('number', baseType, 8); this.baseType = baseType; switch (baseType) { @@ -27,42 +21,32 @@ export default class NumberCoder this.length) { - this.throwError(`Invalid ${this.baseType}`, value); + this.throwError(`Invalid ${this.baseType}. Too many bytes.`, value); } - return zeroPad(bytes, 8); + return toBytes(bytes, 8); } - #decodeBigInt(data: Uint8Array, offset: number): [bigint, number] { + decode(data: Uint8Array, offset: number): [number, number] { let bytes = data.slice(offset, offset + 8); bytes = bytes.slice(8 - this.length, 8); - const num = toBigInt(bytes); - return [num, offset + 8]; - } - decode(data: Uint8Array, offset: number): [ToDecodedType, number] { - const [num, nextOffset] = this.#decodeBigInt(data, offset); - if (this.baseType === 'u64') { - return [num as ToDecodedType, nextOffset]; - } - return [toNumber(num) as ToDecodedType, nextOffset]; + return [toNumber(bytes), offset + 8]; } } diff --git a/packages/abi-coder/src/coders/struct.ts b/packages/abi-coder/src/coders/struct.ts index 1b9d61eb096..c152adcd599 100644 --- a/packages/abi-coder/src/coders/struct.ts +++ b/packages/abi-coder/src/coders/struct.ts @@ -1,8 +1,8 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { concat } from '@ethersproject/bytes'; import type { TypesOfCoder } from './abstract-coder'; import Coder from './abstract-coder'; +import OptionCoder from './option'; type InputValueOf> = { [P in keyof TCoders]: TypesOfCoder['Input']; @@ -28,10 +28,14 @@ export default class StructCoder> extends this.coders = coders; } - encode(value: InputValueOf): any { + encode(value: InputValueOf) { const encodedFields = Object.keys(this.coders).map((fieldName) => { const fieldCoder = this.coders[fieldName]; const fieldValue = value[fieldName]; + + if (!(fieldCoder instanceof OptionCoder) && fieldValue == null) { + this.throwError(`Invalid ${this.type}. Field "${fieldName}" not present.`, value); + } const encoded = fieldCoder.encode(fieldValue); return encoded; }); diff --git a/packages/abi-coder/src/coders/u64.ts b/packages/abi-coder/src/coders/u64.ts new file mode 100644 index 00000000000..49fe3c93ee3 --- /dev/null +++ b/packages/abi-coder/src/coders/u64.ts @@ -0,0 +1,29 @@ +import type { BN, BNInput } from '@fuel-ts/math'; +import { bn, toBytes } from '@fuel-ts/math'; + +import Coder from './abstract-coder'; + +export default class U64Coder extends Coder { + constructor() { + super('u64', 'u64', 8); + } + + encode(value: BNInput): Uint8Array { + let bytes; + + try { + bytes = toBytes(value, 8); + } catch (error) { + this.throwError(`Invalid ${this.type}`, value); + } + + return bytes; + } + + decode(data: Uint8Array, offset: number): [BN, number] { + let bytes = data.slice(offset, offset + 8); + bytes = bytes.slice(0, 8); + + return [bn(bytes), offset + 8]; + } +} diff --git a/packages/abi-coder/src/interface.test.ts b/packages/abi-coder/src/interface.test.ts index 8360b6852c0..3fd276e200f 100644 --- a/packages/abi-coder/src/interface.test.ts +++ b/packages/abi-coder/src/interface.test.ts @@ -1,4 +1,5 @@ import { hexlify } from '@ethersproject/bytes'; +import { toHex } from '@fuel-ts/math'; import FunctionFragment from './fragments/function-fragment'; import Interface from './interface'; @@ -44,7 +45,7 @@ describe('Interface', () => { expect(hexlify(encoded)).toEqual('0x00000000e6af18d7'); encoded = Interface.getSighash(fragmentTwoParams); expect(hexlify(encoded)).toEqual('0x00000000e6af18d7'); - encoded = functionInterfaceTwoParams.encodeFunctionData('sum', [42, 34]); + encoded = functionInterfaceTwoParams.encodeFunctionData('sum', [toHex(42), toHex(34)]); expect(hexlify(encoded)).toEqual( '0x00000000e6af18d70000000000000001000000000000002a0000000000000022' ); @@ -123,7 +124,7 @@ describe('Interface', () => { '0x000000000c36cb9c0000000000000000000000000000002a' ); expect(decoded.length).toEqual(1); - expect(decoded[0]).toEqual(42n); + expect(decoded[0].toHex()).toEqual(toHex(42)); }); it('can calculate the correct sighash for array string values', () => { const fnFragment = FunctionFragment.fromObject({ diff --git a/packages/contract/README.md b/packages/contract/README.md index 5a9103d77a5..2e910b884ae 100644 --- a/packages/contract/README.md +++ b/packages/contract/README.md @@ -33,7 +33,7 @@ npm add @fuel-ts/contract ```ts // typescript file -import { Wallet } from "fuels"; +import { Wallet, BigNumberish, BN } from "fuels"; const provider = new Wallet("0x..."); // Wallet with coins const contractId = "0x..."; @@ -72,7 +72,7 @@ console.log(value); // On projects with typescript without generated types you // can pass the types on the contract call -const { value } = contract.functions.add_one<[bigint], bigint>().call(); +const { value } = contract.functions.add_one<[BigNumberish], BN>().call(); console.log(value); ``` diff --git a/packages/contract/src/__test__/call-test-contract/call-test-contract.test.ts b/packages/contract/src/__test__/call-test-contract/call-test-contract.test.ts index 568e7a5958b..ccd00b73aeb 100644 --- a/packages/contract/src/__test__/call-test-contract/call-test-contract.test.ts +++ b/packages/contract/src/__test__/call-test-contract/call-test-contract.test.ts @@ -1,4 +1,5 @@ import { NativeAssetId } from '@fuel-ts/constants'; +import { BN, bn, toHex } from '@fuel-ts/math'; import { readFileSync } from 'fs'; import { join } from 'path'; @@ -14,37 +15,37 @@ const setupContract = createSetupConfig({ cache: true, }); -const U64_MAX = 2n ** 64n - 1n; +const U64_MAX = bn(2).pow(64).sub(1); describe('CallTestContract', () => { - it.each([0n, 1337n, U64_MAX - 1n])('can call a contract with u64 (%p)', async (num) => { + it.each([0, 1337, U64_MAX.sub(1)])('can call a contract with u64 (%p)', async (num) => { const contract = await setupContract(); - const { value } = await contract.functions.foo(num).call(); - expect(value).toEqual(num + 1n); + const { value } = await contract.functions.foo(num).call(); + expect(value.toHex()).toEqual(bn(num).add(1).toHex()); }); it.each([ - [{ a: false, b: 0n }], - [{ a: true, b: 0n }], - [{ a: false, b: 1337n }], - [{ a: true, b: 1337n }], - [{ a: false, b: U64_MAX - 1n }], - [{ a: true, b: U64_MAX - 1n }], + [{ a: false, b: 0 }], + [{ a: true, b: 0 }], + [{ a: false, b: 1337 }], + [{ a: true, b: 1337 }], + [{ a: false, b: U64_MAX.sub(1) }], + [{ a: true, b: U64_MAX.sub(1) }], ])('can call a contract with structs (%p)', async (struct) => { const contract = await setupContract(); const { value } = await contract.functions.boo(struct).call(); expect(value.a).toEqual(!struct.a); - expect(value.b).toEqual(struct.b + 1n); + expect(value.b.toHex()).toEqual(bn(struct.b).add(1).toHex()); }); it('can call a function with empty arguments', async () => { const contract = await setupContract(); const { value: value0 } = await contract.functions.barfoo(0).call(); - expect(value0).toEqual(63n); + expect(value0.toHex()).toEqual(toHex(63)); const { value: value1 } = await contract.functions.foobar().call(); - expect(value1).toEqual(63n); + expect(value1.toHex()).toEqual(toHex(63)); }); it('function with empty return output configured should resolve undefined', async () => { @@ -82,14 +83,14 @@ describe('CallTestContract', () => { 'foobar_no_params', { values: [], - expected: 50n, + expected: bn(50), }, ], [ 'sum', { values: [10, 20], - expected: 30n, + expected: bn(30), }, ], [ @@ -102,7 +103,7 @@ describe('CallTestContract', () => { b: 30, }, ], - expected: 60n, + expected: bn(60), }, ], [ @@ -114,14 +115,14 @@ describe('CallTestContract', () => { b: 34, }, ], - expected: 68n, + expected: bn(68), }, ], [ 'sum_multparams', { values: [10, 10, 10, 10, 40], - expected: 80n, + expected: bn(80), }, ], [ @@ -132,7 +133,7 @@ describe('CallTestContract', () => { a: 20, }, ], - expected: 30n, + expected: bn(30), }, ], [ @@ -149,7 +150,11 @@ describe('CallTestContract', () => { const { value } = await contract.functions[method](...values).call(); - expect(value).toBe(expected); + if (BN.isBN(value)) { + expect(toHex(value)).toBe(toHex(expected)); + } else { + expect(value).toBe(expected); + } } ); @@ -173,7 +178,7 @@ describe('CallTestContract', () => { forward: [1_000_000, NativeAssetId], }) .call(); - expect(value).toBe(1_000_000n); + expect(value.toHex()).toBe(bn(1_000_000).toHex()); }); it('Forward asset_id on contract call', async () => { @@ -229,10 +234,10 @@ describe('CallTestContract', () => { it('can make multiple calls', async () => { const contract = await setupContract(); - const num = 1337n; - const numC = 10n; - const struct = { a: true, b: 1337n }; - const invocationA = contract.functions.foo(0n); + const num = 1337; + const numC = 10; + const struct = { a: true, b: 1337 }; + const invocationA = contract.functions.foo(0); const multiCallScope = contract.multiCall([invocationA, contract.functions.boo(struct)]); // Set arguments of the invocation @@ -248,10 +253,10 @@ describe('CallTestContract', () => { value: [resultA, resultB, resultC], } = await multiCallScope.call(); - expect(resultA).toEqual(num + 1n); + expect(resultA.toHex()).toEqual(bn(num).add(1).toHex()); expect(resultB.a).toEqual(!struct.a); - expect(resultB.b).toEqual(struct.b + 1n); - expect(resultC).toEqual(numC + 1n); + expect(resultB.b.toHex()).toEqual(bn(struct.b).add(1).toHex()); + expect(resultC.toHex(0)).toEqual(bn(numC).add(1).toHex()); } // Test first time diff --git a/packages/contract/src/__test__/contract-factory.test.ts b/packages/contract/src/__test__/contract-factory.test.ts index cc132b9123e..8c17c58d9cb 100644 --- a/packages/contract/src/__test__/contract-factory.test.ts +++ b/packages/contract/src/__test__/contract-factory.test.ts @@ -1,5 +1,6 @@ import { Interface } from '@fuel-ts/abi-coder'; import { NativeAssetId } from '@fuel-ts/constants'; +import { bn, toHex } from '@fuel-ts/math'; import { Provider } from '@fuel-ts/providers'; import { TestUtils } from '@fuel-ts/wallet'; import { readFileSync } from 'fs'; @@ -36,10 +37,10 @@ describe('Contract Factory', () => { await contact.functions.initialize_counter(41).call(); const { value } = await contact.functions.increment_counter(1).call(); - expect(value).toEqual(42n); + expect(value.toHex()).toEqual(toHex(42)); const { value: value2 } = await contact.functions.increment_counter(1).dryRun(); - expect(value2).toEqual(43n); + expect(value2.toHex()).toEqual(toHex(43)); }); it('Creates a factory from inputs that can return transaction results', async () => { @@ -92,7 +93,7 @@ describe('Contract Factory', () => { }); const { value: var1 } = await contract.functions.return_var1().call(); - expect(var1).toEqual(10n); + expect(var1.toHex()).toEqual(toHex(10)); const { value: var2 } = await contract.functions.return_var2().call(); expect(var2).toEqual(20); @@ -104,10 +105,12 @@ describe('Contract Factory', () => { expect(var4).toEqual(true); const { value: var5 } = await contract.functions.return_var5().call(); - expect(var5).toEqual({ - v1: true, - v2: 50n, - }); + expect(JSON.stringify(var5)).toEqual( + JSON.stringify({ + v1: true, + v2: bn(50), + }) + ); }); it('Creates a contract with initial storage (dynamic key)', async () => { @@ -136,7 +139,7 @@ describe('Contract Factory', () => { }); const { value: var1 } = await contract.functions.return_var1().call(); - expect(var1).toEqual(10n); + expect(var1.toHex()).toEqual(toHex(10)); const { value: var2 } = await contract.functions.return_var2().call(); expect(var2).toEqual(20); @@ -148,10 +151,12 @@ describe('Contract Factory', () => { expect(var4).toEqual(true); const { value: var5 } = await contract.functions.return_var5().call(); - expect(var5).toEqual({ - v1: true, - v2: 50n, - }); + expect(JSON.stringify(var5)).toEqual( + JSON.stringify({ + v1: true, + v2: bn(50), + }) + ); const { value: vB256 } = await contract.functions.return_b256().get(); expect(vB256).toEqual(b256); diff --git a/packages/contract/src/__test__/contract.test.ts b/packages/contract/src/__test__/contract.test.ts index 49826d72c94..f4979791f54 100644 --- a/packages/contract/src/__test__/contract.test.ts +++ b/packages/contract/src/__test__/contract.test.ts @@ -1,6 +1,7 @@ import { getRandomB256 } from '@fuel-ts/address'; import { NativeAssetId, ZeroBytes32 } from '@fuel-ts/constants'; -import { multiply } from '@fuel-ts/math'; +import type { BN } from '@fuel-ts/math'; +import { bn, multiply, toHex, toNumber } from '@fuel-ts/math'; import { Provider } from '@fuel-ts/providers'; import { TestUtils } from '@fuel-ts/wallet'; import { readFileSync } from 'fs'; @@ -137,7 +138,7 @@ describe('Contract', () => { ]); const { value: results } = await scope.call(); - expect(results).toEqual(1338n); + expect(results.toHex()).toEqual(toHex(1338)); }); it('adds multiple contracts on multicalls', async () => { @@ -164,7 +165,7 @@ describe('Contract', () => { ]); const { value: results } = await scope.call(); - expect(results).toEqual([1337n, 1338n]); + expect(JSON.stringify(results)).toEqual(JSON.stringify([bn(1337), bn(1338)])); }); it('submits multiple calls', async () => { @@ -173,7 +174,7 @@ describe('Contract', () => { const { value: results } = await contract .multiCall([contract.functions.foo(1336), contract.functions.foo(1336)]) .call(); - expect(results).toEqual([1337n, 1337n]); + expect(JSON.stringify(results)).toEqual(JSON.stringify([bn(1337), bn(1337)])); }); it('should fail to execute multiple calls if gasLimit is too low', async () => { @@ -213,7 +214,7 @@ describe('Contract', () => { ]); const { value: results } = await scope.call(); - expect(results).toEqual([1337n]); + expect(JSON.stringify(results)).toEqual(JSON.stringify([bn(1337)])); }); it('dryRuns multiple calls', async () => { @@ -222,7 +223,7 @@ describe('Contract', () => { const { value: results } = await contract .multiCall([contract.functions.foo(1336), contract.functions.foo(1336)]) .get(); - expect(results).toEqual([1337n, 1337n]); + expect(JSON.stringify(results)).toEqual(JSON.stringify([bn(1337), bn(1337)])); }); it('simulates multiple calls', async () => { @@ -231,8 +232,8 @@ describe('Contract', () => { const { value, callResult, gasUsed } = await contract .multiCall([contract.functions.foo(1336), contract.functions.foo(1336)]) .simulate(); - expect(value).toEqual([1337n, 1337n]); - expect(gasUsed).toBeGreaterThan(0); + expect(JSON.stringify(value)).toEqual(JSON.stringify([bn(1337), bn(1337)])); + expect(toNumber(gasUsed)).toBeGreaterThan(0); expect(callResult.receipts).toEqual(expect.arrayContaining([expect.any(Object)])); }); @@ -243,7 +244,7 @@ describe('Contract', () => { .multiCall([contract.functions.foo(1336), contract.functions.foo(1336)]) .call(); expect(transactionId).toBeTruthy(); - expect(gasUsed).toBeGreaterThan(0); + expect(toNumber(gasUsed)).toBeGreaterThan(0); }); it('Single call with forwarding a alt token', async () => { @@ -258,8 +259,8 @@ describe('Contract', () => { gasPrice: 1, gasLimit: 2000000, }) - .call(); - expect(value).toEqual(200n); + .call(); + expect(value.toHex()).toEqual(toHex(200)); }); it('MultiCall with multiple forwarding', async () => { @@ -281,8 +282,8 @@ describe('Contract', () => { gasPrice: 1, gasLimit: 2000000, }) - .call<[bigint, bigint, string]>(); - expect(value).toEqual([100n, 200n, AltToken]); + .call<[BN, BN, BN]>(); + expect(JSON.stringify(value)).toEqual(JSON.stringify([bn(100), bn(200), AltToken])); }); it('Check if gas per call is lower than transaction', async () => { @@ -304,7 +305,7 @@ describe('Contract', () => { gasPrice: 1, gasLimit: 100, }) - .call<[bigint, bigint, string]>(); + .call<[BN, BN, BN]>(); }).rejects.toThrowError( "Transaction gasLimit can't be lower than the sum of the forwarded gas of each call" ); @@ -328,16 +329,16 @@ describe('Contract', () => { gasPrice: 1, gasLimit: 1_000_000, }) - .call<[bigint, bigint]>(); + .call<[BN, BN]>(); // Allow values to be off by 2% since we don't have exact values const allowedError = 0.02; - expect(Number(value[0])).toBeGreaterThanOrEqual(500_000 * allowedError); - expect(Number(value[0])).toBeLessThanOrEqual(500_000); + expect(value[0].toNumber()).toBeGreaterThanOrEqual(500_000 * allowedError); + expect(value[0].toNumber()).toBeLessThanOrEqual(500_000); - expect(Number(value[1])).toBeGreaterThanOrEqual(1_000_000 * allowedError); - expect(Number(value[1])).toBeLessThanOrEqual(1_000_000); + expect(value[1].toNumber()).toBeGreaterThanOrEqual(1_000_000 * allowedError); + expect(value[1].toNumber()).toBeLessThanOrEqual(1_000_000); }); it('Get transaction cost', async () => { @@ -353,18 +354,18 @@ describe('Contract', () => { ]); const transactionCost = await invocationScope.getTransactionCost(); - expect(transactionCost.gasPrice).toBe(0n); - expect(transactionCost.fee).toBeGreaterThanOrEqual(0n); - expect(transactionCost.gasUsed).toBeGreaterThan(1000n); + expect(toNumber(transactionCost.gasPrice)).toBe(0); + expect(toNumber(transactionCost.fee)).toBeGreaterThanOrEqual(0); + expect(toNumber(transactionCost.gasUsed)).toBeGreaterThan(1000); const { value } = await invocationScope .txParams({ gasPrice: transactionCost.gasPrice, gasLimit: transactionCost.gasUsed, }) - .call<[bigint, bigint]>(); + .call<[string, string]>(); - expect(value).toEqual([100n, 200n]); + expect(JSON.stringify(value)).toEqual(JSON.stringify([bn(100), bn(200)])); }); it('Get transaction cost with gasPrice 1', async () => { @@ -386,9 +387,9 @@ describe('Contract', () => { // invocation scope const transactionCost = await invocationScope.getTransactionCost(); - expect(transactionCost.gasPrice).toBe(1n); - expect(transactionCost.fee).toBeGreaterThanOrEqual(1n); - expect(transactionCost.gasUsed).toBeGreaterThan(1000n); + expect(toNumber(transactionCost.gasPrice)).toBe(1); + expect(toNumber(transactionCost.fee)).toBeGreaterThanOrEqual(1); + expect(toNumber(transactionCost.gasUsed)).toBeGreaterThan(1000); // Test that gasUsed is correctly calculated // and can be used as gasLimit @@ -397,9 +398,9 @@ describe('Contract', () => { gasPrice: transactionCost.gasPrice, gasLimit: transactionCost.gasUsed, }) - .call<[bigint, bigint]>(); + .call<[string, string]>(); - expect(value).toEqual([100n, 200n]); + expect(JSON.stringify(value)).toEqual(JSON.stringify([bn(100), bn(200)])); }); it('Get transaction cost with gasPrice 2', async () => { @@ -419,9 +420,9 @@ describe('Contract', () => { gasPrice: 2, }); - expect(transactionCost.gasPrice).toBe(2n); - expect(transactionCost.fee).toBeGreaterThanOrEqual(2n); - expect(transactionCost.gasUsed).toBeGreaterThan(1000n); + expect(toNumber(transactionCost.gasPrice)).toBe(2); + expect(toNumber(transactionCost.fee)).toBeGreaterThanOrEqual(2); + expect(toNumber(transactionCost.gasUsed)).toBeGreaterThan(1000); // Test that gasUsed is correctly calculated // and can be used as gasLimit @@ -430,9 +431,9 @@ describe('Contract', () => { gasPrice: transactionCost.gasPrice, gasLimit: transactionCost.gasUsed, }) - .call<[bigint, bigint]>(); + .call<[string, string]>(); - expect(value).toEqual([100n, 200n]); + expect(JSON.stringify(value)).toEqual(JSON.stringify([bn(100), bn(200)])); }); it('Fail before submit if gasLimit is lower than gasUsed', async () => { @@ -451,7 +452,7 @@ describe('Contract', () => { .txParams({ gasLimit, }) - .call(); + .call(); }).rejects.toThrowError(`gasLimit(${gasLimit}) is lower than the required (${gasUsed})`); }); @@ -466,7 +467,7 @@ describe('Contract', () => { const { value: arrayNumber } = await contract.functions.take_array_number([1, 2, 3]).call(); - expect(arrayNumber).toEqual(1n); + expect(arrayNumber.toHex()).toEqual(toHex(1)); const { value: arrayReturnShuffle } = await contract.functions .take_array_string_shuffle(['abc', 'efg', 'hij']) diff --git a/packages/contract/src/__test__/coverage-contract/coverage-contract.test.ts b/packages/contract/src/__test__/coverage-contract/coverage-contract.test.ts index 195eacdb1ec..cf3c14a55d3 100644 --- a/packages/contract/src/__test__/coverage-contract/coverage-contract.test.ts +++ b/packages/contract/src/__test__/coverage-contract/coverage-contract.test.ts @@ -1,4 +1,6 @@ import { NativeAssetId } from '@fuel-ts/constants'; +import type { BN } from '@fuel-ts/math'; +import { bn, toHex } from '@fuel-ts/math'; import { Provider } from '@fuel-ts/providers'; import { TestUtils } from '@fuel-ts/wallet'; import { readFileSync } from 'fs'; @@ -75,9 +77,9 @@ describe('Coverage Contract', () => { }); it('should test u64 variable type', async () => { - const INPUT = BigInt(RUST_U32_MAX + 1); + const INPUT = bn(RUST_U32_MAX).add(1).toHex(); const { value } = await contractInstance.functions.echo_u64(INPUT).call(); - expect(value).toBe(INPUT); + expect(value.toHex()).toBe(INPUT); }); it('should test bool variable type', async () => { @@ -121,15 +123,15 @@ describe('Coverage Contract', () => { }); it('should test tuple > 8 bytes variable type', async () => { - const INPUT = [BigInt(RUST_U32_MAX + 1), BigInt(RUST_U32_MAX + 2)]; + const INPUT = [bn(RUST_U32_MAX).add(1), bn(RUST_U32_MAX).add(2)]; const { value } = await contractInstance.functions.echo_tuple_u64(INPUT).call(); - expect(value).toStrictEqual(INPUT); + expect(JSON.stringify(value)).toStrictEqual(JSON.stringify(INPUT)); }); it('should test tuple mixed variable type', async () => { - const INPUT = [true, BigInt(RUST_U32_MAX + 1)]; + const INPUT = [true, bn(RUST_U32_MAX).add(1)]; const { value } = await contractInstance.functions.echo_tuple_mixed(INPUT).call(); - expect(value).toStrictEqual(INPUT); + expect(JSON.stringify(value)).toStrictEqual(JSON.stringify(INPUT)); }); it('should test array < 8 bytes variable type', async () => { @@ -138,15 +140,17 @@ describe('Coverage Contract', () => { }); it('should test array > 8 bytes variable type', async () => { - const INPUT: [bigint, bigint, bigint, bigint, bigint] = [ - 11n, - BigInt(RUST_U32_MAX + 2), - BigInt(RUST_U32_MAX) + 3n, - BigInt('9009'), - BigInt('0x1fffffffffffff'), + const INPUT: [number, string, BN, string, string] = [ + 11, + toHex(RUST_U32_MAX + 2), + bn(RUST_U32_MAX).add(3), + toHex(bn('9009', 10)), + '0x1fffffffffffff', ]; const { value } = await contractInstance.functions.echo_array_u64(INPUT).call(); - expect(value).toStrictEqual(INPUT); + + const OUTPUT = INPUT.map((v) => toHex(v)); + expect(JSON.stringify(value)).toStrictEqual(JSON.stringify(OUTPUT)); }); it('should test array bool variable type', async () => { diff --git a/packages/contract/src/__test__/generic-types-contract/generic-types-contract.test.ts b/packages/contract/src/__test__/generic-types-contract/generic-types-contract.test.ts index 765ac6dc388..46880b9df56 100644 --- a/packages/contract/src/__test__/generic-types-contract/generic-types-contract.test.ts +++ b/packages/contract/src/__test__/generic-types-contract/generic-types-contract.test.ts @@ -1,3 +1,4 @@ +import { toHex } from '@fuel-ts/math'; import { readFileSync } from 'fs'; import { join } from 'path'; @@ -74,29 +75,29 @@ describe('GenericTypesContract', () => { .call(); const arg1 = { - bim: 1n, + bim: toHex(1), bam: true, - never_used: 2n, + never_used: toHex(2), foo: { x: b256, - b: 32n, + b: toHex(32), }, foo_list: new Array(10).fill(b256), }; const arg2 = { - bim: 1n, + bim: toHex(1), bam: 2, - never_used: 3n, + never_used: toHex(3), foo: { x: { - x: 21n, - b: 22n, + x: toHex(21), + b: toHex(22), }, - b: 32n, + b: toHex(32), }, foo_list: new Array(10).fill({ - x: 31n, - b: 32n, + x: toHex(31), + b: toHex(32), }), }; const { value: call2 } = await contract.functions @@ -104,6 +105,6 @@ describe('GenericTypesContract', () => { .call(); expect(value).toEqual(bimArg1); - expect([arg1, arg2]).toEqual(call2); + expect(JSON.stringify([arg1, arg2])).toEqual(JSON.stringify(call2)); }); }); diff --git a/packages/contract/src/__test__/storage-test-contract/storage-test-contract.test.ts b/packages/contract/src/__test__/storage-test-contract/storage-test-contract.test.ts index 67676af8cb4..ddc200cfef7 100644 --- a/packages/contract/src/__test__/storage-test-contract/storage-test-contract.test.ts +++ b/packages/contract/src/__test__/storage-test-contract/storage-test-contract.test.ts @@ -1,4 +1,5 @@ import { NativeAssetId } from '@fuel-ts/constants'; +import { toHex } from '@fuel-ts/math'; import { Provider } from '@fuel-ts/providers'; import { TestUtils } from '@fuel-ts/wallet'; import { readFileSync } from 'fs'; @@ -31,12 +32,12 @@ describe('StorageTestContract', () => { // Call contract const { value: initializeResult } = await contract.functions.initialize_counter(1300).call(); - expect(initializeResult).toEqual(1300n); + expect(initializeResult.toHex()).toEqual(toHex(1300)); const { value: incrementResult } = await contract.functions.increment_counter(37).call(); - expect(incrementResult).toEqual(1337n); + expect(incrementResult.toHex()).toEqual(toHex(1337)); const { value: count } = await contract.functions.counter().get(); - expect(count).toEqual(1337n); + expect(count.toHex()).toEqual(toHex(1337)); }); it('can access counter value with only provider (no wallet)', async () => { @@ -48,6 +49,6 @@ describe('StorageTestContract', () => { const provider = new Provider('http://127.0.0.1:4000/graphql'); const providerContract = new Contract(contract.id, contract.interface, provider); const { value } = await providerContract.functions.counter().get(); - expect(value).toEqual(1300n); + expect(value.toHex()).toEqual(toHex(1300)); }); }); diff --git a/packages/contract/src/__test__/token-test-contract/token-test-contract.test.ts b/packages/contract/src/__test__/token-test-contract/token-test-contract.test.ts index 217a90d5df6..4d97116d24e 100644 --- a/packages/contract/src/__test__/token-test-contract/token-test-contract.test.ts +++ b/packages/contract/src/__test__/token-test-contract/token-test-contract.test.ts @@ -1,4 +1,6 @@ import { NativeAssetId } from '@fuel-ts/constants'; +import type { BN } from '@fuel-ts/math'; +import { toHex } from '@fuel-ts/math'; import { Provider } from '@fuel-ts/providers'; import { Wallet, TestUtils } from '@fuel-ts/wallet'; import { readFileSync } from 'fs'; @@ -23,7 +25,7 @@ const setup = async () => { }; describe('TokenTestContract', () => { - it('Can mint and transfer coins', async () => { + it.only('Can mint and transfer coins', async () => { // New wallet to transfer coins and check balance const userWallet = Wallet.generate({ provider }); const token = await setup(); @@ -34,14 +36,14 @@ describe('TokenTestContract', () => { value: userWallet.address, }; const getBalance = async () => { - const { value } = await token.functions.get_balance(tokenId, tokenId).get(); + const { value } = await token.functions.get_balance(tokenId, tokenId).get(); return value; }; // Mint some coins await token.functions.mint_coins(100, 1).call(); // Check balance is correct - expect(await getBalance()).toEqual(100n); + expect((await getBalance()).toHex()).toEqual(toHex(100)); // Transfer some coins await token.functions .transfer_coins_to_output(50, tokenId, addressId) @@ -52,6 +54,6 @@ describe('TokenTestContract', () => { // Check new wallet received the coins from the token contract const balances = await userWallet.getBalances(); const tokenBalance = balances.find((b) => b.assetId === token.id.toB256()); - expect(tokenBalance?.amount).toEqual(50n); + expect(tokenBalance?.amount.toHex()).toEqual(toHex(50)); }); }); diff --git a/packages/contract/src/contracts/functions/base-invocation-scope.ts b/packages/contract/src/contracts/functions/base-invocation-scope.ts index 00590eaa037..8b304953d01 100644 --- a/packages/contract/src/contracts/functions/base-invocation-scope.ts +++ b/packages/contract/src/contracts/functions/base-invocation-scope.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import type { InputValue } from '@fuel-ts/abi-coder'; import type { ContractIdLike } from '@fuel-ts/interfaces'; -import { toBigInt } from '@fuel-ts/math'; +import { bn, toNumber } from '@fuel-ts/math'; import type { Provider, CoinQuantity } from '@fuel-ts/providers'; import { transactionRequestify, ScriptTransactionRequest } from '@fuel-ts/providers'; import { MAX_GAS_PER_TX, InputType } from '@fuel-ts/transactions'; @@ -68,10 +68,10 @@ export class BaseInvocationScope { const assets = this.calls .map((call) => ({ assetId: String(call.assetId), - amount: toBigInt(call.amount || 0), + amount: bn(call.amount || 0), })) .concat(this.transactionRequest.calculateFee()) - .filter(({ assetId, amount }) => assetId && amount); + .filter(({ assetId, amount }) => assetId && !bn(amount).isZero()); return assets; } @@ -81,11 +81,11 @@ export class BaseInvocationScope { requiredCoins: Map, { assetId, amount }: CoinQuantity ) => { - const currentAmount = requiredCoins.get(assetId)?.amount || 0n; + const currentAmount = requiredCoins.get(assetId)?.amount || bn(0); return requiredCoins.set(assetId, { assetId: String(assetId), - amount: currentAmount + toBigInt(amount), + amount: currentAmount.add(amount), }); }; this.requiredCoins = Array.from( @@ -124,11 +124,8 @@ export class BaseInvocationScope { } protected checkGasLimitTotal() { - const gasLimitOnCalls = this.calls.reduce( - (total, call) => BigInt(total) + BigInt(call.gas || 0), - 0n - ); - if (gasLimitOnCalls > this.transactionRequest.gasLimit) { + const gasLimitOnCalls = this.calls.reduce((total, call) => total.add(call.gas || 0), bn(0)); + if (gasLimitOnCalls.gt(this.transactionRequest.gasLimit)) { throw new Error( "Transaction gasLimit can't be lower than the sum of the forwarded gas of each call" ); @@ -145,7 +142,7 @@ export class BaseInvocationScope { await this.prepareTransaction(options); const request = transactionRequestify(this.transactionRequest); - request.gasPrice = BigInt(request.gasPrice || options?.gasPrice || 0); + request.gasPrice = bn(toNumber(request.gasPrice) || toNumber(options?.gasPrice || 0)); const txCost = await provider.getTransactionCost(request, options?.tolerance); return txCost; @@ -170,8 +167,8 @@ export class BaseInvocationScope { this.txParameters = txParams; const request = this.transactionRequest; - request.gasLimit = toBigInt(txParams.gasLimit || request.gasLimit); - request.gasPrice = toBigInt(txParams.gasPrice || request.gasPrice); + request.gasLimit = bn(txParams.gasLimit || request.gasLimit); + request.gasPrice = bn(txParams.gasPrice || request.gasPrice); request.addVariableOutputs(this.txParameters?.variableOutputs || 0); return this; diff --git a/packages/contract/src/contracts/functions/invocation-results.ts b/packages/contract/src/contracts/functions/invocation-results.ts index 78fd830957f..cf62fb692b6 100644 --- a/packages/contract/src/contracts/functions/invocation-results.ts +++ b/packages/contract/src/contracts/functions/invocation-results.ts @@ -1,5 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable max-classes-per-file */ +import type { BN } from '@fuel-ts/math'; +import { bn } from '@fuel-ts/math'; import type { CallResult, TransactionResponse, TransactionResult } from '@fuel-ts/providers'; import type { ReceiptScriptResult } from '@fuel-ts/transactions'; import { ReceiptType } from '@fuel-ts/transactions'; @@ -11,13 +13,13 @@ function getGasUsage(callResult: CallResult) { const scriptResult = callResult.receipts.find((r) => r.type === ReceiptType.ScriptResult) as | ReceiptScriptResult | undefined; - return scriptResult?.gasUsed || 0n; + return scriptResult?.gasUsed || bn(0); } class InvocationResult { readonly functionScopes: Array; readonly isMultiCall: boolean; - readonly gasUsed: bigint; + readonly gasUsed: BN; readonly value: T; constructor( diff --git a/packages/contract/src/scripts.ts b/packages/contract/src/scripts.ts index 752c1925f6a..82879303d51 100644 --- a/packages/contract/src/scripts.ts +++ b/packages/contract/src/scripts.ts @@ -2,9 +2,11 @@ import type { BytesLike } from '@ethersproject/bytes'; import { arrayify, concat } from '@ethersproject/bytes'; import type { ArrayCoder, StructCoder } from '@fuel-ts/abi-coder'; -import { AbiCoder, NumberCoder } from '@fuel-ts/abi-coder'; +import { AbiCoder } from '@fuel-ts/abi-coder'; +import U64Coder from '@fuel-ts/abi-coder/src/coders/u64'; import type { AbstractAddress } from '@fuel-ts/interfaces'; import type { BigNumberish } from '@fuel-ts/math'; +import { bn, toNumber } from '@fuel-ts/math'; import { Script } from '@fuel-ts/script'; import { ReceiptType } from '@fuel-ts/transactions'; @@ -56,17 +58,17 @@ export const contractCallScript = new Script( fnArg = { Data: [refArgData.length, args.length] }; refArgData = concat([refArgData, args]); } else { - fnArg = { Value: new NumberCoder('u64').decode(args, 0)[0] }; + fnArg = { Value: new U64Coder().decode(args, 0)[0] }; } const scriptCall = { contract_id: { value: call.contractId }, - fn_selector: new NumberCoder('u64').decode(functionSelector, 0)[0], + fn_selector: new U64Coder().decode(functionSelector, 0)[0], fn_arg: fnArg, parameters: { - amount: call.amount ? BigInt(call.amount) : undefined, + amount: call.amount ? bn(call.amount) : undefined, asset_id: call.assetId ? { value: call.assetId } : undefined, - gas: call.gas ? BigInt(call.gas) : undefined, + gas: call.gas ? bn(call.gas) : undefined, }, }; @@ -86,7 +88,7 @@ export const contractCallScript = new Script( return concat([encodedScriptData, refArgData]); }, (result) => { - if (result.code !== 0n) { + if (toNumber(result.code) !== 0) { throw new Error(`Script returned non-zero result: ${result.code}`); } if (result.returnReceipt.type !== ReceiptType.ReturnData) { @@ -103,9 +105,12 @@ export const contractCallScript = new Script( if (callResult) { if (callResult.Data) { const [offset, length] = callResult.Data; - contractCallResults[i] = returnData.slice(Number(offset), Number(offset + length)); + contractCallResults[i] = returnData.slice( + toNumber(offset), + toNumber(offset) + toNumber(length) + ); } else { - contractCallResults[i] = new NumberCoder('u64').encode(callResult.Value); + contractCallResults[i] = new U64Coder().encode(callResult.Value); } } }); diff --git a/packages/example-contract/src/example-contract.test.ts b/packages/example-contract/src/example-contract.test.ts index cd049206373..a8c6527b24f 100644 --- a/packages/example-contract/src/example-contract.test.ts +++ b/packages/example-contract/src/example-contract.test.ts @@ -1,6 +1,5 @@ -import { TestUtils } from '@fuel-ts/wallet'; import fs from 'fs'; -import { ContractFactory, NativeAssetId, Provider } from 'fuels'; +import { ContractFactory, NativeAssetId, Provider, TestUtils, toHex } from 'fuels'; import path from 'path'; import { ExampleContractAbi__factory } from './example-contract-types'; @@ -9,22 +8,17 @@ describe('ExampleContract', () => { it('should return the input', async () => { const provider = new Provider('http://127.0.0.1:4000/graphql'); const wallet = await TestUtils.generateTestWallet(provider, [[1_000, NativeAssetId]]); - // Deploy const bytecode = fs.readFileSync(path.join(__dirname, '../out/debug/example-contract.bin')); const factory = new ContractFactory(bytecode, ExampleContractAbi__factory.abi, wallet); const contract = await factory.deployContract(); - // Call const { value } = await contract.functions.return_input(1337).call(); - // Assert - expect(value).toEqual(1337n); - + expect(value.toHex()).toEqual(toHex(1337)); // Try co call from the factory const contractInstance = ExampleContractAbi__factory.connect(contract.id, wallet); const { value: v2 } = await contractInstance.functions.return_input(1337).call(); - - expect(v2).toBe(1337n); + expect(v2.toHex()).toBe(toHex(1337)); }); }); diff --git a/packages/hasher/package.json b/packages/hasher/package.json index 945a19b1a76..8b69722bbb0 100644 --- a/packages/hasher/package.json +++ b/packages/hasher/package.json @@ -25,6 +25,7 @@ "@ethersproject/bytes": "^5.5.0", "@ethersproject/sha2": "^5.5.0", "@fuel-ts/constants": "workspace:*", + "@fuel-ts/math": "workspace:*", "@fuel-ts/providers": "workspace:*", "@fuel-ts/transactions": "workspace:*", "lodash.clonedeep": "^4.5.0" diff --git a/packages/hasher/src/hasher.ts b/packages/hasher/src/hasher.ts index b06caf21748..8291a053a67 100644 --- a/packages/hasher/src/hasher.ts +++ b/packages/hasher/src/hasher.ts @@ -1,6 +1,7 @@ import type { BytesLike } from '@ethersproject/bytes'; import { sha256 } from '@ethersproject/sha2'; import { ZeroBytes32 } from '@fuel-ts/constants'; +import { bn } from '@fuel-ts/math'; import type { TransactionRequestLike } from '@fuel-ts/providers'; import { transactionRequestify, TransactionType } from '@fuel-ts/providers'; import type { UtxoId } from '@fuel-ts/transactions'; @@ -70,13 +71,13 @@ export function hashTransaction(transactionRequestLike: TransactionRequestLike) } // Zero out on signing: amount case OutputType.Change: { - outputClone.amount = 0n; + outputClone.amount = bn(0); return outputClone; } // Zero out on signing: amount, to and assetId case OutputType.Variable: { outputClone.to = ZeroBytes32; - outputClone.amount = 0n; + outputClone.amount = bn(0); outputClone.assetId = ZeroBytes32; return outputClone; } diff --git a/packages/hdwallet/src/hdwallet.ts b/packages/hdwallet/src/hdwallet.ts index 30e0eabb6ce..45b1cf8bf3d 100644 --- a/packages/hdwallet/src/hdwallet.ts +++ b/packages/hdwallet/src/hdwallet.ts @@ -1,8 +1,8 @@ import { Base58 } from '@ethersproject/basex'; import type { BytesLike } from '@ethersproject/bytes'; -import { hexDataSlice, hexlify, concat, hexZeroPad, arrayify } from '@ethersproject/bytes'; +import { hexDataSlice, hexlify, concat, arrayify } from '@ethersproject/bytes'; import { computeHmac, ripemd160, sha256, SupportedAlgorithm } from '@ethersproject/sha2'; -import { toBigInt } from '@fuel-ts/math'; +import { bn, toBytes, toHex } from '@fuel-ts/math'; import { Mnemonic } from '@fuel-ts/mnemonic'; import { Signer } from '@fuel-ts/signer'; @@ -52,16 +52,6 @@ function parsePath(path: string, depth: number = 0) { ); } -function to4Bytes(v: number) { - const data = new Uint8Array(4); - - for (let i = 24; i >= 0; i -= 8) { - data[0 + (i >> 3)] = (v >> (24 - i)) & 0xff; - } - - return data; -} - type HDWalletConfig = { privateKey?: BytesLike; publicKey?: BytesLike; @@ -135,16 +125,16 @@ class HDWallet { } // child number: ser32(i) - data.set(to4Bytes(index), 33); + data.set(toBytes(index, 4), 33); const bytes = arrayify(computeHmac(SupportedAlgorithm.sha512, chainCode, data)); const IL = bytes.slice(0, 32); const IR = bytes.slice(32); if (privateKey) { - const N = BigInt('0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141'); + const N = '0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141'; // Child key ki is parse256(IL) + kpar (mod n). - const ki = arrayify(hexZeroPad(hexlify((toBigInt(IL) + toBigInt(privateKey)) % N), 32)); + const ki = bn(IL).add(privateKey).mod(N).toBytes(32); return new HDWallet({ privateKey: ki, @@ -193,7 +183,7 @@ class HDWallet { const prefix = getExtendedKeyPrefix(this.privateKey == null || isPublic, testnet); const depth = hexlify(this.depth); const parentFingerprint = this.parentFingerprint; - const index = hexZeroPad(hexlify(this.index), 4); + const index = toHex(this.index, 4); // last 32 bites from the key const chainCode = this.chainCode; // first 32 bites from the key diff --git a/packages/math/README.md b/packages/math/README.md index f4eba21b2bf..09107617ca8 100644 --- a/packages/math/README.md +++ b/packages/math/README.md @@ -2,7 +2,9 @@ **@fuel-ts/math** is a sub-module for interacting with **Fuel**. -This module contains helpful math utilities to work with numbers like `BigInt`. +This module contains helpful math utilities to work with `decimal`, `hex`, `Uint8Array`. + +Math is based in [bn.js](https://www.npmjs.com/package/bn.js) library, which helps us to do all kinds of calculations safely, doesn't matter the size of the number. # Table of contents diff --git a/packages/math/package.json b/packages/math/package.json index 16ac391870e..aaea8269e0b 100644 --- a/packages/math/package.json +++ b/packages/math/package.json @@ -23,5 +23,9 @@ "license": "Apache-2.0", "scripts": { "build": "tsup --dts" + }, + "dependencies": { + "@types/bn.js": "^5.1.0", + "bn.js": "^5.2.1" } } diff --git a/packages/math/src/bn.test.ts b/packages/math/src/bn.test.ts new file mode 100644 index 00000000000..3675d03fcdf --- /dev/null +++ b/packages/math/src/bn.test.ts @@ -0,0 +1,283 @@ +import type { BN } from './bn'; +import { bn } from './bn'; +import type { BigNumberish } from './types'; + +describe('Math - Convert', () => { + it('can execute operations without losing our BN reference', async () => { + let test: BN; + + test = bn(2).add(2).sub(2).pow('0x3'); + expect(test.toString(16).substring(2, 0)).toEqual('0x'); + + test = test.mul(2); + expect(test.toString(16).substring(2, 0)).toEqual('0x'); + + test = test.div(2); + expect(test.toString(16).substring(2, 0)).toEqual('0x'); + + test = test.sqr(); + expect(test.toString(16).substring(2, 0)).toEqual('0x'); + + test = test.neg(); + expect(test.toString(16).substring(2, 0)).toEqual('0x'); + + test = test.abs(); + expect(test.toString(16).substring(2, 0)).toEqual('0x'); + + test = test.fromTwos(2); + expect(test.toString(16).substring(2, 0)).toEqual('0x'); + + test = test.toTwos(2); + expect(test.toString(16).substring(2, 0)).toEqual('0x'); + + test = test.mod(2); + expect(test.toString(16).substring(2, 0)).toEqual('0x'); + + test = test.divRound(2); + expect(test.toString(16).substring(2, 0)).toEqual('0x'); + }); + + it('can convert between hex and Uint8Array', async () => { + let bytesToConvert: Uint8Array; + let hexToConvert: string; + + bytesToConvert = Uint8Array.from([0]); + hexToConvert = '0x0'; + expect(bn(bytesToConvert).toHex()).toEqual(hexToConvert); + expect(bn(hexToConvert).toBytes()).toEqual(bytesToConvert); + + bytesToConvert = Uint8Array.from([1]); + hexToConvert = '0x1'; + expect(bn(bytesToConvert).toHex()).toEqual(hexToConvert); + expect(bn(hexToConvert).toBytes()).toEqual(bytesToConvert); + + bytesToConvert = Uint8Array.from([1, 255]); + hexToConvert = '0x1ff'; + expect(bn(bytesToConvert).toHex()).toEqual(hexToConvert); + expect(bn(hexToConvert).toBytes()).toEqual(bytesToConvert); + + bytesToConvert = Uint8Array.from([1, 255, 255]); + hexToConvert = '0x1ffff'; + expect(bn(bytesToConvert).toHex()).toEqual(hexToConvert); + expect(bn(hexToConvert).toBytes()).toEqual(bytesToConvert); + }); + + it('can convert between number and Uint8Array', async () => { + let bytesToConvert: Uint8Array; + let numberToConvert: number; + + bytesToConvert = Uint8Array.from([0]); + numberToConvert = 0; + expect(bn(bytesToConvert).toNumber()).toEqual(numberToConvert); + expect(bn(numberToConvert).toBytes()).toEqual(bytesToConvert); + + bytesToConvert = Uint8Array.from([1]); + numberToConvert = 1; + expect(bn(bytesToConvert).toNumber()).toEqual(numberToConvert); + expect(bn(numberToConvert).toBytes()).toEqual(bytesToConvert); + + bytesToConvert = Uint8Array.from([1, 255]); + numberToConvert = 511; + expect(bn(bytesToConvert).toNumber()).toEqual(numberToConvert); + expect(bn(numberToConvert).toBytes()).toEqual(bytesToConvert); + }); + + it('can convert between number and hex', () => { + let hexToConvert: string; + let numberToConvert: number; + + hexToConvert = '0x0'; + numberToConvert = 0; + expect(bn(hexToConvert).toNumber()).toEqual(numberToConvert); + expect(bn(numberToConvert).toHex()).toEqual(hexToConvert); + + hexToConvert = '0x1'; + numberToConvert = 1; + expect(bn(hexToConvert).toNumber()).toEqual(numberToConvert); + expect(bn(numberToConvert).toHex()).toEqual(hexToConvert); + + hexToConvert = '0x11'; + numberToConvert = 17; + expect(bn(hexToConvert).toNumber()).toEqual(numberToConvert); + expect(bn(numberToConvert).toHex()).toEqual(hexToConvert); + + hexToConvert = '0x111'; + numberToConvert = 273; + expect(bn(hexToConvert).toNumber()).toEqual(numberToConvert); + expect(bn(numberToConvert).toHex()).toEqual(hexToConvert); + }); + + it('should toHex accept bytePadding config', () => { + let numberToConvert: number; + let bytesToConvert: Uint8Array; + + numberToConvert = 0; + expect(bn(numberToConvert).toHex()).toEqual('0x0'); + expect(bn(numberToConvert).toHex(1)).toEqual('0x00'); + expect(bn(numberToConvert).toHex(2)).toEqual('0x0000'); + expect(bn(numberToConvert).toHex(3)).toEqual('0x000000'); + expect(bn(numberToConvert).toHex(4)).toEqual('0x00000000'); + expect(bn(numberToConvert).toHex(5)).toEqual('0x0000000000'); + expect(bn(numberToConvert).toHex(6)).toEqual('0x000000000000'); + expect(bn(numberToConvert).toHex(7)).toEqual('0x00000000000000'); + expect(bn(numberToConvert).toHex(8)).toEqual('0x0000000000000000'); + + numberToConvert = 1; + expect(bn(numberToConvert).toHex()).toEqual('0x1'); + expect(bn(numberToConvert).toHex(1)).toEqual('0x01'); + expect(bn(numberToConvert).toHex(2)).toEqual('0x0001'); + expect(bn(numberToConvert).toHex(3)).toEqual('0x000001'); + expect(bn(numberToConvert).toHex(4)).toEqual('0x00000001'); + expect(bn(numberToConvert).toHex(5)).toEqual('0x0000000001'); + expect(bn(numberToConvert).toHex(6)).toEqual('0x000000000001'); + expect(bn(numberToConvert).toHex(7)).toEqual('0x00000000000001'); + expect(bn(numberToConvert).toHex(8)).toEqual('0x0000000000000001'); + + bytesToConvert = Uint8Array.from([0]); + expect(bn(bytesToConvert).toHex()).toEqual('0x0'); + expect(bn(bytesToConvert).toHex(1)).toEqual('0x00'); + expect(bn(bytesToConvert).toHex(2)).toEqual('0x0000'); + expect(bn(bytesToConvert).toHex(3)).toEqual('0x000000'); + expect(bn(bytesToConvert).toHex(4)).toEqual('0x00000000'); + expect(bn(bytesToConvert).toHex(5)).toEqual('0x0000000000'); + expect(bn(bytesToConvert).toHex(6)).toEqual('0x000000000000'); + expect(bn(bytesToConvert).toHex(7)).toEqual('0x00000000000000'); + expect(bn(bytesToConvert).toHex(8)).toEqual('0x0000000000000000'); + + bytesToConvert = Uint8Array.from([1]); + expect(bn(bytesToConvert).toHex()).toEqual('0x1'); + expect(bn(bytesToConvert).toHex(1)).toEqual('0x01'); + expect(bn(bytesToConvert).toHex(2)).toEqual('0x0001'); + expect(bn(bytesToConvert).toHex(3)).toEqual('0x000001'); + expect(bn(bytesToConvert).toHex(4)).toEqual('0x00000001'); + expect(bn(bytesToConvert).toHex(5)).toEqual('0x0000000001'); + expect(bn(bytesToConvert).toHex(6)).toEqual('0x000000000001'); + expect(bn(bytesToConvert).toHex(7)).toEqual('0x00000000000001'); + expect(bn(bytesToConvert).toHex(8)).toEqual('0x0000000000000001'); + }); + + it('should toArray accept bytePadding config', () => { + let numberToConvert: number; + let hexToConvert: string; + + numberToConvert = 0; + expect(bn(numberToConvert).toBytes()).toEqual(Uint8Array.from([0])); + expect(bn(numberToConvert).toBytes(1)).toEqual(Uint8Array.from([0])); + expect(bn(numberToConvert).toBytes(2)).toEqual(Uint8Array.from([0, 0])); + expect(bn(numberToConvert).toBytes(3)).toEqual(Uint8Array.from([0, 0, 0])); + expect(bn(numberToConvert).toBytes(4)).toEqual(Uint8Array.from([0, 0, 0, 0])); + expect(bn(numberToConvert).toBytes(5)).toEqual(Uint8Array.from([0, 0, 0, 0, 0])); + expect(bn(numberToConvert).toBytes(6)).toEqual(Uint8Array.from([0, 0, 0, 0, 0, 0])); + expect(bn(numberToConvert).toBytes(7)).toEqual(Uint8Array.from([0, 0, 0, 0, 0, 0, 0])); + expect(bn(numberToConvert).toBytes(8)).toEqual(Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0])); + + numberToConvert = 1; + expect(bn(numberToConvert).toBytes()).toEqual(Uint8Array.from([1])); + expect(bn(numberToConvert).toBytes(1)).toEqual(Uint8Array.from([1])); + expect(bn(numberToConvert).toBytes(2)).toEqual(Uint8Array.from([0, 1])); + expect(bn(numberToConvert).toBytes(3)).toEqual(Uint8Array.from([0, 0, 1])); + expect(bn(numberToConvert).toBytes(4)).toEqual(Uint8Array.from([0, 0, 0, 1])); + expect(bn(numberToConvert).toBytes(5)).toEqual(Uint8Array.from([0, 0, 0, 0, 1])); + expect(bn(numberToConvert).toBytes(6)).toEqual(Uint8Array.from([0, 0, 0, 0, 0, 1])); + expect(bn(numberToConvert).toBytes(7)).toEqual(Uint8Array.from([0, 0, 0, 0, 0, 0, 1])); + expect(bn(numberToConvert).toBytes(8)).toEqual(Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 1])); + + hexToConvert = '0x0'; + expect(bn(hexToConvert).toBytes()).toEqual(Uint8Array.from([0])); + expect(bn(hexToConvert).toBytes(1)).toEqual(Uint8Array.from([0])); + expect(bn(hexToConvert).toBytes(2)).toEqual(Uint8Array.from([0, 0])); + expect(bn(hexToConvert).toBytes(3)).toEqual(Uint8Array.from([0, 0, 0])); + expect(bn(hexToConvert).toBytes(4)).toEqual(Uint8Array.from([0, 0, 0, 0])); + expect(bn(hexToConvert).toBytes(5)).toEqual(Uint8Array.from([0, 0, 0, 0, 0])); + expect(bn(hexToConvert).toBytes(6)).toEqual(Uint8Array.from([0, 0, 0, 0, 0, 0])); + expect(bn(hexToConvert).toBytes(7)).toEqual(Uint8Array.from([0, 0, 0, 0, 0, 0, 0])); + expect(bn(hexToConvert).toBytes(8)).toEqual(Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 0])); + + hexToConvert = '0x1'; + expect(bn(hexToConvert).toBytes()).toEqual(Uint8Array.from([1])); + expect(bn(hexToConvert).toBytes(1)).toEqual(Uint8Array.from([1])); + expect(bn(hexToConvert).toBytes(2)).toEqual(Uint8Array.from([0, 1])); + expect(bn(hexToConvert).toBytes(3)).toEqual(Uint8Array.from([0, 0, 1])); + expect(bn(hexToConvert).toBytes(4)).toEqual(Uint8Array.from([0, 0, 0, 1])); + expect(bn(hexToConvert).toBytes(5)).toEqual(Uint8Array.from([0, 0, 0, 0, 1])); + expect(bn(hexToConvert).toBytes(6)).toEqual(Uint8Array.from([0, 0, 0, 0, 0, 1])); + expect(bn(hexToConvert).toBytes(7)).toEqual(Uint8Array.from([0, 0, 0, 0, 0, 0, 1])); + expect(bn(hexToConvert).toBytes(8)).toEqual(Uint8Array.from([0, 0, 0, 0, 0, 0, 0, 1])); + }); + + it('should toNumber work when number is inside safe range and break when number provided is too big', () => { + const maxSafeNumber = Number.MAX_SAFE_INTEGER; + let maxSafe: BigNumberish | Uint8Array; + let over: BigNumberish | Uint8Array; + + maxSafe = maxSafeNumber; + over = Number.MAX_SAFE_INTEGER + 1; + expect(bn(maxSafe).toNumber()).toEqual(maxSafeNumber); + expect(() => bn(over).toNumber()).toThrow(); + + maxSafe = '0x1fffffffffffff'; + over = '0x20000000000000'; + expect(bn(maxSafe).toNumber()).toEqual(maxSafeNumber); + expect(() => bn(over).toNumber()).toThrow(); + + maxSafe = Uint8Array.from([31, 255, 255, 255, 255, 255, 255]); + over = Uint8Array.from([32, 0, 0, 0, 0, 0, 0]); + expect(bn(maxSafe).toNumber()).toEqual(maxSafeNumber); + expect(() => bn(over).toNumber()).toThrow(); + }); + + it('should toArray break when value provided is bigger than bytePadding config', () => { + let maxBytes: Uint8Array; + let over: Uint8Array; + + maxBytes = Uint8Array.from([255]); + over = Uint8Array.from([1, 0]); + expect(bn(maxBytes).toBytes(1)).toEqual(maxBytes); + expect(() => bn(over).toBytes(1)).toThrow(); + + maxBytes = Uint8Array.from([255, 255]); + over = Uint8Array.from([1, 0, 0]); + expect(bn(maxBytes).toBytes(2)).toEqual(maxBytes); + expect(() => bn(over).toBytes(2)).toThrow(); + + maxBytes = Uint8Array.from([255, 255, 255]); + over = Uint8Array.from([1, 0, 0, 0]); + expect(bn(maxBytes).toBytes(3)).toEqual(maxBytes); + expect(() => bn(over).toBytes(3)).toThrow(); + + maxBytes = Uint8Array.from([255, 255, 255, 255]); + over = Uint8Array.from([1, 0, 0, 0, 0]); + expect(bn(maxBytes).toBytes(4)).toEqual(maxBytes); + expect(() => bn(over).toBytes(4)).toThrow(); + }); + + it('should toHex break when value provided is bigger than bytePadding config', () => { + let maxBytes: Uint8Array; + let maxHex: string; + let over: Uint8Array; + + maxBytes = Uint8Array.from([255]); + maxHex = '0xff'; + over = Uint8Array.from([1, 0]); + expect(bn(maxBytes).toHex(1)).toEqual(maxHex); + expect(() => bn(over).toHex(1)).toThrow(); + + maxBytes = Uint8Array.from([255, 255]); + maxHex = '0xffff'; + over = Uint8Array.from([1, 0, 0]); + expect(bn(maxBytes).toHex(2)).toEqual(maxHex); + expect(() => bn(over).toHex(2)).toThrow(); + + maxBytes = Uint8Array.from([255, 255, 255]); + maxHex = '0xffffff'; + over = Uint8Array.from([1, 0, 0, 0]); + expect(bn(maxBytes).toHex(3)).toEqual(maxHex); + expect(() => bn(over).toHex(3)).toThrow(); + + maxBytes = Uint8Array.from([255, 255, 255, 255]); + maxHex = '0xffffffff'; + over = Uint8Array.from([1, 0, 0, 0, 0]); + expect(bn(maxBytes).toHex(4)).toEqual(maxHex); + expect(() => bn(over).toHex(4)).toThrow(); + }); +}); diff --git a/packages/math/src/bn.ts b/packages/math/src/bn.ts new file mode 100644 index 00000000000..10267714c7e --- /dev/null +++ b/packages/math/src/bn.ts @@ -0,0 +1,215 @@ +import BnJs from 'bn.js'; + +type CompareResult = -1 | 0 | 1; +export type BNInput = number | string | number[] | Uint8Array | Buffer | BnJs; +interface BNHelper { + caller(v: BNInput, methodName: string): BN | boolean | CompareResult; + toHex: (bytesPadding?: number) => string; + toBytes: (bytesPadding?: number) => Uint8Array; + toJSON: () => string; +} +interface BNInputOverrides { + add: (v: BNInput) => BN; + pow: (v: BNInput) => BN; + sub: (v: BNInput) => BN; + div: (v: BNInput) => BN; + mul: (v: BNInput) => BN; + mod: (v: BNInput) => BN; + divRound: (v: BNInput) => BN; + lt: (v: BNInput) => boolean; + lte: (v: BNInput) => boolean; + gt: (v: BNInput) => boolean; + gte: (v: BNInput) => boolean; + eq: (v: BNInput) => boolean; + cmp: (v: BNInput) => CompareResult; +} +interface BNOverrides { + sqr: () => BN; + neg: () => BN; + abs: () => BN; + toTwos: (width: number) => BN; + fromTwos: (width: number) => BN; +} +interface BNHiddenTypes { + mulTo: (num: BN, out: BN) => BN; + divmod: (num: BNInput, mode?: string, positive?: boolean) => { mod: BN; div: BN }; +} +type BNInputOverridesKeys = keyof BNInputOverrides; + +export class BN extends BnJs implements BNInputOverrides, BNHiddenTypes, BNHelper, BNOverrides { + constructor(value: BNInput, base?: number | 'hex', endian?: BnJs.Endianness) { + if (BN.isBN(value)) { + super(value.toArray(), base, endian); + return; + } + // trim '0x' from hex strings as BN doesn't support it - https://github.com/ChainSafe/web3.js/issues/3847 + if (typeof value === 'string' && value.slice(0, 2) === '0x') { + super(value.substring(2), base || 'hex', endian); + return; + } + + super(value, base, endian); + } + + // ANCHOR: HELPERS + // make sure we always include `0x` in hex strings + toString(base?: number | 'hex', length?: number) { + const output = super.toString(base, length); + + if (base === 16 || base === 'hex') return `0x${output}`; + + return output; + } + + toHex(bytesPadding?: number): string { + const bytes = bytesPadding || 0; + const bytesLength = bytes * 2; + + if (this.isNeg()) { + throw new Error('cannot convert negative value to hex'); + } + if (bytesPadding && this.byteLength() > bytesPadding) { + throw new Error(`value ${this} exceeds bytes ${bytesPadding}`); + } + + return this.toString(16, bytesLength); + } + + toBytes(bytesPadding?: number): Uint8Array { + if (this.isNeg()) { + throw new Error('cannot convert negative value to Bytes'); + } + + return Uint8Array.from(this.toArray(undefined, bytesPadding)); + } + + toJSON(): string { + return this.toString(16); + } + // END ANCHOR: HELPERS + + // ANCHOR: OVERRIDES to accept better inputs + add(v: BNInput): BN { + return this.caller(v, 'add') as BN; + } + + pow(v: BNInput): BN { + return this.caller(v, 'pow') as BN; + } + + sub(v: BNInput): BN { + return this.caller(v, 'sub') as BN; + } + + div(v: BNInput): BN { + return this.caller(v, 'div') as BN; + } + + mul(v: BNInput): BN { + return this.caller(v, 'mul') as BN; + } + + mod(v: BNInput): BN { + return this.caller(v, 'mod') as BN; + } + + divRound(v: BNInput): BN { + return this.caller(v, 'divRound') as BN; + } + + lt(v: BNInput): boolean { + return this.caller(v, 'lt') as boolean; + } + + lte(v: BNInput): boolean { + return this.caller(v, 'lte') as boolean; + } + + gt(v: BNInput): boolean { + return this.caller(v, 'gt') as boolean; + } + + gte(v: BNInput): boolean { + return this.caller(v, 'gte') as boolean; + } + + eq(v: BNInput): boolean { + return this.caller(v, 'eq') as boolean; + } + + cmp(v: BNInput): CompareResult { + return this.caller(v, 'cmp') as CompareResult; + } + // END ANCHOR: OVERRIDES to accept better inputs + + // ANCHOR: OVERRIDES to output our BN type + sqr(): BN { + return new BN(super.sqr().toArray()); + } + + neg(): BN { + return new BN(super.neg().toArray()); + } + + abs(): BN { + return new BN(super.abs().toArray()); + } + + toTwos(width: number): BN { + return new BN(super.toTwos(width).toArray()); + } + + fromTwos(width: number): BN { + return new BN(super.fromTwos(width).toArray()); + } + // END ANCHOR: OVERRIDES to output our BN type + + // ANCHOR: OVERRIDES to avoid losing references + caller(v: BNInput, methodName: BNInputOverridesKeys): BN | boolean | CompareResult { + const output = super[methodName](new BN(v)); + + if (BN.isBN(output)) { + return new BN(output.toArray()); + } + + if (typeof output === 'boolean') { + return output as boolean; + } + + return output as CompareResult; + } + + clone() { + return new BN(this.toArray()); + } + + mulTo(num: BN, out: BN) { + const output: BnJs = (new BnJs(this.toArray()) as BN).mulTo(num, out); + + return new BN(output.toArray()); + } + + egcd(p: BnJs) { + const { a, b, gcd } = new BnJs(this.toArray()).egcd(p); + + return { + a: new BN(a.toArray()), + b: new BN(b.toArray()), + gcd: new BN(gcd.toArray()), + }; + } + + divmod(num: BNInput, mode?: string, positive?: boolean): { mod: BN; div: BN } { + const { div, mod } = (new BnJs(this.toArray()) as BN).divmod(new BN(num), mode, positive); + + return { + div: new BN(div?.toArray()), + mod: new BN(mod?.toArray()), + }; + } + // END ANCHOR: OVERRIDES to avoid losing references +} + +// functional shortcut to create BN +export const bn = (value: BNInput, base?: number | 'hex', endian?: BnJs.Endianness) => + new BN(value, base, endian); diff --git a/packages/math/src/convert.ts b/packages/math/src/convert.ts index b2cbb349bf3..8386ee71043 100644 --- a/packages/math/src/convert.ts +++ b/packages/math/src/convert.ts @@ -1,84 +1,21 @@ -/* eslint-disable no-restricted-syntax */ /** * From: https://github.dev/ethers-io/ethers.js/blob/9ca3dc557de8d1556096ea4140316e7f7711a0f3/packages/math/src.ts/convert.ts */ -import type { BigNumberish } from './types'; +import type { BNInput } from './bn'; +import { bn } from './bn'; -// IEEE 754 support 53-bits of mantissa -const maxValue = 0x1fffffffffffff; - -const nibbles = '0123456789abcdef'; - -// Converts a value to a BigInt, including big endian data -export function toBigInt(_value: BigNumberish | Uint8Array): bigint { - if (_value instanceof Uint8Array) { - let result = '0x0'; - for (const v of _value) { - result += nibbles[v >> 4]; - result += nibbles[v & 0x0f]; - } - return BigInt(result); - } - return BigInt(_value); -} - -export function toNumber(_value: BigNumberish | Uint8Array): number { - const value = toBigInt(_value); - if (value < -maxValue || value > maxValue) { - throw new Error(`Value out of range: ${_value}`); - } - return Number(value); +// Shortcut to bn(value).toNumber +export function toNumber(value: BNInput): number { + return bn(value).toNumber(); } -// Converts value to hex, optionally padding on the left to width bytes -export function toHex(_value: BigNumberish, width?: number): string { - const value = BigInt(_value); - if (value < 0) { - throw new Error('cannot convert negative value to hex'); - } - - let result = value.toString(16); - - if (width == null) { - // Ensure the value is of even length - if (result.length % 2) { - result = `0${result}`; - } - } else { - if (width * 2 < result.length) { - throw new Error(`value ${value} exceeds width ${width}`); - } - - // Pad the value to the required width - while (result.length < width * 2) { - result = `0${result}`; - } - } - - return `0x${result}`; +// Shortcut to bn(value).toHex +export function toHex(value: BNInput, bytesPadding?: number): string { + return bn(value).toHex(bytesPadding); } -export function toArray(_value: BigNumberish): Uint8Array { - const value = BigInt(_value); - if (value < 0) { - throw new Error('cannot convert negative value to hex'); - } - - if (value === 0n) { - return new Uint8Array([]); - } - - let hex = value.toString(16); - if (hex.length % 2) { - hex = `0${hex}`; - } - - const result = new Uint8Array(hex.length / 2); - for (let i = 0; i < result.length; i += 1) { - const offset = i * 2; - result[i] = parseInt(hex.substring(offset, offset + 2), 16); - } - - return result; +// Shortcut to bn(value).toBytes +export function toBytes(value: BNInput, bytesPadding?: number): Uint8Array { + return bn(value).toBytes(bytesPadding); } diff --git a/packages/math/src/index.ts b/packages/math/src/index.ts index 7aea364fcd1..421cc180db4 100644 --- a/packages/math/src/index.ts +++ b/packages/math/src/index.ts @@ -1,3 +1,4 @@ export * from './convert'; export * from './types'; export * from './math'; +export * from './bn'; diff --git a/packages/math/src/math.ts b/packages/math/src/math.ts index a1d19495db7..0ce8566ac39 100644 --- a/packages/math/src/math.ts +++ b/packages/math/src/math.ts @@ -1,9 +1,11 @@ -import { toNumber } from './convert'; +import type { BN } from './bn'; +import { bn } from './bn'; +import type { BigNumberish } from './types'; -export function max(...numbers: Array) { - return BigInt(Math.max(...numbers.map((n) => toNumber(n)))); +export function max(...numbers: Array): BN { + return numbers.reduce((prev, cur) => (bn(cur).gt(prev) ? bn(cur) : prev), bn(0)); } -export function multiply(...numbers: Array) { - return BigInt(Math.ceil(numbers.reduce((a, b) => Number(a) * Number(b), 1))); +export function multiply(...numbers: Array): BN { + return bn(Math.ceil(numbers.reduce((a, b) => bn(a).mul(b), bn(1)).toNumber())); } diff --git a/packages/math/src/types.ts b/packages/math/src/types.ts index 497765511e1..225d0c3ee2a 100644 --- a/packages/math/src/types.ts +++ b/packages/math/src/types.ts @@ -1 +1,3 @@ -export type BigNumberish = string | number | bigint; +import type { BN } from './bn'; + +export type BigNumberish = string | number | BN; diff --git a/packages/merkle-shared/package.json b/packages/merkle-shared/package.json index bed7dd2e8f3..7146873800a 100644 --- a/packages/merkle-shared/package.json +++ b/packages/merkle-shared/package.json @@ -22,8 +22,7 @@ "license": "Apache-2.0", "dependencies": { "@ethersproject/bytes": "^5.4.0", - "@ethersproject/sha2": "^5.4.0", - "@fuel-ts/math": "workspace:*" + "@ethersproject/sha2": "^5.4.0" }, "scripts": { "build": "tsup --dts" diff --git a/packages/merkle-shared/src/common.ts b/packages/merkle-shared/src/common.ts index 06823e73d9c..3aca59e094c 100644 --- a/packages/merkle-shared/src/common.ts +++ b/packages/merkle-shared/src/common.ts @@ -1,27 +1,6 @@ /// @dev The Fuel testing Merkle trees. /// A set of useful helper methods for testing and deploying Merkle trees. -import { toHex } from '@fuel-ts/math'; export const EMPTY = '0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'; export const ZERO = '0x0000000000000000000000000000000000000000000000000000000000000000'; export const MAX_HEIGHT = 256; - -/** - * Convert integer to 32 bytes hex string - */ -export function uintToBytes32(i: number): string { - const value = toHex(i); - let trimmedValue = value.slice(2); - trimmedValue = '0'.repeat(64 - trimmedValue.length).concat(trimmedValue); - return '0x'.concat(trimmedValue); -} - -/** - * Pad an uint left side to be 32 bytes - */ -export function padUint(value: bigint): string { - // uint256 is encoded as 32 bytes, so pad that string. - let trimmedValue = toHex(value).slice(2); - trimmedValue = '0'.repeat(64 - trimmedValue.length).concat(trimmedValue); - return '0x'.concat(trimmedValue); -} diff --git a/packages/merkle/package.json b/packages/merkle/package.json index 929b6ad7824..66aee13074b 100644 --- a/packages/merkle/package.json +++ b/packages/merkle/package.json @@ -22,6 +22,7 @@ ], "license": "Apache-2.0", "dependencies": { + "@fuel-ts/math": "workspace:*", "@fuel-ts/merkle-shared": "workspace:*" }, "scripts": { diff --git a/packages/merkle/src/binaryMerkleTree.test.ts b/packages/merkle/src/binaryMerkleTree.test.ts index b9593d571fe..afefdf2e4f9 100644 --- a/packages/merkle/src/binaryMerkleTree.test.ts +++ b/packages/merkle/src/binaryMerkleTree.test.ts @@ -1,4 +1,4 @@ -import { uintToBytes32 } from '@fuel-ts/merkle-shared'; +import { toHex } from '@fuel-ts/math'; import { calcRoot, constructTree, getProof } from './binaryMerkleTree'; import type Node from './types/node'; @@ -11,7 +11,7 @@ describe('Binary Merkle Tree', () => { beforeEach(() => { data = []; for (let i = 0; i < size; i += 1) { - data.push(uintToBytes32(i)); + data.push(toHex(i, 32)); } }); diff --git a/packages/merklesum/package.json b/packages/merklesum/package.json index 6b6c39561bc..37f088d644c 100644 --- a/packages/merklesum/package.json +++ b/packages/merklesum/package.json @@ -22,6 +22,7 @@ ], "license": "Apache-2.0", "dependencies": { + "@fuel-ts/math": "workspace:*", "@fuel-ts/merkle-shared": "workspace:*" }, "scripts": { diff --git a/packages/merklesum/src/sumMerkleTree.test.ts b/packages/merklesum/src/sumMerkleTree.test.ts index b87302d5bcd..910d37864e5 100644 --- a/packages/merklesum/src/sumMerkleTree.test.ts +++ b/packages/merklesum/src/sumMerkleTree.test.ts @@ -1,20 +1,20 @@ -import { uintToBytes32 } from '@fuel-ts/merkle-shared'; +import { toHex } from '@fuel-ts/math'; import { calcRoot, constructTree, getProof } from './sumMerkleTree'; import Proof from './types/proof'; describe('Sum Merkle Tree', () => { - const size = 100n; - const sumAfterLeaves = ((size - 1n) * size) / 2n; + const size = 100; + const sumAfterLeaves = toHex(((size - 1) * size) / 2); let data: string[] = []; - let values: bigint[] = []; + let values: string[] = []; beforeEach(() => { data = []; values = []; for (let i = 0; i < size; i += 1) { - data.push(uintToBytes32(i)); - values.push(BigInt(i)); + data.push(toHex(i, 32)); + values.push(toHex(i)); } }); @@ -34,7 +34,7 @@ describe('Sum Merkle Tree', () => { const nodeList = constructTree(values, data); const rootNode = nodeList[nodeList.length - 1]; - expect(nodeList.length).toEqual(Number(size * 2n - 1n)); + expect(nodeList.length).toEqual(size * 2 - 1); expect(rootNode.sum).toEqual(sumAfterLeaves); const rootProof: Proof = new Proof([], []); diff --git a/packages/merklesum/src/sumMerkleTree.ts b/packages/merklesum/src/sumMerkleTree.ts index 7d0efcb4b81..4a8ab5c2990 100644 --- a/packages/merklesum/src/sumMerkleTree.ts +++ b/packages/merklesum/src/sumMerkleTree.ts @@ -1,6 +1,7 @@ /// @dev The Fuel testing Merkle trees. /// A set of useful helper methods for testing and deploying Merkle trees. -import { hash, padUint } from '@fuel-ts/merkle-shared'; +import { bn, toHex } from '@fuel-ts/math'; +import { hash } from '@fuel-ts/merkle-shared'; import Node from './types/node'; import Proof from './types/proof'; @@ -9,8 +10,8 @@ import Proof from './types/proof'; * Slice off the '0x' on each argument to simulate abi.encodePacked * hash(prefix + value + data) */ -export function hashLeaf(value: bigint, data: string): string { - return hash('0x00'.concat(padUint(value).slice(2)).concat(data.slice(2))); +export function hashLeaf(value: string, data: string): string { + return hash('0x00'.concat(toHex(value, 32).slice(2)).concat(data.slice(2))); } /** @@ -18,16 +19,16 @@ export function hashLeaf(value: bigint, data: string): string { * hash (prefix + leftSum + leftHash + rightSum + rightHash) */ export function hashNode( - leftValue: bigint, + leftValue: string, left: string, - rightValue: bigint, + rightValue: string, right: string ): string { return hash( '0x01' - .concat(padUint(leftValue).slice(2)) + .concat(toHex(leftValue, 32).slice(2)) .concat(left.slice(2)) - .concat(padUint(rightValue).slice(2)) + .concat(toHex(rightValue, 32).slice(2)) .concat(right.slice(2)) ); } @@ -35,7 +36,7 @@ export function hashNode( /** * Construct tree */ -export function constructTree(sums: bigint[], data: string[]): Node[] { +export function constructTree(sums: string[], data: string[]): Node[] { const nodes = []; for (let i = 0, n = data.length; i < n; i += 1) { const hashed = hashLeaf(sums[i], data[i]); @@ -58,7 +59,9 @@ export function constructTree(sums: bigint[], data: string[]): Node[] { pNodes[j + 1].index, -1, hashed, - pNodes[j].sum + pNodes[j + 1].sum, + bn(pNodes[j].sum) + .add(pNodes[j + 1].sum) + .toHex(), '' ); nodes[i].index = nodesList.length; @@ -82,7 +85,7 @@ export function constructTree(sums: bigint[], data: string[]): Node[] { /** * Compute the merkle root */ -export function calcRoot(sums: bigint[], data: string[]): Node { +export function calcRoot(sums: string[], data: string[]): Node { const nodes = []; for (let i = 0; i < data.length; i += 1) { const hashed = hashLeaf(sums[i], data[i]); @@ -102,7 +105,9 @@ export function calcRoot(sums: bigint[], data: string[]): Node { pNodes[j + 1].index, -1, hashed, - pNodes[j].sum + pNodes[j + 1].sum, + bn(pNodes[j].sum) + .add(pNodes[j + 1].sum) + .toHex(), '' ); } diff --git a/packages/merklesum/src/types/node.ts b/packages/merklesum/src/types/node.ts index b34146a1fd4..180137a5921 100644 --- a/packages/merklesum/src/types/node.ts +++ b/packages/merklesum/src/types/node.ts @@ -4,7 +4,7 @@ class Node { parent: number; hash: string; data: string; - sum: bigint; + sum: string; index: number; constructor( @@ -12,7 +12,7 @@ class Node { right: number, parent: number, hash: string, - sum: bigint, + sum: string, data: string, index: number = 0 ) { diff --git a/packages/merklesum/src/types/proof.ts b/packages/merklesum/src/types/proof.ts index 0f87231c01f..888e3ed32f7 100644 --- a/packages/merklesum/src/types/proof.ts +++ b/packages/merklesum/src/types/proof.ts @@ -1,9 +1,9 @@ // Sum Merkle proof class Proof { sideNodes: string[]; - nodeSums: bigint[]; + nodeSums: string[]; - constructor(sideNodes: string[], sums: bigint[]) { + constructor(sideNodes: string[], sums: string[]) { this.sideNodes = sideNodes; this.nodeSums = sums; } diff --git a/packages/predicate/src/predicate.test.ts b/packages/predicate/src/predicate.test.ts index eeb6c4e5fb2..a30db521024 100644 --- a/packages/predicate/src/predicate.test.ts +++ b/packages/predicate/src/predicate.test.ts @@ -1,7 +1,8 @@ import { Address } from '@fuel-ts/address'; import { NativeAssetId } from '@fuel-ts/constants'; import type { AbstractAddress } from '@fuel-ts/interfaces'; -import type { BigNumberish } from '@fuel-ts/math'; +import type { BigNumberish, BN } from '@fuel-ts/math'; +import { bn, toHex, toNumber } from '@fuel-ts/math'; import { Provider } from '@fuel-ts/providers'; import type { Wallet } from '@fuel-ts/wallet'; import { TestUtils } from '@fuel-ts/wallet'; @@ -29,7 +30,7 @@ const setupPredicate = async ( wallet: Wallet, amountToPredicate: BigNumberish, predicate: Predicate -): Promise => { +): Promise => { await wallet.submitPredicate(predicate.address, amountToPredicate); // collect balance from predicate to prevent flaky tests where predicate address gets "filled up" @@ -39,28 +40,31 @@ const setupPredicate = async ( const assertResults = async ( wallet: Wallet, receiverAddress: AbstractAddress, - initialPredicateBalance: bigint, - initialReceiverBalance: bigint, - amountToPredicate: bigint, + initialPredicateBalance: BN, + initialReceiverBalance: BN, + amountToPredicate: BigNumberish, predicate: Predicate, isSkippingInitialReceiverBalance = false ): Promise => { // Check there are UTXO locked with the predicate hash - expect(initialPredicateBalance).toBeGreaterThanOrEqual(amountToPredicate); - !isSkippingInitialReceiverBalance && expect(initialReceiverBalance).toEqual(0n); + expect(toNumber(initialPredicateBalance)).toBeGreaterThanOrEqual(toNumber(amountToPredicate)); + !isSkippingInitialReceiverBalance && expect(initialReceiverBalance.toHex()).toEqual(toHex(0)); // Check the balance of the receiver const finalReceiverBalance = await wallet.provider.getBalance(receiverAddress, NativeAssetId); - expect(initialReceiverBalance + initialPredicateBalance).toEqual(finalReceiverBalance); + + expect(bn(initialReceiverBalance).add(initialPredicateBalance).toHex()).toEqual( + finalReceiverBalance.toHex() + ); // Check we spent the entire predicate hash input const finalPredicateBalance = await wallet.provider.getBalance(predicate.address, NativeAssetId); - expect(finalPredicateBalance).toEqual(0n); + expect(finalPredicateBalance.toHex()).toEqual(toHex(0)); }; type Validation = { has_account: boolean; - total_complete: bigint; + total_complete: BigNumberish; }; const AddressAbiInputs = [ @@ -98,7 +102,7 @@ describe('Predicate', () => { it('can call a no-arg Predicate that returns true', async () => { const receiverAddress = Address.fromRandom(); const wallet = await setup(); - const amountToPredicate = 10n; + const amountToPredicate = 10; const predicate = new Predicate(testPredicateTrue); const initialPredicateBalance = await setupPredicate(wallet, amountToPredicate, predicate); @@ -118,7 +122,7 @@ describe('Predicate', () => { it('can call a no-arg Predicate that returns true, via wallet', async () => { const wallet = await setup(); - const amountToPredicate = 10n; + const amountToPredicate = 10; const predicate = new Predicate(testPredicateTrue); const initialPredicateBalance = await setupPredicate(wallet, amountToPredicate, predicate); @@ -139,7 +143,7 @@ describe('Predicate', () => { it('can call a no-arg Predicate that returns false, via wallet', async () => { const wallet = await setup(); - const amountToPredicate = 10n; + const amountToPredicate = 10; const predicate = new Predicate(testPredicateFalse); const initialPredicateBalance = await setupPredicate(wallet, amountToPredicate, predicate); @@ -152,7 +156,7 @@ describe('Predicate', () => { it('can call a Coin predicate which returns true with valid predicate data [address]', async () => { const receiverAddress = Address.fromRandom(); const wallet = await setup(); - const amountToPredicate = 10n; + const amountToPredicate = 10; const predicate = new Predicate(testPredicateAddress, AddressAbiInputs); const initialPredicateBalance = await setupPredicate(wallet, amountToPredicate, predicate); @@ -177,7 +181,7 @@ describe('Predicate', () => { it('can call a Coin predicate which returns true with valid predicate data [address], via wallet', async () => { const wallet = await setup(); - const amountToPredicate = 10n; + const amountToPredicate = 10; const predicate = new Predicate(testPredicateAddress, AddressAbiInputs); const initialPredicateBalance = await setupPredicate(wallet, amountToPredicate, predicate); @@ -201,15 +205,15 @@ describe('Predicate', () => { it('can call a Coin predicate which returns false with invalid predicate data [address]', async () => { const receiverAddress = Address.fromRandom(); const wallet = await setup(); - const amountToPredicate = 10n; + const amountToPredicate = 10; const predicate = new Predicate(testPredicateAddress, AddressAbiInputs); const initialPredicateBalance = await setupPredicate(wallet, amountToPredicate, predicate); const initialReceiverBalance = await wallet.provider.getBalance(receiverAddress, NativeAssetId); // Check there are UTXO locked with the predicate hash - expect(initialPredicateBalance).toBeGreaterThanOrEqual(amountToPredicate); - expect(initialReceiverBalance).toEqual(0n); + expect(toNumber(initialPredicateBalance)).toBeGreaterThanOrEqual(toNumber(amountToPredicate)); + expect(initialReceiverBalance.toHex()).toEqual(toHex(0)); await expect(async () => { await wallet.provider.submitSpendPredicate( @@ -224,7 +228,7 @@ describe('Predicate', () => { it('can call a Coin predicate which returns true with valid predicate data [u32]', async () => { const receiverAddress = Address.fromRandom(); const wallet = await setup(); - const amountToPredicate = 10n; + const amountToPredicate = 10; const predicate = new Predicate(testPredicateU32, U32AbiInputs); const initialPredicateBalance = await setupPredicate(wallet, amountToPredicate, predicate); @@ -250,15 +254,15 @@ describe('Predicate', () => { it('can call a Coin predicate which returns false with invalid predicate data [u32]', async () => { const receiverAddress = Address.fromRandom(); const wallet = await setup(); - const amountToPredicate = 10n; + const amountToPredicate = 10; const predicate = new Predicate(testPredicateU32, U32AbiInputs); const initialPredicateBalance = await setupPredicate(wallet, amountToPredicate, predicate); const initialReceiverBalance = await wallet.provider.getBalance(receiverAddress, NativeAssetId); // Check there are UTXO locked with the predicate hash - expect(initialPredicateBalance).toBeGreaterThanOrEqual(amountToPredicate); - expect(initialReceiverBalance).toEqual(0n); + expect(toNumber(initialPredicateBalance)).toBeGreaterThanOrEqual(amountToPredicate); + expect(initialReceiverBalance.toHex()).toEqual(toHex(0)); await expect(async () => { await wallet.provider.submitSpendPredicate( @@ -273,7 +277,7 @@ describe('Predicate', () => { it('can call a Coin predicate which returns true with valid predicate data [struct]', async () => { const receiverAddress = Address.fromRandom(); const wallet = await setup(); - const amountToPredicate = 10n; + const amountToPredicate = 10; const predicate = new Predicate(testPredicateStruct, StructAbiInputs); const initialPredicateBalance = await setupPredicate(wallet, amountToPredicate, predicate); @@ -281,7 +285,7 @@ describe('Predicate', () => { const validation: Validation = { has_account: true, - total_complete: 100n, + total_complete: 100, }; await wallet.provider.submitSpendPredicate( predicate, @@ -303,13 +307,13 @@ describe('Predicate', () => { it('can call a [bin] Coin predicate which returns false with invalid predicate data [struct]', async () => { const receiverAddress = Address.fromRandom(); const wallet = await setup(); - const amountToPredicate = 10n; + const amountToPredicate = 10; const predicate = new Predicate(testPredicateStructBin, StructAbiInputs); const initialPredicateBalance = await setupPredicate(wallet, amountToPredicate, predicate); const validation: Validation = { has_account: false, - total_complete: 0n, + total_complete: 0, }; await expect(async () => { @@ -328,14 +332,14 @@ describe('Predicate', () => { it.skip('should fail if inform gasLimit too low', async () => { const receiverAddress = Address.fromRandom(); const wallet = await setup(); - const amountToPredicate = 10n; + const amountToPredicate = 10; const predicate = new Predicate(testPredicateStruct, StructAbiInputs); const initialPredicateBalance = await setupPredicate(wallet, amountToPredicate, predicate); const validation: Validation = { has_account: true, - total_complete: 100n, + total_complete: 100, }; let failed; diff --git a/packages/providers/src/coin-quantity.ts b/packages/providers/src/coin-quantity.ts index 214d2aa46e7..b28cb13ca63 100644 --- a/packages/providers/src/coin-quantity.ts +++ b/packages/providers/src/coin-quantity.ts @@ -1,12 +1,13 @@ import type { BytesLike } from '@ethersproject/bytes'; import { hexlify } from '@ethersproject/bytes'; import { NativeAssetId } from '@fuel-ts/constants'; -import type { BigNumberish } from '@fuel-ts/math'; +import type { BigNumberish, BN } from '@fuel-ts/math'; +import { bn } from '@fuel-ts/math'; export type CoinQuantityLike = | [amount: BigNumberish, assetId?: BytesLike] | { amount: BigNumberish; assetId?: BytesLike }; -export type CoinQuantity = { amount: bigint; assetId: string }; +export type CoinQuantity = { amount: BN; assetId: string }; export const coinQuantityfy = (coinQuantityLike: CoinQuantityLike): CoinQuantity => { let assetId; @@ -21,6 +22,6 @@ export const coinQuantityfy = (coinQuantityLike: CoinQuantityLike): CoinQuantity return { assetId: hexlify(assetId), - amount: BigInt(amount), + amount: bn(amount), }; }; diff --git a/packages/providers/src/coin.ts b/packages/providers/src/coin.ts index d87a574448d..6961bcb7233 100644 --- a/packages/providers/src/coin.ts +++ b/packages/providers/src/coin.ts @@ -1,3 +1,5 @@ +import type { BN } from '@fuel-ts/math'; + import { GqlCoinStatus as CoinStatus } from './__generated__/operations'; /** @@ -6,11 +8,11 @@ import { GqlCoinStatus as CoinStatus } from './__generated__/operations'; export type Coin = { id: string; assetId: string; - amount: bigint; + amount: BN; owner: string; status: CoinStatus; maturity: number; - blockCreated: bigint; + blockCreated: BN; }; export { CoinStatus }; diff --git a/packages/providers/src/provider.test.ts b/packages/providers/src/provider.test.ts index fcbaa1b5612..dd2473318fe 100644 --- a/packages/providers/src/provider.test.ts +++ b/packages/providers/src/provider.test.ts @@ -1,6 +1,7 @@ import { arrayify } from '@ethersproject/bytes'; import { ZeroBytes32 } from '@fuel-ts/constants'; import { randomBytes } from '@fuel-ts/keystore'; +import { bn, toNumber } from '@fuel-ts/math'; import type { Receipt } from '@fuel-ts/transactions'; import { ReceiptType, TransactionType } from '@fuel-ts/transactions'; @@ -20,8 +21,8 @@ describe('Provider', () => { const callResult = await provider.call({ type: TransactionType.Script, - gasPrice: 0n, - gasLimit: 1000000n, + gasPrice: 0, + gasLimit: 1000000, script: /* Opcode::ADDI(0x10, REG_ZERO, 0xCA) @@ -37,28 +38,28 @@ describe('Provider', () => { { type: ReceiptType.Log, id: ZeroBytes32, - val0: BigInt(202), - val1: BigInt(186), - val2: BigInt(0), - val3: BigInt(0), - pc: BigInt(0x2870), - is: BigInt(0x2868), + val0: bn(202), + val1: bn(186), + val2: bn(0), + val3: bn(0), + pc: bn(0x2870), + is: bn(0x2868), }, { type: ReceiptType.Return, id: ZeroBytes32, - val: BigInt(1), - pc: BigInt(0x2874), - is: BigInt(0x2868), + val: bn(1), + pc: bn(0x2874), + is: bn(0x2868), }, { type: ReceiptType.ScriptResult, - result: BigInt(0), - gasUsed: BigInt(0x2c), + result: bn(0), + gasUsed: bn(0x2c), }, ]; - expect(callResult.receipts).toEqual(expectedReceipts); + expect(JSON.stringify(callResult.receipts)).toEqual(JSON.stringify(expectedReceipts)); }); // TODO: Add tests to provider sendTransaction @@ -71,8 +72,8 @@ describe('Provider', () => { const response = await provider.sendTransaction({ type: TransactionType.Script, - gasPrice: 0n, - gasLimit: 1000000n, + gasPrice: 0, + gasLimit: 1000000, script: /* Opcode::ADDI(0x10, REG_ZERO, 0xCA) @@ -90,24 +91,24 @@ describe('Provider', () => { { type: ReceiptType.Log, id: ZeroBytes32, - val0: BigInt(202), - val1: BigInt(186), - val2: BigInt(0), - val3: BigInt(0), - pc: BigInt(0x2878), - is: BigInt(0x2870), + val0: bn(202), + val1: bn(186), + val2: bn(0), + val3: bn(0), + pc: bn(0x2878), + is: bn(0x2870), }, { type: ReceiptType.Return, id: ZeroBytes32, - val: BigInt(1), - pc: BigInt(0x287c), - is: BigInt(0x2870), + val: bn(1), + pc: bn(0x287c), + is: bn(0x2870), }, { type: ReceiptType.ScriptResult, - result: BigInt(0), - gasUsed: BigInt(0x2c), + result: bn(0), + gasUsed: bn(0x2c), }, ]); }); @@ -130,7 +131,7 @@ describe('Provider', () => { const provider = new Provider('http://127.0.0.1:4000/graphql'); const { consensusParameters } = await provider.getChain(); - expect(consensusParameters.gasPriceFactor).toBeGreaterThan(0n); + expect(toNumber(consensusParameters.gasPriceFactor)).toBeGreaterThan(0); }); it('can get node info including minGasPrice', async () => { diff --git a/packages/providers/src/provider.ts b/packages/providers/src/provider.ts index 20fefbbdc62..69ad5416018 100644 --- a/packages/providers/src/provider.ts +++ b/packages/providers/src/provider.ts @@ -6,8 +6,8 @@ import type { InputValue } from '@fuel-ts/abi-coder'; import { AbiCoder } from '@fuel-ts/abi-coder'; import { NativeAssetId } from '@fuel-ts/constants'; import type { AbstractAddress, AbstractPredicate } from '@fuel-ts/interfaces'; -import type { BigNumberish } from '@fuel-ts/math'; -import { max, multiply } from '@fuel-ts/math'; +import type { BigNumberish, BN } from '@fuel-ts/math'; +import { max, bn, multiply } from '@fuel-ts/math'; import type { Transaction } from '@fuel-ts/transactions'; import { GAS_PRICE_FACTOR, @@ -46,7 +46,7 @@ export type CallResult = { */ export type Block = { id: string; - height: bigint; + height: BN; time: string; producer: string; transactionIds: string[]; @@ -65,16 +65,16 @@ export type ContractResult = { */ export type ChainInfo = { name: string; - baseChainHeight: bigint; + baseChainHeight: BN; peerCount: number; consensusParameters: { - gasPriceFactor: bigint; - maxGasPerTx: bigint; - maxScriptLength: bigint; + gasPriceFactor: BN; + maxGasPerTx: BN; + maxScriptLength: BN; }; latestBlock: { id: string; - height: bigint; + height: BN; producer: string; time: string; transactions: Array<{ id: string }>; @@ -85,15 +85,15 @@ export type ChainInfo = { * Node information */ export type NodeInfo = { - minGasPrice: bigint; + minGasPrice: BN; nodeVersion: string; }; export type TransactionCost = { - minGasPrice: bigint; - gasPrice: bigint; - gasUsed: bigint; - fee: bigint; + minGasPrice: BN; + gasPrice: BN; + gasUsed: BN; + fee: BN; }; const processGqlReceipt = (gqlReceipt: GqlReceiptFragmentFragment): TransactionResultReceipt => { @@ -119,16 +119,16 @@ const processGqlReceipt = (gqlReceipt: GqlReceiptFragmentFragment): TransactionR const processGqlChain = (chain: GqlChainInfoFragmentFragment): ChainInfo => ({ name: chain.name, - baseChainHeight: BigInt(chain.baseChainHeight), + baseChainHeight: bn(chain.baseChainHeight), peerCount: chain.peerCount, consensusParameters: { - gasPriceFactor: BigInt(chain.consensusParameters.gasPriceFactor), - maxGasPerTx: BigInt(chain.consensusParameters.maxGasPerTx), - maxScriptLength: BigInt(chain.consensusParameters.maxScriptLength), + gasPriceFactor: bn(chain.consensusParameters.gasPriceFactor), + maxGasPerTx: bn(chain.consensusParameters.maxGasPerTx), + maxScriptLength: bn(chain.consensusParameters.maxScriptLength), }, latestBlock: { id: chain.latestBlock.id, - height: BigInt(chain.latestBlock.height), + height: bn(chain.latestBlock.height), producer: chain.latestBlock.producer, time: chain.latestBlock.time, transactions: chain.latestBlock.transactions.map((i) => ({ @@ -138,7 +138,7 @@ const processGqlChain = (chain: GqlChainInfoFragmentFragment): ChainInfo => ({ }); const processNodeInfo = (nodeInfo: GqlGetInfoQuery['nodeInfo']) => ({ - minGasPrice: BigInt(nodeInfo.minGasPrice), + minGasPrice: bn(nodeInfo.minGasPrice), nodeVersion: nodeInfo.nodeVersion, }); @@ -205,9 +205,9 @@ export default class Provider { /** * Returns the current block number */ - async getBlockNumber(): Promise { + async getBlockNumber(): Promise { const { chain } = await this.operations.getChain(); - return BigInt(chain.latestBlock.height); + return bn(chain.latestBlock.height, 10); } /** @@ -238,11 +238,11 @@ export default class Provider { // Fail transaction before submit to avoid submit failure // Resulting in lost of funds on a OutOfGas situation. - if (gasUsed > transactionRequest.gasLimit) { + if (bn(gasUsed).gt(bn(transactionRequest.gasLimit))) { throw new Error( `gasLimit(${transactionRequest.gasLimit}) is lower than the required (${gasUsed})` ); - } else if (minGasPrice > transactionRequest.gasPrice) { + } else if (bn(minGasPrice).gt(bn(transactionRequest.gasPrice))) { throw new Error( `gasPrice(${transactionRequest.gasPrice}) is lower than the required ${minGasPrice}` ); @@ -298,7 +298,7 @@ export default class Provider { // and gasPrice to 0 for measure // Transaction without arrive to OutOfGas transactionRequest.gasLimit = MAX_GAS_PER_TX; - transactionRequest.gasPrice = 0n; + transactionRequest.gasPrice = bn(0); // Execute dryRun not validated transaction to query gasUsed const { receipts } = await this.call(transactionRequest); @@ -335,11 +335,11 @@ export default class Provider { return coins.map((coin) => ({ id: coin.utxoId, assetId: coin.assetId, - amount: BigInt(coin.amount), + amount: bn(coin.amount), owner: coin.owner, status: coin.status, - maturity: Number(coin.maturity), - blockCreated: BigInt(coin.blockCreated), + maturity: bn(coin.maturity).toNumber(), + blockCreated: bn(coin.blockCreated), })); } @@ -360,7 +360,7 @@ export default class Provider { owner: owner.toB256(), spendQuery: quantities.map(coinQuantityfy).map((quantity) => ({ assetId: hexlify(quantity.assetId), - amount: quantity.amount.toString(), + amount: quantity.amount.toString(10), })), maxInputs, excludedIds: excludedIds?.map((id) => hexlify(id)), @@ -372,10 +372,10 @@ export default class Provider { id: coin.utxoId, status: coin.status, assetId: coin.assetId, - amount: BigInt(coin.amount), + amount: bn(coin.amount), owner: coin.owner, - maturity: Number(coin.maturity), - blockCreated: BigInt(coin.blockCreated), + maturity: bn(coin.maturity).toNumber(), + blockCreated: bn(coin.blockCreated), })); } @@ -388,11 +388,11 @@ export default class Provider { ): Promise { let variables; if (typeof idOrHeight === 'number') { - variables = { blockHeight: BigInt(idOrHeight).toString() }; + variables = { blockHeight: bn(idOrHeight).toString(10) }; } else if (idOrHeight === 'latest') { - variables = { blockHeight: (await this.getBlockNumber()).toString() }; + variables = { blockHeight: (await this.getBlockNumber()).toString(10) }; } else { - variables = { blockId: idOrHeight }; + variables = { blockId: bn(idOrHeight).toString(10) }; } const { block } = await this.operations.getBlock(variables); @@ -403,7 +403,7 @@ export default class Provider { return { id: block.id, - height: BigInt(block.height), + height: bn(block.height), time: block.time, producer: block.producer, transactionIds: block.transactions.map((tx) => tx.id), @@ -419,7 +419,7 @@ export default class Provider { ): Promise<(Block & { transactions: Transaction[] }) | null> { let variables; if (typeof idOrHeight === 'number') { - variables = { blockHeight: BigInt(idOrHeight).toString() }; + variables = { blockHeight: bn(idOrHeight).toString(10) }; } else if (idOrHeight === 'latest') { variables = { blockHeight: (await this.getBlockNumber()).toString() }; } else { @@ -434,7 +434,7 @@ export default class Provider { return { id: block.id, - height: BigInt(block.height), + height: bn(block.height, 10), time: block.time, producer: block.producer, transactionIds: block.transactions.map((tx) => tx.id), @@ -476,12 +476,12 @@ export default class Provider { owner: AbstractAddress, /** The asset ID of coins to get */ assetId: BytesLike - ): Promise { + ): Promise { const { balance } = await this.operations.getBalance({ owner: owner.toB256(), assetId: hexlify(assetId), }); - return BigInt(balance.amount); + return bn(balance.amount, 10); } /** @@ -503,7 +503,7 @@ export default class Provider { return balances.map((balance) => ({ assetId: balance.assetId, - amount: BigInt(balance.amount), + amount: bn(balance.amount), })); } @@ -534,16 +534,16 @@ export default class Provider { encoded = abiCoder.encode(predicate.types, predicateData); } - let totalInPredicate = 0n; - predicateCoins.forEach((coin: Coin) => { - totalInPredicate += coin.amount; + const totalInPredicate: BN = predicateCoins.reduce((prev: BN, coin: Coin) => { request.addCoin({ ...coin, predicate: predicate.bytes, predicateData: encoded, } as Coin); request.outputs = []; - }); + + return prev.add(coin.amount); + }, bn(0)); // output sent to receiver request.addCoinOutput(receiverAddress, totalInPredicate, assetId); diff --git a/packages/providers/src/transaction-request/input.ts b/packages/providers/src/transaction-request/input.ts index b70544d4ce5..2e94ddbef7a 100644 --- a/packages/providers/src/transaction-request/input.ts +++ b/packages/providers/src/transaction-request/input.ts @@ -2,7 +2,7 @@ import type { BytesLike } from '@ethersproject/bytes'; import { arrayify, hexlify } from '@ethersproject/bytes'; import { ZeroBytes32 } from '@fuel-ts/constants'; import type { BigNumberish } from '@fuel-ts/math'; -import { toNumber } from '@fuel-ts/math'; +import { bn, toNumber } from '@fuel-ts/math'; import type { Input } from '@fuel-ts/transactions'; import { InputType } from '@fuel-ts/transactions'; @@ -59,7 +59,7 @@ export const inputify = (value: TransactionRequestInput): Input => { outputIndex: arrayify(value.id)[32], }, owner: hexlify(value.owner), - amount: BigInt(value.amount), + amount: bn(value.amount), assetId: hexlify(value.assetId), txPointer: { blockHeight: toNumber(arrayify(value.txPointer).slice(0, 8)), diff --git a/packages/providers/src/transaction-request/output.ts b/packages/providers/src/transaction-request/output.ts index 02aec91e0dd..13a0878dec5 100644 --- a/packages/providers/src/transaction-request/output.ts +++ b/packages/providers/src/transaction-request/output.ts @@ -2,6 +2,7 @@ import type { BytesLike } from '@ethersproject/bytes'; import { hexlify } from '@ethersproject/bytes'; import { ZeroBytes32 } from '@fuel-ts/constants'; import type { BigNumberish } from '@fuel-ts/math'; +import { bn } from '@fuel-ts/math'; import type { Output } from '@fuel-ts/transactions'; import { OutputType } from '@fuel-ts/transactions'; @@ -59,7 +60,7 @@ export const outputify = (value: TransactionRequestOutput): Output => { return { type: OutputType.Coin, to: hexlify(value.to), - amount: BigInt(value.amount), + amount: bn(value.amount), assetId: hexlify(value.assetId), }; } @@ -75,7 +76,7 @@ export const outputify = (value: TransactionRequestOutput): Output => { return { type: OutputType.Withdrawal, to: hexlify(value.to), - amount: BigInt(value.amount), + amount: bn(value.amount), assetId: hexlify(value.assetId), }; } @@ -83,7 +84,7 @@ export const outputify = (value: TransactionRequestOutput): Output => { return { type: OutputType.Change, to: hexlify(value.to), - amount: BigInt(0), + amount: bn(0), assetId: hexlify(value.assetId), }; } @@ -91,7 +92,7 @@ export const outputify = (value: TransactionRequestOutput): Output => { return { type: OutputType.Variable, to: ZeroBytes32, - amount: BigInt(0), + amount: bn(0), assetId: ZeroBytes32, }; } diff --git a/packages/providers/src/transaction-request/transaction-request.ts b/packages/providers/src/transaction-request/transaction-request.ts index 595715ebc27..ec02a646111 100644 --- a/packages/providers/src/transaction-request/transaction-request.ts +++ b/packages/providers/src/transaction-request/transaction-request.ts @@ -9,7 +9,8 @@ import type { ContractIdLike, AbstractScript, } from '@fuel-ts/interfaces'; -import type { BigNumberish } from '@fuel-ts/math'; +import type { BigNumberish, BN } from '@fuel-ts/math'; +import { bn, multiply } from '@fuel-ts/math'; import type { Transaction } from '@fuel-ts/transactions'; import { TransactionType, @@ -93,19 +94,13 @@ export class NoWitnessByOwnerError extends Error { } } -/** - * The provider required at least 1 native coin - * even if the gasPrice = 0 - */ -export const MIN_TRANSACTION_AMOUNT = 1n; - abstract class BaseTransactionRequest implements BaseTransactionRequestLike { /** Type of the transaction */ abstract type: TransactionType; /** Gas price for transaction */ - gasPrice: bigint; + gasPrice: BN; /** Gas limit for transaction */ - gasLimit: bigint; + gasLimit: BN; /** Block until which tx cannot be included */ maturity: number; /** List of inputs */ @@ -123,8 +118,8 @@ abstract class BaseTransactionRequest implements BaseTransactionRequestLike { outputs, witnesses, }: BaseTransactionRequestLike = {}) { - this.gasPrice = BigInt(gasPrice ?? 0); - this.gasLimit = BigInt(gasLimit ?? 0); + this.gasPrice = bn(gasPrice ?? 0); + this.gasLimit = bn(gasLimit ?? 0); this.maturity = maturity ?? 0; this.inputs = [...(inputs ?? [])]; this.outputs = [...(outputs ?? [])]; @@ -316,7 +311,7 @@ abstract class BaseTransactionRequest implements BaseTransactionRequestLike { chargeableByteSize() { const witnessSize = this.witnesses.reduce((total, w) => total + arrayify(w).length, 0); - return BigInt(this.toTransactionBytes().length - witnessSize); + return bn(this.toTransactionBytes().length - witnessSize); } /** @@ -327,9 +322,10 @@ abstract class BaseTransactionRequest implements BaseTransactionRequestLike { */ calculateFee(): CoinQuantity { const gasFee = calculatePriceWithFactor(this.gasLimit, this.gasPrice, GAS_PRICE_FACTOR); + return { assetId: NativeAssetId, - amount: gasFee || 1n, + amount: gasFee.isZero() ? bn(1) : gasFee, }; } } diff --git a/packages/providers/src/transaction-response/transaction-response.ts b/packages/providers/src/transaction-response/transaction-response.ts index 4790428dfc6..9945758a399 100644 --- a/packages/providers/src/transaction-response/transaction-response.ts +++ b/packages/providers/src/transaction-response/transaction-response.ts @@ -1,6 +1,8 @@ /* eslint-disable @typescript-eslint/no-non-null-assertion */ /* eslint-disable @typescript-eslint/no-explicit-any */ import { arrayify } from '@ethersproject/bytes'; +import type { BN } from '@fuel-ts/math'; +import { bn } from '@fuel-ts/math'; import type { ReceiptCall, ReceiptLog, @@ -85,7 +87,7 @@ export class TransactionResponse { request: TransactionRequest; provider: Provider; /** Gas used on the transaction */ - gasUsed: bigint = 0n; + gasUsed: BN = bn(0); constructor(id: string, request: TransactionRequest, provider: Provider) { this.id = id; diff --git a/packages/providers/src/util.ts b/packages/providers/src/util.ts index 3c9e7a32f71..65fa74b94fa 100644 --- a/packages/providers/src/util.ts +++ b/packages/providers/src/util.ts @@ -1,5 +1,7 @@ import { sha256 } from '@ethersproject/sha2'; import { ZeroBytes32 } from '@fuel-ts/constants'; +import type { BN } from '@fuel-ts/math'; +import { bn } from '@fuel-ts/math'; import type { Transaction } from '@fuel-ts/transactions'; import { ReceiptType, @@ -53,14 +55,14 @@ export const getSignableTransaction = (transaction: Transaction): Transaction => case OutputType.Change: { return { ...output, - amount: 0n, + amount: bn(0), }; } case OutputType.Variable: { return { ...output, to: ZeroBytes32, - amount: 0n, + amount: bn(0), assetId: ZeroBytes32, }; } @@ -81,15 +83,15 @@ export const getTransactionId = (transaction: Transaction): string => { return sha256(encodedTransaction); }; -export const calculatePriceWithFactor = (gasUsed: bigint, gasPrice: bigint, priceFactor: bigint) => - BigInt(Math.ceil(Number(gasUsed) / Number(priceFactor))) * gasPrice; +export const calculatePriceWithFactor = (gasUsed: BN, gasPrice: BN, priceFactor: BN): BN => + bn(Math.ceil(gasUsed.toNumber() / priceFactor.toNumber()) * gasPrice.toNumber()); -export const getGasUsedFromReceipts = (receipts: Array): bigint => { +export const getGasUsedFromReceipts = (receipts: Array): BN => { const scriptResult = receipts.find((receipt) => receipt.type === ReceiptType.ScriptResult); if (scriptResult && scriptResult.type === ReceiptType.ScriptResult) { return scriptResult.gasUsed; } - return 0n; + return bn(0); }; diff --git a/packages/script/package.json b/packages/script/package.json index fb79fc58d09..6c817e5633c 100644 --- a/packages/script/package.json +++ b/packages/script/package.json @@ -29,6 +29,7 @@ "dependencies": { "@fuel-ts/abi-coder": "workspace:*", "@fuel-ts/constants": "workspace:*", + "@fuel-ts/math": "workspace:*", "@fuel-ts/providers": "workspace:*", "@fuel-ts/wallet": "workspace:*", "@fuel-ts/transactions": "workspace:*", diff --git a/packages/script/src/script.test.ts b/packages/script/src/script.test.ts index c3d820ef8bc..54cf8446120 100644 --- a/packages/script/src/script.test.ts +++ b/packages/script/src/script.test.ts @@ -2,6 +2,8 @@ import { arrayify } from '@ethersproject/bytes'; import { AbiCoder } from '@fuel-ts/abi-coder'; import { NativeAssetId } from '@fuel-ts/constants'; +import type { BigNumberish } from '@fuel-ts/math'; +import { bn } from '@fuel-ts/math'; import type { CoinQuantityLike } from '@fuel-ts/providers'; import { Provider, ScriptTransactionRequest } from '@fuel-ts/providers'; import { ReceiptType } from '@fuel-ts/transactions'; @@ -94,7 +96,7 @@ const scriptAbi = [ type MyStruct = { arg_one: boolean; - arg_two: bigint; + arg_two: BigNumberish; }; describe('Script', () => { @@ -122,11 +124,15 @@ describe('Script', () => { it('can call a script', async () => { const wallet = await setup(); - const obj = { + const input = { arg_one: true, - arg_two: 1337n, + arg_two: 1337, }; - const result = await callScript(wallet, script, obj); - expect(result).toMatchObject(obj); + const output = { + arg_one: true, + arg_two: bn(1337), + }; + const result = await callScript(wallet, script, input); + expect(JSON.stringify(result)).toEqual(JSON.stringify(output)); }); }); diff --git a/packages/script/src/script.ts b/packages/script/src/script.ts index 5b1c1886414..56b6683265d 100644 --- a/packages/script/src/script.ts +++ b/packages/script/src/script.ts @@ -1,5 +1,6 @@ import type { BytesLike } from '@ethersproject/bytes'; import { arrayify } from '@ethersproject/bytes'; +import type { BN } from '@fuel-ts/math'; import type { CallResult, TransactionResultReceipt, @@ -22,8 +23,8 @@ const ASSET_ID_LEN = 32; const AMOUNT_LEN = 8; export type ScriptResult = { - code: bigint; - gasUsed: bigint; + code: BN; + gasUsed: BN; receipts: TransactionResultReceipt[]; scriptResultReceipt: TransactionResultScriptResultReceipt; returnReceipt: @@ -109,8 +110,7 @@ export class Script { decodeCallResult(callResult: CallResult): TResult { try { const scriptResult = callResultToScriptResult(callResult); - const decoded = this.scriptResultDecoder(scriptResult); - return decoded; + return this.scriptResultDecoder(scriptResult); } catch (error) { throw new ScriptResultDecoderError( callResult as TransactionResult<'failure'>, diff --git a/packages/signer/package.json b/packages/signer/package.json index bda27144249..d39b247ed66 100644 --- a/packages/signer/package.json +++ b/packages/signer/package.json @@ -27,6 +27,7 @@ "@fuel-ts/address": "workspace:*", "@fuel-ts/hasher": "workspace:*", "@fuel-ts/keystore": "workspace:*", + "@fuel-ts/math": "workspace:*", "elliptic": "^6.5.4" }, "devDependencies": { diff --git a/packages/signer/src/signer.ts b/packages/signer/src/signer.ts index 50aade6ebac..859e91a16da 100644 --- a/packages/signer/src/signer.ts +++ b/packages/signer/src/signer.ts @@ -1,8 +1,9 @@ import type { BytesLike } from '@ethersproject/bytes'; -import { concat, hexlify, arrayify, zeroPad } from '@ethersproject/bytes'; +import { concat, hexlify, arrayify } from '@ethersproject/bytes'; import { Address } from '@fuel-ts/address'; import { hash } from '@fuel-ts/hasher'; import { randomBytes } from '@fuel-ts/keystore'; +import { toBytes } from '@fuel-ts/math'; import { ec as EC } from 'elliptic'; /** @@ -61,8 +62,8 @@ class Signer { const signature = keyPair.sign(arrayify(data), { canonical: true, }); - const r = zeroPad(signature.r.toArray(), 32); - const s = zeroPad(signature.s.toArray(), 32); + const r = toBytes(signature.r, 32); + const s = toBytes(signature.s, 32); // add recoveryParam to first s byte s[0] |= (signature.recoveryParam || 0) << 7; diff --git a/packages/sparsemerkle/package.json b/packages/sparsemerkle/package.json index cb012a7a4d6..6157efb15d5 100644 --- a/packages/sparsemerkle/package.json +++ b/packages/sparsemerkle/package.json @@ -22,6 +22,7 @@ ], "license": "Apache-2.0", "dependencies": { + "@fuel-ts/math": "workspace:*", "@fuel-ts/merkle-shared": "workspace:*" }, "scripts": { diff --git a/packages/sparsemerkle/src/sparseMerkleTree.test.ts b/packages/sparsemerkle/src/sparseMerkleTree.test.ts index f63c3a948a1..de1d38606fd 100644 --- a/packages/sparsemerkle/src/sparseMerkleTree.test.ts +++ b/packages/sparsemerkle/src/sparseMerkleTree.test.ts @@ -1,4 +1,5 @@ -import { hash, uintToBytes32 } from '@fuel-ts/merkle-shared'; +import { toHex } from '@fuel-ts/math'; +import { hash } from '@fuel-ts/merkle-shared'; import DeepSparseMerkleSubTree from './deepSparseMerkleSubTree'; import SparseMerkleTree from './sparseMerkleTree'; @@ -6,8 +7,8 @@ import SparseMerkleTree from './sparseMerkleTree'; describe('Sparse Merkle Tree', () => { it('Update and delete', async () => { const smt = new SparseMerkleTree(); - const data = uintToBytes32(42); - const newData = uintToBytes32(43); + const data = toHex(42, 32); + const newData = toHex(43, 32); const n = 100; /// Roots from Go implementation @@ -18,37 +19,37 @@ describe('Sparse Merkle Tree', () => { // Add some leaves for (let i = 0; i < n; i += 1) { - const key = hash(uintToBytes32(i)); + const key = hash(toHex(i, 32)); smt.update(key, data); } expect(smt.root).toEqual(rootAfterLeaves); // Update an existing leaf to a new value - smt.update(hash(uintToBytes32(n / 10)), newData); + smt.update(hash(toHex(n / 10, 32)), newData); expect(smt.root).toEqual(rootAfterUpdateExisting); // Update that leaf back to original value, expect original root - smt.update(hash(uintToBytes32(n / 10)), data); + smt.update(hash(toHex(n / 10, 32)), data); expect(smt.root).toEqual(rootAfterLeaves); // Add an new leaf - smt.update(hash(uintToBytes32(n + 50)), data); + smt.update(hash(toHex(n + 50, 32)), data); expect(smt.root).toEqual(rootAfterUpdateNew); // Delete that leaf, expect original root - smt.delete(hash(uintToBytes32(n + 50))); + smt.delete(hash(toHex(n + 50, 32))); expect(smt.root).toEqual(rootAfterLeaves); }); it('addBranch and update', async () => { // Create a full SMT const smt = new SparseMerkleTree(); - const data = uintToBytes32(42); - const newData = uintToBytes32(43); + const data = toHex(42, 32); + const newData = toHex(43, 32); // Add some leaves for (let i = 0; i < 100; i += 1) { - const key = hash(uintToBytes32(i)); + const key = hash(toHex(i, 32)); smt.update(key, data); } @@ -58,7 +59,7 @@ describe('Sparse Merkle Tree', () => { const keyNumbers = [4, 8, 15, 16, 23, 42]; const keys: string[] = []; for (let i = 0; i < keyNumbers.length; i += 1) { - keys.push(hash(uintToBytes32(keyNumbers[i]))); + keys.push(hash(toHex(keyNumbers[i], 32))); } for (let i = 0; i < keys.length; i += 1) { diff --git a/packages/transactions/package.json b/packages/transactions/package.json index 67622b3db6a..39f871555c2 100644 --- a/packages/transactions/package.json +++ b/packages/transactions/package.json @@ -24,7 +24,8 @@ "dependencies": { "@ethersproject/bytes": "^5.4.0", "@fuel-ts/abi-coder": "workspace:*", - "@fuel-ts/constants": "workspace:*" + "@fuel-ts/constants": "workspace:*", + "@fuel-ts/math": "workspace:*" }, "scripts": { "build": "tsup --dts" diff --git a/packages/transactions/src/coders/input.test.ts b/packages/transactions/src/coders/input.test.ts index 07b61683623..d4f6a33b2e3 100644 --- a/packages/transactions/src/coders/input.test.ts +++ b/packages/transactions/src/coders/input.test.ts @@ -1,4 +1,5 @@ import { arrayify, hexlify } from '@ethersproject/bytes'; +import { bn } from '@fuel-ts/math'; import type { Input } from './input'; import { InputCoder, InputType } from './input'; @@ -11,18 +12,18 @@ describe('InputCoder', () => { type: InputType.Coin, utxoID: { transactionId: B256, outputIndex: 0 }, owner: B256, - amount: 0n, + amount: bn(0), assetId: B256, + txPointer: { + blockHeight: 0, + txIndex: 0, + }, witnessIndex: 0, maturity: 0, predicateLength: 0, predicateDataLength: 0, predicate: '0x', predicateData: '0x', - txPointer: { - blockHeight: 0, - txIndex: 0, - }, }; const encoded = hexlify(new InputCoder().encode(input)); @@ -34,7 +35,7 @@ describe('InputCoder', () => { const [decoded, offset] = new InputCoder().decode(arrayify(encoded), 0); expect(offset).toEqual((encoded.length - 2) / 2); - expect(decoded).toEqual(input); + expect(JSON.stringify(decoded)).toEqual(JSON.stringify(input)); }); it('Can encode Contract', () => { diff --git a/packages/transactions/src/coders/input.ts b/packages/transactions/src/coders/input.ts index cd001f8779f..7a999427de5 100644 --- a/packages/transactions/src/coders/input.ts +++ b/packages/transactions/src/coders/input.ts @@ -2,6 +2,8 @@ import { concat } from '@ethersproject/bytes'; import { Coder, B256Coder, NumberCoder } from '@fuel-ts/abi-coder'; +import U64Coder from '@fuel-ts/abi-coder/src/coders/u64'; +import type { BN } from '@fuel-ts/math'; import { ByteArrayCoder } from './byte-array'; import type { TxPointer } from './tx-pointer'; @@ -24,7 +26,7 @@ export type InputCoin = { owner: string; /** Amount of coins (u64) */ - amount: bigint; + amount: BN; /** Asset ID of the coins (b256) */ assetId: string; @@ -61,7 +63,7 @@ export class InputCoinCoder extends Coder { parts.push(new UtxoIdCoder().encode(value.utxoID)); parts.push(new B256Coder().encode(value.owner)); - parts.push(new NumberCoder('u64').encode(value.amount)); + parts.push(new U64Coder().encode(value.amount)); parts.push(new B256Coder().encode(value.assetId)); parts.push(new TxPointerCoder().encode(value.txPointer)); parts.push(new NumberCoder('u8').encode(value.witnessIndex)); @@ -82,7 +84,7 @@ export class InputCoinCoder extends Coder { const utxoID = decoded; [decoded, o] = new B256Coder().decode(data, o); const owner = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const amount = decoded; [decoded, o] = new B256Coder().decode(data, o); const assetId = decoded; diff --git a/packages/transactions/src/coders/output.test.ts b/packages/transactions/src/coders/output.test.ts index a2345e9077a..1b4db28953a 100644 --- a/packages/transactions/src/coders/output.test.ts +++ b/packages/transactions/src/coders/output.test.ts @@ -1,4 +1,5 @@ import { arrayify, hexlify } from '@ethersproject/bytes'; +import { bn } from '@fuel-ts/math'; import type { Output } from './output'; import { OutputCoder, OutputType } from './output'; @@ -10,7 +11,7 @@ describe('OutputCoder', () => { const output: Output = { type: OutputType.Coin, to: B256, - amount: 0n, + amount: bn(0), assetId: B256, }; @@ -23,7 +24,7 @@ describe('OutputCoder', () => { const [decoded, offset] = new OutputCoder().decode(arrayify(encoded), 0); expect(offset).toEqual((encoded.length - 2) / 2); - expect(decoded).toEqual(output); + expect(JSON.stringify(decoded)).toEqual(JSON.stringify(output)); }); it('Can encode Contract', () => { @@ -50,7 +51,7 @@ describe('OutputCoder', () => { const output: Output = { type: OutputType.Withdrawal, to: B256, - amount: 0n, + amount: bn(0), assetId: B256, }; @@ -63,14 +64,14 @@ describe('OutputCoder', () => { const [decoded, offset] = new OutputCoder().decode(arrayify(encoded), 0); expect(offset).toEqual((encoded.length - 2) / 2); - expect(decoded).toEqual(output); + expect(JSON.stringify(decoded)).toEqual(JSON.stringify(output)); }); it('Can encode Change', () => { const output: Output = { type: OutputType.Change, to: B256, - amount: 0n, + amount: bn(0), assetId: B256, }; @@ -83,14 +84,14 @@ describe('OutputCoder', () => { const [decoded, offset] = new OutputCoder().decode(arrayify(encoded), 0); expect(offset).toEqual((encoded.length - 2) / 2); - expect(decoded).toEqual(output); + expect(JSON.stringify(decoded)).toEqual(JSON.stringify(output)); }); it('Can encode Variable', () => { const output: Output = { type: OutputType.Variable, to: B256, - amount: 0n, + amount: bn(0), assetId: B256, }; @@ -103,7 +104,7 @@ describe('OutputCoder', () => { const [decoded, offset] = new OutputCoder().decode(arrayify(encoded), 0); expect(offset).toEqual((encoded.length - 2) / 2); - expect(decoded).toEqual(output); + expect(JSON.stringify(decoded)).toEqual(JSON.stringify(output)); }); it('Can encode ContractCreated', () => { diff --git a/packages/transactions/src/coders/output.ts b/packages/transactions/src/coders/output.ts index d5a0274b61c..5c47b91e4bf 100644 --- a/packages/transactions/src/coders/output.ts +++ b/packages/transactions/src/coders/output.ts @@ -1,6 +1,8 @@ /* eslint-disable max-classes-per-file */ import { concat } from '@ethersproject/bytes'; import { Coder, B256Coder, NumberCoder } from '@fuel-ts/abi-coder'; +import U64Coder from '@fuel-ts/abi-coder/src/coders/u64'; +import type { BN } from '@fuel-ts/math'; export enum OutputType /* u8 */ { Coin = 0, @@ -16,7 +18,7 @@ export type OutputCoin = { /** Receiving address or script hash (b256) */ to: string; /** Amount of coins to send (u64) */ - amount: bigint; + amount: BN; /** Asset ID of coins (b256) */ assetId: string; }; @@ -30,7 +32,7 @@ export class OutputCoinCoder extends Coder { const parts: Uint8Array[] = []; parts.push(new B256Coder().encode(value.to)); - parts.push(new NumberCoder('u64').encode(value.amount)); + parts.push(new U64Coder().encode(value.amount)); parts.push(new B256Coder().encode(value.assetId)); return concat(parts); @@ -42,7 +44,7 @@ export class OutputCoinCoder extends Coder { [decoded, o] = new B256Coder().decode(data, o); const to = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const amount = decoded; [decoded, o] = new B256Coder().decode(data, o); const assetId = decoded; @@ -112,7 +114,7 @@ export type OutputWithdrawal = { /** Receiving address (b256) */ to: string; /** Amount of coins to withdraw (u64) */ - amount: bigint; + amount: BN; /** Asset ID of coins (b256) */ assetId: string; }; @@ -126,7 +128,7 @@ export class OutputWithdrawalCoder extends Coder { const parts: Uint8Array[] = []; parts.push(new B256Coder().encode(value.to)); - parts.push(new NumberCoder('u64').encode(value.amount)); + parts.push(new U64Coder().encode(value.amount)); parts.push(new B256Coder().encode(value.assetId)); return concat(parts); @@ -186,7 +188,7 @@ export class OutputChangeCoder extends Coder { [decoded, o] = new B256Coder().decode(data, o); const to = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const amount = decoded; [decoded, o] = new B256Coder().decode(data, o); const assetId = decoded; @@ -208,7 +210,7 @@ export type OutputVariable = { /** Receiving address or script hash (b256) */ to: string; /** Amount of coins to send (u64) */ - amount: bigint; + amount: BN; /** Asset ID of coins (b256) */ assetId: string; }; @@ -222,7 +224,7 @@ export class OutputVariableCoder extends Coder { const parts: Uint8Array[] = []; parts.push(new B256Coder().encode(value.to)); - parts.push(new NumberCoder('u64').encode(value.amount)); + parts.push(new U64Coder().encode(value.amount)); parts.push(new B256Coder().encode(value.assetId)); return concat(parts); @@ -234,7 +236,7 @@ export class OutputVariableCoder extends Coder { [decoded, o] = new B256Coder().decode(data, o); const to = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const amount = decoded; [decoded, o] = new B256Coder().decode(data, o); const assetId = decoded; diff --git a/packages/transactions/src/coders/receipt.test.ts b/packages/transactions/src/coders/receipt.test.ts index 43fff147b38..de324fe3918 100644 --- a/packages/transactions/src/coders/receipt.test.ts +++ b/packages/transactions/src/coders/receipt.test.ts @@ -1,4 +1,5 @@ import { arrayify, hexlify } from '@ethersproject/bytes'; +import { bn } from '@fuel-ts/math'; import type { Receipt } from './receipt'; import { ReceiptCoder, ReceiptType } from './receipt'; @@ -11,13 +12,13 @@ describe('ReceiptCoder', () => { type: ReceiptType.Call, from: B256, to: B256, - amount: 0n, + amount: bn(0), assetId: B256, - gas: 0n, - param1: 0n, - param2: 0n, - pc: 0n, - is: 0n, + gas: bn(0), + param1: bn(0), + param2: bn(0), + pc: bn(0), + is: bn(0), }; const encoded = hexlify(new ReceiptCoder().encode(receipt)); @@ -29,16 +30,16 @@ describe('ReceiptCoder', () => { const [decoded, offset] = new ReceiptCoder().decode(arrayify(encoded), 0); expect(offset).toEqual((encoded.length - 2) / 2); - expect(decoded).toEqual(receipt); + expect(JSON.stringify(decoded)).toEqual(JSON.stringify(receipt)); }); it('Can encode Return', () => { const receipt: Receipt = { type: ReceiptType.Return, id: B256, - val: 0n, - pc: 0n, - is: 0n, + val: bn(0), + pc: bn(0), + is: bn(0), }; const encoded = hexlify(new ReceiptCoder().encode(receipt)); @@ -50,18 +51,18 @@ describe('ReceiptCoder', () => { const [decoded, offset] = new ReceiptCoder().decode(arrayify(encoded), 0); expect(offset).toEqual((encoded.length - 2) / 2); - expect(decoded).toEqual(receipt); + expect(JSON.stringify(decoded)).toEqual(JSON.stringify(receipt)); }); it('Can encode ReturnData', () => { const receipt: Receipt = { type: ReceiptType.ReturnData, id: B256, - ptr: 0n, - len: 0n, + ptr: bn(0), + len: bn(0), digest: B256, - pc: 0n, - is: 0n, + pc: bn(0), + is: bn(0), }; const encoded = hexlify(new ReceiptCoder().encode(receipt)); @@ -73,16 +74,16 @@ describe('ReceiptCoder', () => { const [decoded, offset] = new ReceiptCoder().decode(arrayify(encoded), 0); expect(offset).toEqual((encoded.length - 2) / 2); - expect(decoded).toEqual(receipt); + expect(JSON.stringify(decoded)).toEqual(JSON.stringify(receipt)); }); it('Can encode Panic', () => { const receipt: Receipt = { type: ReceiptType.Panic, id: B256, - reason: 0n, - pc: 0n, - is: 0n, + reason: bn(0), + pc: bn(0), + is: bn(0), }; const encoded = hexlify(new ReceiptCoder().encode(receipt)); @@ -94,16 +95,16 @@ describe('ReceiptCoder', () => { const [decoded, offset] = new ReceiptCoder().decode(arrayify(encoded), 0); expect(offset).toEqual((encoded.length - 2) / 2); - expect(decoded).toEqual(receipt); + expect(JSON.stringify(decoded)).toEqual(JSON.stringify(receipt)); }); it('Can encode Revert', () => { const receipt: Receipt = { type: ReceiptType.Revert, id: B256, - val: 0n, - pc: 0n, - is: 0n, + val: bn(0), + pc: bn(0), + is: bn(0), }; const encoded = hexlify(new ReceiptCoder().encode(receipt)); @@ -115,19 +116,19 @@ describe('ReceiptCoder', () => { const [decoded, offset] = new ReceiptCoder().decode(arrayify(encoded), 0); expect(offset).toEqual((encoded.length - 2) / 2); - expect(decoded).toEqual(receipt); + expect(JSON.stringify(decoded)).toEqual(JSON.stringify(receipt)); }); it('Can encode Log', () => { const receipt: Receipt = { type: ReceiptType.Log, id: B256, - val0: 0n, - val1: 0n, - val2: 0n, - val3: 0n, - pc: 0n, - is: 0n, + val0: bn(0), + val1: bn(0), + val2: bn(0), + val3: bn(0), + pc: bn(0), + is: bn(0), }; const encoded = hexlify(new ReceiptCoder().encode(receipt)); @@ -139,20 +140,20 @@ describe('ReceiptCoder', () => { const [decoded, offset] = new ReceiptCoder().decode(arrayify(encoded), 0); expect(offset).toEqual((encoded.length - 2) / 2); - expect(decoded).toEqual(receipt); + expect(JSON.stringify(decoded)).toEqual(JSON.stringify(receipt)); }); it('Can encode LogData', () => { const receipt: Receipt = { type: ReceiptType.LogData, id: B256, - val0: 0n, - val1: 0n, - ptr: 0n, - len: 0n, + val0: bn(0), + val1: bn(0), + ptr: bn(0), + len: bn(0), digest: B256, - pc: 0n, - is: 0n, + pc: bn(0), + is: bn(0), }; const encoded = hexlify(new ReceiptCoder().encode(receipt)); @@ -164,7 +165,7 @@ describe('ReceiptCoder', () => { const [decoded, offset] = new ReceiptCoder().decode(arrayify(encoded), 0); expect(offset).toEqual((encoded.length - 2) / 2); - expect(decoded).toEqual(receipt); + expect(JSON.stringify(decoded)).toEqual(JSON.stringify(receipt)); }); it('Can encode Transfer', () => { @@ -172,10 +173,10 @@ describe('ReceiptCoder', () => { type: ReceiptType.Transfer, from: B256, to: B256, - amount: 0n, + amount: bn(0), assetId: B256, - pc: 0n, - is: 0n, + pc: bn(0), + is: bn(0), }; const encoded = hexlify(new ReceiptCoder().encode(receipt)); @@ -187,7 +188,7 @@ describe('ReceiptCoder', () => { const [decoded, offset] = new ReceiptCoder().decode(arrayify(encoded), 0); expect(offset).toEqual((encoded.length - 2) / 2); - expect(decoded).toEqual(receipt); + expect(JSON.stringify(decoded)).toEqual(JSON.stringify(receipt)); }); it('Can encode TransferOut', () => { @@ -195,10 +196,10 @@ describe('ReceiptCoder', () => { type: ReceiptType.TransferOut, from: B256, to: B256, - amount: 0n, + amount: bn(0), assetId: B256, - pc: 0n, - is: 0n, + pc: bn(0), + is: bn(0), }; const encoded = hexlify(new ReceiptCoder().encode(receipt)); @@ -210,6 +211,6 @@ describe('ReceiptCoder', () => { const [decoded, offset] = new ReceiptCoder().decode(arrayify(encoded), 0); expect(offset).toEqual((encoded.length - 2) / 2); - expect(decoded).toEqual(receipt); + expect(JSON.stringify(decoded)).toEqual(JSON.stringify(receipt)); }); }); diff --git a/packages/transactions/src/coders/receipt.ts b/packages/transactions/src/coders/receipt.ts index f4c2224d866..56fbc28480d 100644 --- a/packages/transactions/src/coders/receipt.ts +++ b/packages/transactions/src/coders/receipt.ts @@ -2,6 +2,8 @@ import { concat } from '@ethersproject/bytes'; import { Coder, B256Coder, NumberCoder } from '@fuel-ts/abi-coder'; +import U64Coder from '@fuel-ts/abi-coder/src/coders/u64'; +import type { BN } from '@fuel-ts/math'; export enum ReceiptType /* u8 */ { Call = 0, @@ -23,19 +25,19 @@ export type ReceiptCall = { /** Contract ID of called contract (b256) */ to: string; /** Amount of coins to forward, i.e. $rB (u64) */ - amount: bigint; + amount: BN; /** Asset ID of coins to forward, i.e. MEM[$rC, 32] (b256) */ assetId: string; /** Gas to forward, i.e. $rD (u64) */ - gas: bigint; + gas: BN; /** First parameter (u64) */ - param1: bigint; + param1: BN; /** Second parameter (u64) */ - param2: bigint; + param2: BN; /** Value of register $pc (u64) */ - pc: bigint; + pc: BN; /** Value of register $is (u64) */ - is: bigint; + is: BN; }; export class ReceiptCallCoder extends Coder { @@ -48,13 +50,13 @@ export class ReceiptCallCoder extends Coder { parts.push(new B256Coder().encode(value.from)); parts.push(new B256Coder().encode(value.to)); - parts.push(new NumberCoder('u64').encode(value.amount)); + parts.push(new U64Coder().encode(value.amount)); parts.push(new B256Coder().encode(value.assetId)); - parts.push(new NumberCoder('u64').encode(value.gas)); - parts.push(new NumberCoder('u64').encode(value.param1)); - parts.push(new NumberCoder('u64').encode(value.param2)); - parts.push(new NumberCoder('u64').encode(value.pc)); - parts.push(new NumberCoder('u64').encode(value.is)); + parts.push(new U64Coder().encode(value.gas)); + parts.push(new U64Coder().encode(value.param1)); + parts.push(new U64Coder().encode(value.param2)); + parts.push(new U64Coder().encode(value.pc)); + parts.push(new U64Coder().encode(value.is)); return concat(parts); } @@ -67,19 +69,19 @@ export class ReceiptCallCoder extends Coder { const from = decoded; [decoded, o] = new B256Coder().decode(data, o); const to = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const amount = decoded; [decoded, o] = new B256Coder().decode(data, o); const assetId = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const gas = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const param1 = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const param2 = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const pc = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const is = decoded; return [ @@ -105,11 +107,11 @@ export type ReceiptReturn = { /** Contract ID of current context if in an internal context, zero otherwise (b256) */ id: string; /** Value of register $rA (u64) */ - val: bigint; + val: BN; /** Value of register $pc (u64) */ - pc: bigint; + pc: BN; /** Value of register $is (u64) */ - is: bigint; + is: BN; }; export class ReceiptReturnCoder extends Coder { @@ -121,9 +123,9 @@ export class ReceiptReturnCoder extends Coder { const parts: Uint8Array[] = []; parts.push(new B256Coder().encode(value.id)); - parts.push(new NumberCoder('u64').encode(value.val)); - parts.push(new NumberCoder('u64').encode(value.pc)); - parts.push(new NumberCoder('u64').encode(value.is)); + parts.push(new U64Coder().encode(value.val)); + parts.push(new U64Coder().encode(value.pc)); + parts.push(new U64Coder().encode(value.is)); return concat(parts); } @@ -134,11 +136,11 @@ export class ReceiptReturnCoder extends Coder { [decoded, o] = new B256Coder().decode(data, o); const id = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const val = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const pc = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const is = decoded; return [ @@ -159,15 +161,15 @@ export type ReceiptReturnData = { /** Contract ID of current context if in an internal context, zero otherwise (b256) */ id: string; /** Value of register $rA (u64) */ - ptr: bigint; + ptr: BN; /** Value of register $rB (u64) */ - len: bigint; + len: BN; /** Hash of MEM[$rA, $rB] (b256) */ digest: string; /** Value of register $pc (u64) */ - pc: bigint; + pc: BN; /** Value of register $is (u64) */ - is: bigint; + is: BN; }; export class ReceiptReturnDataCoder extends Coder { @@ -179,11 +181,11 @@ export class ReceiptReturnDataCoder extends Coder { @@ -241,9 +243,9 @@ export class ReceiptPanicCoder extends Coder { const parts: Uint8Array[] = []; parts.push(new B256Coder().encode(value.id)); - parts.push(new NumberCoder('u64').encode(value.reason)); - parts.push(new NumberCoder('u64').encode(value.pc)); - parts.push(new NumberCoder('u64').encode(value.is)); + parts.push(new U64Coder().encode(value.reason)); + parts.push(new U64Coder().encode(value.pc)); + parts.push(new U64Coder().encode(value.is)); return concat(parts); } @@ -254,11 +256,11 @@ export class ReceiptPanicCoder extends Coder { [decoded, o] = new B256Coder().decode(data, o); const id = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const reason = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const pc = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const is = decoded; return [ @@ -279,11 +281,11 @@ export type ReceiptRevert = { /** Contract ID of current context if in an internal context, zero otherwise (b256) */ id: string; /** Value of register $rA (u64) */ - val: bigint; + val: BN; /** Value of register $pc (u64) */ - pc: bigint; + pc: BN; /** Value of register $is (u64) */ - is: bigint; + is: BN; }; export class ReceiptRevertCoder extends Coder { @@ -295,9 +297,9 @@ export class ReceiptRevertCoder extends Coder { const parts: Uint8Array[] = []; parts.push(new B256Coder().encode(value.id)); - parts.push(new NumberCoder('u64').encode(value.val)); - parts.push(new NumberCoder('u64').encode(value.pc)); - parts.push(new NumberCoder('u64').encode(value.is)); + parts.push(new U64Coder().encode(value.val)); + parts.push(new U64Coder().encode(value.pc)); + parts.push(new U64Coder().encode(value.is)); return concat(parts); } @@ -308,11 +310,11 @@ export class ReceiptRevertCoder extends Coder { [decoded, o] = new B256Coder().decode(data, o); const id = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const val = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const pc = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const is = decoded; return [ @@ -333,17 +335,17 @@ export type ReceiptLog = { /** Contract ID of current context if in an internal context, zero otherwise (b256) */ id: string; /** Value of register $rA (u64) */ - val0: bigint; + val0: BN; /** Value of register $rB (u64) */ - val1: bigint; + val1: BN; /** Value of register $rC (u64) */ - val2: bigint; + val2: BN; /** Value of register $rD (u64) */ - val3: bigint; + val3: BN; /** Value of register $pc (u64) */ - pc: bigint; + pc: BN; /** Value of register $is (u64) */ - is: bigint; + is: BN; }; export class ReceiptLogCoder extends Coder { @@ -355,12 +357,12 @@ export class ReceiptLogCoder extends Coder { const parts: Uint8Array[] = []; parts.push(new B256Coder().encode(value.id)); - parts.push(new NumberCoder('u64').encode(value.val0)); - parts.push(new NumberCoder('u64').encode(value.val1)); - parts.push(new NumberCoder('u64').encode(value.val2)); - parts.push(new NumberCoder('u64').encode(value.val3)); - parts.push(new NumberCoder('u64').encode(value.pc)); - parts.push(new NumberCoder('u64').encode(value.is)); + parts.push(new U64Coder().encode(value.val0)); + parts.push(new U64Coder().encode(value.val1)); + parts.push(new U64Coder().encode(value.val2)); + parts.push(new U64Coder().encode(value.val3)); + parts.push(new U64Coder().encode(value.pc)); + parts.push(new U64Coder().encode(value.is)); return concat(parts); } @@ -371,17 +373,17 @@ export class ReceiptLogCoder extends Coder { [decoded, o] = new B256Coder().decode(data, o); const id = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const val0 = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const val1 = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const val2 = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const val3 = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const pc = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const is = decoded; return [ @@ -405,19 +407,19 @@ export type ReceiptLogData = { /** Contract ID of current context if in an internal context, zero otherwise (b256) */ id: string; /** Value of register $rA (u64) */ - val0: bigint; + val0: BN; /** Value of register $rB (u64) */ - val1: bigint; + val1: BN; /** Value of register $rC (u64) */ - ptr: bigint; + ptr: BN; /** Value of register $rD (u64) */ - len: bigint; + len: BN; /** Hash of MEM[$rC, $rD] (b256) */ digest: string; /** Value of register $pc (u64) */ - pc: bigint; + pc: BN; /** Value of register $is (u64) */ - is: bigint; + is: BN; }; export class ReceiptLogDataCoder extends Coder { @@ -429,13 +431,13 @@ export class ReceiptLogDataCoder extends Coder { const parts: Uint8Array[] = []; parts.push(new B256Coder().encode(value.id)); - parts.push(new NumberCoder('u64').encode(value.val0)); - parts.push(new NumberCoder('u64').encode(value.val1)); - parts.push(new NumberCoder('u64').encode(value.ptr)); - parts.push(new NumberCoder('u64').encode(value.len)); + parts.push(new U64Coder().encode(value.val0)); + parts.push(new U64Coder().encode(value.val1)); + parts.push(new U64Coder().encode(value.ptr)); + parts.push(new U64Coder().encode(value.len)); parts.push(new B256Coder().encode(value.digest)); - parts.push(new NumberCoder('u64').encode(value.pc)); - parts.push(new NumberCoder('u64').encode(value.is)); + parts.push(new U64Coder().encode(value.pc)); + parts.push(new U64Coder().encode(value.is)); return concat(parts); } @@ -446,19 +448,19 @@ export class ReceiptLogDataCoder extends Coder { [decoded, o] = new B256Coder().decode(data, o); const id = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const val0 = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const val1 = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const ptr = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const len = decoded; [decoded, o] = new B256Coder().decode(data, o); const digest = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const pc = decoded; - [decoded, o] = new NumberCoder('u64').decode(data, o); + [decoded, o] = new U64Coder().decode(data, o); const is = decoded; return [ @@ -485,13 +487,13 @@ export type ReceiptTransfer = { /** Contract ID of contract to transfer coins to (b256) */ to: string; /** Amount of coins transferred (u64) */ - amount: bigint; + amount: BN; /** Asset ID of coins transferred (b256) */ assetId: string; /** Value of register $pc (u64) */ - pc: bigint; + pc: BN; /** Value of register $is (u64) */ - is: bigint; + is: BN; }; export class ReceiptTransferCoder extends Coder { @@ -504,10 +506,10 @@ export class ReceiptTransferCoder extends Coder { @@ -570,10 +572,10 @@ export class ReceiptTransferOutCoder extends Coder { @@ -626,8 +628,8 @@ export class ReceiptScriptResultCoder extends Coder { it('Can encode TransactionScript', () => { const transaction: Transaction = { type: TransactionType.Script, - gasPrice: 0n, - gasLimit: 0n, + gasPrice: bn(0), + gasLimit: bn(0), maturity: 0, scriptLength: 0, scriptDataLength: 0, @@ -34,14 +35,14 @@ describe('TransactionCoder', () => { const [decoded, offset] = new TransactionCoder().decode(arrayify(encoded), 0); expect(offset).toEqual((encoded.length - 2) / 2); - expect(decoded).toEqual(transaction); + expect(JSON.stringify(decoded)).toEqual(JSON.stringify(transaction)); }); it('Can encode TransactionCreate', () => { const transaction: Transaction = { type: TransactionType.Create, - gasPrice: 0n, - gasLimit: 0n, + gasPrice: bn(0), + gasLimit: bn(0), maturity: 0, bytecodeLength: 0, bytecodeWitnessIndex: 0, @@ -65,6 +66,6 @@ describe('TransactionCoder', () => { const [decoded, offset] = new TransactionCoder().decode(arrayify(encoded), 0); expect(offset).toEqual((encoded.length - 2) / 2); - expect(decoded).toEqual(transaction); + expect(JSON.stringify(decoded)).toEqual(JSON.stringify(transaction)); }); }); diff --git a/packages/transactions/src/coders/transaction.ts b/packages/transactions/src/coders/transaction.ts index fef4faaf66d..8c086995189 100644 --- a/packages/transactions/src/coders/transaction.ts +++ b/packages/transactions/src/coders/transaction.ts @@ -2,6 +2,8 @@ import { concat } from '@ethersproject/bytes'; import { Coder, ArrayCoder, B256Coder, NumberCoder } from '@fuel-ts/abi-coder'; +import U64Coder from '@fuel-ts/abi-coder/src/coders/u64'; +import type { BN } from '@fuel-ts/math'; import { ByteArrayCoder } from './byte-array'; import type { Input } from './input'; @@ -22,10 +24,10 @@ export type TransactionScript = { type: TransactionType.Script; /** Gas price for transaction (u64) */ - gasPrice: bigint; + gasPrice: BN; /** Gas limit for transaction (u64) */ - gasLimit: bigint; + gasLimit: BN; /** Block until which tx cannot be included (u32) */ maturity: number; @@ -72,8 +74,8 @@ export class TransactionScriptCoder extends Coder; - txIndex: NumberCoder<'u16'>; + blockHeight: NumberCoder; + txIndex: NumberCoder; }> { constructor() { super('TxPointer', { diff --git a/packages/transactions/src/coders/utxo-id.ts b/packages/transactions/src/coders/utxo-id.ts index e2e65a5d732..08af089e195 100644 --- a/packages/transactions/src/coders/utxo-id.ts +++ b/packages/transactions/src/coders/utxo-id.ts @@ -9,7 +9,7 @@ export type UtxoId = { export class UtxoIdCoder extends StructCoder<{ transactionId: B256Coder; - outputIndex: NumberCoder<'u8'>; + outputIndex: NumberCoder; }> { constructor() { super('UtxoId', { diff --git a/packages/transactions/src/consts.ts b/packages/transactions/src/consts.ts index f7146ba9efb..b805cbdd684 100644 --- a/packages/transactions/src/consts.ts +++ b/packages/transactions/src/consts.ts @@ -1,3 +1,5 @@ +import { bn } from '@fuel-ts/math'; + /** Maximum contract size, in bytes. */ export const CONTRACT_MAX_SIZE = 16 * 1024; @@ -11,17 +13,17 @@ export const MAX_OUTPUTS = 8; export const MAX_WITNESSES = 16; /** Maximum gas per transaction. */ -export const MAX_GAS_PER_TX = 100000000n; +export const MAX_GAS_PER_TX = bn(100000000); /** * Gas Price factor this is used to calculate * This is used to calculate the gas fee in Native Coins. * Ex.: transactionFee = Math.ceil( / MAX_GAS_PER_TX); */ -export const GAS_PRICE_FACTOR = 1000000n; +export const GAS_PRICE_FACTOR = bn(1000000); /** Gas charged per byte of the transaction. */ -export const GAS_PER_BYTE = 4n; +export const GAS_PER_BYTE = bn(4); // TODO: set max script length const /** Maximum length of script, in instructions. */ diff --git a/packages/typechain-target-fuels/example/types/Demo.d.ts b/packages/typechain-target-fuels/example/types/Demo.d.ts index ae4f9df09ec..f82879627a2 100644 --- a/packages/typechain-target-fuels/example/types/Demo.d.ts +++ b/packages/typechain-target-fuels/example/types/Demo.d.ts @@ -10,6 +10,7 @@ import type { BytesLike, BigNumberish, InvokeFunction, + BN, } from "fuels"; interface DemoInterface extends Interface { diff --git a/packages/typechain-target-fuels/example/types/MulticallAbi.d.ts b/packages/typechain-target-fuels/example/types/MulticallAbi.d.ts index 717fff51923..b589789f2fd 100644 --- a/packages/typechain-target-fuels/example/types/MulticallAbi.d.ts +++ b/packages/typechain-target-fuels/example/types/MulticallAbi.d.ts @@ -10,6 +10,7 @@ import type { BytesLike, BigNumberish, InvokeFunction, + BN, } from "fuels"; import type { Enum, Option } from "./common"; @@ -28,9 +29,9 @@ export type CallInput = { export type CallOutput = { contract_id: ContractIdOutput; - fn_selector: bigint; + fn_selector: BN; fn_arg: CallArgOutput; - amount: bigint; + amount: BN; asset_id: string; }; @@ -67,7 +68,7 @@ export type CallArgInput = Enum<{ Reference: BigNumberish; }>; -export type CallArgOutput = Enum<{ Value: bigint; Reference: bigint }>; +export type CallArgOutput = Enum<{ Value: BN; Reference: BN }>; export type OptionInput = Option; @@ -78,10 +79,7 @@ export type CallReturnInput = Enum<{ Reference: [BigNumberish, BigNumberish]; }>; -export type CallReturnOutput = Enum<{ - Value: bigint; - Reference: [bigint, bigint]; -}>; +export type CallReturnOutput = Enum<{ Value: BN; Reference: [BN, BN] }>; interface MulticallAbiInterface extends Interface { functions: { diff --git a/packages/typechain-target-fuels/example/types/Token.d.ts b/packages/typechain-target-fuels/example/types/Token.d.ts index 54dd0bb24f5..9685cb92569 100644 --- a/packages/typechain-target-fuels/example/types/Token.d.ts +++ b/packages/typechain-target-fuels/example/types/Token.d.ts @@ -10,6 +10,7 @@ import type { BytesLike, BigNumberish, InvokeFunction, + BN, } from "fuels"; export type Ret0Input = { @@ -80,7 +81,7 @@ export class Token extends Contract { asset_id: string, args: [string, BigNumberish] ], - bigint + BN >; send: InvokeFunction< @@ -93,7 +94,7 @@ export class Token extends Contract { void >; - get_balance: InvokeFunction<[], bigint>; + get_balance: InvokeFunction<[], BN>; return_array: InvokeFunction<[gas: BigNumberish], [string, string]>; diff --git a/packages/typechain-target-fuels/src/codegen/index.ts b/packages/typechain-target-fuels/src/codegen/index.ts index 87e4b56ca67..cea16079cfc 100644 --- a/packages/typechain-target-fuels/src/codegen/index.ts +++ b/packages/typechain-target-fuels/src/codegen/index.ts @@ -25,6 +25,7 @@ export function codegenContractTypings(contract: Contract, codegenConfig: Codege BytesLike, BigNumberish, InvokeFunction, + BN, } from 'fuels'; ${Object.values(contract.enums).length ? "import type { Enum, Option } from './common'" : ''} diff --git a/packages/typechain-target-fuels/src/codegen/types.test.ts b/packages/typechain-target-fuels/src/codegen/types.test.ts index fa75dd03724..c85460daa14 100644 --- a/packages/typechain-target-fuels/src/codegen/types.test.ts +++ b/packages/typechain-target-fuels/src/codegen/types.test.ts @@ -100,8 +100,8 @@ describe('Type codegen', () => { expect(generateOutputType({ type: 'bool', originalType: 'bool' })).toEqual('boolean'); expect(generateOutputType({ type: 'u8', bits: 8, originalType: 'u8' })).toEqual('number'); expect(generateOutputType({ type: 'u16', bits: 16, originalType: 'u16' })).toEqual('number'); - expect(generateOutputType({ type: 'u32', bits: 32, originalType: 'u32' })).toEqual('bigint'); - expect(generateOutputType({ type: 'u64', bits: 64, originalType: 'u64' })).toEqual('bigint'); + expect(generateOutputType({ type: 'u32', bits: 32, originalType: 'u32' })).toEqual('number'); + expect(generateOutputType({ type: 'u64', bits: 64, originalType: 'u64' })).toEqual('BN'); expect(generateOutputType({ type: 'byte', size: 1, originalType: 'byte' })).toEqual( 'BytesLike' ); @@ -151,7 +151,7 @@ describe('Type codegen', () => { { type: { type: 'address', originalType: 'address' }, name: '__tuple_element' }, ], }) - ).toEqual('[bigint, string]'); + ).toEqual('[number, string]'); expect( generateOutputType({ type: 'tuple', diff --git a/packages/typechain-target-fuels/src/codegen/types.ts b/packages/typechain-target-fuels/src/codegen/types.ts index 6174d0dcbe3..74e7e24acbc 100644 --- a/packages/typechain-target-fuels/src/codegen/types.ts +++ b/packages/typechain-target-fuels/src/codegen/types.ts @@ -120,10 +120,10 @@ export function generateOutputType( switch (svmType.type) { case 'u8': case 'u16': - return 'number'; case 'u32': + return 'number'; case 'u64': - return 'bigint'; + return 'BN'; case 'b256': case 'address': return 'string'; diff --git a/packages/wallet/src/transfer.test.ts b/packages/wallet/src/transfer.test.ts index 15d95da8467..8adb90358cd 100644 --- a/packages/wallet/src/transfer.test.ts +++ b/packages/wallet/src/transfer.test.ts @@ -1,4 +1,5 @@ import { NativeAssetId } from '@fuel-ts/constants'; +import { bn } from '@fuel-ts/math'; import { Provider, ScriptTransactionRequest } from '@fuel-ts/providers'; import { generateTestWallet } from './test-utils'; @@ -13,9 +14,9 @@ describe('Wallet', () => { await sender.transfer(receiver.address, 1, NativeAssetId); const senderBalances = await sender.getBalances(); - expect(senderBalances).toEqual([{ assetId: NativeAssetId, amount: 99n }]); + expect(senderBalances).toEqual([{ assetId: NativeAssetId, amount: bn(99) }]); const receiverBalances = await receiver.getBalances(); - expect(receiverBalances).toEqual([{ assetId: NativeAssetId, amount: 1n }]); + expect(receiverBalances).toEqual([{ assetId: NativeAssetId, amount: bn(1) }]); }); it('can transfer with custom TX Params', async () => { @@ -31,15 +32,15 @@ describe('Wallet', () => { gasPrice: 1, }); await result.wait(); - }).rejects.toThrowError('gasLimit(1) is lower than the required (11)'); + }).rejects.toThrowError(`gasLimit(${bn(1)}) is lower than the required (${bn(11)})`); await sender.transfer(receiver.address, 1, NativeAssetId, { gasLimit: 10000, }); const senderBalances = await sender.getBalances(); - expect(senderBalances).toEqual([{ assetId: NativeAssetId, amount: 99n }]); + expect(senderBalances).toEqual([{ assetId: NativeAssetId, amount: bn(99) }]); const receiverBalances = await receiver.getBalances(); - expect(receiverBalances).toEqual([{ assetId: NativeAssetId, amount: 1n }]); + expect(receiverBalances).toEqual([{ assetId: NativeAssetId, amount: bn(1) }]); }); it('can exclude IDs when getCoinsToSpend is called', async () => { @@ -49,15 +50,15 @@ describe('Wallet', () => { const assetIdB = '0x0202020202020202020202020202020202020202020202020202020202020202'; const user = await generateTestWallet(provider, [ - [1n, assetIdA], - [1n, assetIdB], - [10n, NativeAssetId], + [1, assetIdA], + [1, assetIdB], + [10, NativeAssetId], ]); const coins = await user.getCoins(); // Test excludes the UTXO where the assetIdA gets added to the senders wallet - await expect(user.getCoinsToSpend([[1n, assetIdA]], 100, [coins[0].id])).rejects.toThrow( + await expect(user.getCoinsToSpend([[1, assetIdA]], 100, [coins[0].id])).rejects.toThrow( /enough coins could not be found/ ); }); @@ -67,20 +68,20 @@ describe('Wallet', () => { const assetIdA = '0x0101010101010101010101010101010101010101010101010101010101010101'; const assetIdB = '0x0202020202020202020202020202020202020202020202020202020202020202'; - const amount = 1n; + const amount = 1; const request = new ScriptTransactionRequest({ gasLimit: 1000000 }); const sender = await generateTestWallet(provider, [ - [amount * 2n, assetIdA], - [amount * 2n, assetIdB], - [10n, NativeAssetId], + [amount * 2, assetIdA], + [amount * 2, assetIdB], + [10, NativeAssetId], ]); const receiverA = await generateTestWallet(provider); const receiverB = await generateTestWallet(provider); const coins = await sender.getCoinsToSpend([ - [amount * 2n, assetIdA], - [amount * 2n, assetIdB], + [amount * 2, assetIdA], + [amount * 2, assetIdB], ]); request.addCoins(coins); @@ -100,16 +101,16 @@ describe('Wallet', () => { const receiverACoins = await receiverA.getCoins(); expect(receiverACoins).toEqual( expect.arrayContaining([ - expect.objectContaining({ assetId: assetIdA, amount }), - expect.objectContaining({ assetId: assetIdB, amount }), + expect.objectContaining({ assetId: assetIdA, amount: bn(amount) }), + expect.objectContaining({ assetId: assetIdB, amount: bn(amount) }), ]) ); const receiverBCoins = await receiverB.getCoins(); expect(receiverBCoins).toEqual( expect.arrayContaining([ - expect.objectContaining({ assetId: assetIdA, amount }), - expect.objectContaining({ assetId: assetIdB, amount }), + expect.objectContaining({ assetId: assetIdA, amount: bn(amount) }), + expect.objectContaining({ assetId: assetIdB, amount: bn(amount) }), ]) ); }); diff --git a/packages/wallet/src/wallet.ts b/packages/wallet/src/wallet.ts index 79352bfb269..4a3c14a49a9 100644 --- a/packages/wallet/src/wallet.ts +++ b/packages/wallet/src/wallet.ts @@ -5,7 +5,7 @@ import { hashMessage, hashTransaction } from '@fuel-ts/hasher'; import { HDWallet } from '@fuel-ts/hdwallet'; import type { AbstractAddress, AbstractPredicate } from '@fuel-ts/interfaces'; import { AbstractWallet } from '@fuel-ts/interfaces'; -import type { BigNumberish } from '@fuel-ts/math'; +import type { BigNumberish, BN } from '@fuel-ts/math'; import { Mnemonic } from '@fuel-ts/mnemonic'; import { ScriptTransactionRequest, transactionRequestify, Provider } from '@fuel-ts/providers'; import type { @@ -150,7 +150,7 @@ export default class Wallet extends AbstractWallet { /** * Gets balance for the given asset. */ - async getBalance(assetId: BytesLike = NativeAssetId): Promise { + async getBalance(assetId: BytesLike = NativeAssetId): Promise { const amount = await this.provider.getBalance(this.address, assetId); return amount; } @@ -188,7 +188,8 @@ export default class Wallet extends AbstractWallet { * Adds coins to the transaction enough to fund it. */ async fund(request: T): Promise { - const coins = await this.getCoinsToSpend([request.calculateFee()]); + const fee = request.calculateFee(); + const coins = await this.getCoinsToSpend([fee]); request.addCoins(coins); } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1c3e8c3efb2..79c5ca0c87e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -52,33 +52,33 @@ importers: typescript: ^4.5.2 devDependencies: '@changesets/changelog-github': 0.4.6 - '@changesets/cli': 2.24.2 - '@ethersproject/bytes': 5.6.1 + '@changesets/cli': 2.24.4 + '@ethersproject/bytes': 5.7.0 '@jest/types': 28.1.0 '@types/jest': 27.5.1 - '@types/node': 14.18.23 + '@types/node': 14.18.26 '@types/node-fetch': 2.6.2 '@types/shelljs': 0.8.11 '@types/web': 0.0.65 - '@typescript-eslint/eslint-plugin': 5.33.0_njno5y7ry2l2lcmiu4tywxkwnq - '@typescript-eslint/parser': 5.33.0_qugx7qdu5zevzvxaiqyxfiwquq + '@typescript-eslint/eslint-plugin': 5.36.1_lbwfnm54o3pmr3ypeqp3btnera + '@typescript-eslint/parser': 5.36.1_yqf6kl63nyoq5megxukfnom5rm conventional-changelog-angular: 5.0.13 dotenv: 9.0.2 - eslint: 8.21.0 - eslint-config-airbnb-base: 15.0.0_jatgrcxl4x7ywe7ak6cnjca2ae - eslint-config-airbnb-typescript: 16.2.0_2p33354vws2q7hfbt5tyy4qhyy - eslint-config-prettier: 8.5.0_eslint@8.21.0 - eslint-plugin-eslint-comments: 3.2.0_eslint@8.21.0 - eslint-plugin-import: 2.26.0_qfqnhzzittf54udqwes54xx65q - eslint-plugin-jsdoc: 37.9.7_eslint@8.21.0 - eslint-plugin-jsx-a11y: 6.6.1_eslint@8.21.0 - eslint-plugin-prettier: 4.2.1_h62lvancfh4b7r6zn2dgodrh5e - eslint-plugin-react: 7.30.1_eslint@8.21.0 - eslint-plugin-react-hooks: 4.6.0_eslint@8.21.0 + eslint: 8.23.0 + eslint-config-airbnb-base: 15.0.0_faomjyrlgqmwswvqymymzkxcqi + eslint-config-airbnb-typescript: 16.2.0_nwt6qmnsbmuicuvak5hafgwebq + eslint-config-prettier: 8.5.0_eslint@8.23.0 + eslint-plugin-eslint-comments: 3.2.0_eslint@8.23.0 + eslint-plugin-import: 2.26.0_wyxuyzvlfep3lsyoibc4fosfq4 + eslint-plugin-jsdoc: 37.9.7_eslint@8.23.0 + eslint-plugin-jsx-a11y: 6.6.1_eslint@8.23.0 + eslint-plugin-prettier: 4.2.1_tgumt6uwl2md3n6uqnggd6wvce + eslint-plugin-react: 7.31.4_eslint@8.23.0 + eslint-plugin-react-hooks: 4.6.0_eslint@8.23.0 eslint-plugin-tsdoc: 0.2.16 - ethers: 5.6.9 + ethers: 5.7.0 forc-bin: link:packages/forc-bin - jest: 28.1.0_wgmt7g4zmeu462tnazkmqjm6zm + jest: 28.1.0_turmrmwfy2xxv6whdm4g3fcy3y markdownlint: 0.23.1 markdownlint-cli: 0.27.1 node-fetch: 2.6.7 @@ -87,16 +87,16 @@ importers: prettier: 2.7.1 shelljs: 0.8.5 ts-generator: 0.1.1 - ts-jest: 28.0.2_2dzzxtvkxekhhfzghvhspsa2km - ts-node: 10.9.1_gqvhidmvmzakkqbagwo6oqbjnm - tsup: 5.12.9_6oasmw356qmm23djlsjgkwvrtm - turbo: 1.4.3 - typedoc: 0.23.10_typescript@4.7.4 - typedoc-just-the-docs-theme: 0.0.1_e6antoqkoip4fafe7ecefzcrwu - typedoc-monorepo-link-types: 0.0.4_typedoc@0.23.10 - typedoc-plugin-markdown: 3.13.4_typedoc@0.23.10 - typedoc-plugin-sourcefile-url: 1.0.6_typedoc@0.23.10 - typescript: 4.7.4 + ts-jest: 28.0.2_o4uec3nv6ehlznvgnzzhupazj4 + ts-node: 10.9.1_ys5ibmf2vqsgufkwyky27zwkd4 + tsup: 5.12.9_s5ojjbx2isjkawqptqpitvy25q + turbo: 1.4.5 + typedoc: 0.23.14_typescript@4.8.2 + typedoc-just-the-docs-theme: 0.0.1_e6mpfwl2rohnwa4aamqb4zpcte + typedoc-monorepo-link-types: 0.0.4_typedoc@0.23.14 + typedoc-plugin-markdown: 3.13.5_typedoc@0.23.14 + typedoc-plugin-sourcefile-url: 1.0.6_typedoc@0.23.14 + typescript: 4.8.2 packages/abi-coder: specifiers: @@ -110,15 +110,15 @@ importers: '@fuel-ts/math': workspace:* type-fest: ^2.12.2 dependencies: - '@ethersproject/abi': 5.6.4 - '@ethersproject/bignumber': 5.6.2 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/properties': 5.6.0 - '@ethersproject/sha2': 5.6.1 - '@ethersproject/strings': 5.6.1 + '@ethersproject/abi': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/sha2': 5.7.0 + '@ethersproject/strings': 5.7.0 '@fuel-ts/math': link:../math - type-fest: 2.18.0 + type-fest: 2.19.0 packages/address: specifiers: @@ -131,9 +131,9 @@ importers: '@fuel-ts/testcases': workspace:* bech32: ^2.0.0 dependencies: - '@ethersproject/bytes': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/sha2': 5.6.1 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/sha2': 5.7.0 '@fuel-ts/constants': link:../constants '@fuel-ts/interfaces': link:../interfaces '@fuel-ts/keystore': link:../keystore @@ -163,9 +163,9 @@ importers: '@fuel-ts/wallet': workspace:* forc-bin: workspace:* dependencies: - '@ethersproject/bytes': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/sha2': 5.6.1 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/sha2': 5.7.0 '@fuel-ts/abi-coder': link:../abi-coder '@fuel-ts/address': link:../address '@fuel-ts/constants': link:../constants @@ -191,14 +191,14 @@ importers: prettier: ^2.4.1 typescript: ^4.5.2 dependencies: - '@ethersproject/bytes': 5.6.1 + '@ethersproject/bytes': 5.7.0 '@fuel-ts/wallet': link:../wallet fuels: link:../fuels devDependencies: forc-bin: link:../forc-bin fuelchain: link:../fuelchain prettier: 2.7.1 - typescript: 4.7.4 + typescript: 4.8.2 packages/forc-bin: specifiers: @@ -247,9 +247,9 @@ importers: '@types/debug': 4.1.7 '@types/fs-extra': 5.1.0 '@types/glob': 5.0.37 - '@types/lodash': 4.14.182 + '@types/lodash': 4.14.184 '@types/mkdirp': 1.0.2 - '@types/node': 14.18.23 + '@types/node': 14.18.26 bluebird: 3.7.2 coveralls: 3.1.1 @@ -279,7 +279,7 @@ importers: '@fuel-ts/wallet-manager': workspace:* '@fuel-ts/wordlists': workspace:* dependencies: - '@ethersproject/bytes': 5.6.1 + '@ethersproject/bytes': 5.7.0 '@fuel-ts/abi-coder': link:../abi-coder '@fuel-ts/address': link:../address '@fuel-ts/constants': link:../constants @@ -308,15 +308,17 @@ importers: '@ethersproject/bytes': ^5.5.0 '@ethersproject/sha2': ^5.5.0 '@fuel-ts/constants': workspace:* + '@fuel-ts/math': workspace:* '@fuel-ts/providers': workspace:* '@fuel-ts/testcases': workspace:* '@fuel-ts/transactions': workspace:* '@types/lodash.clonedeep': ^4.5.6 lodash.clonedeep: ^4.5.0 dependencies: - '@ethersproject/bytes': 5.6.1 - '@ethersproject/sha2': 5.6.1 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/sha2': 5.7.0 '@fuel-ts/constants': link:../constants + '@fuel-ts/math': link:../math '@fuel-ts/providers': link:../providers '@fuel-ts/transactions': link:../transactions lodash.clonedeep: 4.5.0 @@ -333,9 +335,9 @@ importers: '@fuel-ts/mnemonic': workspace:* '@fuel-ts/signer': workspace:* dependencies: - '@ethersproject/basex': 5.6.1 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/sha2': 5.6.1 + '@ethersproject/basex': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/sha2': 5.7.0 '@fuel-ts/math': link:../math '@fuel-ts/mnemonic': link:../mnemonic '@fuel-ts/signer': link:../signer @@ -348,32 +350,39 @@ importers: '@ethersproject/bytes': ^5.6.1 '@ethersproject/pbkdf2': ^5.6.0 dependencies: - '@ethersproject/bytes': 5.6.1 - '@ethersproject/pbkdf2': 5.6.1 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/pbkdf2': 5.7.0 packages/math: - specifiers: {} + specifiers: + '@types/bn.js': ^5.1.0 + bn.js: ^5.2.1 + dependencies: + '@types/bn.js': 5.1.1 + bn.js: 5.2.1 packages/merkle: specifiers: + '@fuel-ts/math': workspace:* '@fuel-ts/merkle-shared': workspace:* dependencies: + '@fuel-ts/math': link:../math '@fuel-ts/merkle-shared': link:../merkle-shared packages/merkle-shared: specifiers: '@ethersproject/bytes': ^5.4.0 '@ethersproject/sha2': ^5.4.0 - '@fuel-ts/math': workspace:* dependencies: - '@ethersproject/bytes': 5.6.1 - '@ethersproject/sha2': 5.6.1 - '@fuel-ts/math': link:../math + '@ethersproject/bytes': 5.7.0 + '@ethersproject/sha2': 5.7.0 packages/merklesum: specifiers: + '@fuel-ts/math': workspace:* '@fuel-ts/merkle-shared': workspace:* dependencies: + '@fuel-ts/math': link:../math '@fuel-ts/merkle-shared': link:../merkle-shared packages/mnemonic: @@ -385,10 +394,10 @@ importers: '@fuel-ts/keystore': workspace:* '@fuel-ts/wordlists': workspace:* dependencies: - '@ethersproject/basex': 5.6.1 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/pbkdf2': 5.6.1 - '@ethersproject/sha2': 5.6.1 + '@ethersproject/basex': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/pbkdf2': 5.7.0 + '@ethersproject/sha2': 5.7.0 '@fuel-ts/keystore': link:../keystore '@fuel-ts/wordlists': link:../wordlists @@ -404,7 +413,7 @@ importers: '@fuel-ts/providers': workspace:* '@fuel-ts/wallet': workspace:* dependencies: - '@ethersproject/bytes': 5.6.1 + '@ethersproject/bytes': 5.7.0 '@fuel-ts/abi-coder': link:../abi-coder '@fuel-ts/address': link:../address '@fuel-ts/contract': link:../contract @@ -439,9 +448,9 @@ importers: lodash.clonedeep: ^4.5.0 typescript: ^4.5.2 dependencies: - '@ethersproject/bytes': 5.6.1 - '@ethersproject/networks': 5.6.4 - '@ethersproject/sha2': 5.6.1 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/networks': 5.7.0 + '@ethersproject/sha2': 5.7.0 '@fuel-ts/abi-coder': link:../abi-coder '@fuel-ts/address': link:../address '@fuel-ts/constants': link:../constants @@ -454,27 +463,29 @@ importers: graphql-tag: 2.12.6_graphql@15.8.0 lodash.clonedeep: 4.5.0 devDependencies: - '@graphql-codegen/cli': 2.11.6_h5eoywvcjsa4emif44kddonyyu + '@graphql-codegen/cli': 2.12.0_bd4dqfuh23qh62sufat7weqjza '@graphql-codegen/typescript': 2.7.3_graphql@15.8.0 - '@graphql-codegen/typescript-graphql-request': 4.5.3_hchyc3qeeqideu47zyo6nk2cfm + '@graphql-codegen/typescript-graphql-request': 4.5.4_hchyc3qeeqideu47zyo6nk2cfm '@graphql-codegen/typescript-operations': 2.5.3_graphql@15.8.0 '@types/lodash.clonedeep': 4.5.7 get-graphql-schema: 2.1.2 - typescript: 4.7.4 + typescript: 4.8.2 packages/script: specifiers: '@ethersproject/bytes': ^5.4.0 '@fuel-ts/abi-coder': workspace:* '@fuel-ts/constants': workspace:* + '@fuel-ts/math': workspace:* '@fuel-ts/providers': workspace:* '@fuel-ts/transactions': workspace:* '@fuel-ts/wallet': workspace:* forc-bin: workspace:* dependencies: - '@ethersproject/bytes': 5.6.1 + '@ethersproject/bytes': 5.7.0 '@fuel-ts/abi-coder': link:../abi-coder '@fuel-ts/constants': link:../constants + '@fuel-ts/math': link:../math '@fuel-ts/providers': link:../providers '@fuel-ts/transactions': link:../transactions '@fuel-ts/wallet': link:../wallet @@ -488,15 +499,17 @@ importers: '@fuel-ts/address': workspace:* '@fuel-ts/hasher': workspace:* '@fuel-ts/keystore': workspace:* + '@fuel-ts/math': workspace:* '@fuel-ts/testcases': workspace:* '@types/elliptic': ^6.4.14 elliptic: ^6.5.4 dependencies: - '@ethersproject/bytes': 5.6.1 - '@ethersproject/sha2': 5.6.1 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/sha2': 5.7.0 '@fuel-ts/address': link:../address '@fuel-ts/hasher': link:../hasher '@fuel-ts/keystore': link:../keystore + '@fuel-ts/math': link:../math elliptic: 6.5.4 devDependencies: '@fuel-ts/testcases': link:../testcases @@ -504,8 +517,10 @@ importers: packages/sparsemerkle: specifiers: + '@fuel-ts/math': workspace:* '@fuel-ts/merkle-shared': workspace:* dependencies: + '@fuel-ts/math': link:../math '@fuel-ts/merkle-shared': link:../merkle-shared packages/testcases: @@ -516,10 +531,12 @@ importers: '@ethersproject/bytes': ^5.4.0 '@fuel-ts/abi-coder': workspace:* '@fuel-ts/constants': workspace:* + '@fuel-ts/math': workspace:* dependencies: - '@ethersproject/bytes': 5.6.1 + '@ethersproject/bytes': 5.7.0 '@fuel-ts/abi-coder': link:../abi-coder '@fuel-ts/constants': link:../constants + '@fuel-ts/math': link:../math packages/typechain-target-fuels: specifiers: @@ -529,8 +546,8 @@ importers: typescript: ^4.5.2 dependencies: fuelchain: link:../fuelchain - ts-essentials: 9.2.0_typescript@4.7.4 - typescript: 4.7.4 + ts-essentials: 9.3.0_typescript@4.8.2 + typescript: 4.8.2 devDependencies: fuels: link:../fuels @@ -550,7 +567,7 @@ importers: '@fuel-ts/testcases': workspace:* '@fuel-ts/transactions': workspace:* dependencies: - '@ethersproject/bytes': 5.6.1 + '@ethersproject/bytes': 5.7.0 '@fuel-ts/abi-coder': link:../abi-coder '@fuel-ts/constants': link:../constants '@fuel-ts/hasher': link:../hasher @@ -605,13 +622,13 @@ packages: peerDependencies: graphql: '*' dependencies: - '@babel/core': 7.18.10 - '@babel/generator': 7.18.12 - '@babel/parser': 7.18.11 + '@babel/core': 7.18.13 + '@babel/generator': 7.18.13 + '@babel/parser': 7.18.13 '@babel/runtime': 7.18.9 - '@babel/traverse': 7.18.11 - '@babel/types': 7.18.10 - babel-preset-fbjs: 3.4.0_@babel+core@7.18.10 + '@babel/traverse': 7.18.13 + '@babel/types': 7.18.13 + babel-preset-fbjs: 3.4.0_@babel+core@7.18.13 chalk: 4.1.2 fb-watchman: 2.0.1 fbjs: 3.0.4 @@ -644,25 +661,25 @@ packages: '@babel/highlight': 7.18.6 dev: true - /@babel/compat-data/7.18.8: - resolution: {integrity: sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ==} + /@babel/compat-data/7.18.13: + resolution: {integrity: sha512-5yUzC5LqyTFp2HLmDoxGQelcdYgSpP9xsnMWBphAscOdFrHSAVbLNzWiy32sVNDqJRDiJK6klfDnAgu6PAGSHw==} engines: {node: '>=6.9.0'} dev: true - /@babel/core/7.18.10: - resolution: {integrity: sha512-JQM6k6ENcBFKVtWvLavlvi/mPcpYZ3+R+2EySDEMSMbp7Mn4FexlbbJVrx2R7Ijhr01T8gyqrOaABWIOgxeUyw==} + /@babel/core/7.18.13: + resolution: {integrity: sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.0 '@babel/code-frame': 7.18.6 - '@babel/generator': 7.18.12 - '@babel/helper-compilation-targets': 7.18.9_@babel+core@7.18.10 + '@babel/generator': 7.18.13 + '@babel/helper-compilation-targets': 7.18.9_@babel+core@7.18.13 '@babel/helper-module-transforms': 7.18.9 '@babel/helpers': 7.18.9 - '@babel/parser': 7.18.11 + '@babel/parser': 7.18.13 '@babel/template': 7.18.10 - '@babel/traverse': 7.18.11 - '@babel/types': 7.18.10 + '@babel/traverse': 7.18.13 + '@babel/types': 7.18.13 convert-source-map: 1.8.0 debug: 4.3.4 gensync: 1.0.0-beta.2 @@ -672,11 +689,11 @@ packages: - supports-color dev: true - /@babel/generator/7.18.12: - resolution: {integrity: sha512-dfQ8ebCN98SvyL7IxNMCUtZQSq5R7kxgN+r8qYTGDmmSion1hX2C0zq2yo1bsCDhXixokv1SAWTZUMYbO/V5zg==} + /@babel/generator/7.18.13: + resolution: {integrity: sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.18.13 '@jridgewell/gen-mapping': 0.3.2 jsesc: 2.5.2 dev: true @@ -685,29 +702,29 @@ packages: resolution: {integrity: sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.18.13 dev: true - /@babel/helper-compilation-targets/7.18.9_@babel+core@7.18.10: + /@babel/helper-compilation-targets/7.18.9_@babel+core@7.18.13: resolution: {integrity: sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/compat-data': 7.18.8 - '@babel/core': 7.18.10 + '@babel/compat-data': 7.18.13 + '@babel/core': 7.18.13 '@babel/helper-validator-option': 7.18.6 browserslist: 4.21.3 semver: 6.3.0 dev: true - /@babel/helper-create-class-features-plugin/7.18.9_@babel+core@7.18.10: - resolution: {integrity: sha512-WvypNAYaVh23QcjpMR24CwZY2Nz6hqdOcFdPbNpV56hL5H6KiFheO7Xm1aPdlLQ7d5emYZX7VZwPp9x3z+2opw==} + /@babel/helper-create-class-features-plugin/7.18.13_@babel+core@7.18.13: + resolution: {integrity: sha512-hDvXp+QYxSRL+23mpAlSGxHMDyIGChm0/AwTfTAAK5Ufe40nCsyNdaYCGuK91phn/fVu9kqayImRDkvNAgdrsA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-annotate-as-pure': 7.18.6 '@babel/helper-environment-visitor': 7.18.9 '@babel/helper-function-name': 7.18.9 @@ -729,28 +746,28 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.18.10 - '@babel/types': 7.18.10 + '@babel/types': 7.18.13 dev: true /@babel/helper-hoist-variables/7.18.6: resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.18.13 dev: true /@babel/helper-member-expression-to-functions/7.18.9: resolution: {integrity: sha512-RxifAh2ZoVU67PyKIO4AMi1wTenGfMR/O/ae0CCRqwgBAt5v7xjdtRw7UoSbsreKrQn5t7r89eruK/9JjYHuDg==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.18.13 dev: true /@babel/helper-module-imports/7.18.6: resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.18.13 dev: true /@babel/helper-module-transforms/7.18.9: @@ -763,8 +780,8 @@ packages: '@babel/helper-split-export-declaration': 7.18.6 '@babel/helper-validator-identifier': 7.18.6 '@babel/template': 7.18.10 - '@babel/traverse': 7.18.11 - '@babel/types': 7.18.10 + '@babel/traverse': 7.18.13 + '@babel/types': 7.18.13 transitivePeerDependencies: - supports-color dev: true @@ -773,7 +790,7 @@ packages: resolution: {integrity: sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.18.13 dev: true /@babel/helper-plugin-utils/7.18.9: @@ -788,8 +805,8 @@ packages: '@babel/helper-environment-visitor': 7.18.9 '@babel/helper-member-expression-to-functions': 7.18.9 '@babel/helper-optimise-call-expression': 7.18.6 - '@babel/traverse': 7.18.11 - '@babel/types': 7.18.10 + '@babel/traverse': 7.18.13 + '@babel/types': 7.18.13 transitivePeerDependencies: - supports-color dev: true @@ -798,21 +815,21 @@ packages: resolution: {integrity: sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.18.13 dev: true /@babel/helper-skip-transparent-expression-wrappers/7.18.9: resolution: {integrity: sha512-imytd2gHi3cJPsybLRbmFrF7u5BIEuI2cNheyKi3/iOBC63kNn3q8Crn2xVuESli0aM4KYsyEqKyS7lFL8YVtw==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.18.13 dev: true /@babel/helper-split-export-declaration/7.18.6: resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} engines: {node: '>=6.9.0'} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.18.13 dev: true /@babel/helper-string-parser/7.18.10: @@ -835,8 +852,8 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.18.10 - '@babel/traverse': 7.18.11 - '@babel/types': 7.18.10 + '@babel/traverse': 7.18.13 + '@babel/types': 7.18.13 transitivePeerDependencies: - supports-color dev: true @@ -850,217 +867,217 @@ packages: js-tokens: 4.0.0 dev: true - /@babel/parser/7.18.11: - resolution: {integrity: sha512-9JKn5vN+hDt0Hdqn1PiJ2guflwP+B6Ga8qbDuoF0PzzVhrzsKIJo8yGqVk6CmMHiMei9w1C1Bp9IMJSIK+HPIQ==} + /@babel/parser/7.18.13: + resolution: {integrity: sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==} engines: {node: '>=6.0.0'} hasBin: true dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.18.13 dev: true - /@babel/plugin-proposal-class-properties/7.18.6_@babel+core@7.18.10: + /@babel/plugin-proposal-class-properties/7.18.6_@babel+core@7.18.13: resolution: {integrity: sha512-cumfXOF0+nzZrrN8Rf0t7M+tF6sZc7vhQwYQck9q1/5w2OExlD+b4v4RpMJFaV1Z7WcDRgO6FqvxqxGlwo+RHQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 - '@babel/helper-create-class-features-plugin': 7.18.9_@babel+core@7.18.10 + '@babel/core': 7.18.13 + '@babel/helper-create-class-features-plugin': 7.18.13_@babel+core@7.18.13 '@babel/helper-plugin-utils': 7.18.9 transitivePeerDependencies: - supports-color dev: true - /@babel/plugin-proposal-object-rest-spread/7.18.9_@babel+core@7.18.10: + /@babel/plugin-proposal-object-rest-spread/7.18.9_@babel+core@7.18.13: resolution: {integrity: sha512-kDDHQ5rflIeY5xl69CEqGEZ0KY369ehsCIEbTGb4siHG5BE9sga/T0r0OUwyZNLMmZE79E1kbsqAjwFCW4ds6Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/compat-data': 7.18.8 - '@babel/core': 7.18.10 - '@babel/helper-compilation-targets': 7.18.9_@babel+core@7.18.10 + '@babel/compat-data': 7.18.13 + '@babel/core': 7.18.13 + '@babel/helper-compilation-targets': 7.18.9_@babel+core@7.18.13 '@babel/helper-plugin-utils': 7.18.9 - '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.18.10 - '@babel/plugin-transform-parameters': 7.18.8_@babel+core@7.18.10 + '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.18.13 + '@babel/plugin-transform-parameters': 7.18.8_@babel+core@7.18.13 dev: true - /@babel/plugin-syntax-async-generators/7.8.4_@babel+core@7.18.10: + /@babel/plugin-syntax-async-generators/7.8.4_@babel+core@7.18.13: resolution: {integrity: sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-syntax-bigint/7.8.3_@babel+core@7.18.10: + /@babel/plugin-syntax-bigint/7.8.3_@babel+core@7.18.13: resolution: {integrity: sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-syntax-class-properties/7.12.13_@babel+core@7.18.10: + /@babel/plugin-syntax-class-properties/7.12.13_@babel+core@7.18.13: resolution: {integrity: sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-syntax-flow/7.18.6_@babel+core@7.18.10: + /@babel/plugin-syntax-flow/7.18.6_@babel+core@7.18.13: resolution: {integrity: sha512-LUbR+KNTBWCUAqRG9ex5Gnzu2IOkt8jRJbHHXFT9q+L9zm7M/QQbEqXyw1n1pohYvOyWC8CjeyjrSaIwiYjK7A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.18.10: + /@babel/plugin-syntax-import-meta/7.10.4_@babel+core@7.18.13: resolution: {integrity: sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-syntax-json-strings/7.8.3_@babel+core@7.18.10: + /@babel/plugin-syntax-json-strings/7.8.3_@babel+core@7.18.13: resolution: {integrity: sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.18.10: + /@babel/plugin-syntax-jsx/7.18.6_@babel+core@7.18.13: resolution: {integrity: sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-syntax-logical-assignment-operators/7.10.4_@babel+core@7.18.10: + /@babel/plugin-syntax-logical-assignment-operators/7.10.4_@babel+core@7.18.13: resolution: {integrity: sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-syntax-nullish-coalescing-operator/7.8.3_@babel+core@7.18.10: + /@babel/plugin-syntax-nullish-coalescing-operator/7.8.3_@babel+core@7.18.13: resolution: {integrity: sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-syntax-numeric-separator/7.10.4_@babel+core@7.18.10: + /@babel/plugin-syntax-numeric-separator/7.10.4_@babel+core@7.18.13: resolution: {integrity: sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-syntax-object-rest-spread/7.8.3_@babel+core@7.18.10: + /@babel/plugin-syntax-object-rest-spread/7.8.3_@babel+core@7.18.13: resolution: {integrity: sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-syntax-optional-catch-binding/7.8.3_@babel+core@7.18.10: + /@babel/plugin-syntax-optional-catch-binding/7.8.3_@babel+core@7.18.13: resolution: {integrity: sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-syntax-optional-chaining/7.8.3_@babel+core@7.18.10: + /@babel/plugin-syntax-optional-chaining/7.8.3_@babel+core@7.18.13: resolution: {integrity: sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-syntax-top-level-await/7.14.5_@babel+core@7.18.10: + /@babel/plugin-syntax-top-level-await/7.14.5_@babel+core@7.18.13: resolution: {integrity: sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-syntax-typescript/7.18.6_@babel+core@7.18.10: + /@babel/plugin-syntax-typescript/7.18.6_@babel+core@7.18.13: resolution: {integrity: sha512-mAWAuq4rvOepWCBid55JuRNvpTNf2UGVgoz4JV0fXEKolsVZDzsa4NqCef758WZJj/GDu0gVGItjKFiClTAmZA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-transform-arrow-functions/7.18.6_@babel+core@7.18.10: + /@babel/plugin-transform-arrow-functions/7.18.6_@babel+core@7.18.13: resolution: {integrity: sha512-9S9X9RUefzrsHZmKMbDXxweEH+YlE8JJEuat9FdvW9Qh1cw7W64jELCtWNkPBPX5En45uy28KGvA/AySqUh8CQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-transform-block-scoped-functions/7.18.6_@babel+core@7.18.10: + /@babel/plugin-transform-block-scoped-functions/7.18.6_@babel+core@7.18.13: resolution: {integrity: sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-transform-block-scoping/7.18.9_@babel+core@7.18.10: + /@babel/plugin-transform-block-scoping/7.18.9_@babel+core@7.18.13: resolution: {integrity: sha512-5sDIJRV1KtQVEbt/EIBwGy4T01uYIo4KRB3VUqzkhrAIOGx7AoctL9+Ux88btY0zXdDyPJ9mW+bg+v+XEkGmtw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-transform-classes/7.18.9_@babel+core@7.18.10: + /@babel/plugin-transform-classes/7.18.9_@babel+core@7.18.13: resolution: {integrity: sha512-EkRQxsxoytpTlKJmSPYrsOMjCILacAjtSVkd4gChEe2kXjFCun3yohhW5I7plXJhCemM0gKsaGMcO8tinvCA5g==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-annotate-as-pure': 7.18.6 '@babel/helper-environment-visitor': 7.18.9 '@babel/helper-function-name': 7.18.9 @@ -1073,86 +1090,86 @@ packages: - supports-color dev: true - /@babel/plugin-transform-computed-properties/7.18.9_@babel+core@7.18.10: + /@babel/plugin-transform-computed-properties/7.18.9_@babel+core@7.18.13: resolution: {integrity: sha512-+i0ZU1bCDymKakLxn5srGHrsAPRELC2WIbzwjLhHW9SIE1cPYkLCL0NlnXMZaM1vhfgA2+M7hySk42VBvrkBRw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-transform-destructuring/7.18.9_@babel+core@7.18.10: - resolution: {integrity: sha512-p5VCYNddPLkZTq4XymQIaIfZNJwT9YsjkPOhkVEqt6QIpQFZVM9IltqqYpOEkJoN1DPznmxUDyZ5CTZs/ZCuHA==} + /@babel/plugin-transform-destructuring/7.18.13_@babel+core@7.18.13: + resolution: {integrity: sha512-TodpQ29XekIsex2A+YJPj5ax2plkGa8YYY6mFjCohk/IG9IY42Rtuj1FuDeemfg2ipxIFLzPeA83SIBnlhSIow==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-transform-flow-strip-types/7.18.9_@babel+core@7.18.10: + /@babel/plugin-transform-flow-strip-types/7.18.9_@babel+core@7.18.13: resolution: {integrity: sha512-+G6rp2zRuOAInY5wcggsx4+QVao1qPM0osC9fTUVlAV3zOrzTCnrMAFVnR6+a3T8wz1wFIH7KhYMcMB3u1n80A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 - '@babel/plugin-syntax-flow': 7.18.6_@babel+core@7.18.10 + '@babel/plugin-syntax-flow': 7.18.6_@babel+core@7.18.13 dev: true - /@babel/plugin-transform-for-of/7.18.8_@babel+core@7.18.10: + /@babel/plugin-transform-for-of/7.18.8_@babel+core@7.18.13: resolution: {integrity: sha512-yEfTRnjuskWYo0k1mHUqrVWaZwrdq8AYbfrpqULOJOaucGSp4mNMVps+YtA8byoevxS/urwU75vyhQIxcCgiBQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-transform-function-name/7.18.9_@babel+core@7.18.10: + /@babel/plugin-transform-function-name/7.18.9_@babel+core@7.18.13: resolution: {integrity: sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 - '@babel/helper-compilation-targets': 7.18.9_@babel+core@7.18.10 + '@babel/core': 7.18.13 + '@babel/helper-compilation-targets': 7.18.9_@babel+core@7.18.13 '@babel/helper-function-name': 7.18.9 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-transform-literals/7.18.9_@babel+core@7.18.10: + /@babel/plugin-transform-literals/7.18.9_@babel+core@7.18.13: resolution: {integrity: sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-transform-member-expression-literals/7.18.6_@babel+core@7.18.10: + /@babel/plugin-transform-member-expression-literals/7.18.6_@babel+core@7.18.13: resolution: {integrity: sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-transform-modules-commonjs/7.18.6_@babel+core@7.18.10: + /@babel/plugin-transform-modules-commonjs/7.18.6_@babel+core@7.18.13: resolution: {integrity: sha512-Qfv2ZOWikpvmedXQJDSbxNqy7Xr/j2Y8/KfijM0iJyKkBTmWuvCA1yeH1yDM7NJhBW/2aXxeucLj6i80/LAJ/Q==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-module-transforms': 7.18.9 '@babel/helper-plugin-utils': 7.18.9 '@babel/helper-simple-access': 7.18.6 @@ -1161,91 +1178,91 @@ packages: - supports-color dev: true - /@babel/plugin-transform-object-super/7.18.6_@babel+core@7.18.10: + /@babel/plugin-transform-object-super/7.18.6_@babel+core@7.18.13: resolution: {integrity: sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 '@babel/helper-replace-supers': 7.18.9 transitivePeerDependencies: - supports-color dev: true - /@babel/plugin-transform-parameters/7.18.8_@babel+core@7.18.10: + /@babel/plugin-transform-parameters/7.18.8_@babel+core@7.18.13: resolution: {integrity: sha512-ivfbE3X2Ss+Fj8nnXvKJS6sjRG4gzwPMsP+taZC+ZzEGjAYlvENixmt1sZ5Ca6tWls+BlKSGKPJ6OOXvXCbkFg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-transform-property-literals/7.18.6_@babel+core@7.18.10: + /@babel/plugin-transform-property-literals/7.18.6_@babel+core@7.18.13: resolution: {integrity: sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-transform-react-display-name/7.18.6_@babel+core@7.18.10: + /@babel/plugin-transform-react-display-name/7.18.6_@babel+core@7.18.13: resolution: {integrity: sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-transform-react-jsx/7.18.10_@babel+core@7.18.10: + /@babel/plugin-transform-react-jsx/7.18.10_@babel+core@7.18.13: resolution: {integrity: sha512-gCy7Iikrpu3IZjYZolFE4M1Sm+nrh1/6za2Ewj77Z+XirT4TsbJcvOFOyF+fRPwU6AKKK136CZxx6L8AbSFG6A==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-annotate-as-pure': 7.18.6 '@babel/helper-module-imports': 7.18.6 '@babel/helper-plugin-utils': 7.18.9 - '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.18.10 - '@babel/types': 7.18.10 + '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.18.13 + '@babel/types': 7.18.13 dev: true - /@babel/plugin-transform-shorthand-properties/7.18.6_@babel+core@7.18.10: + /@babel/plugin-transform-shorthand-properties/7.18.6_@babel+core@7.18.13: resolution: {integrity: sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true - /@babel/plugin-transform-spread/7.18.9_@babel+core@7.18.10: + /@babel/plugin-transform-spread/7.18.9_@babel+core@7.18.13: resolution: {integrity: sha512-39Q814wyoOPtIB/qGopNIL9xDChOE1pNU0ZY5dO0owhiVt/5kFm4li+/bBtwc7QotG0u5EPzqhZdjMtmqBqyQA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 '@babel/helper-skip-transparent-expression-wrappers': 7.18.9 dev: true - /@babel/plugin-transform-template-literals/7.18.9_@babel+core@7.18.10: + /@babel/plugin-transform-template-literals/7.18.9_@babel+core@7.18.13: resolution: {integrity: sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0-0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@babel/helper-plugin-utils': 7.18.9 dev: true @@ -1253,7 +1270,7 @@ packages: resolution: {integrity: sha512-qZEWeccZCrHA2Au4/X05QW5CMdm4VjUDCrGq5gf1ZDcM4hRqreKrtwAn7yci9zfgAS9apvnsFXiGBHBAxZdK9A==} engines: {node: '>=6.9.0'} dependencies: - core-js-pure: 3.24.1 + core-js-pure: 3.25.0 regenerator-runtime: 0.13.9 dev: true @@ -1269,30 +1286,30 @@ packages: engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.18.6 - '@babel/parser': 7.18.11 - '@babel/types': 7.18.10 + '@babel/parser': 7.18.13 + '@babel/types': 7.18.13 dev: true - /@babel/traverse/7.18.11: - resolution: {integrity: sha512-TG9PiM2R/cWCAy6BPJKeHzNbu4lPzOSZpeMfeNErskGpTJx6trEvFaVCbDvpcxwy49BKWmEPwiW8mrysNiDvIQ==} + /@babel/traverse/7.18.13: + resolution: {integrity: sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.18.6 - '@babel/generator': 7.18.12 + '@babel/generator': 7.18.13 '@babel/helper-environment-visitor': 7.18.9 '@babel/helper-function-name': 7.18.9 '@babel/helper-hoist-variables': 7.18.6 '@babel/helper-split-export-declaration': 7.18.6 - '@babel/parser': 7.18.11 - '@babel/types': 7.18.10 + '@babel/parser': 7.18.13 + '@babel/types': 7.18.13 debug: 4.3.4 globals: 11.12.0 transitivePeerDependencies: - supports-color dev: true - /@babel/types/7.18.10: - resolution: {integrity: sha512-MJvnbEiiNkpjo+LknnmRrqbY1GPUUggjv+wQVjetM/AONoupqRALB7I6jGqNUAZsKcRIEu2J6FRFvsczljjsaQ==} + /@babel/types/7.18.13: + resolution: {integrity: sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/helper-string-parser': 7.18.10 @@ -1304,8 +1321,8 @@ packages: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} dev: true - /@changesets/apply-release-plan/6.0.4: - resolution: {integrity: sha512-PutV/ymf8cZMqvaLe/Lh5cP3kBQ9FZl6oGQ3qRDxWD1ML+/uH3jrCE7S7Zw7IVSXkD0lnMD+1dAX7fsOJ6ZvgA==} + /@changesets/apply-release-plan/6.1.0: + resolution: {integrity: sha512-fMNBUAEc013qaA4KUVjdwgYMmKrf5Mlgf6o+f97MJVNzVnikwpWY47Lc3YR1jhC874Fonn5MkjkWK9DAZsdQ5g==} dependencies: '@babel/runtime': 7.18.9 '@changesets/config': 2.1.1 @@ -1317,13 +1334,13 @@ packages: fs-extra: 7.0.1 lodash.startcase: 4.4.0 outdent: 0.5.0 - prettier: 1.19.1 + prettier: 2.7.1 resolve-from: 5.0.0 semver: 5.7.1 dev: true - /@changesets/assemble-release-plan/5.2.0: - resolution: {integrity: sha512-ewY24PEbSec2eKX0+KM7eyENA2hUUp6s4LF9p/iBxTtc+TX2Xbx5rZnlLKZkc8tpuQ3PZbyjLFXWhd1PP6SjCg==} + /@changesets/assemble-release-plan/5.2.1: + resolution: {integrity: sha512-d6ckasOWlKF9Mzs82jhl6TKSCgVvfLoUK1ERySrTg2TQJdrVUteZue6uEIYUTA7SgMu67UOSwol6R9yj1nTdjw==} dependencies: '@babel/runtime': 7.18.9 '@changesets/errors': 0.1.4 @@ -1349,24 +1366,24 @@ packages: - encoding dev: true - /@changesets/cli/2.24.2: - resolution: {integrity: sha512-Bya7bnxF8Sz+O25M6kseAludVsCy5nXSW9u2Lbje/XbJTyU5q/xwIiXF9aTUzVi/4jyKoKoOasx7B1/z+NJLzg==} + /@changesets/cli/2.24.4: + resolution: {integrity: sha512-87JSwMv38zS3QW3062jXZYLsCNRtA08wa7vt3VnMmkGLfUMn2TTSfD+eSGVnKPJ/ycDCvAcCDnrv/B+gSX5KVA==} hasBin: true dependencies: '@babel/runtime': 7.18.9 - '@changesets/apply-release-plan': 6.0.4 - '@changesets/assemble-release-plan': 5.2.0 + '@changesets/apply-release-plan': 6.1.0 + '@changesets/assemble-release-plan': 5.2.1 '@changesets/changelog-git': 0.1.12 '@changesets/config': 2.1.1 '@changesets/errors': 0.1.4 '@changesets/get-dependents-graph': 1.3.3 - '@changesets/get-release-plan': 3.0.13 + '@changesets/get-release-plan': 3.0.14 '@changesets/git': 1.4.1 '@changesets/logger': 0.0.5 '@changesets/pre': 1.0.12 '@changesets/read': 0.5.7 '@changesets/types': 5.1.0 - '@changesets/write': 0.1.9 + '@changesets/write': 0.2.0 '@manypkg/get-packages': 1.1.3 '@types/is-ci': 3.0.0 '@types/semver': 6.2.3 @@ -1425,11 +1442,11 @@ packages: - encoding dev: true - /@changesets/get-release-plan/3.0.13: - resolution: {integrity: sha512-Zl/UN4FUzb5LwmzhO2STRijJT5nQCN4syPEs0p1HSIR+O2iVOzes+2yTLF2zGiOx8qPOsFx/GRSAvuhSzm+9ig==} + /@changesets/get-release-plan/3.0.14: + resolution: {integrity: sha512-xzSfeyIOvUnbqMuQXVKTYUizreWQfICwoQpvEHoePVbERLocc1tPo5lzR7dmVCFcaA/DcnbP6mxyioeq+JuzSg==} dependencies: '@babel/runtime': 7.18.9 - '@changesets/assemble-release-plan': 5.2.0 + '@changesets/assemble-release-plan': 5.2.1 '@changesets/config': 2.1.1 '@changesets/pre': 1.0.12 '@changesets/read': 0.5.7 @@ -1496,14 +1513,14 @@ packages: resolution: {integrity: sha512-uUByGATZCdaPkaO9JkBsgGDjEvHyY2Sb0e/J23+cwxBi5h0fxpLF/HObggO/Fw8T2nxK6zDfJbPsdQt5RwYFJA==} dev: true - /@changesets/write/0.1.9: - resolution: {integrity: sha512-E90ZrsrfJVOOQaP3Mm5Xd7uDwBAqq3z5paVEavTHKA8wxi7NAL8CmjgbGxSFuiP7ubnJA2BuHlrdE4z86voGOg==} + /@changesets/write/0.2.0: + resolution: {integrity: sha512-iKHqGYXZvneRzRfvEBpPqKfpGELOEOEP63MKdM/SdSRon40rsUijkTmsGCHT1ueLi3iJPZPmYuZJvjjKrMzumA==} dependencies: '@babel/runtime': 7.18.9 '@changesets/types': 5.1.0 fs-extra: 7.0.1 human-id: 1.0.2 - prettier: 1.19.1 + prettier: 2.7.1 dev: true /@cspotcode/source-map-support/0.8.1: @@ -1531,13 +1548,13 @@ packages: dev: true optional: true - /@eslint/eslintrc/1.3.0: - resolution: {integrity: sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw==} + /@eslint/eslintrc/1.3.1: + resolution: {integrity: sha512-OhSY22oQQdw3zgPOOwdoj01l/Dzl1Z+xyUP33tkSN+aqyEhymJCcPHyXt+ylW8FSe0TfRC2VG+ROQOapD0aZSQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: ajv: 6.12.6 debug: 4.3.4 - espree: 9.3.3 + espree: 9.4.0 globals: 13.17.0 ignore: 5.2.0 import-fresh: 3.3.0 @@ -1548,184 +1565,185 @@ packages: - supports-color dev: true - /@ethersproject/abi/5.6.4: - resolution: {integrity: sha512-TTeZUlCeIHG6527/2goZA6gW5F8Emoc7MrZDC7hhP84aRGvW3TEdTnZR08Ls88YXM1m2SuK42Osw/jSi3uO8gg==} + /@ethersproject/abi/5.7.0: + resolution: {integrity: sha512-351ktp42TiRcYB3H1OP8yajPeAQstMW/yCFokj/AthP9bLHzQFPlOrxOcwYEDkUAICmOHljvN4K39OMTMUa9RA==} dependencies: - '@ethersproject/address': 5.6.1 - '@ethersproject/bignumber': 5.6.2 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/constants': 5.6.1 - '@ethersproject/hash': 5.6.1 - '@ethersproject/keccak256': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/properties': 5.6.0 - '@ethersproject/strings': 5.6.1 + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 - /@ethersproject/abstract-provider/5.6.1: - resolution: {integrity: sha512-BxlIgogYJtp1FS8Muvj8YfdClk3unZH0vRMVX791Z9INBNT/kuACZ9GzaY1Y4yFq+YSy6/w4gzj3HCRKrK9hsQ==} + /@ethersproject/abstract-provider/5.7.0: + resolution: {integrity: sha512-R41c9UkchKCpAqStMYUpdunjo3pkEvZC3FAwZn5S5MGbXoMQOHIdHItezTETxAO5bevtMApSyEhn9+CHcDsWBw==} dependencies: - '@ethersproject/bignumber': 5.6.2 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/networks': 5.6.4 - '@ethersproject/properties': 5.6.0 - '@ethersproject/transactions': 5.6.2 - '@ethersproject/web': 5.6.1 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/networks': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/web': 5.7.0 - /@ethersproject/abstract-signer/5.6.2: - resolution: {integrity: sha512-n1r6lttFBG0t2vNiI3HoWaS/KdOt8xyDjzlP2cuevlWLG6EX0OwcKLyG/Kp/cuwNxdy/ous+R/DEMdTUwWQIjQ==} + /@ethersproject/abstract-signer/5.7.0: + resolution: {integrity: sha512-a16V8bq1/Cz+TGCkE2OPMTOUDLS3grCpdjoJCYNnVBbdYEMSgKrU0+B90s8b6H+ByYTBZN7a3g76jdIJi7UfKQ==} dependencies: - '@ethersproject/abstract-provider': 5.6.1 - '@ethersproject/bignumber': 5.6.2 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/properties': 5.6.0 + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 - /@ethersproject/address/5.6.1: - resolution: {integrity: sha512-uOgF0kS5MJv9ZvCz7x6T2EXJSzotiybApn4XlOgoTX0xdtyVIJ7pF+6cGPxiEq/dpBiTfMiw7Yc81JcwhSYA0Q==} + /@ethersproject/address/5.7.0: + resolution: {integrity: sha512-9wYhYt7aghVGo758POM5nqcOMaE168Q6aRLJZwUmiqSrAungkG74gSSeKEIR7ukixesdRZGPgVqme6vmxs1fkA==} dependencies: - '@ethersproject/bignumber': 5.6.2 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/keccak256': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/rlp': 5.6.1 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/rlp': 5.7.0 - /@ethersproject/base64/5.6.1: - resolution: {integrity: sha512-qB76rjop6a0RIYYMiB4Eh/8n+Hxu2NIZm8S/Q7kNo5pmZfXhHGHmS4MinUainiBC54SCyRnwzL+KZjj8zbsSsw==} + /@ethersproject/base64/5.7.0: + resolution: {integrity: sha512-Dr8tcHt2mEbsZr/mwTPIQAf3Ai0Bks/7gTw9dSqk1mQvhW3XvRlmDJr/4n+wg1JmCl16NZue17CDh8xb/vZ0sQ==} dependencies: - '@ethersproject/bytes': 5.6.1 + '@ethersproject/bytes': 5.7.0 - /@ethersproject/basex/5.6.1: - resolution: {integrity: sha512-a52MkVz4vuBXR06nvflPMotld1FJWSj2QT0985v7P/emPZO00PucFAkbcmq2vpVU7Ts7umKiSI6SppiLykVWsA==} + /@ethersproject/basex/5.7.0: + resolution: {integrity: sha512-ywlh43GwZLv2Voc2gQVTKBoVQ1mti3d8HK5aMxsfu/nRDnMmNqaSJ3r3n85HBByT8OpoY96SXM1FogC533T4zw==} dependencies: - '@ethersproject/bytes': 5.6.1 - '@ethersproject/properties': 5.6.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/properties': 5.7.0 - /@ethersproject/bignumber/5.6.2: - resolution: {integrity: sha512-v7+EEUbhGqT3XJ9LMPsKvXYHFc8eHxTowFCG/HgJErmq4XHJ2WR7aeyICg3uTOAQ7Icn0GFHAohXEhxQHq4Ubw==} + /@ethersproject/bignumber/5.7.0: + resolution: {integrity: sha512-n1CAdIHRWjSucQO3MC1zPSVgV/6dy/fjL9pMrPP9peL+QxEg9wOsVqwD4+818B6LUEtaXzVHQiuivzRoxPxUGw==} dependencies: - '@ethersproject/bytes': 5.6.1 - '@ethersproject/logger': 5.6.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 bn.js: 5.2.1 - /@ethersproject/bytes/5.6.1: - resolution: {integrity: sha512-NwQt7cKn5+ZE4uDn+X5RAXLp46E1chXoaMmrxAyA0rblpxz8t58lVkrHXoRIn0lz1joQElQ8410GqhTqMOwc6g==} - dependencies: - '@ethersproject/logger': 5.6.0 - - /@ethersproject/constants/5.6.1: - resolution: {integrity: sha512-QSq9WVnZbxXYFftrjSjZDUshp6/eKp6qrtdBtUCm0QxCV5z1fG/w3kdlcsjMCQuQHUnAclKoK7XpXMezhRDOLg==} - dependencies: - '@ethersproject/bignumber': 5.6.2 - - /@ethersproject/contracts/5.6.2: - resolution: {integrity: sha512-hguUA57BIKi6WY0kHvZp6PwPlWF87MCeB4B7Z7AbUpTxfFXFdn/3b0GmjZPagIHS+3yhcBJDnuEfU4Xz+Ks/8g==} - dependencies: - '@ethersproject/abi': 5.6.4 - '@ethersproject/abstract-provider': 5.6.1 - '@ethersproject/abstract-signer': 5.6.2 - '@ethersproject/address': 5.6.1 - '@ethersproject/bignumber': 5.6.2 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/constants': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/properties': 5.6.0 - '@ethersproject/transactions': 5.6.2 - dev: true - - /@ethersproject/hash/5.6.1: - resolution: {integrity: sha512-L1xAHurbaxG8VVul4ankNX5HgQ8PNCTrnVXEiFnE9xoRnaUcgfD12tZINtDinSllxPLCtGwguQxJ5E6keE84pA==} - dependencies: - '@ethersproject/abstract-signer': 5.6.2 - '@ethersproject/address': 5.6.1 - '@ethersproject/bignumber': 5.6.2 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/keccak256': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/properties': 5.6.0 - '@ethersproject/strings': 5.6.1 - - /@ethersproject/hdnode/5.6.2: - resolution: {integrity: sha512-tERxW8Ccf9CxW2db3WsN01Qao3wFeRsfYY9TCuhmG0xNpl2IO8wgXU3HtWIZ49gUWPggRy4Yg5axU0ACaEKf1Q==} - dependencies: - '@ethersproject/abstract-signer': 5.6.2 - '@ethersproject/basex': 5.6.1 - '@ethersproject/bignumber': 5.6.2 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/pbkdf2': 5.6.1 - '@ethersproject/properties': 5.6.0 - '@ethersproject/sha2': 5.6.1 - '@ethersproject/signing-key': 5.6.2 - '@ethersproject/strings': 5.6.1 - '@ethersproject/transactions': 5.6.2 - '@ethersproject/wordlists': 5.6.1 - dev: true - - /@ethersproject/json-wallets/5.6.1: - resolution: {integrity: sha512-KfyJ6Zwz3kGeX25nLihPwZYlDqamO6pfGKNnVMWWfEVVp42lTfCZVXXy5Ie8IZTN0HKwAngpIPi7gk4IJzgmqQ==} - dependencies: - '@ethersproject/abstract-signer': 5.6.2 - '@ethersproject/address': 5.6.1 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/hdnode': 5.6.2 - '@ethersproject/keccak256': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/pbkdf2': 5.6.1 - '@ethersproject/properties': 5.6.0 - '@ethersproject/random': 5.6.1 - '@ethersproject/strings': 5.6.1 - '@ethersproject/transactions': 5.6.2 + /@ethersproject/bytes/5.7.0: + resolution: {integrity: sha512-nsbxwgFXWh9NyYWo+U8atvmMsSdKJprTcICAkvbBffT75qDocbuggBU0SJiVK2MuTrp0q+xvLkTnGMPK1+uA9A==} + dependencies: + '@ethersproject/logger': 5.7.0 + + /@ethersproject/constants/5.7.0: + resolution: {integrity: sha512-DHI+y5dBNvkpYUMiRQyxRBYBefZkJfo70VUkUAsRjcPs47muV9evftfZ0PJVCXYbAiCgght0DtcF9srFQmIgWA==} + dependencies: + '@ethersproject/bignumber': 5.7.0 + + /@ethersproject/contracts/5.7.0: + resolution: {integrity: sha512-5GJbzEU3X+d33CdfPhcyS+z8MzsTrBGk/sc+G+59+tPa9yFkl6HQ9D6L0QMgNTA9q8dT0XKxxkyp883XsQvbbg==} + dependencies: + '@ethersproject/abi': 5.7.0 + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/transactions': 5.7.0 + dev: true + + /@ethersproject/hash/5.7.0: + resolution: {integrity: sha512-qX5WrQfnah1EFnO5zJv1v46a8HW0+E5xuBBDTwMFZLuVTx0tbU2kkx15NqdjxecrLGatQN9FGQKpb1FKdHCt+g==} + dependencies: + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/base64': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + + /@ethersproject/hdnode/5.7.0: + resolution: {integrity: sha512-OmyYo9EENBPPf4ERhR7oj6uAtUAhYGqOnIS+jE5pTXvdKBS99ikzq1E7Iv0ZQZ5V36Lqx1qZLeak0Ra16qpeOg==} + dependencies: + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/basex': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/pbkdf2': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/sha2': 5.7.0 + '@ethersproject/signing-key': 5.7.0 + '@ethersproject/strings': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/wordlists': 5.7.0 + dev: true + + /@ethersproject/json-wallets/5.7.0: + resolution: {integrity: sha512-8oee5Xgu6+RKgJTkvEMl2wDgSPSAQ9MB/3JYjFV9jlKvcYHUXZC+cQp0njgmxdHkYWn8s6/IqIZYm0YWCjO/0g==} + dependencies: + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/hdnode': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/pbkdf2': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/random': 5.7.0 + '@ethersproject/strings': 5.7.0 + '@ethersproject/transactions': 5.7.0 aes-js: 3.0.0 scrypt-js: 3.0.1 dev: true - /@ethersproject/keccak256/5.6.1: - resolution: {integrity: sha512-bB7DQHCTRDooZZdL3lk9wpL0+XuG3XLGHLh3cePnybsO3V0rdCAOQGpn/0R3aODmnTOOkCATJiD2hnL+5bwthA==} + /@ethersproject/keccak256/5.7.0: + resolution: {integrity: sha512-2UcPboeL/iW+pSg6vZ6ydF8tCnv3Iu/8tUmLLzWWGzxWKFFqOBQFLo6uLUv6BDrLgCDfN28RJ/wtByx+jZ4KBg==} dependencies: - '@ethersproject/bytes': 5.6.1 + '@ethersproject/bytes': 5.7.0 js-sha3: 0.8.0 - /@ethersproject/logger/5.6.0: - resolution: {integrity: sha512-BiBWllUROH9w+P21RzoxJKzqoqpkyM1pRnEKG69bulE9TSQD8SAIvTQqIMZmmCO8pUNkgLP1wndX1gKghSpBmg==} - - /@ethersproject/networks/5.6.4: - resolution: {integrity: sha512-KShHeHPahHI2UlWdtDMn2lJETcbtaJge4k7XSjDR9h79QTd6yQJmv6Cp2ZA4JdqWnhszAOLSuJEd9C0PRw7hSQ==} - dependencies: - '@ethersproject/logger': 5.6.0 - - /@ethersproject/pbkdf2/5.6.1: - resolution: {integrity: sha512-k4gRQ+D93zDRPNUfmduNKq065uadC2YjMP/CqwwX5qG6R05f47boq6pLZtV/RnC4NZAYOPH1Cyo54q0c9sshRQ==} - dependencies: - '@ethersproject/bytes': 5.6.1 - '@ethersproject/sha2': 5.6.1 - - /@ethersproject/properties/5.6.0: - resolution: {integrity: sha512-szoOkHskajKePTJSZ46uHUWWkbv7TzP2ypdEK6jGMqJaEt2sb0jCgfBo0gH0m2HBpRixMuJ6TBRaQCF7a9DoCg==} - dependencies: - '@ethersproject/logger': 5.6.0 - - /@ethersproject/providers/5.6.8: - resolution: {integrity: sha512-Wf+CseT/iOJjrGtAOf3ck9zS7AgPmr2fZ3N97r4+YXN3mBePTG2/bJ8DApl9mVwYL+RpYbNxMEkEp4mPGdwG/w==} - dependencies: - '@ethersproject/abstract-provider': 5.6.1 - '@ethersproject/abstract-signer': 5.6.2 - '@ethersproject/address': 5.6.1 - '@ethersproject/base64': 5.6.1 - '@ethersproject/basex': 5.6.1 - '@ethersproject/bignumber': 5.6.2 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/constants': 5.6.1 - '@ethersproject/hash': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/networks': 5.6.4 - '@ethersproject/properties': 5.6.0 - '@ethersproject/random': 5.6.1 - '@ethersproject/rlp': 5.6.1 - '@ethersproject/sha2': 5.6.1 - '@ethersproject/strings': 5.6.1 - '@ethersproject/transactions': 5.6.2 - '@ethersproject/web': 5.6.1 + /@ethersproject/logger/5.7.0: + resolution: {integrity: sha512-0odtFdXu/XHtjQXJYA3u9G0G8btm0ND5Cu8M7i5vhEcE8/HmF4Lbdqanwyv4uQTr2tx6b7fQRmgLrsnpQlmnig==} + + /@ethersproject/networks/5.7.0: + resolution: {integrity: sha512-MG6oHSQHd4ebvJrleEQQ4HhVu8Ichr0RDYEfHzsVAVjHNM+w36x9wp9r+hf1JstMXtseXDtkiVoARAG6M959AA==} + dependencies: + '@ethersproject/logger': 5.7.0 + + /@ethersproject/pbkdf2/5.7.0: + resolution: {integrity: sha512-oR/dBRZR6GTyaofd86DehG72hY6NpAjhabkhxgr3X2FpJtJuodEl2auADWBZfhDHgVCbu3/H/Ocq2uC6dpNjjw==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/sha2': 5.7.0 + + /@ethersproject/properties/5.7.0: + resolution: {integrity: sha512-J87jy8suntrAkIZtecpxEPxY//szqr1mlBaYlQ0r4RCaiD2hjheqF9s1LVE8vVuJCXisjIP+JgtK/Do54ej4Sw==} + dependencies: + '@ethersproject/logger': 5.7.0 + + /@ethersproject/providers/5.7.0: + resolution: {integrity: sha512-+TTrrINMzZ0aXtlwO/95uhAggKm4USLm1PbeCBR/3XZ7+Oey+3pMyddzZEyRhizHpy1HXV0FRWRMI1O3EGYibA==} + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/base64': 5.7.0 + '@ethersproject/basex': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/networks': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/random': 5.7.0 + '@ethersproject/rlp': 5.7.0 + '@ethersproject/sha2': 5.7.0 + '@ethersproject/strings': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/web': 5.7.0 bech32: 1.1.4 ws: 7.4.6 transitivePeerDependencies: @@ -1733,141 +1751,142 @@ packages: - utf-8-validate dev: true - /@ethersproject/random/5.6.1: - resolution: {integrity: sha512-/wtPNHwbmng+5yi3fkipA8YBT59DdkGRoC2vWk09Dci/q5DlgnMkhIycjHlavrvrjJBkFjO/ueLyT+aUDfc4lA==} + /@ethersproject/random/5.7.0: + resolution: {integrity: sha512-19WjScqRA8IIeWclFme75VMXSBvi4e6InrUNuaR4s5pTF2qNhcGdCUwdxUVGtDDqC00sDLCO93jPQoDUH4HVmQ==} dependencies: - '@ethersproject/bytes': 5.6.1 - '@ethersproject/logger': 5.6.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 dev: true - /@ethersproject/rlp/5.6.1: - resolution: {integrity: sha512-uYjmcZx+DKlFUk7a5/W9aQVaoEC7+1MOBgNtvNg13+RnuUwT4F0zTovC0tmay5SmRslb29V1B7Y5KCri46WhuQ==} + /@ethersproject/rlp/5.7.0: + resolution: {integrity: sha512-rBxzX2vK8mVF7b0Tol44t5Tb8gomOHkj5guL+HhzQ1yBh/ydjGnpw6at+X6Iw0Kp3OzzzkcKp8N9r0W4kYSs9w==} dependencies: - '@ethersproject/bytes': 5.6.1 - '@ethersproject/logger': 5.6.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 - /@ethersproject/sha2/5.6.1: - resolution: {integrity: sha512-5K2GyqcW7G4Yo3uenHegbXRPDgARpWUiXc6RiF7b6i/HXUoWlb7uCARh7BAHg7/qT/Q5ydofNwiZcim9qpjB6g==} + /@ethersproject/sha2/5.7.0: + resolution: {integrity: sha512-gKlH42riwb3KYp0reLsFTokByAKoJdgFCwI+CCiX/k+Jm2mbNs6oOaCjYQSlI1+XBVejwH2KrmCbMAT/GnRDQw==} dependencies: - '@ethersproject/bytes': 5.6.1 - '@ethersproject/logger': 5.6.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 hash.js: 1.1.7 - /@ethersproject/signing-key/5.6.2: - resolution: {integrity: sha512-jVbu0RuP7EFpw82vHcL+GP35+KaNruVAZM90GxgQnGqB6crhBqW/ozBfFvdeImtmb4qPko0uxXjn8l9jpn0cwQ==} + /@ethersproject/signing-key/5.7.0: + resolution: {integrity: sha512-MZdy2nL3wO0u7gkB4nA/pEf8lu1TlFswPNmy8AiYkfKTdO6eXBJyUdmHO/ehm/htHw9K/qF8ujnTyUAD+Ry54Q==} dependencies: - '@ethersproject/bytes': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/properties': 5.6.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 bn.js: 5.2.1 elliptic: 6.5.4 hash.js: 1.1.7 - /@ethersproject/solidity/5.6.1: - resolution: {integrity: sha512-KWqVLkUUoLBfL1iwdzUVlkNqAUIFMpbbeH0rgCfKmJp0vFtY4AsaN91gHKo9ZZLkC4UOm3cI3BmMV4N53BOq4g==} - dependencies: - '@ethersproject/bignumber': 5.6.2 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/keccak256': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/sha2': 5.6.1 - '@ethersproject/strings': 5.6.1 - dev: true - - /@ethersproject/strings/5.6.1: - resolution: {integrity: sha512-2X1Lgk6Jyfg26MUnsHiT456U9ijxKUybz8IM1Vih+NJxYtXhmvKBcHOmvGqpFSVJ0nQ4ZCoIViR8XlRw1v/+Cw==} - dependencies: - '@ethersproject/bytes': 5.6.1 - '@ethersproject/constants': 5.6.1 - '@ethersproject/logger': 5.6.0 - - /@ethersproject/transactions/5.6.2: - resolution: {integrity: sha512-BuV63IRPHmJvthNkkt9G70Ullx6AcM+SDc+a8Aw/8Yew6YwT51TcBKEp1P4oOQ/bP25I18JJr7rcFRgFtU9B2Q==} - dependencies: - '@ethersproject/address': 5.6.1 - '@ethersproject/bignumber': 5.6.2 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/constants': 5.6.1 - '@ethersproject/keccak256': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/properties': 5.6.0 - '@ethersproject/rlp': 5.6.1 - '@ethersproject/signing-key': 5.6.2 - - /@ethersproject/units/5.6.1: - resolution: {integrity: sha512-rEfSEvMQ7obcx3KWD5EWWx77gqv54K6BKiZzKxkQJqtpriVsICrktIQmKl8ReNToPeIYPnFHpXvKpi068YFZXw==} - dependencies: - '@ethersproject/bignumber': 5.6.2 - '@ethersproject/constants': 5.6.1 - '@ethersproject/logger': 5.6.0 - dev: true - - /@ethersproject/wallet/5.6.2: - resolution: {integrity: sha512-lrgh0FDQPuOnHcF80Q3gHYsSUODp6aJLAdDmDV0xKCN/T7D99ta1jGVhulg3PY8wiXEngD0DfM0I2XKXlrqJfg==} - dependencies: - '@ethersproject/abstract-provider': 5.6.1 - '@ethersproject/abstract-signer': 5.6.2 - '@ethersproject/address': 5.6.1 - '@ethersproject/bignumber': 5.6.2 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/hash': 5.6.1 - '@ethersproject/hdnode': 5.6.2 - '@ethersproject/json-wallets': 5.6.1 - '@ethersproject/keccak256': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/properties': 5.6.0 - '@ethersproject/random': 5.6.1 - '@ethersproject/signing-key': 5.6.2 - '@ethersproject/transactions': 5.6.2 - '@ethersproject/wordlists': 5.6.1 - dev: true - - /@ethersproject/web/5.6.1: - resolution: {integrity: sha512-/vSyzaQlNXkO1WV+RneYKqCJwualcUdx/Z3gseVovZP0wIlOFcCE1hkRhKBH8ImKbGQbMl9EAAyJFrJu7V0aqA==} - dependencies: - '@ethersproject/base64': 5.6.1 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/properties': 5.6.0 - '@ethersproject/strings': 5.6.1 - - /@ethersproject/wordlists/5.6.1: - resolution: {integrity: sha512-wiPRgBpNbNwCQFoCr8bcWO8o5I810cqO6mkdtKfLKFlLxeCWcnzDi4Alu8iyNzlhYuS9npCwivMbRWF19dyblw==} - dependencies: - '@ethersproject/bytes': 5.6.1 - '@ethersproject/hash': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/properties': 5.6.0 - '@ethersproject/strings': 5.6.1 - dev: true - - /@graphql-codegen/cli/2.11.6_h5eoywvcjsa4emif44kddonyyu: - resolution: {integrity: sha512-0R2Bhgjt3XZTSdsn8MGGuJjDEN2z+KCo7920zLZz9boy6bQ0EyuxS9AUATePS9aC3djy2POAIPCHz8iHK68IlQ==} + /@ethersproject/solidity/5.7.0: + resolution: {integrity: sha512-HmabMd2Dt/raavyaGukF4XxizWKhKQ24DoLtdNbBmNKUOPqwjsKQSdV9GQtj9CBEea9DlzETlVER1gYeXXBGaA==} + dependencies: + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/sha2': 5.7.0 + '@ethersproject/strings': 5.7.0 + dev: true + + /@ethersproject/strings/5.7.0: + resolution: {integrity: sha512-/9nu+lj0YswRNSH0NXYqrh8775XNyEdUQAuf3f+SmOrnVewcJ5SBNAjF7lpgehKi4abvNNXyf+HX86czCdJ8Mg==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/logger': 5.7.0 + + /@ethersproject/transactions/5.7.0: + resolution: {integrity: sha512-kmcNicCp1lp8qanMTC3RIikGgoJ80ztTyvtsFvCYpSCfkjhD0jZ2LOrnbcuxuToLIUYYf+4XwD1rP+B/erDIhQ==} + dependencies: + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/rlp': 5.7.0 + '@ethersproject/signing-key': 5.7.0 + + /@ethersproject/units/5.7.0: + resolution: {integrity: sha512-pD3xLMy3SJu9kG5xDGI7+xhTEmGXlEqXU4OfNapmfnxLVY4EMSSRp7j1k7eezutBPH7RBN/7QPnwR7hzNlEFeg==} + dependencies: + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/logger': 5.7.0 + dev: true + + /@ethersproject/wallet/5.7.0: + resolution: {integrity: sha512-MhmXlJXEJFBFVKrDLB4ZdDzxcBxQ3rLyCkhNqVu3CDYvR97E+8r01UgrI+TI99Le+aYm/in/0vp86guJuM7FCA==} + dependencies: + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/hdnode': 5.7.0 + '@ethersproject/json-wallets': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/random': 5.7.0 + '@ethersproject/signing-key': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/wordlists': 5.7.0 + dev: true + + /@ethersproject/web/5.7.0: + resolution: {integrity: sha512-ApHcbbj+muRASVDSCl/tgxaH2LBkRMEYfLOLVa0COipx0+nlu0QKet7U2lEg0vdkh8XRSLf2nd1f1Uk9SrVSGA==} + dependencies: + '@ethersproject/base64': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + + /@ethersproject/wordlists/5.7.0: + resolution: {integrity: sha512-S2TFNJNfHWVHNE6cNDjbVlZ6MgE17MIxMbMg2zv3wn+3XSJGosL1m9ZVv3GXCf/2ymSsQ+hRI5IzoMJTG6aoVA==} + dependencies: + '@ethersproject/bytes': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/strings': 5.7.0 + dev: true + + /@graphql-codegen/cli/2.12.0_bd4dqfuh23qh62sufat7weqjza: + resolution: {integrity: sha512-esaMiiuypAtJNiZUhGdFmG0gTMEF5dYkqP/7I04egxSragwbIETU8gOl6/gHdLSAV5su7dgfIEZNdWmGCOWAbg==} hasBin: true peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: '@graphql-codegen/core': 2.6.2_graphql@15.8.0 - '@graphql-codegen/plugin-helpers': 2.6.2_graphql@15.8.0 - '@graphql-tools/apollo-engine-loader': 7.3.9_graphql@15.8.0 - '@graphql-tools/code-file-loader': 7.3.3_graphql@15.8.0 - '@graphql-tools/git-loader': 7.2.3_graphql@15.8.0 - '@graphql-tools/github-loader': 7.3.9_graphql@15.8.0 - '@graphql-tools/graphql-file-loader': 7.5.2_graphql@15.8.0 - '@graphql-tools/json-file-loader': 7.4.3_graphql@15.8.0 - '@graphql-tools/load': 7.7.4_graphql@15.8.0 - '@graphql-tools/prisma-loader': 7.2.13_graphql@15.8.0 - '@graphql-tools/url-loader': 7.13.8_graphql@15.8.0 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 - '@whatwg-node/fetch': 0.2.9 + '@graphql-codegen/plugin-helpers': 2.7.0_graphql@15.8.0 + '@graphql-tools/apollo-engine-loader': 7.3.10_graphql@15.8.0 + '@graphql-tools/code-file-loader': 7.3.4_graphql@15.8.0 + '@graphql-tools/git-loader': 7.2.4_graphql@15.8.0 + '@graphql-tools/github-loader': 7.3.10_graphql@15.8.0 + '@graphql-tools/graphql-file-loader': 7.5.3_graphql@15.8.0 + '@graphql-tools/json-file-loader': 7.4.4_graphql@15.8.0 + '@graphql-tools/load': 7.7.5_graphql@15.8.0 + '@graphql-tools/prisma-loader': 7.2.17_graphql@15.8.0 + '@graphql-tools/url-loader': 7.14.2_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 + '@whatwg-node/fetch': 0.3.2 ansi-escapes: 4.3.2 chalk: 4.1.2 chokidar: 3.5.3 cosmiconfig: 7.0.1 + cosmiconfig-typescript-loader: 4.0.0_ik4pmnyrg7v3d5wbp5mj6cxf4a debounce: 1.2.1 detect-indent: 6.1.0 graphql: 15.8.0 - graphql-config: 4.3.3_h5eoywvcjsa4emif44kddonyyu + graphql-config: 4.3.5_bd4dqfuh23qh62sufat7weqjza inquirer: 8.2.4 is-glob: 4.0.3 json-to-pretty-yaml: 1.2.2 @@ -1887,6 +1906,7 @@ packages: - encoding - enquirer - supports-color + - ts-node - typescript - utf-8-validate dev: true @@ -1896,19 +1916,19 @@ packages: peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - '@graphql-codegen/plugin-helpers': 2.6.2_graphql@15.8.0 - '@graphql-tools/schema': 9.0.1_graphql@15.8.0 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-codegen/plugin-helpers': 2.7.0_graphql@15.8.0 + '@graphql-tools/schema': 9.0.2_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 graphql: 15.8.0 tslib: 2.4.0 dev: true - /@graphql-codegen/plugin-helpers/2.6.2_graphql@15.8.0: - resolution: {integrity: sha512-bt5PNix0MwzWP53UdaYm6URrVMWU8RlQhrTSLFjxQ8ShS5zoTlQtpZJGZc5ONqFgKa83qbUmzXUtP8oRVVn8zw==} + /@graphql-codegen/plugin-helpers/2.7.0_graphql@15.8.0: + resolution: {integrity: sha512-+a2VP/4Ob0fwP8YLrQ/hhYlAA9UZUdDFNqwS543DmyiGFUkNIsa7TnTsE/mBDKJSMsCVWLw78949fCpzjyw/9Q==} peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 change-case-all: 1.0.14 common-tags: 1.8.2 graphql: 15.8.0 @@ -1922,20 +1942,20 @@ packages: peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - '@graphql-codegen/plugin-helpers': 2.6.2_graphql@15.8.0 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-codegen/plugin-helpers': 2.7.0_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 graphql: 15.8.0 tslib: 2.4.0 dev: true - /@graphql-codegen/typescript-graphql-request/4.5.3_hchyc3qeeqideu47zyo6nk2cfm: - resolution: {integrity: sha512-xlQnsuZl16fLFhUDhABSauQuJlhYtJtPc8O0fnRZdRRY1dmtjIhYKHtgg2djpIrHefSeMxkISwG9pgj0kV3RTA==} + /@graphql-codegen/typescript-graphql-request/4.5.4_hchyc3qeeqideu47zyo6nk2cfm: + resolution: {integrity: sha512-RaLtrufaRu1nWwx4FhJWqYsjyp4ZRv1sB0iTauoTxk9ImGiCulx++bLZGY+0UzzEh5m+unUW6ZFDZGUD5r+HZw==} peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 - graphql-request: ^3.4.0 || ^4.0.0 + graphql-request: ^3.4.0 || ^4.0.0 || ^5.0.0 graphql-tag: ^2.0.0 dependencies: - '@graphql-codegen/plugin-helpers': 2.6.2_graphql@15.8.0 + '@graphql-codegen/plugin-helpers': 2.7.0_graphql@15.8.0 '@graphql-codegen/visitor-plugin-common': 2.12.1_graphql@15.8.0 auto-bind: 4.0.0 graphql: 15.8.0 @@ -1952,7 +1972,7 @@ packages: peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - '@graphql-codegen/plugin-helpers': 2.6.2_graphql@15.8.0 + '@graphql-codegen/plugin-helpers': 2.7.0_graphql@15.8.0 '@graphql-codegen/typescript': 2.7.3_graphql@15.8.0 '@graphql-codegen/visitor-plugin-common': 2.12.1_graphql@15.8.0 auto-bind: 4.0.0 @@ -1968,7 +1988,7 @@ packages: peerDependencies: graphql: ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - '@graphql-codegen/plugin-helpers': 2.6.2_graphql@15.8.0 + '@graphql-codegen/plugin-helpers': 2.7.0_graphql@15.8.0 '@graphql-codegen/schema-ast': 2.5.1_graphql@15.8.0 '@graphql-codegen/visitor-plugin-common': 2.12.1_graphql@15.8.0 auto-bind: 4.0.0 @@ -1984,10 +2004,10 @@ packages: peerDependencies: graphql: ^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - '@graphql-codegen/plugin-helpers': 2.6.2_graphql@15.8.0 + '@graphql-codegen/plugin-helpers': 2.7.0_graphql@15.8.0 '@graphql-tools/optimize': 1.3.1_graphql@15.8.0 - '@graphql-tools/relay-operation-optimizer': 6.5.3_graphql@15.8.0 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-tools/relay-operation-optimizer': 6.5.4_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 auto-bind: 4.0.0 change-case-all: 1.0.14 dependency-graph: 0.11.0 @@ -2000,39 +2020,39 @@ packages: - supports-color dev: true - /@graphql-tools/apollo-engine-loader/7.3.9_graphql@15.8.0: - resolution: {integrity: sha512-BVO3rc9JCJpzvWy+SYyioR5GbXRkYRE6P5hSm1+N6I/E2aDan44mkTySF6RAbH7/7RMzgzE5vxJMm/m6hx4rvQ==} + /@graphql-tools/apollo-engine-loader/7.3.10_graphql@15.8.0: + resolution: {integrity: sha512-JqUqKBo/DsZA7QxaJIV3mho0j3xAcxG/InIvAn39zqfzUEt3DO4l1VEKwqqNLXgWstmhHaW6tY64EDE+txtFEg==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@ardatan/sync-fetch': 0.0.1 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 - '@whatwg-node/fetch': 0.2.9 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 + '@whatwg-node/fetch': 0.3.2 graphql: 15.8.0 tslib: 2.4.0 transitivePeerDependencies: - encoding dev: true - /@graphql-tools/batch-execute/8.5.3_graphql@15.8.0: - resolution: {integrity: sha512-dvP1bM02/NSDuAS5A6sLIUUJgs0fuMSk3Ib2jc3pL7HG7jzm/IXfvPURs48pJlMnxcawjVDC8fLh1oWfjmoAGg==} + /@graphql-tools/batch-execute/8.5.4_graphql@15.8.0: + resolution: {integrity: sha512-PzFRyCTVao2AGiXx971f3TWJQro7xhtSi3gDTWiMC8aOMiT/FEHcYpNymwc52JJ2ZN6EiiLV/e2acO4qHb64uw==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 dataloader: 2.1.0 graphql: 15.8.0 tslib: 2.4.0 value-or-promise: 1.0.11 dev: true - /@graphql-tools/code-file-loader/7.3.3_graphql@15.8.0: - resolution: {integrity: sha512-si4JFNLaM2hsTWUBLsLpf6t/dGy5Pen6F8348zc+Iao7Y8hgENBim11NxL61NbeJL5TD4v3E+tvf5CnAONZKaQ==} + /@graphql-tools/code-file-loader/7.3.4_graphql@15.8.0: + resolution: {integrity: sha512-t8AKQQPfThNv61PouxKmWVIbsdHh0Ek93stgKqLsG4S8fNfRKtUBYX0oqIWoikeccnHXExkDxwbLBBf9H+SLWA==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/graphql-tag-pluck': 7.3.3_graphql@15.8.0 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-tools/graphql-tag-pluck': 7.3.4_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 globby: 11.1.0 graphql: 15.8.0 tslib: 2.4.0 @@ -2041,27 +2061,27 @@ packages: - supports-color dev: true - /@graphql-tools/delegate/9.0.3_graphql@15.8.0: - resolution: {integrity: sha512-4noYCEL/0UeH+5KVRkkqLYH3iyXBb56hh120Y9DEc/JFmb1ldhgxGH2BuoINE2kt35dYhzRk9QA1+HG8FXIBWQ==} + /@graphql-tools/delegate/9.0.4_graphql@15.8.0: + resolution: {integrity: sha512-W58ZHBR7Rawxa/FqyezdcCyj21f15sid7IaAFon7PRIIaIFJMIZrodKeaclTd34skGguLvuloeYIny6vXNA3tg==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/batch-execute': 8.5.3_graphql@15.8.0 - '@graphql-tools/schema': 9.0.1_graphql@15.8.0 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-tools/batch-execute': 8.5.4_graphql@15.8.0 + '@graphql-tools/schema': 9.0.2_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 dataloader: 2.1.0 graphql: 15.8.0 tslib: 2.4.0 value-or-promise: 1.0.11 dev: true - /@graphql-tools/git-loader/7.2.3_graphql@15.8.0: - resolution: {integrity: sha512-uEx+iwWfatH9SGQ35BI9wZp7FPW5QCp9+SfXKdj5snnaTOlqOl/KepdZP9iL0xWiSUjLd5HebzfiuNCo9t2/HQ==} + /@graphql-tools/git-loader/7.2.4_graphql@15.8.0: + resolution: {integrity: sha512-2xdJh9eVGDfTuBnHwAJHJKFBZeP4k0WKYTydhA0ZMWGPkfWdig3iEmvf78rUwCS+7TcToANeHhR7y3rkVhNVPg==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/graphql-tag-pluck': 7.3.3_graphql@15.8.0 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-tools/graphql-tag-pluck': 7.3.4_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 graphql: 15.8.0 is-glob: 4.0.3 micromatch: 4.0.5 @@ -2071,15 +2091,15 @@ packages: - supports-color dev: true - /@graphql-tools/github-loader/7.3.9_graphql@15.8.0: - resolution: {integrity: sha512-L5C/D3JBtwnh8m8KE1iVWElI/oN+XMpYctR6S8oXO7VchdvUxkBBnTKTWq7wD9mYU6BTJLnRHoh+c6SZzxdWag==} + /@graphql-tools/github-loader/7.3.10_graphql@15.8.0: + resolution: {integrity: sha512-gtMzkRZwwg8HGNe5OPzVc6K6fF8oyf1y6m6SIdnj0d80qVdjXQOG/5answlb27zKc/rCDPv+KKnpXtbKXs4tHg==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@ardatan/sync-fetch': 0.0.1 - '@graphql-tools/graphql-tag-pluck': 7.3.3_graphql@15.8.0 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 - '@whatwg-node/fetch': 0.2.9 + '@graphql-tools/graphql-tag-pluck': 7.3.4_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 + '@whatwg-node/fetch': 0.3.2 graphql: 15.8.0 tslib: 2.4.0 transitivePeerDependencies: @@ -2087,75 +2107,75 @@ packages: - supports-color dev: true - /@graphql-tools/graphql-file-loader/7.5.2_graphql@15.8.0: - resolution: {integrity: sha512-4M5c5SRnxTURNwfq46dlEspWGk+nQpO2nF/p9kxaPiXG0iMAQ8suOd3jQk99LEefQpVhFNb5FumyvUnyW0BogA==} + /@graphql-tools/graphql-file-loader/7.5.3_graphql@15.8.0: + resolution: {integrity: sha512-KM2Rg5jWCYH91Vfc3L9bWk0uW7JDeC9+QUTaqY+yUQbjT3RckYOdjPdiLtNMgkJA8r432RM5/Ns/gO8QScOkmQ==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/import': 6.7.3_graphql@15.8.0 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-tools/import': 6.7.4_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 globby: 11.1.0 graphql: 15.8.0 tslib: 2.4.0 unixify: 1.0.0 dev: true - /@graphql-tools/graphql-tag-pluck/7.3.3_graphql@15.8.0: - resolution: {integrity: sha512-hU8/e8k2fdxK6gDUxnm7CDXmcyagpsMAxo7aNqY2Y4TzIZ0J1EeaM2Xi4wAqv7wRh3diR7TroGlsJ3zOCZx3Jw==} + /@graphql-tools/graphql-tag-pluck/7.3.4_graphql@15.8.0: + resolution: {integrity: sha512-vPCUuxUV+/vK2hDidzWvaqgGifQriwmDJUUlp5Js1CEIUKm3dFI4V1bCos2r25lQ6NbH9WSJt2cZTACnaH939g==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@babel/parser': 7.18.11 - '@babel/traverse': 7.18.11 - '@babel/types': 7.18.10 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@babel/parser': 7.18.13 + '@babel/traverse': 7.18.13 + '@babel/types': 7.18.13 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 graphql: 15.8.0 tslib: 2.4.0 transitivePeerDependencies: - supports-color dev: true - /@graphql-tools/import/6.7.3_graphql@15.8.0: - resolution: {integrity: sha512-7D/nDfwAj1TEkF+vAxm+hxgYNQW3h1kDz8JnYmvvY1Yv7OxZQQHDNd4tVg3BYVtW2kjsz3nzip46Z8ZQ9L7gHg==} + /@graphql-tools/import/6.7.4_graphql@15.8.0: + resolution: {integrity: sha512-fUlX+pVF2X6IiRFE9vUb8/Qiwm2WHadSN5i3YHjtFJ71nUyMeyfbcd6xYAHEpR1mwRCC+8US+JsMlo/KxT4TEA==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 graphql: 15.8.0 resolve-from: 5.0.0 tslib: 2.4.0 dev: true - /@graphql-tools/json-file-loader/7.4.3_graphql@15.8.0: - resolution: {integrity: sha512-YihARAoaGJnYakDAaUkdZ6GsvGcyZRdZK2qx9FWkqtpHt02FLCBpcjjLq/cpM0N6K0ecqzh/dYSVD7MthUFXQg==} + /@graphql-tools/json-file-loader/7.4.4_graphql@15.8.0: + resolution: {integrity: sha512-hQP3+S+59sJQXvP4FW0IUMAVWZtGhHcssoS44tn/fNGJgFeaeRSoDPi2om/NL3RhsgAaQYU8xbscGp2sOwIdFg==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 globby: 11.1.0 graphql: 15.8.0 tslib: 2.4.0 unixify: 1.0.0 dev: true - /@graphql-tools/load/7.7.4_graphql@15.8.0: - resolution: {integrity: sha512-2VtVWeMNizNTTc8Dv/hs0lrvGHaLko8jpBoP9TewFdBz6pAXPsLHYnNAhEfBYJd+Vk5GZbnWTfVColxhnF8NEQ==} + /@graphql-tools/load/7.7.5_graphql@15.8.0: + resolution: {integrity: sha512-7AnT87hNG37gE8677D9/1P6yaRLKCxi52Ipr1YFN3vSIIARA692nv5/k9PkksHVmJitbvjPu4BxvnVcDOMtMSw==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/schema': 9.0.1_graphql@15.8.0 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-tools/schema': 9.0.2_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 graphql: 15.8.0 p-limit: 3.1.0 tslib: 2.4.0 dev: true - /@graphql-tools/merge/8.3.3_graphql@15.8.0: - resolution: {integrity: sha512-EfULshN2s2s2mhBwbV9WpGnoehRLe7eIMdZrKfHhxlBWOvtNUd3KSCN0PUdAMd7lj1jXUW9KYdn624JrVn6qzg==} + /@graphql-tools/merge/8.3.4_graphql@15.8.0: + resolution: {integrity: sha512-2z1UpHvvI52nQZIYArU+rPq1lOENWetsdb+6vu8yLGyCRP4CpKMBvtmiHkbrlPBO8dItpZ08szXEoaStfJHBxQ==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 graphql: 15.8.0 tslib: 2.4.0 dev: true @@ -2169,19 +2189,19 @@ packages: tslib: 2.4.0 dev: true - /@graphql-tools/prisma-loader/7.2.13_graphql@15.8.0: - resolution: {integrity: sha512-fGMYGvhi8yCyKsbx2tgZujZJdqraCs6uOSXHhXESrAjY91UPTf8dQF8OTCtFX8EYgO+C7/2qYIiQlIVt4J8X0A==} + /@graphql-tools/prisma-loader/7.2.17_graphql@15.8.0: + resolution: {integrity: sha512-vdQOfWk0ZEg2VNw7c/rRut/BAWPUBgYs7dOElBHmXd/wF5YNOKX3SaOu2AyqTmpwJn+joy+u/sJiLwNqYXvdhA==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/url-loader': 7.13.8_graphql@15.8.0 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-tools/url-loader': 7.14.2_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 '@types/js-yaml': 4.0.5 '@types/json-stable-stringify': 1.0.34 - '@types/jsonwebtoken': 8.5.8 + '@types/jsonwebtoken': 8.5.9 chalk: 4.1.2 debug: 4.3.4 - dotenv: 16.0.1 + dotenv: 16.0.2 graphql: 15.8.0 graphql-request: 4.3.0_graphql@15.8.0 http-proxy-agent: 5.0.0 @@ -2202,13 +2222,13 @@ packages: - utf-8-validate dev: true - /@graphql-tools/relay-operation-optimizer/6.5.3_graphql@15.8.0: - resolution: {integrity: sha512-QXKZJvfGIVnYGvnWabVdKLgh+8X9YWQRMPK9OydiYUi6O4HvB5PMT5qkrYpshjeek3UsJztZsGXiRJbY9O4c9Q==} + /@graphql-tools/relay-operation-optimizer/6.5.4_graphql@15.8.0: + resolution: {integrity: sha512-1epuPdtz14233EjrWs4n2UQxoqRHhb6OKIltiJvNR1L/67ZtB02RxESV2PFGqGphdBUZHL7zKdBIUGIaF8sJ5g==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@ardatan/relay-compiler': 12.0.0_graphql@15.8.0 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 graphql: 15.8.0 tslib: 2.4.0 transitivePeerDependencies: @@ -2216,34 +2236,34 @@ packages: - supports-color dev: true - /@graphql-tools/schema/9.0.1_graphql@15.8.0: - resolution: {integrity: sha512-Y6apeiBmvXEz082IAuS/ainnEEQrzMECP1MRIV72eo2WPa6ZtLYPycvIbd56Z5uU2LKP4XcWRgK6WUbCyN16Rw==} + /@graphql-tools/schema/9.0.2_graphql@15.8.0: + resolution: {integrity: sha512-FnBM1PMKQ6y8KlzeFocnEwcGA/IT++z4v+hvvwwXL+IUYDNqmrp9XYNklpQRb/KKSbTtKnQapCWNiVNex7jl+Q==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/merge': 8.3.3_graphql@15.8.0 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-tools/merge': 8.3.4_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 graphql: 15.8.0 tslib: 2.4.0 value-or-promise: 1.0.11 dev: true - /@graphql-tools/url-loader/7.13.8_graphql@15.8.0: - resolution: {integrity: sha512-toJI7FyEDD4pVp4QVmek03r7NebQ5qGTmnlDHoz29WMNlwdQQMOYE2hWBqcwRqyGNJceApVpdW4GboDVoV/rfA==} + /@graphql-tools/url-loader/7.14.2_graphql@15.8.0: + resolution: {integrity: sha512-pcPkFDM7nfo/eWnFL0Qrf3dlCMdniTznI8JUuE3dxFOS4aU5lRNIcfQy4rGKAECN+Vx3OoLb34mRdBNo4jVe9g==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: '@ardatan/sync-fetch': 0.0.1 - '@graphql-tools/delegate': 9.0.3_graphql@15.8.0 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 - '@graphql-tools/wrap': 9.0.4_graphql@15.8.0 + '@graphql-tools/delegate': 9.0.4_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 + '@graphql-tools/wrap': 9.0.5_graphql@15.8.0 '@n1ru4l/graphql-live-query': 0.10.0_graphql@15.8.0 '@types/ws': 8.5.3 - '@whatwg-node/fetch': 0.2.9 + '@whatwg-node/fetch': 0.3.2 dset: 3.1.2 extract-files: 11.0.0 graphql: 15.8.0 - graphql-ws: 5.10.0_graphql@15.8.0 + graphql-ws: 5.10.1_graphql@15.8.0 isomorphic-ws: 5.0.0_ws@8.8.1 meros: 1.2.0 tslib: 2.4.0 @@ -2256,8 +2276,8 @@ packages: - utf-8-validate dev: true - /@graphql-tools/utils/8.10.0_graphql@15.8.0: - resolution: {integrity: sha512-yI+V373FdXQbYfqdarehn9vRWDZZYuvyQ/xwiv5ez2BbobHrqsexF7qs56plLRaQ8ESYpVAjMQvJWe9s23O0Jg==} + /@graphql-tools/utils/8.10.1_graphql@15.8.0: + resolution: {integrity: sha512-UYi/afPvxZ8mz0LjplMxOSmGDPenVS/Q0zJ/6LOyF9yZdJYIDe+J+Qr/I9+rCYQmgBW4BJeRUUc7VoUzZPfZDA==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: @@ -2265,14 +2285,14 @@ packages: tslib: 2.4.0 dev: true - /@graphql-tools/wrap/9.0.4_graphql@15.8.0: - resolution: {integrity: sha512-l1t/LmVBec54NhLCJHXi8dCAENotkeqje+2XT0dl3N0RCetO8Fq5PkxWo/59DVM7AgGvqifJLvD/bmpZLGS4Bw==} + /@graphql-tools/wrap/9.0.5_graphql@15.8.0: + resolution: {integrity: sha512-EkPBEHV4547Tjrbea6Oz/eCtTgJo8unNUB7BiYDPWb1XcRUg9wIgy7JgfKO3KR/NgVBsh2Zu1107zeYhAvOuQw==} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 dependencies: - '@graphql-tools/delegate': 9.0.3_graphql@15.8.0 - '@graphql-tools/schema': 9.0.1_graphql@15.8.0 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-tools/delegate': 9.0.4_graphql@15.8.0 + '@graphql-tools/schema': 9.0.2_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 graphql: 15.8.0 tslib: 2.4.0 value-or-promise: 1.0.11 @@ -2293,6 +2313,11 @@ packages: resolution: {integrity: sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==} dev: true + /@humanwhocodes/module-importer/1.0.1: + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + dev: true + /@humanwhocodes/object-schema/1.2.1: resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==} dev: true @@ -2322,7 +2347,7 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: '@jest/types': 28.1.3 - '@types/node': 14.18.23 + '@types/node': 14.18.26 chalk: 4.1.2 jest-message-util: 28.1.3 jest-util: 28.1.3 @@ -2343,14 +2368,14 @@ packages: '@jest/test-result': 28.1.3 '@jest/transform': 28.1.3 '@jest/types': 28.1.3 - '@types/node': 14.18.23 + '@types/node': 14.18.26 ansi-escapes: 4.3.2 chalk: 4.1.2 ci-info: 3.3.2 exit: 0.1.2 graceful-fs: 4.2.10 jest-changed-files: 28.1.3 - jest-config: 28.1.3_wgmt7g4zmeu462tnazkmqjm6zm + jest-config: 28.1.3_turmrmwfy2xxv6whdm4g3fcy3y jest-haste-map: 28.1.3 jest-message-util: 28.1.3 jest-regex-util: 28.0.2 @@ -2378,7 +2403,7 @@ packages: dependencies: '@jest/fake-timers': 28.1.3 '@jest/types': 28.1.3 - '@types/node': 14.18.23 + '@types/node': 14.18.26 jest-mock: 28.1.3 dev: true @@ -2405,7 +2430,7 @@ packages: dependencies: '@jest/types': 28.1.3 '@sinonjs/fake-timers': 9.1.2 - '@types/node': 14.18.23 + '@types/node': 14.18.26 jest-message-util: 28.1.3 jest-mock: 28.1.3 jest-util: 28.1.3 @@ -2437,7 +2462,7 @@ packages: '@jest/transform': 28.1.3 '@jest/types': 28.1.3 '@jridgewell/trace-mapping': 0.3.15 - '@types/node': 14.18.23 + '@types/node': 14.18.26 chalk: 4.1.2 collect-v8-coverage: 1.0.1 exit: 0.1.2 @@ -2464,7 +2489,7 @@ packages: resolution: {integrity: sha512-/l/VWsdt/aBXgjshLWOFyFt3IVdYypu5y2Wn2rOO1un6nkqIn8SLXzgIMYXFyYsRWDyF5EthmKJMIdJvk08grg==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: - '@sinclair/typebox': 0.24.27 + '@sinclair/typebox': 0.24.34 dev: true /@jest/source-map/28.1.2: @@ -2500,7 +2525,7 @@ packages: resolution: {integrity: sha512-u5dT5di+oFI6hfcLOHGTAfmUxFRrjK+vnaP0kkVow9Md/M7V/MxqQMOz/VV25UZO8pzeA9PjfTpOu6BDuwSPQA==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@jest/types': 28.1.3 '@jridgewell/trace-mapping': 0.3.15 babel-plugin-istanbul: 6.1.1 @@ -2514,7 +2539,7 @@ packages: micromatch: 4.0.5 pirates: 4.0.5 slash: 3.0.0 - write-file-atomic: 4.0.1 + write-file-atomic: 4.0.2 transitivePeerDependencies: - supports-color dev: true @@ -2526,8 +2551,8 @@ packages: '@jest/schemas': 28.1.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 14.18.23 - '@types/yargs': 17.0.11 + '@types/node': 14.18.26 + '@types/yargs': 17.0.12 chalk: 4.1.2 dev: true @@ -2538,8 +2563,8 @@ packages: '@jest/schemas': 28.1.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 14.18.23 - '@types/yargs': 17.0.11 + '@types/node': 14.18.26 + '@types/yargs': 17.0.12 chalk: 4.1.2 dev: true @@ -2676,8 +2701,8 @@ packages: webcrypto-core: 1.7.5 dev: true - /@sinclair/typebox/0.24.27: - resolution: {integrity: sha512-K7C7IlQ3zLePEZleUN21ceBA2aLcMnLHTLph8QWk1JK37L90obdpY+QGY8bXMKxf1ht1Z0MNewvXxWv0oGDYFg==} + /@sinclair/typebox/0.24.34: + resolution: {integrity: sha512-x3ejWKw7rpy30Bvm6U0AQMOHdjqe2E3YJrBHlTxH0KFsp77bBa+MH324nJxtXZFpnTy/JW2h5HPYVm0vG2WPnw==} dev: true /@sinonjs/commons/1.8.3: @@ -2716,41 +2741,40 @@ packages: /@types/babel__core/7.1.19: resolution: {integrity: sha512-WEOTgRsbYkvA/KCsDwVEGkd7WAr1e3g31VHQ8zy5gul/V1qKullU/BU5I68X5v7V3GnB9eotmom4v5a5gjxorw==} dependencies: - '@babel/parser': 7.18.11 - '@babel/types': 7.18.10 + '@babel/parser': 7.18.13 + '@babel/types': 7.18.13 '@types/babel__generator': 7.6.4 '@types/babel__template': 7.4.1 - '@types/babel__traverse': 7.18.0 + '@types/babel__traverse': 7.18.1 dev: true /@types/babel__generator/7.6.4: resolution: {integrity: sha512-tFkciB9j2K755yrTALxD44McOrk+gfpIpvC3sxHjRawj6PfnQxrse4Clq5y/Rq+G3mrBurMax/lG8Qn2t9mSsg==} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.18.13 dev: true /@types/babel__template/7.4.1: resolution: {integrity: sha512-azBFKemX6kMg5Io+/rdGT0dkGreboUVR0Cdm3fz9QJWpaQGJRQXl7C+6hOTCZcMll7KFyEQpgbYI2lHdsS4U7g==} dependencies: - '@babel/parser': 7.18.11 - '@babel/types': 7.18.10 + '@babel/parser': 7.18.13 + '@babel/types': 7.18.13 dev: true - /@types/babel__traverse/7.18.0: - resolution: {integrity: sha512-v4Vwdko+pgymgS+A2UIaJru93zQd85vIGWObM5ekZNdXCKtDYqATlEYnWgfo86Q6I1Lh0oXnksDnMU1cwmlPDw==} + /@types/babel__traverse/7.18.1: + resolution: {integrity: sha512-FSdLaZh2UxaMuLp9lixWaHq/golWTRWOnRsAXzDTDSDOQLuZb1nsdCt6pJSPWSEQt2eFZ2YVk3oYhn+1kLMeMA==} dependencies: - '@babel/types': 7.18.10 + '@babel/types': 7.18.13 dev: true /@types/bluebird/3.5.36: resolution: {integrity: sha512-HBNx4lhkxN7bx6P0++W8E289foSu8kO8GCk2unhuVggO+cE7rh9DhZUyPhUxNRG9m+5B5BTKxZQ5ZP92x/mx9Q==} dev: true - /@types/bn.js/5.1.0: - resolution: {integrity: sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA==} + /@types/bn.js/5.1.1: + resolution: {integrity: sha512-qNrYbZqMx0uJAfKnKclPh+dTwK33KfLHYqtyODwd5HnXOjnkhc4qgn3BrK6RWyGZm5+sIFE7Q7Vz6QQtJB7w7g==} dependencies: - '@types/node': 18.7.2 - dev: true + '@types/node': 18.7.14 /@types/command-line-args/4.0.4: resolution: {integrity: sha512-ScyfRf5HXh0SD89/LnO6JveunPAjkHy3qC//XAkvVG9qor6SvkeLQPsERoC5wuGXzw8G5I9WuNdRXFbtt9ovgw==} @@ -2765,33 +2789,33 @@ packages: /@types/elliptic/6.4.14: resolution: {integrity: sha512-z4OBcDAU0GVwDTuwJzQCiL6188QvZMkvoERgcVjq0/mPM8jCfdwZ3x5zQEVoL9WCAru3aG5wl3Z5Ww5wBWn7ZQ==} dependencies: - '@types/bn.js': 5.1.0 + '@types/bn.js': 5.1.1 dev: true /@types/fs-extra/5.1.0: resolution: {integrity: sha512-AInn5+UBFIK9FK5xc9yP5e3TQSPNNgjHByqYcj9g5elVBnDQcQL7PlO1CIRy2gWlbwK7UPYqi7vRvFA44dCmYQ==} dependencies: - '@types/node': 18.7.2 + '@types/node': 14.18.26 dev: true /@types/glob/5.0.37: resolution: {integrity: sha512-ATA/xrS7CZ3A2WCPVY4eKdNpybq56zqlTirnHhhyOztZM/lPxJzusOBI3BsaXbu6FrUluqzvMlI4sZ6BDYMlMg==} dependencies: - '@types/minimatch': 3.0.5 - '@types/node': 18.7.2 + '@types/minimatch': 5.1.2 + '@types/node': 14.18.26 dev: true - /@types/glob/7.2.0: - resolution: {integrity: sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA==} + /@types/glob/8.0.0: + resolution: {integrity: sha512-l6NQsDDyQUVeoTynNpC9uRvCUint/gSUXQA2euwmTuWGvPY5LSDUu6tkCtJB2SvGQlJQzLaKqcGZP4//7EDveA==} dependencies: - '@types/minimatch': 3.0.5 - '@types/node': 14.18.23 + '@types/minimatch': 5.1.2 + '@types/node': 14.18.26 dev: true /@types/graceful-fs/4.1.5: resolution: {integrity: sha512-anKkLmZZ+xm4p8JWBf4hElkM4XR+EZeA2M9BAkkTldmcyDY4mbdIJnRghDJH3Ov5ooY7/UAoENtmdMSkaAd7Cw==} dependencies: - '@types/node': 14.18.23 + '@types/node': 14.18.26 dev: true /@types/is-ci/3.0.0: @@ -2839,24 +2863,24 @@ packages: resolution: {integrity: sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==} dev: true - /@types/jsonwebtoken/8.5.8: - resolution: {integrity: sha512-zm6xBQpFDIDM6o9r6HSgDeIcLy82TKWctCXEPbJJcXb5AKmi5BNNdLXneixK4lplX3PqIVcwLBCGE/kAGnlD4A==} + /@types/jsonwebtoken/8.5.9: + resolution: {integrity: sha512-272FMnFGzAVMGtu9tkr29hRL6bZj4Zs1KZNeHLnKqAvp06tAIcarTMwOh8/8bz4FmKRcMxZhZNeUAQsNLoiPhg==} dependencies: - '@types/node': 18.7.2 + '@types/node': 18.7.14 dev: true /@types/lodash.clonedeep/4.5.7: resolution: {integrity: sha512-ccNqkPptFIXrpVqUECi60/DFxjNKsfoQxSQsgcBJCX/fuX1wgyQieojkcWH/KpE3xzLoWN/2k+ZeGqIN3paSvw==} dependencies: - '@types/lodash': 4.14.182 + '@types/lodash': 4.14.184 dev: true - /@types/lodash/4.14.182: - resolution: {integrity: sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q==} + /@types/lodash/4.14.184: + resolution: {integrity: sha512-RoZphVtHbxPZizt4IcILciSWiC6dcn+eZ8oX9IWEYfDMcocdd42f7NPI6fQj+6zI8y4E0L7gu2pcZKLGTRaV9Q==} dev: true - /@types/minimatch/3.0.5: - resolution: {integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==} + /@types/minimatch/5.1.2: + resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} dev: true /@types/minimist/1.2.2: @@ -2866,13 +2890,13 @@ packages: /@types/mkdirp/0.5.2: resolution: {integrity: sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg==} dependencies: - '@types/node': 14.18.23 + '@types/node': 14.18.26 dev: true /@types/mkdirp/1.0.2: resolution: {integrity: sha512-o0K1tSO0Dx5X6xlU5F1D6625FawhC3dU3iqr25lluNv/+/QIVH8RLNEiVokgIZo+mz+87w/3Mkg/VvQS+J51fQ==} dependencies: - '@types/node': 18.7.2 + '@types/node': 14.18.26 dev: true /@types/ms/0.7.31: @@ -2882,7 +2906,7 @@ packages: /@types/node-fetch/2.6.2: resolution: {integrity: sha512-DHqhlq5jeESLy19TYhLakJ07kNumXWjcDdxXsLUMJZ6ue8VZJj4kLPQVE/2mdHh3xZziNF1xppu5lwmS53HR+A==} dependencies: - '@types/node': 14.18.23 + '@types/node': 14.18.26 form-data: 3.0.1 dev: true @@ -2890,13 +2914,12 @@ packages: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} dev: true - /@types/node/14.18.23: - resolution: {integrity: sha512-MhbCWN18R4GhO8ewQWAFK4TGQdBpXWByukz7cWyJmXhvRuCIaM/oWytGPqVmDzgEnnaIc9ss6HbU5mUi+vyZPA==} + /@types/node/14.18.26: + resolution: {integrity: sha512-0b+utRBSYj8L7XAp0d+DX7lI4cSmowNaaTkk6/1SKzbKkG+doLuPusB9EOvzLJ8ahJSk03bTLIL6cWaEd4dBKA==} dev: true - /@types/node/18.7.2: - resolution: {integrity: sha512-ce7MIiaYWCFv6A83oEultwhBXb22fxwNOQf5DIxWA4WXvDQ7K+L0fbWl/YOfCzlR5B/uFkSnVBhPcOfOECcWvA==} - dev: true + /@types/node/18.7.14: + resolution: {integrity: sha512-6bbDaETVi8oyIARulOE9qF1/Qdi/23z6emrUh0fNJRUmjznqrixD4MpGDdgOFk5Xb0m2H6Xu42JGdvAxaJR/wA==} /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} @@ -2912,7 +2935,7 @@ packages: /@types/resolve/0.0.8: resolution: {integrity: sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ==} dependencies: - '@types/node': 14.18.23 + '@types/node': 14.18.26 dev: true /@types/semver/6.2.3: @@ -2922,8 +2945,8 @@ packages: /@types/shelljs/0.8.11: resolution: {integrity: sha512-x9yaMvEh5BEaZKeVQC4vp3l+QoFj3BXcd4aYfuKSzIIyihjdVARAadYy3SMNIz0WCCdS2vB9JL/U6GQk5PaxQw==} dependencies: - '@types/glob': 7.2.0 - '@types/node': 14.18.23 + '@types/glob': 8.0.0 + '@types/node': 14.18.26 dev: true /@types/stack-utils/2.0.1: @@ -2937,21 +2960,21 @@ packages: /@types/ws/8.5.3: resolution: {integrity: sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w==} dependencies: - '@types/node': 18.7.2 + '@types/node': 18.7.14 dev: true /@types/yargs-parser/21.0.0: resolution: {integrity: sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA==} dev: true - /@types/yargs/17.0.11: - resolution: {integrity: sha512-aB4y9UDUXTSMxmM4MH+YnuR0g5Cph3FLQBoWoMB21DSvFVAxRVEHEMx3TLh+zUZYMCQtKiqazz0Q4Rre31f/OA==} + /@types/yargs/17.0.12: + resolution: {integrity: sha512-Nz4MPhecOFArtm81gFQvQqdV7XYCrWKx5uUt6GNHredFHn1i2mtWqXTON7EPXMtNi1qjtjEM/VCHDhcHsAMLXQ==} dependencies: '@types/yargs-parser': 21.0.0 dev: true - /@typescript-eslint/eslint-plugin/5.33.0_njno5y7ry2l2lcmiu4tywxkwnq: - resolution: {integrity: sha512-jHvZNSW2WZ31OPJ3enhLrEKvAZNyAFWZ6rx9tUwaessTc4sx9KmgMNhVcqVAl1ETnT5rU5fpXTLmY9YvC1DCNg==} + /@typescript-eslint/eslint-plugin/5.36.1_lbwfnm54o3pmr3ypeqp3btnera: + resolution: {integrity: sha512-iC40UK8q1tMepSDwiLbTbMXKDxzNy+4TfPWgIL661Ym0sD42vRcQU93IsZIrmi+x292DBr60UI/gSwfdVYexCA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: '@typescript-eslint/parser': ^5.0.0 @@ -2961,24 +2984,24 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/parser': 5.33.0_qugx7qdu5zevzvxaiqyxfiwquq - '@typescript-eslint/scope-manager': 5.33.0 - '@typescript-eslint/type-utils': 5.33.0_qugx7qdu5zevzvxaiqyxfiwquq - '@typescript-eslint/utils': 5.33.0_qugx7qdu5zevzvxaiqyxfiwquq + '@typescript-eslint/parser': 5.36.1_yqf6kl63nyoq5megxukfnom5rm + '@typescript-eslint/scope-manager': 5.36.1 + '@typescript-eslint/type-utils': 5.36.1_yqf6kl63nyoq5megxukfnom5rm + '@typescript-eslint/utils': 5.36.1_yqf6kl63nyoq5megxukfnom5rm debug: 4.3.4 - eslint: 8.21.0 + eslint: 8.23.0 functional-red-black-tree: 1.0.1 ignore: 5.2.0 regexpp: 3.2.0 semver: 7.3.7 - tsutils: 3.21.0_typescript@4.7.4 - typescript: 4.7.4 + tsutils: 3.21.0_typescript@4.8.2 + typescript: 4.8.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser/5.33.0_qugx7qdu5zevzvxaiqyxfiwquq: - resolution: {integrity: sha512-cgM5cJrWmrDV2KpvlcSkelTBASAs1mgqq+IUGKJvFxWrapHpaRy5EXPQz9YaKF3nZ8KY18ILTiVpUtbIac86/w==} + /@typescript-eslint/parser/5.36.1_yqf6kl63nyoq5megxukfnom5rm: + resolution: {integrity: sha512-/IsgNGOkBi7CuDfUbwt1eOqUXF9WGVBW9dwEe1pi+L32XrTsZIgmDFIi2RxjzsvB/8i+MIf5JIoTEH8LOZ368A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 @@ -2987,26 +3010,26 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 5.33.0 - '@typescript-eslint/types': 5.33.0 - '@typescript-eslint/typescript-estree': 5.33.0_typescript@4.7.4 + '@typescript-eslint/scope-manager': 5.36.1 + '@typescript-eslint/types': 5.36.1 + '@typescript-eslint/typescript-estree': 5.36.1_typescript@4.8.2 debug: 4.3.4 - eslint: 8.21.0 - typescript: 4.7.4 + eslint: 8.23.0 + typescript: 4.8.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager/5.33.0: - resolution: {integrity: sha512-/Jta8yMNpXYpRDl8EwF/M8It2A9sFJTubDo0ATZefGXmOqlaBffEw0ZbkbQ7TNDK6q55NPHFshGBPAZvZkE8Pw==} + /@typescript-eslint/scope-manager/5.36.1: + resolution: {integrity: sha512-pGC2SH3/tXdu9IH3ItoqciD3f3RRGCh7hb9zPdN2Drsr341zgd6VbhP5OHQO/reUqihNltfPpMpTNihFMarP2w==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.33.0 - '@typescript-eslint/visitor-keys': 5.33.0 + '@typescript-eslint/types': 5.36.1 + '@typescript-eslint/visitor-keys': 5.36.1 dev: true - /@typescript-eslint/type-utils/5.33.0_qugx7qdu5zevzvxaiqyxfiwquq: - resolution: {integrity: sha512-2zB8uEn7hEH2pBeyk3NpzX1p3lF9dKrEbnXq1F7YkpZ6hlyqb2yZujqgRGqXgRBTHWIUG3NGx/WeZk224UKlIA==} + /@typescript-eslint/type-utils/5.36.1_yqf6kl63nyoq5megxukfnom5rm: + resolution: {integrity: sha512-xfZhfmoQT6m3lmlqDvDzv9TiCYdw22cdj06xY0obSznBsT///GK5IEZQdGliXpAOaRL34o8phEvXzEo/VJx13Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: '*' @@ -3015,22 +3038,23 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/utils': 5.33.0_qugx7qdu5zevzvxaiqyxfiwquq + '@typescript-eslint/typescript-estree': 5.36.1_typescript@4.8.2 + '@typescript-eslint/utils': 5.36.1_yqf6kl63nyoq5megxukfnom5rm debug: 4.3.4 - eslint: 8.21.0 - tsutils: 3.21.0_typescript@4.7.4 - typescript: 4.7.4 + eslint: 8.23.0 + tsutils: 3.21.0_typescript@4.8.2 + typescript: 4.8.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types/5.33.0: - resolution: {integrity: sha512-nIMt96JngB4MYFYXpZ/3ZNU4GWPNdBbcB5w2rDOCpXOVUkhtNlG2mmm8uXhubhidRZdwMaMBap7Uk8SZMU/ppw==} + /@typescript-eslint/types/5.36.1: + resolution: {integrity: sha512-jd93ShpsIk1KgBTx9E+hCSEuLCUFwi9V/urhjOWnOaksGZFbTOxAT47OH2d4NLJnLhkVD+wDbB48BuaycZPLBg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@typescript-eslint/typescript-estree/5.33.0_typescript@4.7.4: - resolution: {integrity: sha512-tqq3MRLlggkJKJUrzM6wltk8NckKyyorCSGMq4eVkyL5sDYzJJcMgZATqmF8fLdsWrW7OjjIZ1m9v81vKcaqwQ==} + /@typescript-eslint/typescript-estree/5.36.1_typescript@4.8.2: + resolution: {integrity: sha512-ih7V52zvHdiX6WcPjsOdmADhYMDN15SylWRZrT2OMy80wzKbc79n8wFW0xpWpU0x3VpBz/oDgTm2xwDAnFTl+g==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: typescript: '*' @@ -3038,55 +3062,55 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 5.33.0 - '@typescript-eslint/visitor-keys': 5.33.0 + '@typescript-eslint/types': 5.36.1 + '@typescript-eslint/visitor-keys': 5.36.1 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.7 - tsutils: 3.21.0_typescript@4.7.4 - typescript: 4.7.4 + tsutils: 3.21.0_typescript@4.8.2 + typescript: 4.8.2 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils/5.33.0_qugx7qdu5zevzvxaiqyxfiwquq: - resolution: {integrity: sha512-JxOAnXt9oZjXLIiXb5ZIcZXiwVHCkqZgof0O8KPgz7C7y0HS42gi75PdPlqh1Tf109M0fyUw45Ao6JLo7S5AHw==} + /@typescript-eslint/utils/5.36.1_yqf6kl63nyoq5megxukfnom5rm: + resolution: {integrity: sha512-lNj4FtTiXm5c+u0pUehozaUWhh7UYKnwryku0nxJlYUEWetyG92uw2pr+2Iy4M/u0ONMKzfrx7AsGBTCzORmIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: '@types/json-schema': 7.0.11 - '@typescript-eslint/scope-manager': 5.33.0 - '@typescript-eslint/types': 5.33.0 - '@typescript-eslint/typescript-estree': 5.33.0_typescript@4.7.4 - eslint: 8.21.0 + '@typescript-eslint/scope-manager': 5.36.1 + '@typescript-eslint/types': 5.36.1 + '@typescript-eslint/typescript-estree': 5.36.1_typescript@4.8.2 + eslint: 8.23.0 eslint-scope: 5.1.1 - eslint-utils: 3.0.0_eslint@8.21.0 + eslint-utils: 3.0.0_eslint@8.23.0 transitivePeerDependencies: - supports-color - typescript dev: true - /@typescript-eslint/visitor-keys/5.33.0: - resolution: {integrity: sha512-/XsqCzD4t+Y9p5wd9HZiptuGKBlaZO5showwqODii5C0nZawxWLF+Q6k5wYHBrQv96h6GYKyqqMHCSTqta8Kiw==} + /@typescript-eslint/visitor-keys/5.36.1: + resolution: {integrity: sha512-ojB9aRyRFzVMN3b5joSYni6FAS10BBSCAfKJhjJAV08t/a95aM6tAhz+O1jF+EtgxktuSO3wJysp2R+Def/IWQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - '@typescript-eslint/types': 5.33.0 + '@typescript-eslint/types': 5.36.1 eslint-visitor-keys: 3.3.0 dev: true - /@whatwg-node/fetch/0.2.9: - resolution: {integrity: sha512-h+ehuqE/ZqJdRy+xywHyKpBIPmST0ms8Itgf4gGSu10pJrmod3/t9DbG/GlATvLBE4pvqYHrxKAKo3NNQVJc3g==} + /@whatwg-node/fetch/0.3.2: + resolution: {integrity: sha512-Bs5zAWQs0tXsLa4mRmLw7Psps1EN78vPtgcLpw3qPY8s6UYPUM67zFZ9cy+7tZ64PXhfwzxJn+m7RH2Lq48RNQ==} dependencies: '@peculiar/webcrypto': 1.4.0 abort-controller: 3.0.0 busboy: 1.6.0 event-target-polyfill: 0.0.3 form-data-encoder: 1.7.2 - formdata-node: 4.3.3 + formdata-node: 4.4.1 node-fetch: 2.6.7 - undici: 5.8.2 + undici: 5.10.0 web-streams-polyfill: 3.2.1 transitivePeerDependencies: - encoding @@ -3236,7 +3260,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 get-intrinsic: 1.1.2 is-string: 1.0.7 dev: true @@ -3252,7 +3276,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 es-shim-unscopables: 1.0.0 dev: true @@ -3262,7 +3286,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 es-shim-unscopables: 1.0.0 dev: true @@ -3329,17 +3353,17 @@ packages: resolution: {integrity: sha512-Td525n+iPOOyUQIeBfcASuG6uJsDOITl7Mds5gFyerkWiX7qhUTdYUBlSgNMyVqtSJqwpt1kXGLdUt6SykLMRA==} dev: true - /babel-jest/28.1.3_@babel+core@7.18.10: + /babel-jest/28.1.3_@babel+core@7.18.13: resolution: {integrity: sha512-epUaPOEWMk3cWX0M/sPvCHHCe9fMFAa/9hXEgKP8nFfNl/jlGkE9ucq9NqkZGXLDduCJYS0UvSlPUwC0S+rH6Q==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} peerDependencies: '@babel/core': ^7.8.0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@jest/transform': 28.1.3 '@types/babel__core': 7.1.19 babel-plugin-istanbul: 6.1.1 - babel-preset-jest: 28.1.3_@babel+core@7.18.10 + babel-preset-jest: 28.1.3_@babel+core@7.18.13 chalk: 4.1.2 graceful-fs: 4.2.10 slash: 3.0.0 @@ -3350,7 +3374,7 @@ packages: /babel-plugin-dynamic-import-node/2.3.3: resolution: {integrity: sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==} dependencies: - object.assign: 4.1.3 + object.assign: 4.1.4 dev: true /babel-plugin-istanbul/6.1.1: @@ -3371,81 +3395,81 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: '@babel/template': 7.18.10 - '@babel/types': 7.18.10 + '@babel/types': 7.18.13 '@types/babel__core': 7.1.19 - '@types/babel__traverse': 7.18.0 + '@types/babel__traverse': 7.18.1 dev: true /babel-plugin-syntax-trailing-function-commas/7.0.0-beta.0: resolution: {integrity: sha512-Xj9XuRuz3nTSbaTXWv3itLOcxyF4oPD8douBBmj7U9BBC6nEBYfyOJYQMf/8PJAFotC62UY5dFfIGEPr7WswzQ==} dev: true - /babel-preset-current-node-syntax/1.0.1_@babel+core@7.18.10: + /babel-preset-current-node-syntax/1.0.1_@babel+core@7.18.13: resolution: {integrity: sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.18.10 - '@babel/plugin-syntax-async-generators': 7.8.4_@babel+core@7.18.10 - '@babel/plugin-syntax-bigint': 7.8.3_@babel+core@7.18.10 - '@babel/plugin-syntax-class-properties': 7.12.13_@babel+core@7.18.10 - '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.18.10 - '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.18.10 - '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.18.10 - '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.18.10 - '@babel/plugin-syntax-numeric-separator': 7.10.4_@babel+core@7.18.10 - '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.18.10 - '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.18.10 - '@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.18.10 - '@babel/plugin-syntax-top-level-await': 7.14.5_@babel+core@7.18.10 - dev: true - - /babel-preset-fbjs/3.4.0_@babel+core@7.18.10: + '@babel/core': 7.18.13 + '@babel/plugin-syntax-async-generators': 7.8.4_@babel+core@7.18.13 + '@babel/plugin-syntax-bigint': 7.8.3_@babel+core@7.18.13 + '@babel/plugin-syntax-class-properties': 7.12.13_@babel+core@7.18.13 + '@babel/plugin-syntax-import-meta': 7.10.4_@babel+core@7.18.13 + '@babel/plugin-syntax-json-strings': 7.8.3_@babel+core@7.18.13 + '@babel/plugin-syntax-logical-assignment-operators': 7.10.4_@babel+core@7.18.13 + '@babel/plugin-syntax-nullish-coalescing-operator': 7.8.3_@babel+core@7.18.13 + '@babel/plugin-syntax-numeric-separator': 7.10.4_@babel+core@7.18.13 + '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.18.13 + '@babel/plugin-syntax-optional-catch-binding': 7.8.3_@babel+core@7.18.13 + '@babel/plugin-syntax-optional-chaining': 7.8.3_@babel+core@7.18.13 + '@babel/plugin-syntax-top-level-await': 7.14.5_@babel+core@7.18.13 + dev: true + + /babel-preset-fbjs/3.4.0_@babel+core@7.18.13: resolution: {integrity: sha512-9ywCsCvo1ojrw0b+XYk7aFvTH6D9064t0RIL1rtMf3nsa02Xw41MS7sZw216Im35xj/UY0PDBQsa1brUDDF1Ow==} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.18.10 - '@babel/plugin-proposal-class-properties': 7.18.6_@babel+core@7.18.10 - '@babel/plugin-proposal-object-rest-spread': 7.18.9_@babel+core@7.18.10 - '@babel/plugin-syntax-class-properties': 7.12.13_@babel+core@7.18.10 - '@babel/plugin-syntax-flow': 7.18.6_@babel+core@7.18.10 - '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.18.10 - '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.18.10 - '@babel/plugin-transform-arrow-functions': 7.18.6_@babel+core@7.18.10 - '@babel/plugin-transform-block-scoped-functions': 7.18.6_@babel+core@7.18.10 - '@babel/plugin-transform-block-scoping': 7.18.9_@babel+core@7.18.10 - '@babel/plugin-transform-classes': 7.18.9_@babel+core@7.18.10 - '@babel/plugin-transform-computed-properties': 7.18.9_@babel+core@7.18.10 - '@babel/plugin-transform-destructuring': 7.18.9_@babel+core@7.18.10 - '@babel/plugin-transform-flow-strip-types': 7.18.9_@babel+core@7.18.10 - '@babel/plugin-transform-for-of': 7.18.8_@babel+core@7.18.10 - '@babel/plugin-transform-function-name': 7.18.9_@babel+core@7.18.10 - '@babel/plugin-transform-literals': 7.18.9_@babel+core@7.18.10 - '@babel/plugin-transform-member-expression-literals': 7.18.6_@babel+core@7.18.10 - '@babel/plugin-transform-modules-commonjs': 7.18.6_@babel+core@7.18.10 - '@babel/plugin-transform-object-super': 7.18.6_@babel+core@7.18.10 - '@babel/plugin-transform-parameters': 7.18.8_@babel+core@7.18.10 - '@babel/plugin-transform-property-literals': 7.18.6_@babel+core@7.18.10 - '@babel/plugin-transform-react-display-name': 7.18.6_@babel+core@7.18.10 - '@babel/plugin-transform-react-jsx': 7.18.10_@babel+core@7.18.10 - '@babel/plugin-transform-shorthand-properties': 7.18.6_@babel+core@7.18.10 - '@babel/plugin-transform-spread': 7.18.9_@babel+core@7.18.10 - '@babel/plugin-transform-template-literals': 7.18.9_@babel+core@7.18.10 + '@babel/core': 7.18.13 + '@babel/plugin-proposal-class-properties': 7.18.6_@babel+core@7.18.13 + '@babel/plugin-proposal-object-rest-spread': 7.18.9_@babel+core@7.18.13 + '@babel/plugin-syntax-class-properties': 7.12.13_@babel+core@7.18.13 + '@babel/plugin-syntax-flow': 7.18.6_@babel+core@7.18.13 + '@babel/plugin-syntax-jsx': 7.18.6_@babel+core@7.18.13 + '@babel/plugin-syntax-object-rest-spread': 7.8.3_@babel+core@7.18.13 + '@babel/plugin-transform-arrow-functions': 7.18.6_@babel+core@7.18.13 + '@babel/plugin-transform-block-scoped-functions': 7.18.6_@babel+core@7.18.13 + '@babel/plugin-transform-block-scoping': 7.18.9_@babel+core@7.18.13 + '@babel/plugin-transform-classes': 7.18.9_@babel+core@7.18.13 + '@babel/plugin-transform-computed-properties': 7.18.9_@babel+core@7.18.13 + '@babel/plugin-transform-destructuring': 7.18.13_@babel+core@7.18.13 + '@babel/plugin-transform-flow-strip-types': 7.18.9_@babel+core@7.18.13 + '@babel/plugin-transform-for-of': 7.18.8_@babel+core@7.18.13 + '@babel/plugin-transform-function-name': 7.18.9_@babel+core@7.18.13 + '@babel/plugin-transform-literals': 7.18.9_@babel+core@7.18.13 + '@babel/plugin-transform-member-expression-literals': 7.18.6_@babel+core@7.18.13 + '@babel/plugin-transform-modules-commonjs': 7.18.6_@babel+core@7.18.13 + '@babel/plugin-transform-object-super': 7.18.6_@babel+core@7.18.13 + '@babel/plugin-transform-parameters': 7.18.8_@babel+core@7.18.13 + '@babel/plugin-transform-property-literals': 7.18.6_@babel+core@7.18.13 + '@babel/plugin-transform-react-display-name': 7.18.6_@babel+core@7.18.13 + '@babel/plugin-transform-react-jsx': 7.18.10_@babel+core@7.18.13 + '@babel/plugin-transform-shorthand-properties': 7.18.6_@babel+core@7.18.13 + '@babel/plugin-transform-spread': 7.18.9_@babel+core@7.18.13 + '@babel/plugin-transform-template-literals': 7.18.9_@babel+core@7.18.13 babel-plugin-syntax-trailing-function-commas: 7.0.0-beta.0 transitivePeerDependencies: - supports-color dev: true - /babel-preset-jest/28.1.3_@babel+core@7.18.10: + /babel-preset-jest/28.1.3_@babel+core@7.18.13: resolution: {integrity: sha512-L+fupJvlWAHbQfn74coNX3zf60LXMJsezNvvx8eIh7iOR1luJ1poxYgQk1F8PYtNq/6QODDHCqsSnTFSWC491A==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 babel-plugin-jest-hoist: 28.1.3 - babel-preset-current-node-syntax: 1.0.1_@babel+core@7.18.10 + babel-preset-current-node-syntax: 1.0.1_@babel+core@7.18.13 dev: true /balanced-match/1.0.2: @@ -3532,10 +3556,10 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001375 - electron-to-chromium: 1.4.217 + caniuse-lite: 1.0.30001388 + electron-to-chromium: 1.4.241 node-releases: 2.0.6 - update-browserslist-db: 1.0.5_browserslist@4.21.3 + update-browserslist-db: 1.0.7_browserslist@4.21.3 dev: true /bs-logger/0.2.6: @@ -3566,8 +3590,8 @@ packages: ieee754: 1.2.1 dev: true - /bundle-require/3.0.4_esbuild@0.14.54: - resolution: {integrity: sha512-VXG6epB1yrLAvWVQpl92qF347/UXmncQj7J3U8kZEbdVZ1ZkQyr4hYeL/9RvcE8vVVdp53dY78Fd/3pqfRqI1A==} + /bundle-require/3.1.0_esbuild@0.14.54: + resolution: {integrity: sha512-IIXtAO7fKcwPHNPt9kY/WNVJqy7NDy6YqJvv6ENH0TOZoJ+yjpEsn1w40WKZbR2ibfu5g1rfgJTvmFHpm5aOMA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} peerDependencies: esbuild: '>=0.13' @@ -3583,8 +3607,8 @@ packages: streamsearch: 1.1.0 dev: true - /cac/6.7.12: - resolution: {integrity: sha512-rM7E2ygtMkJqD9c7WnFU6fruFcN3xe4FM5yUmgxhZzIKJk4uHl9U/fhwdajGFQbQuv43FAUo1Fe8gX/oIKDeSA==} + /cac/6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} dev: true @@ -3626,8 +3650,8 @@ packages: engines: {node: '>=10'} dev: true - /caniuse-lite/1.0.30001375: - resolution: {integrity: sha512-kWIMkNzLYxSvnjy0hL8w1NOaWNr2rn39RTAVyIwcw8juu60bZDWiF1/loOYANzjtJmy6qPgNmn38ro5Pygagdw==} + /caniuse-lite/1.0.30001388: + resolution: {integrity: sha512-znVbq4OUjqgLxMxoNX2ZeeLR0d7lcDiE5uJ4eUiWdml1J1EkxbnQq6opT9jb9SMfJxB0XA16/ziHwni4u1I3GQ==} dev: true /capital-case/1.0.4: @@ -3884,8 +3908,8 @@ packages: safe-buffer: 5.1.2 dev: true - /core-js-pure/3.24.1: - resolution: {integrity: sha512-r1nJk41QLLPyozHUUPmILCEMtMw24NG4oWK6RbsDdjzQgg9ZvrUsPBj1MnG0wXXp1DCDU6j+wUvEmBSrtRbLXg==} + /core-js-pure/3.25.0: + resolution: {integrity: sha512-IeHpLwk3uoci37yoI2Laty59+YqH9x5uR65/yiA0ARAJrTrN4YU0rmauLWfvqOuk77SlNJXj2rM6oT/dBD87+A==} requiresBuild: true dev: true @@ -3899,8 +3923,22 @@ packages: '@iarna/toml': 2.2.5 dev: true - /cosmiconfig-typescript-loader/3.1.1_6py7yincmiaz4uydey2jxlpsc4: - resolution: {integrity: sha512-SR5/NciF0vyYqcGsmB9WJ4QOKkcSSSzcBPLrnT6094BYahMy0eImWvlH3zoEOYqpF2zgiyAKHtWTXTo+fqgxPg==} + /cosmiconfig-typescript-loader/4.0.0_e5jnbh2sijlediukff6fqmd6je: + resolution: {integrity: sha512-cVpucSc2Tf+VPwCCR7SZzmQTQkPbkk4O01yXsYqXBIbjE1bhwqSyAgYQkRK1un4i0OPziTleqFhdkmOc4RQ/9g==} + engines: {node: '>=12', npm: '>=6'} + peerDependencies: + '@types/node': '*' + cosmiconfig: '>=7' + ts-node: '>=10' + typescript: '>=3' + dependencies: + cosmiconfig: 7.0.1 + ts-node: 10.9.1_typescript@4.8.2 + typescript: 4.8.2 + dev: true + + /cosmiconfig-typescript-loader/4.0.0_ik4pmnyrg7v3d5wbp5mj6cxf4a: + resolution: {integrity: sha512-cVpucSc2Tf+VPwCCR7SZzmQTQkPbkk4O01yXsYqXBIbjE1bhwqSyAgYQkRK1un4i0OPziTleqFhdkmOc4RQ/9g==} engines: {node: '>=12', npm: '>=6'} peerDependencies: '@types/node': '*' @@ -3909,8 +3947,7 @@ packages: typescript: '>=3' dependencies: cosmiconfig: 7.0.1 - ts-node: 10.9.1_typescript@4.7.4 - typescript: 4.7.4 + typescript: 4.8.2 dev: true /cosmiconfig/7.0.1: @@ -4171,8 +4208,8 @@ packages: is-obj: 2.0.0 dev: true - /dotenv/16.0.1: - resolution: {integrity: sha512-1K6hR6wtk2FviQ4kEiSjFiH5rpzEVi8WW0x96aztHVMhEspNpc4DVOUTEHtEva5VThQ8IaBX1Pe4gSzpVVUsKQ==} + /dotenv/16.0.2: + resolution: {integrity: sha512-JvpYKUmzQhYoIFgK2MOnF3bciIZoItIIoryihy0rIA+H4Jy0FmgyKYAHCTN98P5ybGSJcIFbh6QKeJdtZd1qhA==} engines: {node: '>=12'} dev: true @@ -4204,8 +4241,8 @@ packages: safe-buffer: 5.2.1 dev: true - /electron-to-chromium/1.4.217: - resolution: {integrity: sha512-iX8GbAMij7cOtJPZo02CClpaPMWjvN5meqXiJXkBgwvraNWTNH0Z7F9tkznI34JRPtWASoPM/xWamq3oNb49GA==} + /electron-to-chromium/1.4.241: + resolution: {integrity: sha512-e7Wsh4ilaioBZ5bMm6+F4V5c11dh56/5Jwz7Hl5Tu1J7cnB+Pqx5qIF2iC7HPpfyQMqGSvvLP5bBAIDd2gAtGw==} dev: true /elliptic/6.5.4: @@ -4249,8 +4286,8 @@ packages: is-arrayish: 0.2.1 dev: true - /es-abstract/1.20.1: - resolution: {integrity: sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA==} + /es-abstract/1.20.2: + resolution: {integrity: sha512-XxXQuVNrySBNlEkTYJoDNFe5+s2yIOpzq80sUHEdPdQr0S5nTLz4ZPPPswNIpKseDDUS5yghX1gfLIHQZ1iNuQ==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 @@ -4271,7 +4308,7 @@ packages: is-weakref: 1.0.2 object-inspect: 1.12.2 object-keys: 1.1.1 - object.assign: 4.1.3 + object.assign: 4.1.4 regexp.prototype.flags: 1.4.3 string.prototype.trimend: 1.0.5 string.prototype.trimstart: 1.0.5 @@ -4521,7 +4558,7 @@ packages: engines: {node: '>=10'} dev: true - /eslint-config-airbnb-base/15.0.0_jatgrcxl4x7ywe7ak6cnjca2ae: + /eslint-config-airbnb-base/15.0.0_faomjyrlgqmwswvqymymzkxcqi: resolution: {integrity: sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==} engines: {node: ^10.12.0 || >=12.0.0} peerDependencies: @@ -4529,14 +4566,14 @@ packages: eslint-plugin-import: ^2.25.2 dependencies: confusing-browser-globals: 1.0.11 - eslint: 8.21.0 - eslint-plugin-import: 2.26.0_qfqnhzzittf54udqwes54xx65q - object.assign: 4.1.3 + eslint: 8.23.0 + eslint-plugin-import: 2.26.0_wyxuyzvlfep3lsyoibc4fosfq4 + object.assign: 4.1.4 object.entries: 1.1.5 semver: 6.3.0 dev: true - /eslint-config-airbnb-typescript/16.2.0_2p33354vws2q7hfbt5tyy4qhyy: + /eslint-config-airbnb-typescript/16.2.0_nwt6qmnsbmuicuvak5hafgwebq: resolution: {integrity: sha512-OUaMPZpTOZGKd5tXOjJ9PRU4iYNW/Z5DoHIynjsVK/FpkWdiY5+nxQW6TiJAlLwVI1l53xUOrnlZWtVBVQzuWA==} peerDependencies: '@typescript-eslint/eslint-plugin': ^5.0.0 @@ -4544,20 +4581,20 @@ packages: eslint: ^7.32.0 || ^8.2.0 eslint-plugin-import: ^2.25.3 dependencies: - '@typescript-eslint/eslint-plugin': 5.33.0_njno5y7ry2l2lcmiu4tywxkwnq - '@typescript-eslint/parser': 5.33.0_qugx7qdu5zevzvxaiqyxfiwquq - eslint: 8.21.0 - eslint-config-airbnb-base: 15.0.0_jatgrcxl4x7ywe7ak6cnjca2ae - eslint-plugin-import: 2.26.0_qfqnhzzittf54udqwes54xx65q + '@typescript-eslint/eslint-plugin': 5.36.1_lbwfnm54o3pmr3ypeqp3btnera + '@typescript-eslint/parser': 5.36.1_yqf6kl63nyoq5megxukfnom5rm + eslint: 8.23.0 + eslint-config-airbnb-base: 15.0.0_faomjyrlgqmwswvqymymzkxcqi + eslint-plugin-import: 2.26.0_wyxuyzvlfep3lsyoibc4fosfq4 dev: true - /eslint-config-prettier/8.5.0_eslint@8.21.0: + /eslint-config-prettier/8.5.0_eslint@8.23.0: resolution: {integrity: sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==} hasBin: true peerDependencies: eslint: '>=7.0.0' dependencies: - eslint: 8.21.0 + eslint: 8.23.0 dev: true /eslint-import-resolver-node/0.3.6: @@ -4569,7 +4606,7 @@ packages: - supports-color dev: true - /eslint-module-utils/2.7.4_xtzkthmenmjo2h753u2dv735yy: + /eslint-module-utils/2.7.4_ykymimdrk6u2mbikrjd7umy4sm: resolution: {integrity: sha512-j4GT+rqzCoRKHwURX7pddtIPGySnX9Si/cgMI5ztrcqOPtk5dDEeZ34CQVPphnqkJytlc97Vuk05Um2mJ3gEQA==} engines: {node: '>=4'} peerDependencies: @@ -4590,26 +4627,26 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.33.0_qugx7qdu5zevzvxaiqyxfiwquq + '@typescript-eslint/parser': 5.36.1_yqf6kl63nyoq5megxukfnom5rm debug: 3.2.7 - eslint: 8.21.0 + eslint: 8.23.0 eslint-import-resolver-node: 0.3.6 transitivePeerDependencies: - supports-color dev: true - /eslint-plugin-eslint-comments/3.2.0_eslint@8.21.0: + /eslint-plugin-eslint-comments/3.2.0_eslint@8.23.0: resolution: {integrity: sha512-0jkOl0hfojIHHmEHgmNdqv4fmh7300NdpA9FFpF7zaoLvB/QeXOGNLIo86oAveJFrfB1p05kC8hpEMHM8DwWVQ==} engines: {node: '>=6.5.0'} peerDependencies: eslint: '>=4.19.1' dependencies: escape-string-regexp: 1.0.5 - eslint: 8.21.0 + eslint: 8.23.0 ignore: 5.2.0 dev: true - /eslint-plugin-import/2.26.0_qfqnhzzittf54udqwes54xx65q: + /eslint-plugin-import/2.26.0_wyxuyzvlfep3lsyoibc4fosfq4: resolution: {integrity: sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA==} engines: {node: '>=4'} peerDependencies: @@ -4619,14 +4656,14 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.33.0_qugx7qdu5zevzvxaiqyxfiwquq + '@typescript-eslint/parser': 5.36.1_yqf6kl63nyoq5megxukfnom5rm array-includes: 3.1.5 array.prototype.flat: 1.3.0 debug: 2.6.9 doctrine: 2.1.0 - eslint: 8.21.0 + eslint: 8.23.0 eslint-import-resolver-node: 0.3.6 - eslint-module-utils: 2.7.4_xtzkthmenmjo2h753u2dv735yy + eslint-module-utils: 2.7.4_ykymimdrk6u2mbikrjd7umy4sm has: 1.0.3 is-core-module: 2.10.0 is-glob: 4.0.3 @@ -4640,7 +4677,7 @@ packages: - supports-color dev: true - /eslint-plugin-jsdoc/37.9.7_eslint@8.21.0: + /eslint-plugin-jsdoc/37.9.7_eslint@8.23.0: resolution: {integrity: sha512-8alON8yYcStY94o0HycU2zkLKQdcS+qhhOUNQpfONHHwvI99afbmfpYuPqf6PbLz5pLZldG3Te5I0RbAiTN42g==} engines: {node: ^12 || ^14 || ^16 || ^17} peerDependencies: @@ -4650,7 +4687,7 @@ packages: comment-parser: 1.3.0 debug: 4.3.4 escape-string-regexp: 4.0.0 - eslint: 8.21.0 + eslint: 8.23.0 esquery: 1.4.0 regextras: 0.8.0 semver: 7.3.7 @@ -4659,7 +4696,7 @@ packages: - supports-color dev: true - /eslint-plugin-jsx-a11y/6.6.1_eslint@8.21.0: + /eslint-plugin-jsx-a11y/6.6.1_eslint@8.23.0: resolution: {integrity: sha512-sXgFVNHiWffBq23uiS/JaP6eVR622DqwB4yTzKvGZGcPq6/yZ3WmOZfuBks/vHWo9GaFOqC2ZK4i6+C35knx7Q==} engines: {node: '>=4.0'} peerDependencies: @@ -4673,7 +4710,7 @@ packages: axobject-query: 2.2.0 damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 - eslint: 8.21.0 + eslint: 8.23.0 has: 1.0.3 jsx-ast-utils: 3.3.3 language-tags: 1.0.5 @@ -4681,7 +4718,7 @@ packages: semver: 6.3.0 dev: true - /eslint-plugin-prettier/4.2.1_h62lvancfh4b7r6zn2dgodrh5e: + /eslint-plugin-prettier/4.2.1_tgumt6uwl2md3n6uqnggd6wvce: resolution: {integrity: sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ==} engines: {node: '>=12.0.0'} peerDependencies: @@ -4692,23 +4729,23 @@ packages: eslint-config-prettier: optional: true dependencies: - eslint: 8.21.0 - eslint-config-prettier: 8.5.0_eslint@8.21.0 + eslint: 8.23.0 + eslint-config-prettier: 8.5.0_eslint@8.23.0 prettier: 2.7.1 prettier-linter-helpers: 1.0.0 dev: true - /eslint-plugin-react-hooks/4.6.0_eslint@8.21.0: + /eslint-plugin-react-hooks/4.6.0_eslint@8.23.0: resolution: {integrity: sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==} engines: {node: '>=10'} peerDependencies: eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 dependencies: - eslint: 8.21.0 + eslint: 8.23.0 dev: true - /eslint-plugin-react/7.30.1_eslint@8.21.0: - resolution: {integrity: sha512-NbEvI9jtqO46yJA3wcRF9Mo0lF9T/jhdHqhCHXiXtD+Zcb98812wvokjWpU7Q4QH5edo6dmqrukxVvWWXHlsUg==} + /eslint-plugin-react/7.31.4_eslint@8.23.0: + resolution: {integrity: sha512-2ry4HTT+c+hSgpnV2DXj3d5oAmH11KH8HHQwtcfRdq6/+R3nEimvMbwAqK79eb4ZW1/hp8yC5elBusZM6li/Gg==} engines: {node: '>=4'} peerDependencies: eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 @@ -4716,7 +4753,7 @@ packages: array-includes: 3.1.5 array.prototype.flatmap: 1.3.0 doctrine: 2.1.0 - eslint: 8.21.0 + eslint: 8.23.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.3 minimatch: 3.1.2 @@ -4753,13 +4790,13 @@ packages: estraverse: 5.3.0 dev: true - /eslint-utils/3.0.0_eslint@8.21.0: + /eslint-utils/3.0.0_eslint@8.23.0: resolution: {integrity: sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==} engines: {node: ^10.0.0 || ^12.0.0 || >= 14.0.0} peerDependencies: eslint: '>=5' dependencies: - eslint: 8.21.0 + eslint: 8.23.0 eslint-visitor-keys: 2.1.0 dev: true @@ -4773,14 +4810,15 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /eslint/8.21.0: - resolution: {integrity: sha512-/XJ1+Qurf1T9G2M5IHrsjp+xrGT73RZf23xA1z5wB1ZzzEAWSZKvRwhWxTFp1rvkvCfwcvAUNAP31bhKTTGfDA==} + /eslint/8.23.0: + resolution: {integrity: sha512-pBG/XOn0MsJcKcTRLr27S5HpzQo4kLr+HjLQIyK4EiCsijDl/TB+h5uEuJU6bQ8Edvwz1XWOjpaP2qgnXGpTcA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true dependencies: - '@eslint/eslintrc': 1.3.0 + '@eslint/eslintrc': 1.3.1 '@humanwhocodes/config-array': 0.10.4 '@humanwhocodes/gitignore-to-minimatch': 1.0.2 + '@humanwhocodes/module-importer': 1.0.1 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 @@ -4788,9 +4826,9 @@ packages: doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.1.1 - eslint-utils: 3.0.0_eslint@8.21.0 + eslint-utils: 3.0.0_eslint@8.23.0 eslint-visitor-keys: 3.3.0 - espree: 9.3.3 + espree: 9.4.0 esquery: 1.4.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 @@ -4816,13 +4854,12 @@ packages: strip-ansi: 6.0.1 strip-json-comments: 3.1.1 text-table: 0.2.0 - v8-compile-cache: 2.3.0 transitivePeerDependencies: - supports-color dev: true - /espree/9.3.3: - resolution: {integrity: sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==} + /espree/9.4.0: + resolution: {integrity: sha512-DQmnRpLj7f6TgN/NYb0MTzJXL+vJF9h3pHy4JhCIs3zwcgez8xmGg3sXHcEO97BrmO2OSvCwMdfdlyl+E9KjOw==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: acorn: 8.8.0 @@ -4865,39 +4902,39 @@ packages: engines: {node: '>=0.10.0'} dev: true - /ethers/5.6.9: - resolution: {integrity: sha512-lMGC2zv9HC5EC+8r429WaWu3uWJUCgUCt8xxKCFqkrFuBDZXDYIdzDUECxzjf2BMF8IVBByY1EBoGSL3RTm8RA==} - dependencies: - '@ethersproject/abi': 5.6.4 - '@ethersproject/abstract-provider': 5.6.1 - '@ethersproject/abstract-signer': 5.6.2 - '@ethersproject/address': 5.6.1 - '@ethersproject/base64': 5.6.1 - '@ethersproject/basex': 5.6.1 - '@ethersproject/bignumber': 5.6.2 - '@ethersproject/bytes': 5.6.1 - '@ethersproject/constants': 5.6.1 - '@ethersproject/contracts': 5.6.2 - '@ethersproject/hash': 5.6.1 - '@ethersproject/hdnode': 5.6.2 - '@ethersproject/json-wallets': 5.6.1 - '@ethersproject/keccak256': 5.6.1 - '@ethersproject/logger': 5.6.0 - '@ethersproject/networks': 5.6.4 - '@ethersproject/pbkdf2': 5.6.1 - '@ethersproject/properties': 5.6.0 - '@ethersproject/providers': 5.6.8 - '@ethersproject/random': 5.6.1 - '@ethersproject/rlp': 5.6.1 - '@ethersproject/sha2': 5.6.1 - '@ethersproject/signing-key': 5.6.2 - '@ethersproject/solidity': 5.6.1 - '@ethersproject/strings': 5.6.1 - '@ethersproject/transactions': 5.6.2 - '@ethersproject/units': 5.6.1 - '@ethersproject/wallet': 5.6.2 - '@ethersproject/web': 5.6.1 - '@ethersproject/wordlists': 5.6.1 + /ethers/5.7.0: + resolution: {integrity: sha512-5Xhzp2ZQRi0Em+0OkOcRHxPzCfoBfgtOQA+RUylSkuHbhTEaQklnYi2hsWbRgs3ztJsXVXd9VKBcO1ScWL8YfA==} + dependencies: + '@ethersproject/abi': 5.7.0 + '@ethersproject/abstract-provider': 5.7.0 + '@ethersproject/abstract-signer': 5.7.0 + '@ethersproject/address': 5.7.0 + '@ethersproject/base64': 5.7.0 + '@ethersproject/basex': 5.7.0 + '@ethersproject/bignumber': 5.7.0 + '@ethersproject/bytes': 5.7.0 + '@ethersproject/constants': 5.7.0 + '@ethersproject/contracts': 5.7.0 + '@ethersproject/hash': 5.7.0 + '@ethersproject/hdnode': 5.7.0 + '@ethersproject/json-wallets': 5.7.0 + '@ethersproject/keccak256': 5.7.0 + '@ethersproject/logger': 5.7.0 + '@ethersproject/networks': 5.7.0 + '@ethersproject/pbkdf2': 5.7.0 + '@ethersproject/properties': 5.7.0 + '@ethersproject/providers': 5.7.0 + '@ethersproject/random': 5.7.0 + '@ethersproject/rlp': 5.7.0 + '@ethersproject/sha2': 5.7.0 + '@ethersproject/signing-key': 5.7.0 + '@ethersproject/solidity': 5.7.0 + '@ethersproject/strings': 5.7.0 + '@ethersproject/transactions': 5.7.0 + '@ethersproject/units': 5.7.0 + '@ethersproject/wallet': 5.7.0 + '@ethersproject/web': 5.7.0 + '@ethersproject/wordlists': 5.7.0 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -5091,12 +5128,12 @@ packages: resolution: {integrity: sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==} engines: {node: ^10.12.0 || >=12.0.0} dependencies: - flatted: 3.2.6 + flatted: 3.2.7 rimraf: 3.0.2 dev: true - /flatted/3.2.6: - resolution: {integrity: sha512-0sQoMh9s0BYsm+12Huy/rkKxVu4R1+r96YX5cG44rHV0pQ6iC3Q+mkoMFaGWObMFYQxCVT+ssG1ksneA2MI9KQ==} + /flatted/3.2.7: + resolution: {integrity: sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==} dev: true /forever-agent/0.6.1: @@ -5124,12 +5161,12 @@ packages: combined-stream: 1.0.8 mime-types: 2.1.35 - /formdata-node/4.3.3: - resolution: {integrity: sha512-coTew7WODO2vF+XhpUdmYz4UBvlsiTMSNaFYZlrXIqYbFd4W7bMwnoALNLE6uvNgzTg2j1JDF0ZImEfF06VPAA==} + /formdata-node/4.4.1: + resolution: {integrity: sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==} engines: {node: '>= 12.20'} dependencies: node-domexception: 1.0.0 - web-streams-polyfill: 4.0.0-beta.1 + web-streams-polyfill: 4.0.0-beta.3 dev: true /fs-extra/7.0.1: @@ -5169,7 +5206,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 functions-have-names: 1.2.3 dev: true @@ -5316,25 +5353,26 @@ packages: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} dev: true - /graphql-config/4.3.3_h5eoywvcjsa4emif44kddonyyu: - resolution: {integrity: sha512-ju2LAbOk6GLp+8JY7mh3CrEe0iEj2AdImNKv58G0DyISBo72kDEJYNJ07hKmkHdIzhDsSHiVzaCVIyBU2LCUug==} + /graphql-config/4.3.5_bd4dqfuh23qh62sufat7weqjza: + resolution: {integrity: sha512-B4jXhHL7j3llCem+ACeo48wvVYhtJxRyt5SfSnvywbRlVYyUzt5ibZV6WJU2Yii2/rcVRIGi7BHDgcAPWdWdJg==} engines: {node: '>= 10.0.0'} peerDependencies: graphql: ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0 dependencies: - '@graphql-tools/graphql-file-loader': 7.5.2_graphql@15.8.0 - '@graphql-tools/json-file-loader': 7.4.3_graphql@15.8.0 - '@graphql-tools/load': 7.7.4_graphql@15.8.0 - '@graphql-tools/merge': 8.3.3_graphql@15.8.0 - '@graphql-tools/url-loader': 7.13.8_graphql@15.8.0 - '@graphql-tools/utils': 8.10.0_graphql@15.8.0 + '@graphql-tools/graphql-file-loader': 7.5.3_graphql@15.8.0 + '@graphql-tools/json-file-loader': 7.4.4_graphql@15.8.0 + '@graphql-tools/load': 7.7.5_graphql@15.8.0 + '@graphql-tools/merge': 8.3.4_graphql@15.8.0 + '@graphql-tools/url-loader': 7.14.2_graphql@15.8.0 + '@graphql-tools/utils': 8.10.1_graphql@15.8.0 cosmiconfig: 7.0.1 cosmiconfig-toml-loader: 1.0.0 - cosmiconfig-typescript-loader: 3.1.1_6py7yincmiaz4uydey2jxlpsc4 + cosmiconfig-typescript-loader: 4.0.0_e5jnbh2sijlediukff6fqmd6je graphql: 15.8.0 minimatch: 4.2.1 string-env-interpolation: 1.0.1 - ts-node: 10.9.1_typescript@4.7.4 + ts-node: 10.9.1_typescript@4.8.2 + tslib: 2.4.0 transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -5379,8 +5417,8 @@ packages: graphql: 15.8.0 tslib: 2.4.0 - /graphql-ws/5.10.0_graphql@15.8.0: - resolution: {integrity: sha512-ewbPzHQdRZgNCPDH9Yr6xccSeZfk3fmpO/AGGGg4KkM5gc6oAOJQ10Oui1EqprhVOyRbOll9bw2qAkOiOwfTag==} + /graphql-ws/5.10.1_graphql@15.8.0: + resolution: {integrity: sha512-MKm/3SRd1vj5Km8NaujsgeGRTKZQjUN5HRnIMJ8dL2UznKoxvrtQyJqTmqJt0f6vQd9AooDg/+baXo3huiY4Ew==} engines: {node: '>=10'} peerDependencies: graphql: '>=0.11 <=16' @@ -5409,7 +5447,7 @@ packages: source-map: 0.6.1 wordwrap: 1.0.0 optionalDependencies: - uglify-js: 3.16.3 + uglify-js: 3.17.0 dev: true /har-schema/2.0.0: @@ -5889,8 +5927,8 @@ packages: resolution: {integrity: sha512-6Lthe1hqXHBNsqvgDzGO6l03XNeu3CrG4RqQ1KM9+l5+jNGpEJfIELx1NS3SEHmJQA8np/u+E4EPRKRiu6m19A==} engines: {node: '>=8'} dependencies: - '@babel/core': 7.18.10 - '@babel/parser': 7.18.11 + '@babel/core': 7.18.13 + '@babel/parser': 7.18.13 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.0 semver: 6.3.0 @@ -5946,7 +5984,7 @@ packages: '@jest/expect': 28.1.3 '@jest/test-result': 28.1.3 '@jest/types': 28.1.3 - '@types/node': 14.18.23 + '@types/node': 14.18.26 chalk: 4.1.2 co: 4.6.0 dedent: 0.7.0 @@ -5965,7 +6003,7 @@ packages: - supports-color dev: true - /jest-cli/28.1.3_wgmt7g4zmeu462tnazkmqjm6zm: + /jest-cli/28.1.3_turmrmwfy2xxv6whdm4g3fcy3y: resolution: {integrity: sha512-roY3kvrv57Azn1yPgdTebPAXvdR2xfezaKKYzVxZ6It/5NCxzJym6tUI5P1zkdWhfUYkxEI9uZWcQdaFLo8mJQ==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} hasBin: true @@ -5982,7 +6020,7 @@ packages: exit: 0.1.2 graceful-fs: 4.2.10 import-local: 3.1.0 - jest-config: 28.1.3_wgmt7g4zmeu462tnazkmqjm6zm + jest-config: 28.1.3_turmrmwfy2xxv6whdm4g3fcy3y jest-util: 28.1.3 jest-validate: 28.1.3 prompts: 2.4.2 @@ -5993,7 +6031,7 @@ packages: - ts-node dev: true - /jest-config/28.1.3_wgmt7g4zmeu462tnazkmqjm6zm: + /jest-config/28.1.3_turmrmwfy2xxv6whdm4g3fcy3y: resolution: {integrity: sha512-MG3INjByJ0J4AsNBm7T3hsuxKQqFIiRo/AUqb1q9LRKI5UU6Aar9JHbr9Ivn1TVwfUD9KirRoM/T6u8XlcQPHQ==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} peerDependencies: @@ -6005,11 +6043,11 @@ packages: ts-node: optional: true dependencies: - '@babel/core': 7.18.10 + '@babel/core': 7.18.13 '@jest/test-sequencer': 28.1.3 '@jest/types': 28.1.3 - '@types/node': 14.18.23 - babel-jest: 28.1.3_@babel+core@7.18.10 + '@types/node': 14.18.26 + babel-jest: 28.1.3_@babel+core@7.18.13 chalk: 4.1.2 ci-info: 3.3.2 deepmerge: 4.2.2 @@ -6028,7 +6066,7 @@ packages: pretty-format: 28.1.3 slash: 3.0.0 strip-json-comments: 3.1.1 - ts-node: 10.9.1_gqvhidmvmzakkqbagwo6oqbjnm + ts-node: 10.9.1_ys5ibmf2vqsgufkwyky27zwkd4 transitivePeerDependencies: - supports-color dev: true @@ -6078,7 +6116,7 @@ packages: '@jest/environment': 28.1.3 '@jest/fake-timers': 28.1.3 '@jest/types': 28.1.3 - '@types/node': 14.18.23 + '@types/node': 14.18.26 jest-mock: 28.1.3 jest-util: 28.1.3 dev: true @@ -6099,7 +6137,7 @@ packages: dependencies: '@jest/types': 28.1.3 '@types/graceful-fs': 4.1.5 - '@types/node': 14.18.23 + '@types/node': 14.18.26 anymatch: 3.1.2 fb-watchman: 2.0.1 graceful-fs: 4.2.10 @@ -6160,7 +6198,7 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: '@jest/types': 28.1.3 - '@types/node': 14.18.23 + '@types/node': 14.18.26 dev: true /jest-pnp-resolver/1.2.2_jest-resolve@28.1.3: @@ -6214,7 +6252,7 @@ packages: '@jest/test-result': 28.1.3 '@jest/transform': 28.1.3 '@jest/types': 28.1.3 - '@types/node': 14.18.23 + '@types/node': 14.18.26 chalk: 4.1.2 emittery: 0.10.2 graceful-fs: 4.2.10 @@ -6268,17 +6306,17 @@ packages: resolution: {integrity: sha512-4lzMgtiNlc3DU/8lZfmqxN3AYD6GGLbl+72rdBpXvcV+whX7mDrREzkPdp2RnmfIiWBg1YbuFSkXduF2JcafJg==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: - '@babel/core': 7.18.10 - '@babel/generator': 7.18.12 - '@babel/plugin-syntax-typescript': 7.18.6_@babel+core@7.18.10 - '@babel/traverse': 7.18.11 - '@babel/types': 7.18.10 + '@babel/core': 7.18.13 + '@babel/generator': 7.18.13 + '@babel/plugin-syntax-typescript': 7.18.6_@babel+core@7.18.13 + '@babel/traverse': 7.18.13 + '@babel/types': 7.18.13 '@jest/expect-utils': 28.1.3 '@jest/transform': 28.1.3 '@jest/types': 28.1.3 - '@types/babel__traverse': 7.18.0 + '@types/babel__traverse': 7.18.1 '@types/prettier': 2.7.0 - babel-preset-current-node-syntax: 1.0.1_@babel+core@7.18.10 + babel-preset-current-node-syntax: 1.0.1_@babel+core@7.18.13 chalk: 4.1.2 expect: 28.1.3 graceful-fs: 4.2.10 @@ -6300,7 +6338,7 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: '@jest/types': 28.1.3 - '@types/node': 14.18.23 + '@types/node': 14.18.26 chalk: 4.1.2 ci-info: 3.3.2 graceful-fs: 4.2.10 @@ -6325,7 +6363,7 @@ packages: dependencies: '@jest/test-result': 28.1.3 '@jest/types': 28.1.3 - '@types/node': 14.18.23 + '@types/node': 14.18.26 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.10.2 @@ -6337,12 +6375,12 @@ packages: resolution: {integrity: sha512-CqRA220YV/6jCo8VWvAt1KKx6eek1VIHMPeLEbpcfSfkEeWyBNppynM/o6q+Wmw+sOhos2ml34wZbSX3G13//g==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} dependencies: - '@types/node': 14.18.23 + '@types/node': 14.18.26 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - /jest/28.1.0_wgmt7g4zmeu462tnazkmqjm6zm: + /jest/28.1.0_turmrmwfy2xxv6whdm4g3fcy3y: resolution: {integrity: sha512-TZR+tHxopPhzw3c3560IJXZWLNHgpcz1Zh0w5A65vynLGNcg/5pZ+VildAd7+XGOu6jd58XMY/HNn0IkZIXVXg==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} hasBin: true @@ -6354,7 +6392,7 @@ packages: dependencies: '@jest/core': 28.1.3_ts-node@10.9.1 import-local: 3.1.0 - jest-cli: 28.1.3_wgmt7g4zmeu462tnazkmqjm6zm + jest-cli: 28.1.3_turmrmwfy2xxv6whdm4g3fcy3y transitivePeerDependencies: - '@types/node' - supports-color @@ -6462,8 +6500,8 @@ packages: resolution: {integrity: sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==} dev: true - /jsonc-parser/3.1.0: - resolution: {integrity: sha512-DRf0QjnNeCUds3xTjKlQQ3DpJD51GvDjJfnxUVWg6PZTo2otSm+slzNAxU/35hF8/oJIKoG9slq30JYOsF2azg==} + /jsonc-parser/3.2.0: + resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} dev: true /jsonfile/4.0.0: @@ -6506,7 +6544,7 @@ packages: engines: {node: '>=4.0'} dependencies: array-includes: 3.1.5 - object.assign: 4.1.3 + object.assign: 4.1.4 dev: true /jwa/1.4.1: @@ -6838,8 +6876,8 @@ packages: markdown-it: 12.0.4 dev: true - /marked/4.0.18: - resolution: {integrity: sha512-wbLDJ7Zh0sqA0Vdg6aqlbT+yPxqLblpAZh1mK2+AO2twQkPywvvqQNfEPVwSSRjZ7dZcdeVBIAgiO7MMp3Dszw==} + /marked/4.1.0: + resolution: {integrity: sha512-+Z6KDjSPa6/723PQYyc1axYZpYYpDnECDaU6hkaf5gqBieBkMKYReL5hteF2QizhlMbgbo8umXl/clZ67+GlsA==} engines: {node: '>= 12'} hasBin: true dev: true @@ -7110,8 +7148,8 @@ packages: engines: {node: '>= 0.4'} dev: true - /object.assign/4.1.3: - resolution: {integrity: sha512-ZFJnX3zltyjcYJL0RoCJuzb+11zWGyaDbjgxZbdV7rFEcHQuYxrZqhow67aA7xpes6LhojyFDaBKAFfogQrikA==} + /object.assign/4.1.4: + resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} engines: {node: '>= 0.4'} dependencies: call-bind: 1.0.2 @@ -7126,7 +7164,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 dev: true /object.fromentries/2.0.5: @@ -7135,14 +7173,14 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 dev: true /object.hasown/1.1.1: resolution: {integrity: sha512-LYLe4tivNQzq4JdaWW6WO3HMZZJWzkkH8fnI6EebWl0VZth2wL2Lovm74ep2/gZzlaTdV62JZHEqHQ2yVn8Q/A==} dependencies: define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 dev: true /object.values/1.1.5: @@ -7151,7 +7189,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 dev: true /once/1.4.0: @@ -7418,7 +7456,7 @@ packages: optional: true dependencies: lilconfig: 2.0.6 - ts-node: 10.9.1_gqvhidmvmzakkqbagwo6oqbjnm + ts-node: 10.9.1_ys5ibmf2vqsgufkwyky27zwkd4 yaml: 1.10.2 dev: true @@ -7444,12 +7482,6 @@ packages: fast-diff: 1.2.0 dev: true - /prettier/1.19.1: - resolution: {integrity: sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==} - engines: {node: '>=4'} - hasBin: true - dev: true - /prettier/2.7.1: resolution: {integrity: sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==} engines: {node: '>=10.13.0'} @@ -7785,8 +7817,8 @@ packages: glob: 7.2.3 dev: true - /rollup/2.77.3: - resolution: {integrity: sha512-/qxNTG7FbmefJWoeeYJFbHehJ2HNWnjkAFRKzWN/45eNBBF/r8lo992CwcJXEzyVxs5FmfId+vTSTQDb+bxA+g==} + /rollup/2.79.0: + resolution: {integrity: sha512-x4KsrCgwQ7ZJPcFA/SUu6QVcYlO7uRLfLAy0DSA4NS2eG8japdbpM50ToH7z4iObodRYOJ0soneF0iaQRJ6zhA==} engines: {node: '>=10.0.0'} hasBin: true optionalDependencies: @@ -7901,12 +7933,12 @@ packages: interpret: 1.4.0 rechoir: 0.6.2 - /shiki/0.10.1: - resolution: {integrity: sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==} + /shiki/0.11.1: + resolution: {integrity: sha512-EugY9VASFuDqOexOgXR18ZV+TbFrQHeCpEYaXamO+SZlsnT/2LxuLBX25GGtIrwaEVFXUAbUQ601SWE2rMwWHA==} dependencies: - jsonc-parser: 3.1.0 + jsonc-parser: 3.2.0 vscode-oniguruma: 1.6.2 - vscode-textmate: 5.2.0 + vscode-textmate: 6.0.0 dev: true /side-channel/1.0.4: @@ -8002,7 +8034,7 @@ packages: resolution: {integrity: sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==} dependencies: spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.11 + spdx-license-ids: 3.0.12 dev: true /spdx-exceptions/2.3.0: @@ -8013,11 +8045,11 @@ packages: resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} dependencies: spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.11 + spdx-license-ids: 3.0.12 dev: true - /spdx-license-ids/3.0.11: - resolution: {integrity: sha512-Ctl2BrFiM0X3MANYgj3CkygxhRmr9mi6xhejbdO960nF6EDJApTYpn0BQnDKlnNBULKiCN1n3w9EBkHK8ZWg+g==} + /spdx-license-ids/3.0.12: + resolution: {integrity: sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==} dev: true /sponge-case/1.0.1: @@ -8094,7 +8126,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 get-intrinsic: 1.1.2 has-symbols: 1.0.3 internal-slot: 1.0.3 @@ -8108,7 +8140,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 dev: true /string.prototype.trimend/1.0.5: @@ -8116,7 +8148,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 dev: true /string.prototype.trimstart/1.0.5: @@ -8124,7 +8156,7 @@ packages: dependencies: call-bind: 1.0.2 define-properties: 1.1.4 - es-abstract: 1.20.1 + es-abstract: 1.20.2 dev: true /string_decoder/1.3.0: @@ -8351,12 +8383,12 @@ packages: typescript: '>=3.7.0' dev: false - /ts-essentials/9.2.0_typescript@4.7.4: - resolution: {integrity: sha512-HLl+am6q+ulOWcjUFghpIQXXyaH0hVTnFTVWNqwz1iDxyN+t+lwDfqPB5FmPUTFw3J+y26UR3hNGmK/1jehokA==} + /ts-essentials/9.3.0_typescript@4.8.2: + resolution: {integrity: sha512-XeiCboEyBG8UqXZtXl59bWEi4ZgOqRsogFDI6WDGIF1LmzbYiAkIwjkXN6zZWWl4re/lsOqMlYfe8KA0XiiEPw==} peerDependencies: typescript: '>=4.1.0' dependencies: - typescript: 4.7.4 + typescript: 4.8.2 dev: false /ts-generator/0.1.1: @@ -8378,7 +8410,7 @@ packages: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} dev: true - /ts-jest/28.0.2_2dzzxtvkxekhhfzghvhspsa2km: + /ts-jest/28.0.2_o4uec3nv6ehlznvgnzzhupazj4: resolution: {integrity: sha512-IOZMb3D0gx6IHO9ywPgiQxJ3Zl4ECylEFwoVpENB55aTn5sdO0Ptyx/7noNBxAaUff708RqQL4XBNxxOVjY0vQ==} engines: {node: ^12.13.0 || ^14.15.0 || ^16.10.0 || >=17.0.0} hasBin: true @@ -8402,13 +8434,13 @@ packages: '@types/jest': 27.5.1 bs-logger: 0.2.6 fast-json-stable-stringify: 2.1.0 - jest: 28.1.0_wgmt7g4zmeu462tnazkmqjm6zm + jest: 28.1.0_turmrmwfy2xxv6whdm4g3fcy3y jest-util: 28.1.3 json5: 2.2.1 lodash.memoize: 4.1.2 make-error: 1.3.6 semver: 7.3.7 - typescript: 4.7.4 + typescript: 4.8.2 yargs-parser: 20.2.9 dev: true @@ -8416,7 +8448,7 @@ packages: resolution: {integrity: sha512-DEQrfv6l7IvN2jlzc/VTdZJYsWUnQNCsueYjMkC/iXoEoi5fNan6MjeDqkvhfzbmHgdz9UxDUluX3V5HdjTydQ==} dev: true - /ts-node/10.9.1_gqvhidmvmzakkqbagwo6oqbjnm: + /ts-node/10.9.1_typescript@4.8.2: resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -8435,19 +8467,18 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.3 - '@types/node': 14.18.23 acorn: 8.8.0 acorn-walk: 8.2.0 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.7.4 + typescript: 4.8.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true - /ts-node/10.9.1_typescript@4.7.4: + /ts-node/10.9.1_ys5ibmf2vqsgufkwyky27zwkd4: resolution: {integrity: sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==} hasBin: true peerDependencies: @@ -8466,13 +8497,14 @@ packages: '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.3 + '@types/node': 14.18.26 acorn: 8.8.0 acorn-walk: 8.2.0 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 4.7.4 + typescript: 4.8.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 dev: true @@ -8493,7 +8525,7 @@ packages: /tslib/2.4.0: resolution: {integrity: sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==} - /tsup/5.12.9_6oasmw356qmm23djlsjgkwvrtm: + /tsup/5.12.9_s5ojjbx2isjkawqptqpitvy25q: resolution: {integrity: sha512-dUpuouWZYe40lLufo64qEhDpIDsWhRbr2expv5dHEMjwqeKJS2aXA/FPqs1dxO4T6mBojo7rvo3jP9NNzaKyDg==} hasBin: true peerDependencies: @@ -8508,8 +8540,8 @@ packages: typescript: optional: true dependencies: - bundle-require: 3.0.4_esbuild@0.14.54 - cac: 6.7.12 + bundle-require: 3.1.0_esbuild@0.14.54 + cac: 6.7.14 chokidar: 3.5.3 debug: 4.3.4 esbuild: 0.14.54 @@ -8518,24 +8550,24 @@ packages: joycon: 3.1.1 postcss-load-config: 3.1.4_ts-node@10.9.1 resolve-from: 5.0.0 - rollup: 2.77.3 + rollup: 2.79.0 source-map: 0.8.0-beta.0 sucrase: 3.25.0 tree-kill: 1.2.2 - typescript: 4.7.4 + typescript: 4.8.2 transitivePeerDependencies: - supports-color - ts-node dev: true - /tsutils/3.21.0_typescript@4.7.4: + /tsutils/3.21.0_typescript@4.8.2: resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 4.7.4 + typescript: 4.8.2 dev: true /tty-table/4.1.6: @@ -8558,137 +8590,137 @@ packages: safe-buffer: 5.2.1 dev: true - /turbo-android-arm64/1.4.3: - resolution: {integrity: sha512-ZUvdoEHJkTkOFOO9PKWYrdONDBVqkNsvwEMufTVf07RXgqmbXDPkznzT4hcQm6xXyqWqJdjgSAMdlm+2nNE1Og==} + /turbo-android-arm64/1.4.5: + resolution: {integrity: sha512-cKPJVyS1A2BBVbcH8XVeBArtEjHxioEm9zQa3Hv68usQOOFW+KOjH+0fGvjqMrWztLVFhE+npeVsnyu/6AmRew==} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true - /turbo-darwin-64/1.4.3: - resolution: {integrity: sha512-gapoVm5qbu2TJS4lJ6fM3o2eAkLyXSxHihw/4NRAYmwHCH3at1/cIAnRcctB/HLL3ZaB/p3HKb8mnI7k6xNHOw==} + /turbo-darwin-64/1.4.5: + resolution: {integrity: sha512-cK6LjkziSfopTznpfx3EdW/C11xFlK01tYxNj0XPoBW4vNb1zLsfrI/HIwp0SzdNLqzCBwOJBK0VB07Q1MmlxQ==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64/1.4.3: - resolution: {integrity: sha512-XUe6FTsHamEH7FfNslYYO04yecAaguhZuwW4kE9B/BAP8MUYsmVqONauLPyE/YqM6pf2K0xwVe+RlEGf53CWbg==} + /turbo-darwin-arm64/1.4.5: + resolution: {integrity: sha512-hnixteVmfllup0//mGr2AZOff8oJ9dEydRU/EvbyIJ7PdkSct8758YnP5l2yMyxxipHHALSwchOKcySoaPBLRw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-freebsd-64/1.4.3: - resolution: {integrity: sha512-1CAjXmDClgMXdWZXreUfAbGBB2WB9TZHfJIdsgnDqt4fIcFGChknzYqc+Fj3tGHAczMpinGjBbWIzFuxOq/ofQ==} + /turbo-freebsd-64/1.4.5: + resolution: {integrity: sha512-DDNSDiKJF/F1qbSNlvRs2UO79iMPlKFw/ZcVCDKXRjMI5uMRujMIfNnoStAg6kifYZJ0KIxnzdsbbJFtCTgPhQ==} cpu: [x64] os: [freebsd] requiresBuild: true dev: true optional: true - /turbo-freebsd-arm64/1.4.3: - resolution: {integrity: sha512-j5C7j/vwabPKpr5d6YlLgHGHBZCOcXj3HdkBshDHTQ0wghH0NuCUUaesYxI3wva/4/Ec0dhIrb20Laa/HMxXLA==} + /turbo-freebsd-arm64/1.4.5: + resolution: {integrity: sha512-pFU8ujUp7XU527NM04P4foDjOKfi8f0rNJqREU6AMxawiMI6y0oyHc3W4VNKm0Y9IsjcfguZKZRMPeQ0n7LgJA==} cpu: [arm64] os: [freebsd] requiresBuild: true dev: true optional: true - /turbo-linux-32/1.4.3: - resolution: {integrity: sha512-vnc+StXIoQEnxIU43j7rEz/J+v+RV4dbUdUolBq0k9gkUV8KMCcqPkIa753K47E2KLNGKXMaYDI6AHQX1GAQZg==} + /turbo-linux-32/1.4.5: + resolution: {integrity: sha512-Y5pnIetm4CwxbG1YQbvnTmjROPjQjX03ktHvmoekBleU1coYGShGPd9iarQZ96XkeaRevfwfSJ90AnDGwc3/QQ==} cpu: [ia32] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-64/1.4.3: - resolution: {integrity: sha512-KAUeIa8Ejt6BLrBGbVurlrjDxqh62tu75D4cqKqKfzWspcbEtmdqlV6qthXfm8SlzGSNuQXX0+qXEWds2FIZXg==} + /turbo-linux-64/1.4.5: + resolution: {integrity: sha512-tiTusM7mYib3iLmVOWmxhsg6xU3EArjOL4l3yh9rYBdArhDJk+DrhXkbJkYOYgNSWUEfPeBs0lzSkfTIQ2H21g==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm/1.4.3: - resolution: {integrity: sha512-zZNoHUK5ioFyxAngh8tHe763Dzb22ne3LJkaZn0ExkFHJtWClWv536lPcDuQPpIH9W9iz5OwPKtN32DNpNwk8A==} + /turbo-linux-arm/1.4.5: + resolution: {integrity: sha512-5BsTRsoZeUWXWau4t4CNdL6NjlDdXrh8suhj5YolXUVCe039A5IutS7Dgd4i8dV1BovFCU3bz38dqQI2Qst5eQ==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64/1.4.3: - resolution: {integrity: sha512-rzB7w+RHCQkKr8aDxxozv/IzdN976CYyBiRocSf9QGU73uyAg8pCo3i0MiENSRjDC+tUbdbu2lEUwGXf9ziB9Q==} + /turbo-linux-arm64/1.4.5: + resolution: {integrity: sha512-R03HPqb0tJtqsGF4P3oPWsggdpTe9CZiBEtzATFpL7WVzm/Dsimy1Wcj07v6gCWdgi/mWmRt+OcZfGhnf7mibQ==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-mips64le/1.4.3: - resolution: {integrity: sha512-Ztr1BM5NiUsHWjB7zpkP2RpRDA/fjbLaCbkyfyGlLmVkrSkh05NFBD03IWs2LSLy/wb6vRpL3MQ4FKcb97Tn8w==} + /turbo-linux-mips64le/1.4.5: + resolution: {integrity: sha512-08+WhWCx2Bp6wKH8im4Z2iEBCgiWJLZbNbZ8YHxamwlIk1JsklyCCMikMSWb0GmpKi7EIjdmtPRQY2CyoBefpg==} cpu: [mipsel] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-ppc64le/1.4.3: - resolution: {integrity: sha512-tJaFJWxwfy/iLd69VHZj6JcXy9hO8LQ+ZUOna/p/wiy5WrFVgEYlD+4gfECfRZ+52EIelMgXl97vACaN1WMhLw==} + /turbo-linux-ppc64le/1.4.5: + resolution: {integrity: sha512-feGjTOYcCbg12Y6JzL8nxaUOzjqqYtO6vtxrJy16yVCd2k2htd18iZ1kLjWKDZA94vdyW5lfyAGsAQik2eAC4A==} cpu: [ppc64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-32/1.4.3: - resolution: {integrity: sha512-w9LyYd+DW3PYFXu9vQiie5lfdqmVIKLV0h181C49hempkIXfgQAosXfaugYWDwBc0GEBoBIQB0vGQKE7gt5nzA==} + /turbo-windows-32/1.4.5: + resolution: {integrity: sha512-O4tOnGmVJrR1JOKepuUvx/kqgaU6eMEjYUihJlvQmz9pTA/ecs8HrTGyXrabbmp5YdUmF2qsXaAcOvEuJaNPmQ==} cpu: [ia32] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-64/1.4.3: - resolution: {integrity: sha512-qPCqemxxOrXyqqig3fVQozRkOwo5oJSsQ3FTZE5YlNu2NwwWvY1mC0X4WTZIDsbj4oHqr0riqC7RGKbjQm1IIQ==} + /turbo-windows-64/1.4.5: + resolution: {integrity: sha512-3W9gGq9h2szhestsoA1XqN9hV0wCRpGCEV6fbb3q9EaJY8K9Tff8By0mi+fE31OKHY4om+PHg595q7kybcyG/Q==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64/1.4.3: - resolution: {integrity: sha512-djnOOBjw33AnUx2SR6TMOpDr3nKLnVD+HcZvnQz70HyE331AKWjBoEE4rtUOteLAfViWAp3afbiljFSOnbU00Q==} + /turbo-windows-arm64/1.4.5: + resolution: {integrity: sha512-/77f6OJM/4MqYEoCMER5MZTbfJZuVN22R9mc7iJDFOrNJrwvAWiAx98Fvo7WEVpMjGFUEq4Wi0UV5SpMAGU3bA==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo/1.4.3: - resolution: {integrity: sha512-g08eD2HdO/XW5xGHnXr0cXGiWnrgFBI6pN/3u0EOTeerKAsWIZU0ZrpSnl3whRtImeBB/gQu7Eu1waM2VOxzgw==} + /turbo/1.4.5: + resolution: {integrity: sha512-imAyc1kZusjzMWY4RO572FWws8x6CoM5mX7D3qtMjdGuqOBNBhPTIaJ0LmQLu+xzuKIOlJ5m/2587CsHOJTdgw==} hasBin: true requiresBuild: true optionalDependencies: - turbo-android-arm64: 1.4.3 - turbo-darwin-64: 1.4.3 - turbo-darwin-arm64: 1.4.3 - turbo-freebsd-64: 1.4.3 - turbo-freebsd-arm64: 1.4.3 - turbo-linux-32: 1.4.3 - turbo-linux-64: 1.4.3 - turbo-linux-arm: 1.4.3 - turbo-linux-arm64: 1.4.3 - turbo-linux-mips64le: 1.4.3 - turbo-linux-ppc64le: 1.4.3 - turbo-windows-32: 1.4.3 - turbo-windows-64: 1.4.3 - turbo-windows-arm64: 1.4.3 + turbo-android-arm64: 1.4.5 + turbo-darwin-64: 1.4.5 + turbo-darwin-arm64: 1.4.5 + turbo-freebsd-64: 1.4.5 + turbo-freebsd-arm64: 1.4.5 + turbo-linux-32: 1.4.5 + turbo-linux-64: 1.4.5 + turbo-linux-arm: 1.4.5 + turbo-linux-arm64: 1.4.5 + turbo-linux-mips64le: 1.4.5 + turbo-linux-ppc64le: 1.4.5 + turbo-windows-32: 1.4.5 + turbo-windows-64: 1.4.5 + turbo-windows-arm64: 1.4.5 dev: true /tweetnacl/0.14.5: @@ -8732,62 +8764,62 @@ packages: engines: {node: '>=8'} dev: true - /type-fest/2.18.0: - resolution: {integrity: sha512-pRS+/yrW5TjPPHNOvxhbNZexr2bS63WjrMU8a+VzEBhUi9Tz1pZeD+vQz3ut0svZ46P+SRqMEPnJmk2XnvNzTw==} + /type-fest/2.19.0: + resolution: {integrity: sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==} engines: {node: '>=12.20'} dev: false - /typedoc-just-the-docs-theme/0.0.1_e6antoqkoip4fafe7ecefzcrwu: + /typedoc-just-the-docs-theme/0.0.1_e6mpfwl2rohnwa4aamqb4zpcte: resolution: {integrity: sha512-EetAAT5XwVifc26eldY1SLv9Ey7wQQa1GV9wkNeVlZMPjPuGQIoIy4z7bT6u4ZOZANDeF5J0fdjxKQeJN1ejOg==} peerDependencies: typedoc: '>=0.22.9' typedoc-plugin-markdown: '>=3.11.10' dependencies: - typedoc: 0.23.10_typescript@4.7.4 - typedoc-plugin-markdown: 3.13.4_typedoc@0.23.10 + typedoc: 0.23.14_typescript@4.8.2 + typedoc-plugin-markdown: 3.13.5_typedoc@0.23.14 dev: true - /typedoc-monorepo-link-types/0.0.4_typedoc@0.23.10: + /typedoc-monorepo-link-types/0.0.4_typedoc@0.23.14: resolution: {integrity: sha512-fAxmfoJSp6cvT+I9/pN9pS2R8EoKUHaKU095E6H7FwN4tZUXPri5CZkxi9JLRlM5SV+pQwIlYnx9b+hnVP0nHA==} peerDependencies: typedoc: 0.23.x dependencies: - typedoc: 0.23.10_typescript@4.7.4 + typedoc: 0.23.14_typescript@4.8.2 dev: true - /typedoc-plugin-markdown/3.13.4_typedoc@0.23.10: - resolution: {integrity: sha512-E/EBBmu6ARtnbswZGtBVBB/BfukZiGMOlqPc0RXCI/NFitONBahFqbCAF5fKQlijlcfipJj5pw5AMFH3NytrAw==} + /typedoc-plugin-markdown/3.13.5_typedoc@0.23.14: + resolution: {integrity: sha512-E6bSn96MtiWTU4fr9wddD7d2T91XTtONj4Jdx2TZsjdAg/ig4ft2ECet/rNbBOiyw9MC0VO9toC/yvI8ZcY2PQ==} peerDependencies: typedoc: '>=0.23.0' dependencies: handlebars: 4.7.7 - typedoc: 0.23.10_typescript@4.7.4 + typedoc: 0.23.14_typescript@4.8.2 dev: true - /typedoc-plugin-sourcefile-url/1.0.6_typedoc@0.23.10: + /typedoc-plugin-sourcefile-url/1.0.6_typedoc@0.23.14: resolution: {integrity: sha512-xHq9DzkoQywS7FyPneMm2/Hr9GRoCpjSQXkVN0W6SCJKP7fguqg2tasgh+8l5/mW6YSYvqCqEbkSYLbuD4Y6gA==} peerDependencies: typedoc: '>=0.16.0' dependencies: - typedoc: 0.23.10_typescript@4.7.4 + typedoc: 0.23.14_typescript@4.8.2 dev: true - /typedoc/0.23.10_typescript@4.7.4: - resolution: {integrity: sha512-03EUiu/ZuScUBMnY6p0lY+HTH8SwhzvRE3gImoemdPDWXPXlks83UGTx++lyquWeB1MTwm9D9Ca8RIjkK3AFfQ==} + /typedoc/0.23.14_typescript@4.8.2: + resolution: {integrity: sha512-s2I+ZKBET38EctZvbXp2GooHrNaKjWZkrwGEK/sttnOGiKJqU0vHrsdcwLgKZGuo2aedNL3RRPj1LnAAeYscig==} engines: {node: '>= 14.14'} hasBin: true peerDependencies: - typescript: 4.6.x || 4.7.x + typescript: 4.6.x || 4.7.x || 4.8.x dependencies: lunr: 2.3.9 - marked: 4.0.18 + marked: 4.1.0 minimatch: 5.1.0 - shiki: 0.10.1 - typescript: 4.7.4 + shiki: 0.11.1 + typescript: 4.8.2 dev: true - /typescript/4.7.4: - resolution: {integrity: sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==} + /typescript/4.8.2: + resolution: {integrity: sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==} engines: {node: '>=4.2.0'} hasBin: true @@ -8809,8 +8841,8 @@ packages: resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} dev: true - /uglify-js/3.16.3: - resolution: {integrity: sha512-uVbFqx9vvLhQg0iBaau9Z75AxWJ8tqM9AV890dIZCLApF4rTcyHwmAvLeEdYRs+BzYWu8Iw81F79ah0EfTXbaw==} + /uglify-js/3.17.0: + resolution: {integrity: sha512-aTeNPVmgIMPpm1cxXr2Q/nEbvkmV8yq66F3om7X3P/cvOXQ0TMQ64Wk63iyT1gPlmdmGzjGpyLh1f3y8MZWXGg==} engines: {node: '>=0.8.0'} hasBin: true requiresBuild: true @@ -8831,8 +8863,8 @@ packages: engines: {node: '>=0.10.0'} dev: true - /undici/5.8.2: - resolution: {integrity: sha512-3KLq3pXMS0Y4IELV045fTxqz04Nk9Ms7yfBBHum3yxsTR4XNn+ZCaUbf/mWitgYDAhsplQ0B1G4S5D345lMO3A==} + /undici/5.10.0: + resolution: {integrity: sha512-c8HsD3IbwmjjbLvoZuRI26TZic+TSEe8FPMLLOkN1AfYRhdjnKBU6yL+IwcSCbdZiX4e5t0lfMDLDCqj4Sq70g==} engines: {node: '>=12.18'} dev: true @@ -8847,8 +8879,8 @@ packages: normalize-path: 2.1.1 dev: true - /update-browserslist-db/1.0.5_browserslist@4.21.3: - resolution: {integrity: sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q==} + /update-browserslist-db/1.0.7_browserslist@4.21.3: + resolution: {integrity: sha512-iN/XYesmZ2RmmWAiI4Z5rq0YqSiv0brj9Ce9CfhNE4xIW2h+MFxcgkxIzZ+ShkFPUkjU3gQ+3oypadD3RAMtrg==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -8890,10 +8922,6 @@ packages: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} dev: true - /v8-compile-cache/2.3.0: - resolution: {integrity: sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==} - dev: true - /v8-to-istanbul/9.0.1: resolution: {integrity: sha512-74Y4LqY74kLE6IFyIjPtkSTWzUZmj8tdHT9Ii/26dvQ6K9Dl2NbEfj0XgU2sHCtKgt5VupqhlO/5aWuqS+IY1w==} engines: {node: '>=10.12.0'} @@ -8916,7 +8944,7 @@ packages: dev: true /verror/1.10.0: - resolution: {integrity: sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==} + resolution: {integrity: sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=} engines: {'0': node >=0.6.0} dependencies: assert-plus: 1.0.0 @@ -8928,8 +8956,8 @@ packages: resolution: {integrity: sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==} dev: true - /vscode-textmate/5.2.0: - resolution: {integrity: sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==} + /vscode-textmate/6.0.0: + resolution: {integrity: sha512-gu73tuZfJgu+mvCSy4UZwd2JXykjK9zAZsfmDeut5dx/1a7FeTk0XwJsSuqQn+cuMCGVbIBfl+s53X4T19DnzQ==} dev: true /walker/1.0.8: @@ -8949,9 +8977,9 @@ packages: engines: {node: '>= 8'} dev: true - /web-streams-polyfill/4.0.0-beta.1: - resolution: {integrity: sha512-3ux37gEX670UUphBF9AMCq8XM6iQ8Ac6A+DSRRjDoRBm1ufCkaCDdNVbaqq60PsEkdNlLKrGtv/YBP4EJXqNtQ==} - engines: {node: '>= 12'} + /web-streams-polyfill/4.0.0-beta.3: + resolution: {integrity: sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==} + engines: {node: '>= 14'} dev: true /webcrypto-core/1.7.5: @@ -9064,9 +9092,9 @@ packages: /wrappy/1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - /write-file-atomic/4.0.1: - resolution: {integrity: sha512-nSKUxgAbyioruk6hU87QzVbY279oYT6uiwgDoujth2ju4mJ+TZau7SQBhtbTmUyuNYTuXnSyRn66FV0+eCgcrQ==} - engines: {node: ^12.13.0 || ^14.15.0 || >=16} + /write-file-atomic/4.0.2: + resolution: {integrity: sha512-7KxauUdBmSdWnmpaGFg+ppNjKF8uNLry8LyzjauQDOVONfFLNKrKvQOxZ/VuTIcS/gge/YNahf5RIIQWTSarlg==} + engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} dependencies: imurmurhash: 0.1.4 signal-exit: 3.0.7