Skip to content

Instantly share code, notes, and snippets.

@hihiben
Created April 19, 2021 03:31
Show Gist options
  • Save hihiben/84cedacb7317b4c7ecce1617ea4c68f7 to your computer and use it in GitHub Desktop.
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=
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