Ejemplo n.º 1
0
api = Contract(address=address, api_key=key)

abi = api.get_abi()
sourcecode = api.get_sourcecode()

# Proxies

number = 10453272
block_numb = '0x9f8118'
address = '0xf75e354c5edc8efed9b59ee9f67a80845ade7d0c'
TX_HASH = '0xb03d4625fd433ad05f036abdc895a1837a7d838ed39f970db69e7d832e41205d'
index = '0x0'
api = Proxies(api_key=key)

price = api.gas_price()
block = api.get_block_by_number(number)
tx_count = api.get_block_transaction_count_by_number(block_number=block_numb)
code = api.get_code(address)
block0 = api.get_most_recent_block()
value = api.get_storage_at(address, 0x0)
transaction = api.get_transaction_by_blocknumber_index(block_number=block_numb,
                                                       index=index)
transaction = api.get_transaction_by_hash(tx_hash=TX_HASH)
count = api.get_transaction_count(address)
receipt = api.get_transaction_receipt(TX_HASH)
uncles = api.get_uncle_by_blocknumber_index(block_number=block_numb,
                                            index=index)

# Stats

api = Stats(api_key=key)
Ejemplo n.º 2
0
print(trans_table)

balance = api.get_balance()
print(balance)

# Contract
address = '0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359'

api = Contract(address=address, api_key=key)
abi = api.get_abi()
print('\nContract:')
print(abi)

# Proxies
api = Proxies(api_key=key)
block = api.get_block_by_number(5747732)
print('\nProxies:')
print(block['number'])

block = api.get_most_recent_block()
print(int(block, 16))

# Stats
api = Stats(api_key=key)
last_price = api.get_ether_last_price()
last_price_table = pd.DataFrame(last_price, index=[0])
print('\nLast ether price')
print(last_price_table)

# call with default address, The DAO
api = Stats(api_key=key)