Skip to content

Instantly share code, notes, and snippets.

View xeroc's full-sized avatar
🏠
building

Fabian Schuh xeroc

🏠
building
View GitHub Profile
#!/bin/bash
PEERPLAYSD="/usr/local/bin/witness_node"
# For blockchain download
VERSION=`cat /etc/peerplays/version`
## Supported Environmental Variables
#
# * $PEERPLAYSD_SEED_NODES
# * $PEERPLAYSD_RPC_ENDPOINT
from flask import Flask, jsonify
from bitshares import BitShares
app = Flask(__name__)
bitshares = BitShares()
@app.route("/<call>/<parameter>")
def callit(call, parameter):
f = getattr(bitshares.rpc, call)
import yaml
from pprint import pprint
import sys
import json
from bitshares import BitShares
from bitshares.account import Account
from bitshares.blockchain import Blockchain
import logging
from logging.handlers import SMTPHandler, RotatingFileHandler
import threading
import pika
import sys
import json
import config
from piston.account import Account
from .models import User
from .maillog import logmodule
from .operationsqueue import OperationsQueue
log = logmodule(__name__)
import threading
import pika
import sys
import json
import config
from piston.account import Account
from .models import User
from .maillog import logmodule
from .operationsqueue import OperationsQueue
log = logmodule(__name__)
from pprint import pprint
from bitshares import BitShares
from bitshares.block import Block
bts = BitShares()
block = Block(22016660, bitshares_instance=bts)
tx = block["transactions"][0]
pprint(
bts.rpc.get_transaction_hex(tx)
@xeroc
xeroc / -
Created November 10, 2017 16:08
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 73e6b1b..08862ab 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,6 +25,12 @@ SET( DEFAULT_EXECUTABLE_INSTALL_DIR bin/ )
SET( CMAKE_DEBUG_POSTFIX _debug )
SET( BUILD_SHARED_LIBS NO )
SET( ECC_IMPL secp256k1 CACHE STRING "secp256k1 or openssl or mixed" )
+SET( FC_USE_FULL_ZLIB FALSE CACHE BOOL "TRUE to try to use full zlib for compression, FALSE to use miniz.c")
+
# The RPC API node
node: wss://this.uptick.rocks
# If true, a new price feed needs manual confirmation
confirm: True
# The producer name(s)
producer: in.abit
# Exchange settings
from peerplays import PeerPlays
ppy = PeerPlays()
print(ppy.rpc.get_objects(["2.0.0"]))
print(ppy.rpc.get_block(123))
print(ppy.rpc.get_matched_bets_for_bettor("1.2.43", api_id="bookie"))
print(ppy.rpc.get_object("1.2.43", api_id="database"))
from peerplays import PeerPlays
ppy = PeerPlays()
print(ppy.rpc.get_objects(["2.0.0"]))
print(ppy.rpc.get_block(123))