diff --git a/src/constants/constants.ts b/src/constants/constants.ts index 21eb28f5..c9948fc9 100644 --- a/src/constants/constants.ts +++ b/src/constants/constants.ts @@ -172,4 +172,4 @@ export const LSP6_ALL_PERMISSIONS = export const COMPACT_BYTES_ARRAY_STRING = '[CompactBytesArray]'; -export const DEFAULT_GAS_VALUE = 2000000; +export const DEFAULT_GAS_VALUE = 2_000_000; diff --git a/src/provider/providerWrapper.test.ts b/src/provider/providerWrapper.test.ts index 91748eb3..75e8ed94 100644 --- a/src/provider/providerWrapper.test.ts +++ b/src/provider/providerWrapper.test.ts @@ -3,6 +3,7 @@ import assert from 'assert'; import { ProviderWrapper } from './providerWrapper'; const erc725AccountAddress = '0x214be121bB52e6909c5158579b3458f8760f1b2f'; +const defaultGas = 2_000_000; describe('ProviderWrapper', () => { describe('#getOwner', () => { @@ -15,7 +16,7 @@ describe('ProviderWrapper', () => { }); }, }; - const ethSource = new ProviderWrapper(mockProvider); + const ethSource = new ProviderWrapper(mockProvider, defaultGas); const owner = await ethSource.getOwner(erc725AccountAddress); assert.deepStrictEqual( @@ -30,7 +31,7 @@ describe('ProviderWrapper', () => { cb(new Error('some error')); }, }; - const ethSource = new ProviderWrapper(mockProvider); + const ethSource = new ProviderWrapper(mockProvider, defaultGas); try { await ethSource.getOwner(erc725AccountAddress); @@ -47,7 +48,7 @@ describe('ProviderWrapper', () => { }); }, }; - const ethSource = new ProviderWrapper(mockProvider); + const ethSource = new ProviderWrapper(mockProvider, defaultGas); try { await ethSource.getOwner(erc725AccountAddress); diff --git a/src/types/Config.ts b/src/types/Config.ts index fa40adbb..15707591 100644 --- a/src/types/Config.ts +++ b/src/types/Config.ts @@ -5,13 +5,14 @@ export interface ERC725Config { * ```js title=Example * const config = { * ipfsGateway: 'https://ipfs.lukso.network/ipfs/' + * gas: 20_000_000 // Optional, default 2_000_000 * }; * ``` * Make sure to use the following format: `/ipfs/`.
* Another example: `https://cloudflare-ipfs.com/ipfs/` */ ipfsGateway: string; - gas: number; + gas?: number; } export interface ERC725Options {