@moonwell-fi/moonwell-sdk
Version:
TypeScript Interface for Moonwell
27 lines • 921 B
JavaScript
import { http, fallback } from "viem";
import { polygon } from "viem/chains";
import { createEnvironmentConfig, } from "../../types/config.js";
import { tokens } from "./tokens.js";
const createEnvironment = (rpcUrls, indexerUrl, governanceIndexerUrl) => createEnvironmentConfig({
key: "polygon",
name: "Polygon",
chain: {
...polygon,
rpcUrls: {
default: { http: rpcUrls || polygon.rpcUrls.default.http },
},
},
transport: rpcUrls
? fallback(rpcUrls.map((url) => http(url)))
: http(polygon.rpcUrls.default.http[0]),
indexerUrl: indexerUrl || "https://ponder.moonwell.fi",
governanceIndexerUrl: governanceIndexerUrl || "https://ponder.moonwell.fi",
tokens,
markets: {},
vaults: {},
morphoMarkets: {},
contracts: {},
custom: {},
});
export { createEnvironment, polygon, tokens };
//# sourceMappingURL=environment.js.map