Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
fix(warp): default ot using arweave.net for warp
Browse files Browse the repository at this point in the history
  • Loading branch information
dtfiedler committed Jun 4, 2024
1 parent 3c16a02 commit bc19e31
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/middleware/warp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -39,7 +46,7 @@ export const warp = WarpFactory.forMainnet(
...defaultCacheOptions,
},
true,
arweave,
warpArweave,
)
.useStateCache(
new SqliteContractCache(
Expand Down

0 comments on commit bc19e31

Please sign in to comment.