Adding back register function

This commit is contained in:
Richard Ramos 2018-07-31 12:13:22 -04:00
parent 9a53bc8eb0
commit 98f2f077a2
1 changed files with 11 additions and 0 deletions

View File

@ -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];