Verified contractPartialMIT
PepeKimchiToken
Address0xd0c16c23eebc6e40b915107bd8ff47f33df2afa8
- Balance
0 ETH
- Transactions
3
- Compiler
solc 0.8.28
- Same code
Only this contract
Details
- Compiler
- solc 0.8.28+commit.7893614a
- Language
- solidity
- Optimization
- No
- EVM version
- cancun
- License
- MIT
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 21,311,236
- Creation transaction
- 0xdc79f1afc4…273f628172
PepeKimchiToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract PepeKimchiToken {
string public name = "Pepe Kimchi"; // 토큰 이름
string public symbol = "PEKI"; // 토큰 심볼
uint8 public decimals = 18; // 소수점 자리수
uint256 public totalSupply = 10000000000 * (10 ** uint256(decimals)); // 총 발행량: 100억 개
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
// 이벤트 (전송 로그)
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
// 생성자
constructor() {
balanceOf[msg.sender] = totalSupply; // 배포자에게 전체 토큰 할당
emit Transfer(address(0), msg.sender, totalSupply);
}
// 전송 함수
function transfer(address to, uint256 value) public returns (bool success) {
require(balanceOf[msg.sender] >= value, "Insufficient balance");
balanceOf[msg.sender] -= value;
balanceOf[to] += value;
emit Transfer(msg.sender, to, value);
return true;
}
// 승인 함수
function approve(address spender, uint256 value) public returns (bool success) {
allowance[msg.sender][spender] = value;
emit Approval(msg.sender, spender, value);
return true;
}
// 승인된 토큰 전송 함수
function transferFrom(address from, address to, uint256 value) public returns (bool success) {
require(balanceOf[from] >= value, "Insufficient balance");
require(allowance[from][msg.sender] >= value, "Allowance exceeded");
balanceOf[from] -= value;
balanceOf[to] += value;
allowance[from][msg.sender] -= value;
emit Transfer(from, to, value);
return true;
}
}Compiler settingsShow
{
"metadata": {
"bytecodeHash": "ipfs"
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": false
},
"evmVersion": "cancun",
"remappings": []
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.