- Run Contract Tests
- Run Flow Tests
cd cordapp-mycash
./gradlew deployNodes
build/nodes/runnodes
# Issue 50 USD to PartyA in 5 installments
flow start IssueFlow$Initiator issuer: "O=Bank,L=New York,C=US", owner: "O=PartyA,L=London,C=GB", amount: 1000, currencyCode: "USD", anonymous: false
flow start IssueFlow$Initiator issuer: "O=Bank,L=New York,C=US", owner: "O=PartyA,L=London,C=GB", amount: 1000, currencyCode: "USD", anonymous: false
flow start IssueFlow$Initiator issuer: "O=Bank,L=New York,C=US", owner: "O=PartyA,L=London,C=GB", amount: 1000, currencyCode: "USD", anonymous: false
flow start IssueFlow$Initiator issuer: "O=Bank,L=New York,C=US", owner: "O=PartyA,L=London,C=GB", amount: 1000, currencyCode: "USD", anonymous: false
flow start IssueFlow$Initiator issuer: "O=Bank,L=New York,C=US", owner: "O=PartyA,L=London,C=GB", amount: 1000, currencyCode: "USD", anonymous: false
# You should see 5 unconsumed MyCash states
run vaultQuery contractStateType: com.template.state.MyCash
# Send 42 USD to PartyB
flow start MoveFlow$Initiator issuer: "O=Bank,L=New York,C=US", owner: "O=PartyA,L=London,C=GB", amount: 4200, currencyCode: "USD", newOwner: "O=PartyB,L=New York,C=US", anonymous: false
# You should see one new MyCash state of value 8 USD
run vaultQuery contractStateType: com.template.state.MyCash
# You should see one new MyCash state of value 42 USD
run vaultQuery contractStateType: com.template.state.MyCash
# (Copy txHash and txIndex)
run vaultQuery contractStateType: com.template.state.MyCash
# Exit the remaining 8 USD from the ledger
flow start ExitFlow$Initiator txHash: "", txIndex: , anonymous: false
# You shouldn't see any unconsumed states
run vaultQuery contractStateType: com.template.state.MyCash