def get_by_address(address)
      raise ArgumentError, 'address must be 20 bytes' unless address.size == 20

      accts = @accounts.select {|acct| acct.address == address }

      if accts.size == 0
        raise KeyError, "account not found by address #{Utils.encode_hex(address)}"
      elsif accts.size > 1
        logger.warn "multiple accounts with same address found", address: Utils.encode_hex(address)
      end

      accts[0]
    end
def get_by_address(address)
      raise ArgumentError, 'address must be 20 bytes' unless address.size == 20

      accts = @accounts.select {|acct| acct.address == address }

      if accts.size == 0
        raise KeyError, "account not found by address #{Utils.encode_hex(address)}"
      elsif accts.size > 1
        logger.warn "multiple accounts with same address found", address: Utils.encode_hex(address)
      end

      accts[0]
    end
Get an account by its address.

 Note that even if an account with the given address exists, it might
 not be found if it is locked. Also, multiple accounts with the same
 address may exist, in which case the first one is returned (and a
 warning is logged).

 @raise [KeyError] if no matching account can be found