Esempio n. 1
0
def balance(account):
    return api.send_request('eth_getBalance', [account, "latest"]).text
Esempio n. 2
0
def peers():
    return api.send_request('net_peerCount').text
Esempio n. 3
0
def transaction_nonce(account):
    return api.send_request('eth_getTransactionCount',
                            [account, "latest"]).text
Esempio n. 4
0
def pending_transactions():
    return api.send_request('eth_pendingTransactions').text
Esempio n. 5
0
def block(number):
    return api.send_request('eth_getBlockByNumber', [number, True]).text
Esempio n. 6
0
def block_number():
    return api.send_request('eth_blockNumber').text
Esempio n. 7
0
def transaction(transaction_hash):
    return api.send_request('eth_getTransactionByHash',
                            [transaction_hash]).text
Esempio n. 8
0
def transaction_receipt(transaction_hash):
    return api.send_request('eth_getTransactionReceipt',
                            [transaction_hash]).text
Esempio n. 9
0
def execute():
    data = json.loads(request.data)
    return api.send_request(data['method'], data['params']).text
Esempio n. 10
0
def sendTransaction():
    transaction = json.loads(request.data)['transaction']
    return api.send_request('eth_sendRawTransaction', [transaction]).text
Esempio n. 11
0
def index():
    return api.send_request('admin_peers').text