UNPKG

sevm

Version:

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

32 lines 930 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Log = void 0; const _1 = require("."); /** * Represents a `LOGn` instruction, or in Solidity terms, an `emit` statement. * * https://docs.soliditylang.org/en/latest/contracts.html#events */ class Log { constructor(event, offset, size, topics, args) { this.event = event; this.offset = offset; this.size = size; this.topics = topics; this.args = args; this.name = 'Log'; } get eventName() { if (this.event !== undefined && this.event.sig !== undefined) { return this.event.sig.split('(')[0]; } return undefined; } eval() { return new Log(this.event, this.offset.eval(), this.size.eval(), this.topics.map(_1.evalE), this.args?.map(_1.evalE) // this.args ); } } exports.Log = Log; //# sourceMappingURL=log.js.map