Install openssl with brew install openssl
Per https://solitum.net/openssl-os-x-el-capitan-and-brew/:
$ cd /usr/local/include
$ ln -s ../opt/openssl/include/openssl .
$ cd /usr/local/lib
$ $ for i in ../opt/openssl/lib/lib*; do ln -vs $i .; done
// Copyright 2018 The go-ethereum Authors | |
// This file is part of go-ethereum. | |
// | |
// go-ethereum is free software: you can redistribute it and/or modify | |
// it under the terms of the GNU General Public License as published by | |
// the Free Software Foundation, either version 3 of the License, or | |
// (at your option) any later version. | |
// | |
// go-ethereum is distributed in the hope that it will be useful, | |
// but WITHOUT ANY WARRANTY; without even the implied warranty of |
from web3 import Web3, HTTPProvider | |
web3 = Web3(HTTPProvider("http://localhost:8545")) | |
PERCENTILE = 0.6 | |
NUMBLOCKS = 43200 | |
# NUMBLOCKS = 1000 | |
def getMinGasPrice(block): | |
minPrice = None |
Install openssl with brew install openssl
Per https://solitum.net/openssl-os-x-el-capitan-and-brew/:
$ cd /usr/local/include
$ ln -s ../opt/openssl/include/openssl .
$ cd /usr/local/lib
$ $ for i in ../opt/openssl/lib/lib*; do ln -vs $i .; done
I hereby claim:
To claim this, I am signing this object:
pragma solidity ^0.4.10; | |
contract ENS { | |
function owner(bytes32 node) constant returns (address); | |
} | |
contract Deed { | |
address public owner; | |
address public previousOwner; | |
} |
// Example usage: `bumpGasPrice(web3.toWei(2, 'gwei'))` | |
function bumpGasPrice(minprice) { | |
for(var i = 0; i < eth.accounts.length; i++) { | |
var account = eth.accounts[i]; | |
var pending = txpool.content.pending[account]; | |
if(pending === undefined) continue; | |
Object.keys(pending).forEach(function(nonce) { | |
var tx = pending[nonce]; | |
var gasPrice = new BigNumber(tx.gasPrice.slice(2), 16); | |
if(gasPrice < minprice) { |
pragma solidity ^0.4.10; | |
import "IERC20Token.sol"; | |
/** | |
* The problem: Handing out tokens is problematic, because the receiving account | |
* also needs enough ether to send a transaction transferring the tokens to the | |
* user's account. | |
* | |
* The solution: Send the tokens to a 'checking account'. The recipient of the |
pragma solidity ^0.4.0; | |
import "SafeMath.sol"; | |
import "IERC20Token.sol"; | |
/** | |
* @dev Implements a capped token sale using a second-price auction. | |
* | |
* @author Nick Johnson <[email protected]> | |
* |
from pyxdameraulevenshtein import damerau_levenshtein_distance | |
words = [line.strip().split(" ")[1] for line in open('wordlist.txt')] | |
out = [] | |
for word in words: | |
if len(out) >= 2148: break | |
if len(word) < 4 or len(word) > 8: continue | |
if len(out) > 0 and min(damerau_levenshtein_distance(x, word) for x in out) < 2: continue | |
if any(x.startswith(word[:4]) for x in out): continue | |
print word | |
out.append(word) |
pragma solidity ^0.4.0; | |
contract BadToken { | |
mapping(address=>uint) public balances; | |
function BadToken() payable { | |
balances[msg.sender] = msg.value; | |
} | |
function transfer(address recipient, uint amount) { |