From bc19e31f90c03b64ef0c6674daef643f6a7d4ba0 Mon Sep 17 00:00:00 2001 From: dtfiedler Date: Tue, 4 Jun 2024 10:24:50 -0600 Subject: [PATCH] fix(warp): default ot using arweave.net for warp --- src/middleware/warp.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/middleware/warp.ts b/src/middleware/warp.ts index dd05bc8..9047bce 100644 --- a/src/middleware/warp.ts +++ b/src/middleware/warp.ts @@ -22,15 +22,22 @@ import { WarpFactory, defaultCacheOptions, } from 'warp-contracts'; -import { arweave } from './arweave'; import { SqliteContractCache } from 'warp-contracts-sqlite'; import { LmdbCache } from 'warp-contracts-lmdb'; import path from 'path'; +import Arweave from 'arweave'; LoggerFactory.INST.logLevel( (process.env.WARP_LOG_LEVEL as LogLevel) ?? 'fatal', ); +// use arweave.net for warp for now +const warpArweave = Arweave.init({ + host: 'arweave.net', + port: 443, + protocol: 'https', +}); + /** * TODO: consider using warp-contracts-postgres cache for distributed state caching across instances */ @@ -39,7 +46,7 @@ export const warp = WarpFactory.forMainnet( ...defaultCacheOptions, }, true, - arweave, + warpArweave, ) .useStateCache( new SqliteContractCache(