UNPKG

sevm

Version:

A Symbolic Ethereum Virtual Machine (EVM) bytecode decompiler & analyzer library & CLI

56 lines (55 loc) 1.74 kB
import type { State } from '../state'; import { type Inst, type Expr, type IInst, Tag } from '.'; /** * Represents a jump from one `State` to another from the given `pc`. */ export declare class Branch { readonly pc: number; state: State<Inst, Expr>; constructor(pc: number, state: State<Inst, Expr>); static make(pc: number, state: State<Inst, Expr>): Branch; } export declare class Jump implements IInst { readonly offset: Expr; readonly destBranch: Branch; readonly pushStateId: number; readonly name = "Jump"; constructor(offset: Expr, destBranch: Branch, pushStateId: number); eval(): this; next(): Branch[]; } export declare class Jumpi implements IInst { readonly cond: Expr; readonly offset: Expr; readonly fallBranch: Branch; readonly destBranch: Branch; readonly pushStateId: number; readonly name = "Jumpi"; readonly evalCond: Expr; constructor(cond: Expr, offset: Expr, fallBranch: Branch, destBranch: Branch, pushStateId: number); eval(): Jumpi; next(): Branch[]; } export declare class JumpDest implements IInst { readonly fallBranch: Branch; readonly name = "JumpDest"; constructor(fallBranch: Branch); eval(): this; next(): Branch[]; } export declare class Sig extends Tag { readonly selector: string; readonly positive: boolean; readonly tag = "Sig"; constructor(selector: string, positive?: boolean); eval(): Expr; } export declare class SigCase implements IInst { readonly condition: Sig; readonly offset: Expr; readonly fallBranch: Branch; readonly name = "SigCase"; constructor(condition: Sig, offset: Expr, fallBranch: Branch); eval(): this; next(): Branch[]; }