def total_sov(): api = tokens.Tokens(contract_address=address, api_key=api_key) total = api.get_total_supply() return (int(total) / 100000000)
print('balance_multiple:', balance_multiple) #block_mined = api.get_all_blocks_mined(offset=10000, blocktype='blocks') #print('block_mined:', block_mined) transaction = api.get_transaction_page(page=1, offset=10) df_transaction = pd.DataFrame(transaction) print('transaction:', df_transaction.head()) #all_transaction = api.get_all_transactions(offset=10000, sort='asc') #df_all_transaction = pd.DataFrame(all_transaction) #print(all_transaction[0]) #Tokens contract_address = '0x57d90b64a1a57749b0f932f1a3395792e12e7055' api2 = tokens.Tokens(contract_address=contract_address, api_key=key) token = api2.get_token_balance(address=address) print('token:', token) total_supply = api2.get_total_supply() print('total supply:', total_supply) #Proxies api3 = proxies.Proxies(api_key=key) #price = api3.gas_price() #print('price:', price) recent_block = api3.get_most_recent_block() print('recent block:', recent_block) block_by_number = api3.get_block_by_number(5747732) print('block_by_number:', block_by_number)
def __init__(self, key, contract_address): self.key = key self.contract_address = contract_address self.api = tokens.Tokens(contract_address=contract_address, api_key=key)
def ERC20token_total_supply(key, contract_adddress): api = tokens.Tokens(contract_address=contract_address, api_key=key) print(api.get_total_supply())
def ERC20token_account_bal(key, contract_address, address): api = tokens.Tokens(contract_address=contract_address, api_key=key) print(api.get_token_balance(address=address))
def change_token_contract(self, contract_address): self.contract_address = contract_address self.api = tokens.Tokens(contract_address=contract_address, api_key=self.api_key)