Exemplo n.º 1
0
    print '%s: %s (%s)' % (m, result, type(result))

################################################################################
print '*' * 80

addr = '0x1dcb8d1f0fcc8cbc8c2d76528e877f915e299fbe'
for x in ['earliest', 'latest', 'pending', 150000]:
    result = c.eth_getTransactionCount(addr, x)
    print 'eth_getTransactionCount: %s (%s)' % (result, type(result))

b = (231301, '0x9476018748ba1dae5bdf5e3725f8966df1fa127d49f58e66f621bf6868a23c85')
result = c.eth_getBlockTransactionCountByHash(b[1])
print 'eth_getBlockTransactionCountByHash: %s (%s)' % (result, type(result))

for x in ['earliest', 'latest', 'pending', b[0]]:
    result = c.eth_getBlockTransactionCountByNumber(x)
    print 'eth_getBlockTransactionCountByNumber: %s (%s)' % (result, type(result))


b = (199583, '0x19d761c6f944eefe91ad70b9aff3d2d76c972e5bb68c443eea7c0eaa144cef9f')
result = c.eth_getUncleCountByBlockHash(b[1])
print 'eth_getUncleCountByBlockHash: %s (%s)' % (result, type(result))

for x in ['earliest', 'latest', 'pending', b[0]]:
    result = c.eth_getUncleCountByBlockNumber(x)
    print 'eth_getUncleCountByBlockNumber: %s (%s)' % (result, type(result))

################################################################################
print '*' * 80

db_name = 'db_name'
Exemplo n.º 2
0
################################################################################
print('*' * 80)

addr = '0x1dcb8d1f0fcc8cbc8c2d76528e877f915e299fbe'
for x in ['earliest', 'latest', 'pending', 150000]:
    result = c.eth_getTransactionCount(addr, x)
    print('eth_getTransactionCount: %s (%s)' % (result, type(result)))

b = (231301, '0x9476018748ba1dae5bdf5e3725f8966df1fa127d49f58e66f621bf6868a23c85')
result = c.eth_getBlockTransactionCountByHash(b[1])
print
'eth_getBlockTransactionCountByHash: %s (%s)' % (result, type(result))

for x in ['earliest', 'latest', 'pending', b[0]]:
    result = c.eth_getBlockTransactionCountByNumber(x)
    print('eth_getBlockTransactionCountByNumber: %s (%s)' % (result, type(result)))

b = (199583, '0x19d761c6f944eefe91ad70b9aff3d2d76c972e5bb68c443eea7c0eaa144cef9f')
result = c.eth_getUncleCountByBlockHash(b[1])
print('eth_getUncleCountByBlockHash: %s (%s)' % (result, type(result)))

for x in ['earliest', 'latest', 'pending', b[0]]:
    result = c.eth_getUncleCountByBlockNumber(x)
    print('eth_getUncleCountByBlockNumber: %s (%s)' % (result, type(result)))

################################################################################
print
'*' * 80

db_name = 'db_name'
Exemplo n.º 3
0
################################################################################
print('*' * 80)

addr = '0x1dcb8d1f0fcc8cbc8c2d76528e877f915e299fbe'
for x in ['earliest', 'latest', 'pending', 150000]:
    result = geth_client.eth_getTransactionCount(addr, x)
    print('eth_getTransactionCount: %s (%s)' % (result, type(result)))

b = (231301,
     '0x9476018748ba1dae5bdf5e3725f8966df1fa127d49f58e66f621bf6868a23c85')
result = geth_client.eth_getBlockTransactionCountByHash(b[1])
print('eth_getBlockTransactionCountByHash: %s (%s)' % (result, type(result)))

for x in ['earliest', 'latest', 'pending', b[0]]:
    result = geth_client.eth_getBlockTransactionCountByNumber(x)
    print('eth_getBlockTransactionCountByNumber: %s (%s)' %
          (result, type(result)))

b = (199583,
     '0x19d761c6f944eefe91ad70b9aff3d2d76c972e5bb68c443eea7c0eaa144cef9f')
result = geth_client.eth_getUncleCountByBlockHash(b[1])
print('eth_getUncleCountByBlockHash: %s (%s)' % (result, type(result)))

for x in ['earliest', 'latest', 'pending', b[0]]:
    result = geth_client.eth_getUncleCountByBlockNumber(x)
    print('eth_getUncleCountByBlockNumber: %s (%s)' % (result, type(result)))

################################################################################

# ______________THIS IS DEPRECATED_______________ #