Skip to content

Instantly share code, notes, and snippets.

@lyricalpolymath
lyricalpolymath / console.sol
Created January 6, 2018 10:17 — 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);