Пример #1
0
 def balance_current_contract(self, *addresses):
     address_list = []
     for address in addresses:
         address_list.append(
             neo_get_scripthash_from_address(address=address))
     return self.get_balance(addresses=address_list,
                             contracts=self.current_contract_hash)
 def balance_current_contract(self, *addresses):
     address_list = []
     contract_dict = {}
     for address in addresses:
         address_list.append(
             neo_get_scripthash_from_address(address=address))
     current_contract = current_contract_hash(self.contracts)
     for chain in current_contract.keys():
         contract_dict[chain] =\
             self.get_balance(addresses=address_list, contracts=current_contract[chain])
     return contract_dict
 def balance_by_contract(self, *addresses):
     address_list = []
     contract_dict = {}
     for address in addresses:
         address_list.append(
             neo_get_scripthash_from_address(address=address))
     contracts = self.get_contracts()
     for blockchain in contracts:
         contract_dict[blockchain] = {}
         for key in contracts[blockchain]:
             contract_dict[blockchain][key] =\
                 self.get_balance(addresses=address_list, contracts=contracts[blockchain][key])
     return contract_dict
 def order_history(self, address, pair=None):
     return self.get_orders(
         neo_get_scripthash_from_address(address=address), pair=pair)
Пример #5
0
 def test_neo_get_scripthash_from_address(self):
     self.assertEqual(neo_get_scripthash_from_address(address=testnet_address), testnet_scripthash)