Skip to main content

Arweave Gateway transaction loader

Warp is hardly trying to fulfill the promise of decentralization, that is way interactions and contract definitions stored on arweave can be fetched from independent sources.

Warp Gateway

As default warp-sdk uses warp gateway for loading contract definitions and interactions. Warp Gateway is Warp solution-oriented for performance - you can read more here. This is the default option used when initializing warp-sdk for mainnet - WarpFactory.forMainnet().

Arweave Gateway

Arweave gateway is a solution maintained by the Arweave team, which allows fetching data from Arweave blockchain. You can configure warp-sdk to use this gateway instead of Warp Gateway. However, be aware of the performance penalty.

Example usage


Works only for contracts which all of transactions were processed by warp-sequencer. We are currently working to support mixed interactions (those submitted directly to arweave or to warp-sequencer).

import {
} from "warp-contracts";
import Arweave from "arweave/node/common";

const arweave = Arweave.init({
host: "",
port: 443,
protocol: "https",
const withArLoader = WarpFactory.custom(
{ inMemory: true, dbLocation: "" }, // cache
new ArweaveGatewayBundledInteractionLoader(arweave, "mainnet")
new ArweaveGatewayBundledContractDefinitionLoader(arweave, "mainnet")

const arResult = await withArLoader

All fetched transactions are checked for sortKey integrity before evaluating state.