Skip to content

Commit

Permalink
Updating docs
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardonunesp committed Aug 29, 2018
1 parent 175ebcd commit ae54970
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Cards Gateway Example
# Transfer Gateway Example

This project is built using the [loom-js][] Transfer Gateway API, and demonstrates how to transfer
ERC721 tokens between Ethereum and Loom DAppChains via a browser frontend built with React.
ERC721/ERC20 tokens between Ethereum and Loom DAppChains via a browser frontend built with React.

## Interface in action

Expand Down Expand Up @@ -133,7 +133,7 @@ RegistryVersion: 2
TransferGateway:
# Enables the Gateway Go contract (DAppChain Gateway), must be the same on all nodes.
ContractEnabled: true

# Enables the in-process Gateway Oracle.
OracleEnabled: true

Expand Down Expand Up @@ -161,7 +161,7 @@ TransferGateway:
# Number of seconds to wait before starting the Gateway Oracle, this allows the DAppChain node
# to spin up before the Gateway Oracle tries to connect to it.
OracleStartupDelay: 5

# Number of seconds the Gateway Oracle should wait between reconnection attempts if it encounters
# a network error of some kind.
OracleReconnectInterval: 5
Expand Down Expand Up @@ -217,9 +217,9 @@ data between the DAppChain and Mainnet.
### πŸ“ truffle-ethereum

This directory contains the contracts that are deployed to Mainnet, primarily the `Gateway` contract
(Mainnet Gateway), and the `CryptoCards` ERC721 token contract.
(Mainnet Gateway), and the `CryptoCards/GameToken` ERC721/ERC20 token contract.

The `CryptoCards` ERC721 contract implements a convenient function for depositing tokens into the
The `CryptoCards/GameToken` ERC721/ERC20 contract implements a convenient function for depositing tokens into the
`Gateway` contract:

```solidity
Expand All @@ -228,22 +228,22 @@ function depositToGateway(uint tokenId) public {
}
```

The `Gateway` contract implements the `withdrawERC721` function, which should be called by a user
The `Gateway` contract implements the `withdrawERC721` or `withdrawERC20` function, which should be called by a user
who wishes to withdraw a token from the Mainnet Gateway back to their own Mainnet account.

> NOTE: The Mainnet Gateway will only allow a user to withdraw a token if they can provide proof
> that it's no longer in circulation on the DAppChain, you can read more about it in the [Transfer Gateway docs][].

### πŸ“ truffle-dappchain

This directory contains the `CryptoCardsDAppChain` ERC721 contract that's deployed to the DAppChain,
this contract will keep track of any tokens sent from the `CryptoCards` ERC721 contract on Mainnet
This directory contains the `CryptoCardsDAppChain/GameTokenDAppChain` ERC721/ERC20 contract that's deployed to the DAppChain,
this contract will keep track of any tokens sent from the `CryptoCards/GameToken` ERC721/ERC20 contract on Mainnet
to the DAppChain via the Transfer Gateway.

When a user deposits their `CryptoCards` tokens into the Mainnet Gateway contract the DAppChain
Gateway contract will `mint` the corresponding tokens in the `CryptoCardsDAppChain` contract.
When a user deposits their `CryptoCards/GameToken` tokens into the Mainnet Gateway contract the DAppChain
Gateway contract will `mint` the corresponding tokens in the `CryptoCardsDAppChain/GameTokenDAppChain` contract.

Note that the DAppChain Gateway must be authorized to mint tokens in the `CryptoCardsDAppChain`
Note that the DAppChain Gateway must be authorized to mint tokens in the `CryptoCardsDAppChain/GameTokenDAppChain`
contract, otherwise token transfers from Mainnet to the DAppChain won't work.

```solidity
Expand All @@ -256,9 +256,9 @@ function mint(uint256 _uid) public {
### πŸ“ transfer-gateway-scripts

This directory contains a single `index.js` script file which is responsible for mapping the
`CryptoCards` ERC721 contract on Mainnet to the `CryptoCardsDAppChain` ERC721 contract on the
`CryptoCards/GameToken` ERC721/ERC20 contract on Mainnet to the `CryptoCardsDAppChain/GameTokenDAppChain` ERC721/ERC20 contract on the
DAppChain. Without this contract mapping the Transfer Gateway won't know what to do when it receives
ERC721 tokens from either contract. You can read more about contract mapping in the
ERC721/ERC20 tokens from either contract. You can read more about contract mapping in the
[Transfer Gateway docs][].

### πŸ“ webclient
Expand Down

0 comments on commit ae54970

Please sign in to comment.