mirror of
https://github.com/autistic-symposium/web3-starter-sol.git
synced 2025-08-01 19:26:05 -04:00
29 lines
977 B
Solidity
29 lines
977 B
Solidity
// SPDX-License-Identifier: MIT
|
|
pragma solidity ^0.8.17;
|
|
|
|
// ERC20 tokens provide functionalities to
|
|
// - transfer tokens
|
|
// - allow others to transfer tokens on behalf of the token holder
|
|
|
|
|
|
// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.0.0/contracts/token/ERC20/IERC20.sol
|
|
interface IERC20 {
|
|
function totalSupply() external view returns (uint);
|
|
|
|
function balanceOf(address account) external view returns (uint);
|
|
|
|
function transfer(address recipient, uint amount) external returns (bool);
|
|
|
|
function allowance(address owner, address spender) external view returns (uint);
|
|
|
|
function approve(address spender, uint amount) external returns (bool);
|
|
|
|
function transferFrom(
|
|
address sender,
|
|
address recipient,
|
|
uint amount
|
|
) external returns (bool);
|
|
|
|
event Transfer(address indexed from, address indexed to, uint value);
|
|
event Approval(address indexed owner, address indexed spender, uint value);
|
|
}
|