- Instance type: t2.xlarge
- vCPUs: 4
- Memory (GiB): 16
- General Purpose SSD (GP2): 200 GB
- Ubuntu
- Running in eu-central-1b (Frankfurt)
Hint: to make your life easier and allow login with a simple ssh btc-0.14
, edit ~/.ssh/config
:
## [It would be nice to import a library, another contract's interface, or a | |
## parent to inherit from] | |
## but that's not supported. Yes, inheritance is dangerous, but code reuse can | |
## be very beneficial as | |
## well. I believe adoption will be held back by this. | |
## [Declare a positive number] Why change the type from `uint256`? `num` is | |
## less descriptive, ie. it could include irrational numbers for all I know. | |
## Also, will 4-byte identifiers be compatible with solidity? | |
## ie. `bytes4(keccak256('uint256'))` or `bytes4(keccak256('num'))` ? Or is |
admin.addPeer("enode://da0c61fe14ba9da1a9835b59d811553d21787448724cfe6412bc17f0b14586df91826d8286b2137342d09a8631df5ea548cf301294b05657c2a90f9c3d526721@143.198.119.44:30303"); | |
admin.addPeer("enode://3e2287c6caf363357efc600611ccb777e6997ef8b749b1f87e94d3a7d2b466bbefba163b0620c88804f18bc70cfbe68538720ac2644fc1c970848488cdca0c7a@143.198.114.251:30303"); | |
admin.addPeer("enode://15ea76b5d30ce9eaabf6a9a8fe5ca0ff032534d296b5b8ca6e00a730d08a4aaa019077c382a6b2d08ebc7cf6f8eb888f5e00e0dd378798e3459a555538654370@157.230.6.79:30303"); | |
admin.addPeer("enode://2e718763172902a8fa4bcdda45f77a5c2688de5230e184d154e4867922b8f6ad23e1016379715cb5f55f6c79060563f93896035e35dfb47361d08599d4908ae8@143.198.118.178:30303"); | |
admin.addPeer("enode://9d45f21eeb37bd5555fac0c4094ae3d4d144d93e2313aeb891bf3054b0dcf6ca817961ed29ea1de00389b5c36dc6bbe9b00443e367b16ed8ba251cea6c242044@94.176.237.140:30303"); | |
admin.addPeer("enode://2493b5b8407ccb1c448d7ad358e838066640f273442730caf80acde2fe98522b1d9dcebd2dc982efe44911a49779888fe72defc181c29596facff05e1 |
package main | |
import ( | |
"github.com/syndtr/goleveldb/leveldb" | |
"fmt" | |
"encoding/binary" | |
"github.com/ethereum/go-ethereum/core/types" | |
"bytes" | |
"github.com/ethereum/go-ethereum/rlp" | |
) |
// Bytecode origin https://www.reddit.com/r/ethereum/comments/6ic49q/any_assembly_programmers_willing_to_write_a/dj5ceuw/ | |
// Modified version of Vitalik's https://www.reddit.com/r/ethereum/comments/6c1jui/delegatecall_forwarders_how_to_save_5098_on/ | |
// Credits to Jordi Baylina for this way of deploying contracts https://gist.github.com/jbaylina/e8ac19b8e7478fd10cf0363ad1a5a4b3 | |
// Forwarder is slightly modified to only return 256 bytes (8 normal returns) | |
// Deployed Factory in Kovan: https://kovan.etherscan.io/address/0xaebc118657099e2110c90494f48b3d21329b23eb | |
// Example of a Forwarder deploy using the Factory: https://kovan.etherscan.io/tx/0xe995dd023c8336685cb819313d933ae8938009f9c8c0e1af6c57b8be06986957 | |
// Just 66349 gas per contract |
pragma solidity ^0.4.2; | |
contract ethernalSale { | |
struct order { | |
uint amount; | |
address buyer; | |
} | |
mapping (uint => order) orderBook; | |
mapping (address => uint) balanceOf; |
#config | |
minProf= .001 #min profit for alert in BTC/Day | |
slowAlertTimer = 300 #min time for slow alert in seconds | |
offTimer = 0 #min time of off alert in seconds | |
btcAddress = "address goes here" #niceHash BTC address to monitor | |
iftttKey = "key goes here" #key from IFTTT Maker applet |
import datetime, requests | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.dates as mdates | |
import json, collections, os | |
UTC_OFFSET = -14400 # Local offset from UTC | |
START_DATE = "2016-01-01" # Day to start chat | |
TMP_DIR = "/tmp" # Writable temp directory, without trailing slash |
library LZF { | |
function decompress(bytes memory compressed, bytes memory decompressed) internal { | |
uint ip; | |
uint in_end; | |
uint op; | |
assembly { | |
// OP points to the current output location in memory | |
op := add(decompressed, 32) | |
// IP actually points to 31 bytes before the desired location, so | |
// MLOADs work correctly |
contract DateTime { | |
/* | |
* Credit to pipermerriam for this utility contract | |
* | |
* Date and Time utilities for ethereum contracts | |
* | |
* address: 0x1a6184cd4c5bea62b0116de7962ee7315b7bcbce | |
*/ | |
function toTimestamp(uint16 year, uint8 month, uint8 day) constant returns (uint timestamp); |