Openzeppelin ์ด์ฉํด์, ํ์ค ERC-20 + ์์ ์ด ์ํ๋ ๊ธฐ๋ฅ๋ค ๋ด๊ธฐ โ ์ ํํ ๋ฆฌ์์น๋ฅผ ํด์, ํด๋น ํจ์๊ฐ ๋ญ ํ๊ณ ์ ๋ค์ด๊ฐ์ผ ๋๋์ง ์์ ์ ํ๋จ ๊ทผ๊ฑฐ๋ฅผ ๋ง๋ค๊ธฐ!
Metamask ์ธํ (rpc network, faucet, import token, ๊ณ์ ๋ถ๋ฌ์ค๊ธฐ ๋ฑ)
Tip : ์๊ธฐ๊ฐ ๊ฐ๋ฐํ๊ณ ์ ํ๋ ๋ถ์ผ์ ํ๋ก๋ํธ๋ค์ https://dappradar.com ์ ํตํด ์ฐพ์, ํด๋น ํ์ฌ์ github๋ฅผ ํ์ํด๋ณธ๋ค.
totalSupply()balanceOf(account)transfer(to, amount)allowance(owner, spender)approve(spender, amount)transferFrom(from, to, amount)Transfer(from, to, value)Approval(owner, spender, value)constructor(name_, symbol_)name : Token์ ์ด๋ฆsymbol : Token์ ๋จ์(3~4๊ธ์)decimals : Token์ ์์์ ์ ์ด๋๊น์ง ๋ํ๋ผ ๊ฒ์ธ์งincreaseAllowance(spender, addedValue)decreaseAllowance(spender, subtractedValue)_transfer(from, to, amount)_mint(account, amount)_burn(account, amount)_approve(owner, spender, amount)_spendAllowance(owner, spender, amount)_beforeTokenTransfer(from, to, amount)_afterTokenTransfer(from, to, amount)burn(amount)burnFrom(account, amount)checkpoints(account, pos)numCheckpoints(account)delegates(account)getVotes(account)getPastVotes(account, blockNumber)getPastTotalSupply(blockNumber)delegate(delegatee)delegateBySig(delegatee, nonce, expiry, v, r, s)_maxSupply()_mint(account, amount)_burn(account, amount)_afterTokenTransfer(from, to, amount)_delegate(delegator, delegatee)_beforeTokenTransfer(from, to, amount)constructor()paused()_pause()_unpause()_snapshot()_getCurrentSnapshotId()balanceOfAt(account, snapshotId)totalSupplyAt(snapshotId)_beforeTokenTransfer(from, to, amount)safeTransfer(token, to, value)safeTransferFrom(token, from, to, value)safeApprove(token, spender, value)safeIncreaseAllowance(token, spender, value)safeDecreaseAllowance(token, spender, value)import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Snapshot.sol";
import "@openzeppelin/contracts/token/ERC20/utils/TokenTimelock.sol";