Files
reverse-engineering-anything/src/cli/evmCommands.ts
T
morluto fa53f7070a refactor(cli): project view-delivery inspectors from their contracts (#10600)
* refactor(cli): project view-delivery inspectors from their contracts

* refactor(cli): project APK signature, desktop application and EVM inspectors from contracts (#10603)
2026-11-15 15:00:24 +08:00

42 lines
1.3 KiB
TypeScript

import type { Logger } from "pino";
import { evmInterfaceModule } from "../composition/evm.js";
import {
inspectWithService,
registerContractCommand,
} from "./contractCommand.js";
import { PRODUCER_LIMITS_HELP } from "./producerLimitsOption.js";
import type { CliInstance } from "./types.js";
/** Resolve operator paths and preserve explicit encoding through the shared workflow. */
export const registerEvmCommands = (
cli: CliInstance,
logger: Logger,
environment: Readonly<NodeJS.ProcessEnv>,
): void => {
const service = evmInterfaceModule.create(environment);
registerContractCommand(
cli,
logger,
evmInterfaceModule.contract,
{
command: evmInterfaceModule.cliCommand,
description:
"Infer interface candidates from explicit local EVM bytecode",
positionals: ["path", "encoding"],
callerPaths: ["path"],
jsonText: ["producer_limits"],
fields: {
path: { description: "Local bytecode carrier" },
encoding: { description: "Selected carrier representation" },
producer_limits: { description: PRODUCER_LIMITS_HELP },
},
omit: {
detail:
"One-shot output is complete Evidence; this command has no summary delivery",
},
},
inspectWithService(() => service, "evmole-interface"),
);
};