- Sync Balance: Uses web3.unity to fetch users balance. If the user has a token, then change character to red
- Logic found in
/Assets/HYPERPLAY/SyncBalance.cs
- Logic found in
- Mint Token: Connects to metamask wallet to mint a token
- Logic found in
/Assets/HYPERPLAY/MintToken.cs
- Logic found in
- Burn Tokens: Connects to metamask wallet to burn all of a players token. (a way to reset)
- Logic found in
/Assets/HYPERPLAY/BurnToken.cs
- Logic found in
https://goerli.etherscan.io/address/0xDD6ff2bA7fD02D19e8e4e1d99b65802eD9705437
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract ERC20Token is ERC20 {
constructor() ERC20("Test Token20", "tTKN20") {}
// mints 1 token
function publicMint() public {
_mint(msg.sender, 1);
}
// burns all of users token
function publicBurn() public {
_burn(msg.sender, this.balanceOf(msg.sender));
}
}