Skip to content

Instantly share code, notes, and snippets.

@stanly-johnson
stanly-johnson / console.sol
Created May 24, 2018 03:21 — forked from maurelian/console.sol
A JS style console.log() function for solidity.
pragma solidity ^0.4.10;
// Enables event logging of the format `console.log('descriptive string', variable)`,
// without having to worry about the variable type (as long as an event has been declared for that type in the
// Console contract.
contract Console {
event LogUint(string, uint);
function log(string s , uint x) {
LogUint(s, x);