diff --git a/src/core/WarpBuilder.ts b/src/core/WarpBuilder.ts index 62cb0ab..428c009 100644 --- a/src/core/WarpBuilder.ts +++ b/src/core/WarpBuilder.ts @@ -19,8 +19,6 @@ import { WarpGatewayInteractionsLoader } from '@warp'; -export const WARP_GW_URL = 'https://d1o5nlqr4okus2.cloudfront.net'; - export class WarpBuilder { private _definitionLoader?: DefinitionLoader; private _interactionsLoader?: InteractionsLoader; diff --git a/src/core/WarpFactory.ts b/src/core/WarpFactory.ts index d8e79b1..9b43f29 100644 --- a/src/core/WarpFactory.ts +++ b/src/core/WarpFactory.ts @@ -7,7 +7,6 @@ import { HandlerExecutorFactory, SourceType, Warp, - WARP_GW_URL, WarpBuilder, WarpEnvironment } from '@warp/core'; @@ -24,6 +23,8 @@ export type CacheOptions = { dbLocation: string; }; +export const WARP_GW_URL = 'https://d1o5nlqr4okus2.cloudfront.net'; + export const defaultWarpGwOptions: GatewayOptions = { confirmationStatus: { notCorrupted: true }, source: null, @@ -103,6 +104,7 @@ export class WarpFactory { if (useArweaveGw) { return this.customArweaveGw(arweave, cacheOptions, 'mainnet'); } else { + console.log(defaultWarpGwOptions); return this.customWarpGw(arweave, defaultWarpGwOptions, cacheOptions, 'mainnet'); } } diff --git a/src/core/modules/impl/WarpGatewayInteractionsLoader.ts b/src/core/modules/impl/WarpGatewayInteractionsLoader.ts index d83e73a..4cc62f7 100644 --- a/src/core/modules/impl/WarpGatewayInteractionsLoader.ts +++ b/src/core/modules/impl/WarpGatewayInteractionsLoader.ts @@ -97,7 +97,6 @@ export class WarpGatewayInteractionsLoader implements InteractionsLoader { throw new Error(`Unable to retrieve transactions. Warp gateway responded with status ${error.status}.`); }); this.logger.debug(`Loading interactions: page ${page} loaded in ${benchmarkRequestTime.elapsed()}`); - this.logger.debug(`Interactions`, response.interactions); interactions.push(...response.interactions); limit = response.paging.limit; diff --git a/tools/contract.ts b/tools/contract.ts index 3d44b84..5e35713 100644 --- a/tools/contract.ts +++ b/tools/contract.ts @@ -23,7 +23,8 @@ async function main() { const rssUsedBefore = Math.round((process.memoryUsage().rss / 1024 / 1024) * 100) / 100; const arweave = Arweave.init({ - host: 'arweave.testnet1.bundlr.network', // Hostname or IP address for a Arweave host +/* host: 'arweave.testnet1.bundlr.network',*/ // Hostname or IP address for a Arweave host + host: 'arweave.net', port: 443, // Port protocol: 'https', // Network protocol http or https timeout: 60000, // Network request timeouts in milliseconds @@ -31,12 +32,9 @@ async function main() { }); - const warp = WarpFactory.forTestnet(arweave, {...defaultCacheOptions, inMemory: true}); + const warp = WarpFactory.forMainnet({...defaultCacheOptions, inMemory: true}); try { - const contract = warp.contract("R7wHkzV2bRktpSnOfBj9I7GHn5JaeO6XrQKDFlcu2XA") - .setEvaluationOptions({ - internalWrites: true - }); + const contract = warp.contract("Daj-MNSnH55TDfxqC7v4eq0lKzVIwh98srUaWqyuZtY"); const {state, validity, errorMessages} = await contract.readState(); console.log(state);