Skip to content

Commit

Permalink
Add Centralized Edition for GCT and GCTO with unittest.
Browse files Browse the repository at this point in the history
  • Loading branch information
ice09 committed Oct 21, 2021
1 parent dd36017 commit b8c5806
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,12 @@ public String prepareTokenTrustGraph() throws Exception {
List<String> dests = Lists.newArrayList(groupCurrencyTokenAlice.getAddress(), groupCurrencyTokenBob.getAddress(), gcto.getContractAddress());
List<BigInteger> wads = Lists.newArrayList(BigInteger.TWO, BigInteger.TWO, BigInteger.TWO);

// Now mint Charly Token for GCT
// Transitive Transfer of Charly Tokens to GCTO
trx = orgaHubCharly.transferThrough(tokenOwners, srcs, dests, wads).send();
// The Service must monitor the events on the GCTO contract (to get transfer events)
eventLogger.addTokenTransferEvent(tokenBob, groupCurrencyTokenBob, trx);
// The Service must trigger mintTransitive with destination and source (to reduce fraud potential) to mint
// Use Bob Tokens as source (these have been transferred to GTCO transitively) and Charly as destination
trx = gcto.mintTransitive(groupCurrencyTokenCharly.getAddress(), groupCurrencyTokenBob.getAddress(), BigInteger.TWO).send();
eventLogger.addTokenMintingEvent(gct, trx);
eventLogger.addTokenTransferEvent(tokenCharly, groupCurrencyTokenBob, trx);
Expand Down

0 comments on commit b8c5806

Please sign in to comment.