APE Price: $1.14 (+4.07%)

Contract

0xbf4C2022769B45747E0298B4953439cF79216dd5

Overview

APE Balance

Apechain LogoApechain LogoApechain Logo0 APE

APE Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Approve44918842024-11-17 11:47:3228 hrs ago1731844052IN
0xbf4C2022...F79216dd5
0 APE0.0011827225.42069
Approve43218722024-11-15 10:42:453 days ago1731667365IN
0xbf4C2022...F79216dd5
0 APE0.0011827225.42069
Approve43159002024-11-15 7:41:353 days ago1731656495IN
0xbf4C2022...F79216dd5
0 APE0.0011750925.42069
Approve43155242024-11-15 7:30:053 days ago1731655805IN
0xbf4C2022...F79216dd5
0 APE0.0011827225.42069
0x60c0604043153382024-11-15 7:23:513 days ago1731655431IN
 Create: MHBToken
0 APE0.0145022425.42069

Parent Transaction Hash Block From To
View All Internal Transactions

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MHBToken

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at apescan.io on 2024-11-15
*/

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract MHBToken {
    string public name = "MHB";
    string public symbol = "ME";
    uint8 public decimals = 18;
    uint256 public totalSupply = 1000000000 * 10**18; // 1 billion tokens with 18 decimals

    mapping(address => uint256) private balances;
    mapping(address => mapping(address => uint256)) private allowances;

    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(
        address indexed owner,
        address indexed spender,
        uint256 value
    );

    constructor() {
        balances[msg.sender] = totalSupply; // Assign the entire supply to the contract deployer
        emit Transfer(address(0), msg.sender, totalSupply);
    }

    function balanceOf(address account) public view returns (uint256) {
        return balances[account];
    }

    function transfer(address recipient, uint256 amount) public returns (bool) {
        require(balances[msg.sender] >= amount, "Insufficient balance");
        balances[msg.sender] -= amount;
        balances[recipient] += amount;
        emit Transfer(msg.sender, recipient, amount);
        return true;
    }

    function approve(address spender, uint256 amount) public returns (bool) {
        allowances[msg.sender][spender] = amount;
        emit Approval(msg.sender, spender, amount);
        return true;
    }

    function allowance(address owner, address spender)
        public
        view
        returns (uint256)
    {
        return allowances[owner][spender];
    }

    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public returns (bool) {
        require(balances[sender] >= amount, "Insufficient balance");
        require(allowances[sender][msg.sender] >= amount, "Allowance exceeded");

        balances[sender] -= amount;
        balances[recipient] += amount;
        allowances[sender][msg.sender] -= amount;

        emit Transfer(sender, recipient, amount);
        return true;
    }
}

Contract Security Audit

Contract ABI

