コード例 #1
0
def userB_has_some_amount_of_eth_in_plasma_cash(context, amount):
    client = Client(container.get_root_chain(), container.get_child_chain_client(), userB_key)
    block = client.get_block(TRANSFER_TX_BLOCK)
    tx = block.get_tx_by_uid(uid)
    assert tx.amount == amount, 'tx.amount {} != amount: {}'.format(tx.amount, amount)

    assert_msg = 'tx.new_owner {} not same address as userB: {}'.format(tx.new_owner.hex(), userB)
    assert address_equals(tx.new_owner.hex(), userB), assert_msg
コード例 #2
0
def userA_have_some_amount_of_eth_in_plasma_cash(context, amount):
    client = container.get_client()
    block = client.get_block(DEPOSIT_TX_BLOCK)
    tx = block.get_tx_by_uid(uid)
    assert tx.amount == amount, 'tx.amount {} != amount: {}'.format(
        tx.amount, amount)

    assert_msg = 'new_owner {} is not same address as userA: {}'.format(
        tx.new_owner.hex(), userA)
    assert address_equals(tx.new_owner.hex(), userA), assert_msg