Created
April 19, 2021 03:31
-
-
Save hihiben/84cedacb7317b4c7ecce1617ea4c68f7 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.3+commit.8d00100c.js&optimize=true&runs=200&gist=
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.8.0; | |
import "https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-contracts/master/contracts/token/ERC20/ERC20.sol"; | |
contract TST is ERC20 { | |
constructor() ERC20("Test token", "TST") { | |
_mint(msg.sender, 10000 * (10**uint256(decimals()))); | |
} | |
} | |
contract Bank { | |
// deposit ETH function | |
// withdraw ETH function | |
// deposit token function | |
// withdraw token function | |
} | |
contract Setup { | |
ERC20 public token; | |
Bank public bank; | |
constructor() { | |
token = new TST(); | |
bank = new Bank(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment