Skip to content

Instantly share code, notes, and snippets.

@peekpi
peekpi / Controlled.sol
Created May 23, 2018 10:18
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract Controlled {
address owner;
modifier onlyOwner {
require(msg.sender == owner);
_;
}
constructor() public
{
@peekpi
peekpi / ballot.sol
Created May 23, 2018 15:02
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
}
struct Proposal {
@peekpi
peekpi / ballot.sol
Created May 24, 2018 05:14
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract Ballot {
struct Voter {
uint weight;
bool voted;
uint8 vote;
address delegate;
}
struct Proposal {
@peekpi
peekpi / Controlled.sol
Created May 24, 2018 10:53
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract Controlled {
address public controller;
modifier onlyController {
require(msg.sender == controller);
_;
}
constructor() public
{
@peekpi
peekpi / Controlled.sol
Last active May 24, 2018 14:55
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract Controlled {
address public controller;
modifier onlyController {
require(msg.sender == controller);
_;
}
constructor() public
{
@peekpi
peekpi / Controlled.sol
Created May 25, 2018 02:55
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract Controlled {
address public controller;
modifier onlyController {
require(msg.sender == controller);
_;
}
constructor() public
{
@peekpi
peekpi / Controlled.sol
Created May 25, 2018 08:54
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.0;
contract Controlled {
address public controller;
modifier onlyController {
require(msg.sender == controller);
_;
}
constructor() public
{
@peekpi
peekpi / generate_bitcoin_address.sh
Created July 26, 2018 10:36 — forked from colindean/generate_bitcoin_address.sh
Bitcoin address generator in bash
#!/bin/bash
#
# This is free and unencumbered software released into the public domain.
#
# Requires bc, dc, openssl, xxd
#
# by grondilu from https://bitcointalk.org/index.php?topic=10970.msg156708#msg156708
base58=({1..9} {A..H} {J..N} {P..Z} {a..k} {m..z})
bitcoinregex="^[$(printf "%s" "${base58[@]}")]{34}$"
// src/app.ts
// import "./dashboard";
//import "./explorer";
import express from "express";
import http from "http";
import "source-map-support/register";
const app = express();
const server = http.createServer(app);
@peekpi
peekpi / Complex.sol
Last active November 6, 2020 14:50
try generate inter transactions with tracer module
pragma solidity ^0.6.2;
contract SubContract {
function _revert(bool cond, string memory error) public pure {
require(cond, error);
}
function destruct() public {}
function deposit() payable public {}