ERC-20
Overview
Max Total Supply
150,000,000 PEACE
Holders
1,135
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
1,573,413.359832638920234064 PEACEValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Peace
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0 pragma solidity ^0.8.11; /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol) /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) /// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. abstract contract ERC20 { /*/////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); /*/////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ string public name; string public symbol; uint8 public immutable decimals; /*/////////////////////////////////////////////////////////////// ERC20 STORAGE //////////////////////////////////////////////////////////////*/ uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; /*/////////////////////////////////////////////////////////////// EIP-2612 STORAGE //////////////////////////////////////////////////////////////*/ bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); uint256 internal immutable INITIAL_CHAIN_ID; bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; mapping(address => uint256) public nonces; /*/////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor( string memory _name, string memory _symbol, uint8 _decimals ) { name = _name; symbol = _symbol; decimals = _decimals; INITIAL_CHAIN_ID = block.chainid; INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); } /*/////////////////////////////////////////////////////////////// ERC20 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 amount) public virtual returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function transfer(address to, uint256 amount) public virtual returns (bool) { balanceOf[msg.sender] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(msg.sender, to, amount); return true; } function transferFrom( address from, address to, uint256 amount ) public virtual returns (bool) { uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; balanceOf[from] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(from, to, amount); return true; } /*/////////////////////////////////////////////////////////////// EIP-2612 LOGIC //////////////////////////////////////////////////////////////*/ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); // Unchecked because the only math done is incrementing // the owner's nonce which cannot realistically overflow. unchecked { bytes32 digest = keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR(), keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline)) ) ); address recoveredAddress = ecrecover(digest, v, r, s); require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); allowance[recoveredAddress][spender] = value; } emit Approval(owner, spender, value); } function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); } function computeDomainSeparator() internal view virtual returns (bytes32) { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256("1"), block.chainid, address(this) ) ); } /*/////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 amount) internal virtual { totalSupply += amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(address(0), to, amount); } function _burn(address from, uint256 amount) internal virtual { balanceOf[from] -= amount; // Cannot underflow because a user's balance // will never be larger than the total supply. unchecked { totalSupply -= amount; } emit Transfer(from, address(0), amount); } } contract Peace is ERC20("PEACEVOID", "PEACE", 18) { constructor (address to) { _mint(to, 150000000 ether); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"to","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e06040523480156200001157600080fd5b5060405162000ec038038062000ec0833981016040819052620000349162000287565b604080518082018252600981526814115050d15593d25160ba1b602080830191825283518085019094526005845264504541434560d81b908401528151919291601291620000869160009190620001e1565b5081516200009c906001906020850190620001e1565b5060ff81166080524660a052620000b2620000d8565b60c05250620000d191508290506a7c13bc4b2c133c5600000062000174565b50620003c1565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60006040516200010c9190620002f6565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b80600260008282546200018891906200039a565b90915550506001600160a01b0382166000818152600360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b828054620001ef90620002b9565b90600052602060002090601f0160209004810192826200021357600085556200025e565b82601f106200022e57805160ff19168380011785556200025e565b828001600101855582156200025e579182015b828111156200025e57825182559160200191906001019062000241565b506200026c92915062000270565b5090565b5b808211156200026c576000815560010162000271565b6000602082840312156200029a57600080fd5b81516001600160a01b0381168114620002b257600080fd5b9392505050565b600181811c90821680620002ce57607f821691505b60208210811415620002f057634e487b7160e01b600052602260045260246000fd5b50919050565b600080835481600182811c9150808316806200031357607f831692505b60208084108214156200033457634e487b7160e01b86526022600452602486fd5b8180156200034b57600181146200035d576200038c565b60ff198616895284890196506200038c565b60008a81526020902060005b86811015620003845781548b82015290850190830162000369565b505084890196505b509498975050505050505050565b60008219821115620003bc57634e487b7160e01b600052601160045260246000fd5b500190565b60805160a05160c051610acf620003f16000396000610467015260006104320152600061016b0152610acf6000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c80633644e5151161008c57806395d89b411161006657806395d89b41146101e7578063a9059cbb146101ef578063d505accf14610202578063dd62ed3e1461021757600080fd5b80633644e5151461019f57806370a08231146101a75780637ecebe00146101c757600080fd5b806306fdde03146100d4578063095ea7b3146100f257806318160ddd1461011557806323b872dd1461012c57806330adf81f1461013f578063313ce56714610166575b600080fd5b6100dc610242565b6040516100e991906107fe565b60405180910390f35b61010561010036600461086f565b6102d0565b60405190151581526020016100e9565b61011e60025481565b6040519081526020016100e9565b61010561013a366004610899565b61033c565b61011e7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b61018d7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016100e9565b61011e61042e565b61011e6101b53660046108d5565b60036020526000908152604090205481565b61011e6101d53660046108d5565b60056020526000908152604090205481565b6100dc610489565b6101056101fd36600461086f565b610496565b6102156102103660046108f7565b61050e565b005b61011e61022536600461096a565b600460209081526000928352604080842090915290825290205481565b6000805461024f9061099d565b80601f016020809104026020016040519081016040528092919081815260200182805461027b9061099d565b80156102c85780601f1061029d576101008083540402835291602001916102c8565b820191906000526020600020905b8154815290600101906020018083116102ab57829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061032b9086815260200190565b60405180910390a350600192915050565b6001600160a01b038316600090815260046020908152604080832033845290915281205460001981146103985761037383826109d8565b6001600160a01b03861660009081526004602090815260408083203384529091529020555b6001600160a01b038516600090815260036020526040812080548592906103c09084906109d8565b90915550506001600160a01b03808516600081815260036020526040908190208054870190555190918716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061041b9087815260200190565b60405180910390a3506001949350505050565b60007f000000000000000000000000000000000000000000000000000000000000000046146104645761045f610764565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001805461024f9061099d565b336000908152600360205260408120805483919083906104b79084906109d8565b90915550506001600160a01b038316600081815260036020526040908190208054850190555133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061032b9086815260200190565b428410156105635760405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f4558504952454400000000000000000060448201526064015b60405180910390fd5b600061056d61042e565b6001600160a01b0389811660008181526005602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938c166060840152608083018b905260a083019390935260c08083018a90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015610686573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906106bc5750886001600160a01b0316816001600160a01b0316145b6106f95760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b604482015260640161055a565b6001600160a01b0390811660009081526004602090815260408083208b8516808552908352928190208a905551898152919350918a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f600060405161079691906109fd565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600060208083528351808285015260005b8181101561082b5785810183015185820160400152820161080f565b8181111561083d576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461086a57600080fd5b919050565b6000806040838503121561088257600080fd5b61088b83610853565b946020939093013593505050565b6000806000606084860312156108ae57600080fd5b6108b784610853565b92506108c560208501610853565b9150604084013590509250925092565b6000602082840312156108e757600080fd5b6108f082610853565b9392505050565b600080600080600080600060e0888a03121561091257600080fd5b61091b88610853565b965061092960208901610853565b95506040880135945060608801359350608088013560ff8116811461094d57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561097d57600080fd5b61098683610853565b915061099460208401610853565b90509250929050565b600181811c908216806109b157607f821691505b602082108114156109d257634e487b7160e01b600052602260045260246000fd5b50919050565b6000828210156109f857634e487b7160e01b600052601160045260246000fd5b500390565b600080835481600182811c915080831680610a1957607f831692505b6020808410821415610a3957634e487b7160e01b86526022600452602486fd5b818015610a4d5760018114610a5e57610a8b565b60ff19861689528489019650610a8b565b60008a81526020902060005b86811015610a835781548b820152908501908301610a6a565b505084890196505b50949897505050505050505056fea264697066735822122080c45e534bd7646c2e753e86bd2f4ed28d54ac7a4dd359d6725f5376e05f012664736f6c634300080b0033000000000000000000000000ebdd2c99ae959651acd437295b4321c446219b3d
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c80633644e5151161008c57806395d89b411161006657806395d89b41146101e7578063a9059cbb146101ef578063d505accf14610202578063dd62ed3e1461021757600080fd5b80633644e5151461019f57806370a08231146101a75780637ecebe00146101c757600080fd5b806306fdde03146100d4578063095ea7b3146100f257806318160ddd1461011557806323b872dd1461012c57806330adf81f1461013f578063313ce56714610166575b600080fd5b6100dc610242565b6040516100e991906107fe565b60405180910390f35b61010561010036600461086f565b6102d0565b60405190151581526020016100e9565b61011e60025481565b6040519081526020016100e9565b61010561013a366004610899565b61033c565b61011e7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b61018d7f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff90911681526020016100e9565b61011e61042e565b61011e6101b53660046108d5565b60036020526000908152604090205481565b61011e6101d53660046108d5565b60056020526000908152604090205481565b6100dc610489565b6101056101fd36600461086f565b610496565b6102156102103660046108f7565b61050e565b005b61011e61022536600461096a565b600460209081526000928352604080842090915290825290205481565b6000805461024f9061099d565b80601f016020809104026020016040519081016040528092919081815260200182805461027b9061099d565b80156102c85780601f1061029d576101008083540402835291602001916102c8565b820191906000526020600020905b8154815290600101906020018083116102ab57829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061032b9086815260200190565b60405180910390a350600192915050565b6001600160a01b038316600090815260046020908152604080832033845290915281205460001981146103985761037383826109d8565b6001600160a01b03861660009081526004602090815260408083203384529091529020555b6001600160a01b038516600090815260036020526040812080548592906103c09084906109d8565b90915550506001600160a01b03808516600081815260036020526040908190208054870190555190918716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061041b9087815260200190565b60405180910390a3506001949350505050565b60007f000000000000000000000000000000000000000000000000000000000000000146146104645761045f610764565b905090565b507f4b58892b0638493023c1a87126e4b2d30a247367960dd78ff0a18ddc510a816690565b6001805461024f9061099d565b336000908152600360205260408120805483919083906104b79084906109d8565b90915550506001600160a01b038316600081815260036020526040908190208054850190555133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061032b9086815260200190565b428410156105635760405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f4558504952454400000000000000000060448201526064015b60405180910390fd5b600061056d61042e565b6001600160a01b0389811660008181526005602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938c166060840152608083018b905260a083019390935260c08083018a90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015610686573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906106bc5750886001600160a01b0316816001600160a01b0316145b6106f95760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b604482015260640161055a565b6001600160a01b0390811660009081526004602090815260408083208b8516808552908352928190208a905551898152919350918a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f600060405161079691906109fd565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600060208083528351808285015260005b8181101561082b5785810183015185820160400152820161080f565b8181111561083d576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461086a57600080fd5b919050565b6000806040838503121561088257600080fd5b61088b83610853565b946020939093013593505050565b6000806000606084860312156108ae57600080fd5b6108b784610853565b92506108c560208501610853565b9150604084013590509250925092565b6000602082840312156108e757600080fd5b6108f082610853565b9392505050565b600080600080600080600060e0888a03121561091257600080fd5b61091b88610853565b965061092960208901610853565b95506040880135945060608801359350608088013560ff8116811461094d57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561097d57600080fd5b61098683610853565b915061099460208401610853565b90509250929050565b600181811c908216806109b157607f821691505b602082108114156109d257634e487b7160e01b600052602260045260246000fd5b50919050565b6000828210156109f857634e487b7160e01b600052601160045260246000fd5b500390565b600080835481600182811c915080831680610a1957607f831692505b6020808410821415610a3957634e487b7160e01b86526022600452602486fd5b818015610a4d5760018114610a5e57610a8b565b60ff19861689528489019650610a8b565b60008a81526020902060005b86811015610a835781548b820152908501908301610a6a565b505084890196505b50949897505050505050505056fea264697066735822122080c45e534bd7646c2e753e86bd2f4ed28d54ac7a4dd359d6725f5376e05f012664736f6c634300080b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000ebdd2c99ae959651acd437295b4321c446219b3d
-----Decoded View---------------
Arg [0] : to (address): 0xebdD2C99ae959651aCd437295b4321c446219B3D
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000ebdd2c99ae959651acd437295b4321c446219b3d
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.