This file contains hidden or 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
| { | |
| "Practice Classes/MiniToken.sol": { | |
| "__sources__": { | |
| "Practice Classes/MiniToken.sol": { | |
| "content": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\n/// @title MiniToken — class 4 exercise\n/// @notice Implement an ERC-20 from scratch. Fill every TODO until the file\n/// compiles and behaves per the spec slide.\ncontract MiniToken {\n string public name = \"MiniToken\";\n string public symbol = \"MINI\";\n uint8 public constant decimals = 18;\n\n uint256 private _totalSupply;\n mapping(address => uint256) private _balances;\n mapping(address => mapping(address => uint256)) private _allowances;\n\n event Transfer(address indexed from, address indexed to, uint256 value);\n event Approval(address indexed owner, address indexed spender, uint256 value);\n\n error InsufficientBalance(address from, uint256 have, uint256 need);\n error InsufficientAllowance(address owner, address spender, uint256 have, uint256 need);\n\n constructor(uint256 i |