Skip to content

Instantly share code, notes, and snippets.

View tinybike's full-sized avatar

Jack Peterson tinybike

  • Merica
View GitHub Profile
jack@substrate:~/src/augur.js$ curl -H "Content-Type: application/json" -X POST --data '{"id":13,"jsonrpc":"2.0","method":"eth_call","params":[{"from":"0x01114f4bda09ed6c6715cf0baf606b5bce1dc96a","to":"0x6eabb9367012c0a84473e1e6d7a7ce39a54d77bb","data":"0x59381d2e000000000000000000000000000000000000000000000000000000005c2b1e00000000000000000000000000000000000000000000000000000000000012345600000000000000000000000074e88699f5d33f516500c3d9a2430f5e6ffb068900000000000000000000000001114f4bda09ed6c6715cf0baf606b5bce1dc96a737061636500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000006857696c6c20537061636558207375636365737366756c6c7920636f6d706c6574652061206d616e6e656420666c6967687420746f2074686520496e7465726e6174696f6e616c2053706163652053746174696f6e2062792074686520656e64206f6620323031383f0000000000000000000000000000000000000000
{ id: 16,
jsonrpc: '2.0',
method: 'eth_call',
params:
[ { from: '0x01114f4bda09ed6c6715cf0baf606b5bce1dc96a',
to: '0xe5d435b3ea328ecc046109d21d3750a03a8dff8a',
data: '0x6fd2d67d000000000000000000000000000000000000000000000000000000005e0da300000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000027120000000000000000000000000000000000000000000000000000000000123456000000000000000000000000fc57bfb53d70db73eb623122958ea107315a2da400000000000000000000000001114f4bda09ed6c6715cf0baf606b5bce1dc96a706f6c69746963730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000041e7b226d61726b657454797065223a2263617465676f726963616c222c227265736f6c7574696f6e536f75726365223a22222c2274616773223a5b22656c656374696f6e73222c22555320706f6c6974696373225d2c226465736372697074696f6e223a22576861742077696c6c20626520746865207374617475732
1) server/getters/get-reporting-history get reporter history that actually exists:
Uncaught AssertionError: expected { Object (0x000000000000000000000000000000000000000b) } to deeply equal { Object (0x000000000000000000000000000000000000000b) }
+ expected - actual
"reportingWindow": "0x1000000000000000000000000000000000000000"
"stakeToken": "0x0000000000000000001000000000000000000001"
}
]
+ "0x0000000000000000000000000000000000000019": [
yarn install v1.3.2
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@1.1.2: The platform "linux" is incompatible with this module.
info "fsevents@1.1.2" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning "airbitz-core-js-ui > react-dom@15.6.1" has incorrect peer dependency "react@^15.6.1".
warning "airbitz-core-js-ui > react-toolbox@1.1.2" has unmet peer dependency "react-addons-css-transition-group@^0.14.0 || ^15.2.0".
warning "react-dates > react-with-styles-interface-css@2.0.2" has incorrect peer dependency "react@^0.14 || ^15.6.0".

Keybase proof

I hereby claim:

  • I am tinybike on github.
  • I am tinybike (https://keybase.io/tinybike) on keybase.
  • I have a public key ASATUTBhrVtSP2EQ-KqD6nVkSKS6V6rAglqVQ3NuQPcoaAo

To claim this, I am signing this object:

pragma solidity ^0.4.13;
// AUDIT/CONSIDER: Is it better that this contract provide generic functions that are limited to whitelisted callers or for it to have many specific functions which have more limited and specific validation?
contract Augur {
enum ReportingPhase {
DesignatedReporter, LimitedReporters, AllReporters
}
// misc events
/// <reference types="node" />
declare module "augur.js" {
type AbiEncodedData = string;
type Address = string;
type Bytes32 = string;
type Int256 = string;
interface AugurJsOptions {
# /parity/parity daemon /parity/parity.pid --chain dev --no-ui --no-dapps --no-discovery --jsonrpc-apis web3,eth,net,personal,parity,parity_set,traces,rpc,parity_accounts \
&& while ! curl --silent --show-error -H "Content-Type: application/json" -X POST --data '{"jsonrpc":"2.0","method":"parity_newAccountFromPhrase","params":["",""],"id": 1}' localhost:8545; do sleep 0.1; done \
&& kill -s TERM `cat /parity/parity.pid` \
&& while kill -0 `cat /parity/parity.pid`; do sleep 0.01; done \
&& rm /parity/parity.pid \
&& echo "" > /parity/password
/parity/parity \
--chain dev \
--gasprice 2 \
@tinybike
tinybike / recall_windows.py
Last active August 12, 2017 01:23
Store and recall the current Ubuntu desktop layout (XFCE)
#!/usr/bin/env python3
# @author Jacob Vlijm (https://askubuntu.com/a/645614)
# Note: requires wmctrl (apt-get install wmctrl)
import subprocess
import os
import sys
import time
HORIZONTAL_ADJUSTMENT = 2 # XFCE (0 for unity)
#!/usr/bin/env node
var rpc = require("ethrpc");
var tokenContractAddress = "0x..."; // address of ERC-20 token contract
var valueToSend = "0x42"; // value to send (in wei, i.e. 1e-18 ether)
var sender = "0x..."; // sending address
var receiver = "0x..."; // receiving address
var privateKey = Buffer.from("...", "hex"); // private key as bytearray (buffer)