Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Fred Buluku fredbuluku

I may be slow to respond.
Block or report user

Report or block fredbuluku

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View v1.script
access = road_class == motorway? true : false
speed = road_class == motorway? 120
fredbuluku /
Created Nov 29, 2018 — forked from chriseth/
Async Solidity Contracts

Having seen @pirapira's sketch of Bamboo ( ), which proposed to add better control about the "smart contract program flow", even across calls, I thought that this should certainly be added to Solidity, and actually, it might even be possible now to a certain degree using inline assembly.

The problem is that with many functions in a contract, it is not always clear which can be called at which stage in the contract's lifetime. Certain smart contracts would be easier to understand if written as follows:

fredbuluku / counter.sol
Created Nov 29, 2018 — forked from aunyks/counter.sol
A simple counter written in Solidity, for Ethereum.
View counter.sol
pragma solidity ^0.4.0;
contract Counter {
int private count = 0;
function incrementCounter() public {
count += 1;
function decrementCounter() public {
count -= 1;
function getCount() public constant returns (int) {
fredbuluku / ercevocer.js
Created Sep 30, 2018 — forked from bas-vk/ercevocer.js
Use solidity ecrecover with signature calculated with eth_sign
View ercevocer.js
// Change accountToSignWith to the address of your account.
var Web3 = require('web3');
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider('http://localhost:8545'));
var accountToSignWith = '0xbedcf417ff2752d996d2ade98b97a6f0bef4beb9';
var message = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Tubulum fuisse, qua illum, cuius is condemnatus est rogatione, P. Eaedem res maneant alio modo.'
You can’t perform that action at this time.