import { ILogger } from "../onchain/types/logger.js"; import { OnchainSDK } from "../onchain/OnchainSDK.js"; import "../onchain/index.js"; import { AnvilClient } from "./createAnvilClient.js"; import { Address } from "viem"; //#region src/dev/midasUtils.d.ts export interface UnpauseMidasIssuanceVaultProps { anvil: AnvilClient; /** * Midas issuance vault (deposit vault) to unpause */ vault: Address; /** * Midas access control admin, impersonated on the fork * (MIDAS_ACL_ADMIN in periphery-v3/router-v3 foundry tests) */ admin: Address; logger?: ILogger; } /** * Pauses the vault back when it was unpaused by `unpauseMidasIssuanceVault`, * and does nothing otherwise. Safe to call more than once. */ export type RestoreMidasIssuanceVaultPause = () => Promise; /** * Unpauses a Midas issuance vault on an anvil fork so that `depositInstant` * stops reverting with `Pausable: paused` (global) or `Pausable: fn paused` * (per-selector), and returns a callback that restores the original pause * state of each layer that was cleared. * * Impersonates `admin` and grants it `pauseAdminRole()` when missing, same as * `greenlistMidasGateway` does with the greenlist roles. The grant is not * reverted by the callback, only the pause state is. */ export declare function unpauseMidasIssuanceVault(props: UnpauseMidasIssuanceVaultProps): Promise; /** * One Midas credit suite: a credit manager with a Midas gateway adapter, * or with a Midas degen NFT when it has no such adapter. */ export interface MidasCreditSuite { creditManager: Address; gateway: Address; mToken: Address; } /** * Midas credit suites of the loaded credit managers. * * A manager with a gateway adapter is a suite on its own, so its degen NFT * is not consulted. Suites that only have a Midas degen NFT read `mToken` * from the gateway. */ export declare function discoverMidasCreditSuites(sdk: OnchainSDK): Promise; /** * Gateways of the Midas credit suites of the loaded credit managers. */ export declare function discoverMidasGateways(sdk: OnchainSDK): Promise; /** * mTokens of the Midas credit suites of the loaded credit managers. * * A manager with a gateway adapter contributes that adapter's mToken, so its * degen NFT is not consulted. Suites that only have a Midas degen NFT * contribute the mToken read from the gateway. */ export declare function discoverMidasMTokens(sdk: OnchainSDK): Promise; //#endregion