Contract 0xf72F4B012B9B633D3EE1d4Ddb7b2Ce12EeFE2203

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x9f7acf692bc22739de03d4d428022ad71ea6e2934a1dd5d11dde92717ca5b9a9Write103095632021-11-25 6:45:216 days 18 hrs ago0xd29205598630823f3f8d71664da7dad0c1305f45 IN 0xf72f4b012b9b633d3ee1d4ddb7b2ce12eefe22030 HT0.00016668675 2.25
0xcee3d817b003bce30a60a17a075e9d56ca431db05232e9c2223606dda4b8f99fWrite103095582021-11-25 6:45:066 days 18 hrs ago0xd29205598630823f3f8d71664da7dad0c1305f45 IN 0xf72f4b012b9b633d3ee1d4ddb7b2ce12eefe22030 HT0.00016668675 2.25
0x236443c91a351fb40d2903ecea6e4e6e921f46cf7ecbc395030c1f7af6ee0dabWrite103095532021-11-25 6:44:516 days 18 hrs ago0xd29205598630823f3f8d71664da7dad0c1305f45 IN 0xf72f4b012b9b633d3ee1d4ddb7b2ce12eefe22030 HT0.00020516175 2.25
0xb7d31b0f103a8d3524b16a0dcf0ee2957f8ee879b37f0077ef90fe0ab1099eaeSet Gate103095512021-11-25 6:44:456 days 18 hrs ago0xd29205598630823f3f8d71664da7dad0c1305f45 IN 0xf72f4b012b9b633d3ee1d4ddb7b2ce12eefe22030 HT0.0001039545 2.25
0x6935f4229a766e4be1ae3770aa1127411d7ebd2892f3528dca6221267bbca2c90x60806040103095242021-11-25 6:43:246 days 18 hrs ago0xd29205598630823f3f8d71664da7dad0c1305f45 IN  Contract Creation0 HT0.0011689625 2.5
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BalanceTools

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license
/**
 *Submitted for verification at hecoinfo.com on 2021-11-25
*/

// SPDX-License-Identifier: GPL-3.0

pragma solidity >=0.8.0 <0.9.0;
/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);
}

contract BalanceTools {

    mapping(address => bool) _dictinctTools;

    mapping(uint256 => address) _user;

    uint256 autoIncrement;

    address private _gate;
    
    address private _owner;
    
    modifier onlyOwner() {
        require(_owner == msg.sender, "Ownable: caller is not the owner");
        _;
    }

    modifier onlyGate() {
        require(_gate == msg.sender, "Ownable: caller is not the gate");
        _;
    }
    
    constructor () {  
        _owner = msg.sender;
    }
    
    function setGate(address __gate) external onlyOwner
    {
        _gate = __gate;
    }

    function write(address _sender) external onlyGate
    {
        if (_dictinctTools[_sender] == false)
        {
            _dictinctTools[_sender] = true;
            autoIncrement++;
            _user[autoIncrement] = _sender;
        }
    }

    function balanceOfTotal(address _tokenContract) external view
    {
        uint256 _balanceOfTotal = 0;
        for (uint256 i=1; i<=autoIncrement; i++)
        {
            _balanceOfTotal += IERC20(_tokenContract).balanceOf(_user[i]);
        }
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_tokenContract","type":"address"}],"name":"balanceOfTotal","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"__gate","type":"address"}],"name":"setGate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"}],"name":"write","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5033600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610719806100616000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806388315a401461004657806393730f7014610062578063d29dad831461007e575b600080fd5b610060600480360381019061005b9190610472565b61009a565b005b61007c60048036038101906100779190610472565b61016e565b005b61009860048036038101906100939190610472565b61031d565b005b3373ffffffffffffffffffffffffffffffffffffffff16600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461012a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610121906104fc565b60405180910390fd5b80600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b3373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146101fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101f590610568565b60405180910390fd5b600015156000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515141561031a5760016000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600260008154809291906102c0906105c1565b91905055508060016000600254815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b600080600190505b600254811161040a578273ffffffffffffffffffffffffffffffffffffffff166370a082316001600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518263ffffffff1660e01b815260040161039a9190610619565b60206040518083038186803b1580156103b257600080fd5b505afa1580156103c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ea9190610660565b826103f5919061068d565b91508080610402906105c1565b915050610325565b505050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061043f82610414565b9050919050565b61044f81610434565b811461045a57600080fd5b50565b60008135905061046c81610446565b92915050565b6000602082840312156104885761048761040f565b5b60006104968482850161045d565b91505092915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006104e660208361049f565b91506104f1826104b0565b602082019050919050565b60006020820190508181036000830152610515816104d9565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206761746500600082015250565b6000610552601f8361049f565b915061055d8261051c565b602082019050919050565b6000602082019050818103600083015261058181610545565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000819050919050565b60006105cc826105b7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156105ff576105fe610588565b5b600182019050919050565b61061381610434565b82525050565b600060208201905061062e600083018461060a565b92915050565b61063d816105b7565b811461064857600080fd5b50565b60008151905061065a81610634565b92915050565b6000602082840312156106765761067561040f565b5b60006106848482850161064b565b91505092915050565b6000610698826105b7565b91506106a3836105b7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156106d8576106d7610588565b5b82820190509291505056fea2646970667358221220dbbe90e3dc817ab51b50be078e8691ad4ac7acf86efe745fd1a58cdc05fa743b64736f6c63430008090033

Deployed ByteCode Sourcemap

