Ejemplo n.º 1
0
def do_guess(args, config):
    address = args.address
    balance = float(args.balance)

    url = config.get('DEFAULT', 'url')
    key_file = config.get('DEFAULT', 'key_file')

    # First, get the latest block from Ethereum.  We need this since
    # we specify the block when constructing the transaction, so we
    # can get deterministic results.
    block = get_ethereum_block_number()


    client = SegClient(baseurl=url, keyfile=key_file)
    client.guess(address=address, balance=balance, block=block)

    if args.wait:
        client.waitforcommit()