UNPKG

@broxus/js-core

Version:

MobX-based JavaScript Core library

12 lines (11 loc) 822 B
import { debug, groupCollapsed, groupEnd, sliceString } from '@broxus/js-utils'; import { inheritTextStyle, successLabelStyle, successTextStyle } from '../../console'; import { getScanLink } from '../../utils/get-scan-link'; export function contractStateChangeDebugMessage(name, address, event, networkId) { const link = getScanLink(event.address.toString(), networkId); groupCollapsed(`%c${name}%c %ccontractStateChanged%c event has been captured on the ${name} [%c${sliceString(address?.toString())}%c] contract`, successLabelStyle, inheritTextStyle, successTextStyle, inheritTextStyle, successTextStyle, inheritTextStyle); debug(`${name} address: %c${sliceString(event.address.toString())}%c ${link}`, successTextStyle, inheritTextStyle); debug('Event state'); debug(event.state); groupEnd(); }