[{"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":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","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":"account","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":[],"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":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

60c0604052600360808190526226a42160e91b60a090815261002491600091906100cc565b50604080518082019091526002808252614d4560f01b602090920191825261004e916001916100cc565b506002805460ff191660121790556b033b2e3c9fd0803ce800000060035534801561007857600080fd5b506003543360008181526004602052604080822084905551919290917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef916100bf91610165565b60405180910390a36101a9565b8280546100d89061016e565b90600052602060002090601f0160209004810192826100fa5760008555610140565b82601f1061011357805160ff1916838001178555610140565b82800160010185558215610140579182015b82811115610140578251825591602001919060010190610125565b5061014c929150610150565b5090565b5b8082111561014c5760008155600101610151565b90815260200190565b60028104600182168061018257607f821691505b602082108114156101a357634e487b7160e01b600052602260045260246000fd5b50919050565b61072f806101b86000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146100fe57806370a082311461011357806395d89b4114610126578063a9059cbb1461012e578063dd62ed3e1461014157610093565b806306fdde0314610098578063095ea7b3146100b657806318160ddd146100d657806323b872dd146100eb575b600080fd5b6100a0610154565b6040516100ad91906105b5565b60405180910390f35b6100c96100c4366004610581565b6101e2565b6040516100ad91906105aa565b6100de61024c565b6040516100ad9190610662565b6100c96100f9366004610546565b610252565b6101066103bf565b6040516100ad919061066b565b6100de6101213660046104f3565b6103c8565b6100a06103e7565b6100c961013c366004610581565b6103f4565b6100de61014f366004610514565b6104b1565b60008054610161906106a8565b80601f016020809104026020016040519081016040528092919081815260200182805461018d906106a8565b80156101da5780601f106101af576101008083540402835291602001916101da565b820191906000526020600020905b8154815290600101906020018083116101bd57829003601f168201915b505050505081565b3360008181526005602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061023b908690610662565b60405180910390a350600192915050565b60035481565b6001600160a01b0383166000908152600460205260408120548211156102935760405162461bcd60e51b815260040161028a90610634565b60405180910390fd5b6001600160a01b03841660009081526005602090815260408083203384529091529020548211156102d65760405162461bcd60e51b815260040161028a90610608565b6001600160a01b038416600090815260046020526040812080548492906102fe908490610691565b90915550506001600160a01b0383166000908152600460205260408120805484929061032b908490610679565b90915550506001600160a01b038416600090815260056020908152604080832033845290915281208054849290610363908490610691565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516103ad9190610662565b60405180910390a35060019392505050565b60025460ff1681565b6001600160a01b0381166000908152600460205260409020545b919050565b60018054610161906106a8565b336000908152600460205260408120548211156104235760405162461bcd60e51b815260040161028a90610634565b3360009081526004602052604081208054849290610442908490610691565b90915550506001600160a01b0383166000908152600460205260408120805484929061046f908490610679565b90915550506040516001600160a01b0384169033907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061023b908690610662565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b80356001600160a01b03811681146103e257600080fd5b600060208284031215610504578081fd5b61050d826104dc565b9392505050565b60008060408385031215610526578081fd5b61052f836104dc565b915061053d602084016104dc565b90509250929050565b60008060006060848603121561055a578081fd5b610563846104dc565b9250610571602085016104dc565b9150604084013590509250925092565b60008060408385031215610593578182fd5b61059c836104dc565b946020939093013593505050565b901515815260200190565b6000602080835283518082850152825b818110156105e1578581018301518582016040015282016105c5565b818111156105f25783604083870101525b50601f01601f1916929092016040019392505050565b602080825260129082015271105b1b1bddd85b98d948195e18d95959195960721b604082015260600190565b602080825260149082015273496e73756666696369656e742062616c616e636560601b604082015260600190565b90815260200190565b60ff91909116815260200190565b6000821982111561068c5761068c6106e3565b500190565b6000828210156106a3576106a36106e3565b500390565b6002810460018216806106bc57607f821691505b602082108114156106dd57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea264697066735822122053a76b07b7381c47e929936900b5d82c32de43fa2ab787a083dd8de0ddf995ee64736f6c63430008000033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146100fe57806370a082311461011357806395d89b4114610126578063a9059cbb1461012e578063dd62ed3e1461014157610093565b806306fdde0314610098578063095ea7b3146100b657806318160ddd146100d657806323b872dd146100eb575b600080fd5b6100a0610154565b6040516100ad91906105b5565b60405180910390f35b6100c96100c4366004610581565b6101e2565b6040516100ad91906105aa565b6100de61024c565b6040516100ad9190610662565b6100c96100f9366004610546565b610252565b6101066103bf565b6040516100ad919061066b565b6100de6101213660046104f3565b6103c8565b6100a06103e7565b6100c961013c366004610581565b6103f4565b6100de61014f366004610514565b6104b1565b60008054610161906106a8565b80601f016020809104026020016040519081016040528092919081815260200182805461018d906106a8565b80156101da5780601f106101af576101008083540402835291602001916101da565b820191906000526020600020905b8154815290600101906020018083116101bd57829003601f168201915b505050505081565b3360008181526005602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259061023b908690610662565b60405180910390a350600192915050565b60035481565b6001600160a01b0383166000908152600460205260408120548211156102935760405162461bcd60e51b815260040161028a90610634565b60405180910390fd5b6001600160a01b03841660009081526005602090815260408083203384529091529020548211156102d65760405162461bcd60e51b815260040161028a90610608565b6001600160a01b038416600090815260046020526040812080548492906102fe908490610691565b90915550506001600160a01b0383166000908152600460205260408120805484929061032b908490610679565b90915550506001600160a01b038416600090815260056020908152604080832033845290915281208054849290610363908490610691565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516103ad9190610662565b60405180910390a35060019392505050565b60025460ff1681565b6001600160a01b0381166000908152600460205260409020545b919050565b60018054610161906106a8565b336000908152600460205260408120548211156104235760405162461bcd60e51b815260040161028a90610634565b3360009081526004602052604081208054849290610442908490610691565b90915550506001600160a01b0383166000908152600460205260408120805484929061046f908490610679565b90915550506040516001600160a01b0384169033907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061023b908690610662565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b80356001600160a01b03811681146103e257600080fd5b600060208284031215610504578081fd5b61050d826104dc565b9392505050565b60008060408385031215610526578081fd5b61052f836104dc565b915061053d602084016104dc565b90509250929050565b60008060006060848603121561055a578081fd5b610563846104dc565b9250610571602085016104dc565b9150604084013590509250925092565b60008060408385031215610593578182fd5b61059c836104dc565b946020939093013593505050565b901515815260200190565b6000602080835283518082850152825b818110156105e1578581018301518582016040015282016105c5565b818111156105f25783604083870101525b50601f01601f1916929092016040019392505050565b602080825260129082015271105b1b1bddd85b98d948195e18d95959195960721b604082015260600190565b602080825260149082015273496e73756666696369656e742062616c616e636560601b604082015260600190565b90815260200190565b60ff91909116815260200190565b6000821982111561068c5761068c6106e3565b500190565b6000828210156106a3576106a36106e3565b500390565b6002810460018216806106bc57607f821691505b602082108114156106dd57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfea264697066735822122053a76b07b7381c47e929936900b5d82c32de43fa2ab787a083dd8de0ddf995ee64736f6c63430008000033

Deployed Bytecode Sourcemap

60:2056:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;85:26;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;1232:206;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;185:48::-;;;:::i;:::-;;;;;;;:::i;1619:494::-;;;;;;:::i;:::-;;:::i;152:26::-;;;:::i;:::-;;;;;;;:::i;792:109::-;;;;;;:::i;:::-;;:::i;118:27::-;;;:::i;909:315::-;;;;;;:::i;:::-;;:::i;1446:165::-;;;;;;:::i;:::-;;:::i;85:26::-;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;1232:206::-;1326:10;1298:4;1315:22;;;:10;:22;;;;;;;;-1:-1:-1;;;;;1315:31:0;;;;;;;;;;:40;;;1371:37;1298:4;;1315:31;;1371:37;;;;1349:6;;1371:37;:::i;:::-;;;;;;;;-1:-1:-1;1426:4:0;1232:206;;;;:::o;185:48::-;;;;:::o;1619:494::-;-1:-1:-1;;;;;1767:16:0;;1742:4;1767:16;;;:8;:16;;;;;;:26;-1:-1:-1;1767:26:0;1759:59;;;;-1:-1:-1;;;1759:59:0;;;;;;;:::i;:::-;;;;;;;;;-1:-1:-1;;;;;1837:18:0;;;;;;:10;:18;;;;;;;;1856:10;1837:30;;;;;;;;:40;-1:-1:-1;1837:40:0;1829:71;;;;-1:-1:-1;;;1829:71:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;1913:16:0;;;;;;:8;:16;;;;;:26;;1933:6;;1913:16;:26;;1933:6;;1913:26;:::i;:::-;;;;-1:-1:-1;;;;;;;1950:19:0;;;;;;:8;:19;;;;;:29;;1973:6;;1950:19;:29;;1973:6;;1950:29;:::i;:::-;;;;-1:-1:-1;;;;;;;1990:18:0;;;;;;:10;:18;;;;;;;;2009:10;1990:30;;;;;;;:40;;2024:6;;1990:18;:40;;2024:6;;1990:40;:::i;:::-;;;;;;;;2065:9;-1:-1:-1;;;;;2048:35:0;2057:6;-1:-1:-1;;;;;2048:35:0;;2076:6;2048:35;;;;;;:::i;:::-;;;;;;;;-1:-1:-1;2101:4:0;1619:494;;;;;:::o;152:26::-;;;;;;:::o;792:109::-;-1:-1:-1;;;;;876:17:0;;849:7;876:17;;;:8;:17;;;;;;792:109;;;;:::o;118:27::-;;;;;;;:::i;909:315::-;1012:10;978:4;1003:20;;;:8;:20;;;;;;:30;-1:-1:-1;1003:30:0;995:63;;;;-1:-1:-1;;;995:63:0;;;;;;;:::i;:::-;1078:10;1069:20;;;;:8;:20;;;;;:30;;1093:6;;1069:20;:30;;1093:6;;1069:30;:::i;:::-;;;;-1:-1:-1;;;;;;;1110:19:0;;;;;;:8;:19;;;;;:29;;1133:6;;1110:19;:29;;1133:6;;1110:29;:::i;:::-;;;;-1:-1:-1;;1155:39:0;;-1:-1:-1;;;;;1155:39:0;;;1164:10;;1155:39;;;;1187:6;;1155:39;:::i;1446:165::-;-1:-1:-1;;;;;1577:17:0;;;1545:7;1577:17;;;:10;:17;;;;;;;;:26;;;;;;;;;;;;;1446:165::o;14:175:1:-;84:20;;-1:-1:-1;;;;;133:31:1;;123:42;;113:2;;179:1;176;169:12;194:198;;306:2;294:9;285:7;281:23;277:32;274:2;;;327:6;319;312:22;274:2;355:31;376:9;355:31;:::i;:::-;345:41;264:128;-1:-1:-1;;;264:128:1:o;397:274::-;;;526:2;514:9;505:7;501:23;497:32;494:2;;;547:6;539;532:22;494:2;575:31;596:9;575:31;:::i;:::-;565:41;;625:40;661:2;650:9;646:18;625:40;:::i;:::-;615:50;;484:187;;;;;:::o;676:342::-;;;;822:2;810:9;801:7;797:23;793:32;790:2;;;843:6;835;828:22;790:2;871:31;892:9;871:31;:::i;:::-;861:41;;921:40;957:2;946:9;942:18;921:40;:::i;:::-;911:50;;1008:2;997:9;993:18;980:32;970:42;;780:238;;;;;:::o;1023:266::-;;;1152:2;1140:9;1131:7;1127:23;1123:32;1120:2;;;1173:6;1165;1158:22;1120:2;1201:31;1222:9;1201:31;:::i;:::-;1191:41;1279:2;1264:18;;;;1251:32;;-1:-1:-1;;;1110:179:1:o;1294:187::-;1459:14;;1452:22;1434:41;;1422:2;1407:18;;1389:92::o;1486:603::-;;1627:2;1656;1645:9;1638:21;1688:6;1682:13;1731:6;1726:2;1715:9;1711:18;1704:34;1756:4;1769:140;1783:6;1780:1;1777:13;1769:140;;;1878:14;;;1874:23;;1868:30;1844:17;;;1863:2;1840:26;1833:66;1798:10;;1769:140;;;1927:6;1924:1;1921:13;1918:2;;;1997:4;1992:2;1983:6;1972:9;1968:22;1964:31;1957:45;1918:2;-1:-1:-1;2073:2:1;2052:15;-1:-1:-1;;2048:29:1;2033:45;;;;2080:2;2029:54;;1607:482;-1:-1:-1;;;1607:482:1:o;2094:342::-;2296:2;2278:21;;;2335:2;2315:18;;;2308:30;-1:-1:-1;;;2369:2:1;2354:18;;2347:48;2427:2;2412:18;;2268:168::o;2441:344::-;2643:2;2625:21;;;2682:2;2662:18;;;2655:30;-1:-1:-1;;;2716:2:1;2701:18;;2694:50;2776:2;2761:18;;2615:170::o;2790:177::-;2936:25;;;2924:2;2909:18;;2891:76::o;2972:184::-;3144:4;3132:17;;;;3114:36;;3102:2;3087:18;;3069:87::o;3161:128::-;;3232:1;3228:6;3225:1;3222:13;3219:2;;;3238:18;;:::i;:::-;-1:-1:-1;3274:9:1;;3209:80::o;3294:125::-;;3362:1;3359;3356:8;3353:2;;;3367:18;;:::i;:::-;-1:-1:-1;3404:9:1;;3343:76::o;3424:380::-;3509:1;3499:12;;3556:1;3546:12;;;3567:2;;3621:4;3613:6;3609:17;3599:27;;3567:2;3674;3666:6;3663:14;3643:18;3640:38;3637:2;;;3720:10;3715:3;3711:20;3708:1;3701:31;3755:4;3752:1;3745:15;3783:4;3780:1;3773:15;3637:2;;3479:325;;;:::o;3809:127::-;3870:10;3865:3;3861:20;3858:1;3851:31;3901:4;3898:1;3891:15;3925:4;3922:1;3915:15

Swarm Source

ipfs://53a76b07b7381c47e929936900b5d82c32de43fa2ab787a083dd8de0ddf995ee

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.