UNPKG

doppler-v3-sdk

Version:
46 lines 1.47 kB
import { createDrift, } from "@delvtech/drift"; import { airlockAbi } from "../../abis"; export var ModuleState; (function (ModuleState) { ModuleState[ModuleState["NotWhitelisted"] = 0] = "NotWhitelisted"; ModuleState[ModuleState["TokenFactory"] = 1] = "TokenFactory"; ModuleState[ModuleState["GovernanceFactory"] = 2] = "GovernanceFactory"; ModuleState[ModuleState["HookFactory"] = 3] = "HookFactory"; ModuleState[ModuleState["Migrator"] = 4] = "Migrator"; })(ModuleState || (ModuleState = {})); export class ReadFactory { constructor(address, drift = createDrift()) { this.airlock = drift.contract({ abi: airlockAbi, address, }); } async getModuleState(address, options) { return this.airlock.read("getModuleState", { module: address, ...options, }); } async getAssetData(asset, options) { return this.airlock.read("getAssetData", { asset, ...options, }); } async getCreateEvents(options) { return this.airlock.getEvents("Create", { ...options, }); } async getMigrateEvents(options) { return this.airlock.getEvents("Migrate", { ...options, }); } async getSetModuleStateEvents(options) { return this.airlock.getEvents("SetModuleState", { ...options, }); } } //# sourceMappingURL=ReadFactory.js.map