Ejemplo n.º 1
0
                                        internal=False)
block = api.get_blocks_mined_page(page=1, offset=1, blocktype='blocks')
blocks = api.get_all_blocks_mined(offset=10, blocktype='uncles')

# address = ['0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a',
#           '0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a']
#
#api = Account(address=address, api_key=key)
#balances = api.get_balance_multiple()
# print(balances)

# Blocks

api = Blocks(api_key=key)

reward = api.get_block_reward(2165403)

# Contracts

address = '0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359'
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'
Ejemplo n.º 2
0
formatted_bm['timeStamp'] = pd.to_datetime(formatted_bm['timeStamp'], unit='s')
print(formatted_bm.head(5))

## multiple address
addresses = ['0xbb9bc244d798123fde783fcc1c72d3bb8c189413', '0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a']
api = Account(address=addresses, api_key=key)
### get balance
mutiple_bal = api.get_balance_multiple()
formatted_mb = pd.DataFrame.from_dict(mutiple_bal)
print(formatted_mb.head(5))

# Blocks
block = 2165403
api = Blocks(api_key=key)
### get reward
reward = api.get_block_reward(block)
print(reward)

# Contracts
address = '0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359'
### get abi
api = Contract(address=address, api_key=key)
abi = api.get_abi()
print(abi)
### get sourcecode
sourcecode = api.get_sourcecode()
print(sourcecode[0]['SourceCode'])

# Proxies
### get most recent block
api = Proxies(api_key=key)