Develop an integration test for Alice pays Dave for ice cream

Description

Goal
The goal is to create an integration test(s) that demonstrates a requirement show how Alice pays Dave for ice cream. This is described in https://rchain.atlassian.net/wiki/spaces/CORE/pages/652640311/Wallet+proposal#Walletproposal-AlicepaysDaveforicecream

Done when
There are one or more integration tests added to the CI/CD test suite that demonstrate the ability for Alice to pay Dave for ice cream .

Scenarios

A

Execute as a deployer "Alice" having some rev (probably a testnet operator / genesis vault owner):

Deploy a contract doing a transfer to an unused RevAddress (this is important for covering onboarding as well).

The contract should be along the lines of

Execute with the private key of user "Bob" corresponding to the targetVault's RevAddress
deploy a transfer of 50 rev back to Alice
check balances of both vaults to be as expected (Alice = initial balance - 50, Bob = 50)

B

Execute as Alice, deploy .rho that:
creates a vault for Charlie (a new user),
tries to do a transfer from it using the deployerAuthKey
The transfer should fail (retrun (false, "Invalid AuthKey"))

BLOCKERS

To obtain Bob's rev address, one would use the off-chain tool described in RCHAIN-2974.

To obtain the public key needed for that, one would generate a keypair as described in

We need a way of asserting execution results for contracts (is there one already?)

We need a way of setting up a genesis vault for the integration tests / safely passing in integration tests the private key to one of those.

Assignee

Will Qiu

Reporter

Kelly Foster

Priority

Medium

Components

Story Points

13

Epic Link

Fix versions

Labels

Sprint

None
Configure