From 98f2f077a2a1302ff4445329a64b1297dca151c3 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Tue, 31 Jul 2018 12:13:22 -0400 Subject: [PATCH] Adding back register function --- contracts/plasma/PlasmaERC20.sol | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/contracts/plasma/PlasmaERC20.sol b/contracts/plasma/PlasmaERC20.sol index 6254173..f950ae3 100644 --- a/contracts/plasma/PlasmaERC20.sol +++ b/contracts/plasma/PlasmaERC20.sol @@ -24,6 +24,17 @@ contract PlasmaERC20 is ERC721Token, Owned { mapping(uint => uint8) NFTTypes; mapping(uint => uint) ERC20Balances; + + // TODO: this is only for the demo. Remove + function register() external { + // Give each new player 5 cards + for (int j = 0; j < 5; j++) { + uint256 tokenId = allTokens.length + 1; + _mint(msg.sender, tokenId); + } + } + + function depositERC20(uint8 _NFTType) public { uint rate = exchangeRate[_NFTType];