fix: warpgw configuration fix
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user