Overview
APE Balance
0 APE
APE Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 4477831 | 32 hrs ago | IN | 0 APE | 0.01444357 |
Loading...
Loading
Contract Name:
ApeswapERC20
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.19; // SPDX-License-Identifier: MIT import "./interfaces/IApeswapERC20.sol"; import "./libraries/SafeMath.sol"; contract ApeswapERC20 is IApeswapERC20 { using SafeMath for uint256; string public constant name = "Ape LPs"; string public constant symbol = "Ape-LP"; uint8 public constant decimals = 18; uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; bytes32 public DOMAIN_SEPARATOR; // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); bytes32 public constant PERMIT_TYPEHASH = 0x7af2cd06d86e4252f2c847dae09d1922eb5b0e90a2231ecaf7298d7aaf1f1ccf; mapping(address => uint256) public nonces; constructor() { uint256 chainId = block.chainid; DOMAIN_SEPARATOR = keccak256( abi.encode( keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ), keccak256(bytes(name)), keccak256(bytes("1")), chainId, address(this) ) ); } function _mint(address to, uint256 value) internal { totalSupply = totalSupply.add(value); balanceOf[to] = balanceOf[to].add(value); emit Transfer(address(0), to, value); } function _burn(address from, uint256 value) internal { balanceOf[from] = balanceOf[from].sub(value); totalSupply = totalSupply.sub(value); emit Transfer(from, address(0), value); } function _approve( address owner, address spender, uint256 value ) private { allowance[owner][spender] = value; emit Approval(owner, spender, value); } function _transfer( address from, address to, uint256 value ) private { balanceOf[from] = balanceOf[from].sub(value); balanceOf[to] = balanceOf[to].add(value); emit Transfer(from, to, value); } function approve(address spender, uint256 value) external returns (bool) { _approve(msg.sender, spender, value); return true; } function transfer(address to, uint256 value) external returns (bool) { _transfer(msg.sender, to, value); return true; } function transferFrom( address from, address to, uint256 value ) external returns (bool) { if (allowance[from][msg.sender] != uint256(int256(-1))) { allowance[from][msg.sender] = allowance[from][msg.sender].sub( value ); } _transfer(from, to, value); return true; } function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external { require(deadline >= block.timestamp, "Apeswap: EXPIRED"); 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, "Apeswap: INVALID_SIGNATURE" ); _approve(owner, spender, value); } }
pragma solidity ^0.8.19; // SPDX-License-Identifier: MIT interface IApeswapERC20 { event Approval( address indexed owner, address indexed spender, uint256 value ); event Transfer(address indexed from, address indexed to, uint256 value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transfer(address to, uint256 value) external returns (bool); function transferFrom( address from, address to, uint256 value ) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint256); function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; }
pragma solidity ^0.8.19; // SPDX-License-Identifier: MIT // a library for performing overflow-safe math, courtesy of DappHub (https://github.com/dapphub/ds-math) library SafeMath { function add(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x + y) >= x, "ds-math-add-overflow"); } function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x - y) <= x, "ds-math-sub-underflow"); } function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { require(y == 0 || (z = x * y) / y == x, "ds-math-mul-overflow"); } }
{ "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":[],"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":"value","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":"value","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":"value","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":"value","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":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561000f575f80fd5b506040805180820182526007815266417065204c507360c81b6020918201528151808301835260018152603160f81b9082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f8490894d376b824a90fde9ba945adb7da0350e2173690febff8f6a46c25c7597818401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a0808301919091528351808303909101815260c090910190925281519101206003556108d5806100eb5f395ff3fe608060405234801561000f575f80fd5b50600436106100cb575f3560e01c80633644e5151161008857806395d89b411161006357806395d89b41146101df578063a9059cbb14610204578063d505accf14610217578063dd62ed3e1461022c575f80fd5b80633644e5151461019857806370a08231146101a15780637ecebe00146101c0575f80fd5b806306fdde03146100cf578063095ea7b31461010b57806318160ddd1461012e57806323b872dd1461014457806330adf81f14610157578063313ce5671461017e575b5f80fd5b6100f560405180604001604052806007815260200166417065204c507360c81b81525081565b60405161010291906106c8565b60405180910390f35b61011e61011936600461072e565b610256565b6040519015158152602001610102565b6101365f5481565b604051908152602001610102565b61011e610152366004610756565b61026c565b6101367f7af2cd06d86e4252f2c847dae09d1922eb5b0e90a2231ecaf7298d7aaf1f1ccf81565b610186601281565b60405160ff9091168152602001610102565b61013660035481565b6101366101af36600461078f565b60016020525f908152604090205481565b6101366101ce36600461078f565b60046020525f908152604090205481565b6100f56040518060400160405280600681526020016504170652d4c560d41b81525081565b61011e61021236600461072e565b6102fc565b61022a6102253660046107af565b610308565b005b61013661023a36600461081c565b600260209081525f928352604080842090915290825290205481565b5f61026233848461051b565b5060015b92915050565b6001600160a01b0383165f9081526002602090815260408083203384529091528120545f19146102e7576001600160a01b0384165f9081526002602090815260408083203384529091529020546102c3908361057c565b6001600160a01b0385165f9081526002602090815260408083203384529091529020555b6102f28484846105d1565b5060019392505050565b5f6102623384846105d1565b428410156103505760405162461bcd60e51b815260206004820152601060248201526f105c195cddd85c0e881156141254915160821b60448201526064015b60405180910390fd5b6003546001600160a01b0388165f90815260046020526040812080549192917f7af2cd06d86e4252f2c847dae09d1922eb5b0e90a2231ecaf7298d7aaf1f1ccf918b918b918b9190876103a283610861565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e0016040516020818303038152906040528051906020012060405160200161041b92919061190160f01b81526002810192909252602282015260420190565b60408051601f1981840301815282825280516020918201205f80855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015610483573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906104b95750886001600160a01b0316816001600160a01b0316145b6105055760405162461bcd60e51b815260206004820152601a60248201527f417065737761703a20494e56414c49445f5349474e41545552450000000000006044820152606401610347565b61051089898961051b565b505050505050505050565b6001600160a01b038381165f8181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b5f826105888382610879565b91508111156102665760405162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b6044820152606401610347565b6001600160a01b0383165f908152600160205260409020546105f3908261057c565b6001600160a01b038085165f9081526001602052604080822093909355908416815220546106219082610674565b6001600160a01b038084165f8181526001602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061056f9085815260200190565b5f82610680838261088c565b91508110156102665760405162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b6044820152606401610347565b5f6020808352835180828501525f5b818110156106f3578581018301518582016040015282016106d7565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610729575f80fd5b919050565b5f806040838503121561073f575f80fd5b61074883610713565b946020939093013593505050565b5f805f60608486031215610768575f80fd5b61077184610713565b925061077f60208501610713565b9150604084013590509250925092565b5f6020828403121561079f575f80fd5b6107a882610713565b9392505050565b5f805f805f805f60e0888a0312156107c5575f80fd5b6107ce88610713565b96506107dc60208901610713565b95506040880135945060608801359350608088013560ff811681146107ff575f80fd5b9699959850939692959460a0840135945060c09093013592915050565b5f806040838503121561082d575f80fd5b61083683610713565b915061084460208401610713565b90509250929050565b634e487b7160e01b5f52601160045260245ffd5b5f600182016108725761087261084d565b5060010190565b818103818111156102665761026661084d565b808201808211156102665761026661084d56fea26469706673582212208295d758bdd827637d61a70526244ba73dc18d5bafd006a5f25a72394996ab6564736f6c63430008140033
Deployed Bytecode
0x608060405234801561000f575f80fd5b50600436106100cb575f3560e01c80633644e5151161008857806395d89b411161006357806395d89b41146101df578063a9059cbb14610204578063d505accf14610217578063dd62ed3e1461022c575f80fd5b80633644e5151461019857806370a08231146101a15780637ecebe00146101c0575f80fd5b806306fdde03146100cf578063095ea7b31461010b57806318160ddd1461012e57806323b872dd1461014457806330adf81f14610157578063313ce5671461017e575b5f80fd5b6100f560405180604001604052806007815260200166417065204c507360c81b81525081565b60405161010291906106c8565b60405180910390f35b61011e61011936600461072e565b610256565b6040519015158152602001610102565b6101365f5481565b604051908152602001610102565b61011e610152366004610756565b61026c565b6101367f7af2cd06d86e4252f2c847dae09d1922eb5b0e90a2231ecaf7298d7aaf1f1ccf81565b610186601281565b60405160ff9091168152602001610102565b61013660035481565b6101366101af36600461078f565b60016020525f908152604090205481565b6101366101ce36600461078f565b60046020525f908152604090205481565b6100f56040518060400160405280600681526020016504170652d4c560d41b81525081565b61011e61021236600461072e565b6102fc565b61022a6102253660046107af565b610308565b005b61013661023a36600461081c565b600260209081525f928352604080842090915290825290205481565b5f61026233848461051b565b5060015b92915050565b6001600160a01b0383165f9081526002602090815260408083203384529091528120545f19146102e7576001600160a01b0384165f9081526002602090815260408083203384529091529020546102c3908361057c565b6001600160a01b0385165f9081526002602090815260408083203384529091529020555b6102f28484846105d1565b5060019392505050565b5f6102623384846105d1565b428410156103505760405162461bcd60e51b815260206004820152601060248201526f105c195cddd85c0e881156141254915160821b60448201526064015b60405180910390fd5b6003546001600160a01b0388165f90815260046020526040812080549192917f7af2cd06d86e4252f2c847dae09d1922eb5b0e90a2231ecaf7298d7aaf1f1ccf918b918b918b9190876103a283610861565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810187905260e0016040516020818303038152906040528051906020012060405160200161041b92919061190160f01b81526002810192909252602282015260420190565b60408051601f1981840301815282825280516020918201205f80855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015610483573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116158015906104b95750886001600160a01b0316816001600160a01b0316145b6105055760405162461bcd60e51b815260206004820152601a60248201527f417065737761703a20494e56414c49445f5349474e41545552450000000000006044820152606401610347565b61051089898961051b565b505050505050505050565b6001600160a01b038381165f8181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b5f826105888382610879565b91508111156102665760405162461bcd60e51b815260206004820152601560248201527464732d6d6174682d7375622d756e646572666c6f7760581b6044820152606401610347565b6001600160a01b0383165f908152600160205260409020546105f3908261057c565b6001600160a01b038085165f9081526001602052604080822093909355908416815220546106219082610674565b6001600160a01b038084165f8181526001602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061056f9085815260200190565b5f82610680838261088c565b91508110156102665760405162461bcd60e51b815260206004820152601460248201527364732d6d6174682d6164642d6f766572666c6f7760601b6044820152606401610347565b5f6020808352835180828501525f5b818110156106f3578581018301518582016040015282016106d7565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114610729575f80fd5b919050565b5f806040838503121561073f575f80fd5b61074883610713565b946020939093013593505050565b5f805f60608486031215610768575f80fd5b61077184610713565b925061077f60208501610713565b9150604084013590509250925092565b5f6020828403121561079f575f80fd5b6107a882610713565b9392505050565b5f805f805f805f60e0888a0312156107c5575f80fd5b6107ce88610713565b96506107dc60208901610713565b95506040880135945060608801359350608088013560ff811681146107ff575f80fd5b9699959850939692959460a0840135945060c09093013592915050565b5f806040838503121561082d575f80fd5b61083683610713565b915061084460208401610713565b90509250929050565b634e487b7160e01b5f52601160045260245ffd5b5f600182016108725761087261084d565b5060010190565b818103818111156102665761026661084d565b808201808211156102665761026661084d56fea26469706673582212208295d758bdd827637d61a70526244ba73dc18d5bafd006a5f25a72394996ab6564736f6c63430008140033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.