export interface BlockaidUnsupportedChainErrorOptions { method: string chain: string supportedChain: string } class BlockaidUnsupportedChainError extends Error { public readonly chain: string public readonly supportedChain: string constructor({ method, chain, supportedChain, }: BlockaidUnsupportedChainErrorOptions) { super( `[Blockaid] ${method} is only supported on ${supportedChain}. Received: "${chain}"`, ) this.name = 'BlockaidUnsupportedChainError' this.chain = chain this.supportedChain = supportedChain // Set the prototype explicitly. Object.setPrototypeOf(this, BlockaidUnsupportedChainError.prototype) } } export default BlockaidUnsupportedChainError