325:1160:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;863:90;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;961:252;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;1221:261;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;863:90;595:10;585:20;;:6;;;;;;;;;;;:20;;;577:65;;;;;;;;;;;;:::i;:::-;;;;;;;;;939:6:::1;931:5;;:14;;;;;;;;;;;;;;;;;;863:90:::0;:::o;961:252::-;718:10;709:19;;:5;;;;;;;;;;;:19;;;701:63;;;;;;;;;;;;:::i;:::-;;;;;;;;;1058:5:::1;1031:32;;:14;:23:::0;1046:7:::1;1031:23;;;;;;;;;;;;;;;;;;;;;;;;;:32;;;1027:179;;;1115:4;1089:14;:23:::0;1104:7:::1;1089:23;;;;;;;;;;;;;;;;:30;;;;;;;;;;;;;;;;;;1134:13;;:15;;;;;;;;;:::i;:::-;;;;;;1187:7;1164:5;:20;1170:13;;1164:20;;;;;;;;;;;;:30;;;;;;;;;;;;;;;;;;1027:179;961:252:::0;:::o;1221:261::-;1299:23;1342:9;1352:1;1342:11;;1337:138;1358:13;;1355:1;:16;1337:138;;1428:14;1421:32;;;1454:5;:8;1460:1;1454:8;;;;;;;;;;;;;;;;;;;;;1421:42;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;1402:61;;;;;:::i;:::-;;;1373:3;;;;;:::i;:::-;;;;1337:138;;;;1288:194;1221:261;:::o;88:117:1:-;197:1;194;187:12;334:126;371:7;411:42;404:5;400:54;389:65;;334:126;;;:::o;466:96::-;503:7;532:24;550:5;532:24;:::i;:::-;521:35;;466:96;;;:::o;568:122::-;641:24;659:5;641:24;:::i;:::-;634:5;631:35;621:63;;680:1;677;670:12;621:63;568:122;:::o;696:139::-;742:5;780:6;767:20;758:29;;796:33;823:5;796:33;:::i;:::-;696:139;;;;:::o;841:329::-;900:6;949:2;937:9;928:7;924:23;920:32;917:119;;;955:79;;:::i;:::-;917:119;1075:1;1100:53;1145:7;1136:6;1125:9;1121:22;1100:53;:::i;:::-;1090:63;;1046:117;841:329;;;;:::o;1176:169::-;1260:11;1294:6;1289:3;1282:19;1334:4;1329:3;1325:14;1310:29;;1176:169;;;;:::o;1351:182::-;1491:34;1487:1;1479:6;1475:14;1468:58;1351:182;:::o;1539:366::-;1681:3;1702:67;1766:2;1761:3;1702:67;:::i;:::-;1695:74;;1778:93;1867:3;1778:93;:::i;:::-;1896:2;1891:3;1887:12;1880:19;;1539:366;;;:::o;1911:419::-;2077:4;2115:2;2104:9;2100:18;2092:26;;2164:9;2158:4;2154:20;2150:1;2139:9;2135:17;2128:47;2192:131;2318:4;2192:131;:::i;:::-;2184:139;;1911:419;;;:::o;2336:181::-;2476:33;2472:1;2464:6;2460:14;2453:57;2336:181;:::o;2523:366::-;2665:3;2686:67;2750:2;2745:3;2686:67;:::i;:::-;2679:74;;2762:93;2851:3;2762:93;:::i;:::-;2880:2;2875:3;2871:12;2864:19;;2523:366;;;:::o;2895:419::-;3061:4;3099:2;3088:9;3084:18;3076:26;;3148:9;3142:4;3138:20;3134:1;3123:9;3119:17;3112:47;3176:131;3302:4;3176:131;:::i;:::-;3168:139;;2895:419;;;:::o;3320:180::-;3368:77;3365:1;3358:88;3465:4;3462:1;3455:15;3489:4;3486:1;3479:15;3506:77;3543:7;3572:5;3561:16;;3506:77;;;:::o;3589:233::-;3628:3;3651:24;3669:5;3651:24;:::i;:::-;3642:33;;3697:66;3690:5;3687:77;3684:103;;;3767:18;;:::i;:::-;3684:103;3814:1;3807:5;3803:13;3796:20;;3589:233;;;:::o;3828:118::-;3915:24;3933:5;3915:24;:::i;:::-;3910:3;3903:37;3828:118;;:::o;3952:222::-;4045:4;4083:2;4072:9;4068:18;4060:26;;4096:71;4164:1;4153:9;4149:17;4140:6;4096:71;:::i;:::-;3952:222;;;;:::o;4180:122::-;4253:24;4271:5;4253:24;:::i;:::-;4246:5;4243:35;4233:63;;4292:1;4289;4282:12;4233:63;4180:122;:::o;4308:143::-;4365:5;4396:6;4390:13;4381:22;;4412:33;4439:5;4412:33;:::i;:::-;4308:143;;;;:::o;4457:351::-;4527:6;4576:2;4564:9;4555:7;4551:23;4547:32;4544:119;;;4582:79;;:::i;:::-;4544:119;4702:1;4727:64;4783:7;4774:6;4763:9;4759:22;4727:64;:::i;:::-;4717:74;;4673:128;4457:351;;;;:::o;4814:305::-;4854:3;4873:20;4891:1;4873:20;:::i;:::-;4868:25;;4907:20;4925:1;4907:20;:::i;:::-;4902:25;;5061:1;4993:66;4989:74;4986:1;4983:81;4980:107;;;5067:18;;:::i;:::-;4980:107;5111:1;5108;5104:9;5097:16;;4814:305;;;;:::o

Swarm Source

ipfs://dbbe90e3dc817ab51b50be078e8691ad4ac7acf86efe745fd1a58cdc05fa743b
Block Transaction Gas Used Reward
Age Block Fee Address Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading