Skip to content

Instantly share code, notes, and snippets.

View ahiatsevich's full-sized avatar

Aliaksei Hiatsevich ahiatsevich

View GitHub Profile
@ahiatsevich
ahiatsevich / HelloWorld1.sol
Created June 15, 2017 09:05
Test `modifier` gas consumption (2)
pragma solidity ^0.4.11;
contract HelloWorld1 {
modifier verifyParam1(uint param) {
if (param > 5) {
_;
}
}
modifier verifyParam2(uint param) {
@ahiatsevich
ahiatsevich / GlobalEvents.sol
Last active April 30, 2017 12:24
FirePin: how to transmit events between network participants.
pragma solidity ^0.4.8;
contract GlobalEvents {
address private owner;
event eventEmited(address publisher, string data_url, string hash);
function GlobalEvents() { owner = msg.sender; }
function kill() { if (msg.sender == owner) selfdestruct(owner); }