Contract 0xDE6b3148d96ECf1e7e0c96Aab6A10AD6558B5228

Txn Hash Method
Block
From
To
Value [Txn Fee]
0xd24a200b914a3ad2c24bd9eed2a2ad8cd441a7852179d7963eb20f2df121131bSet Gate102561152021-11-23 10:12:578 days 14 hrs ago0xd29205598630823f3f8d71664da7dad0c1305f45 IN 0xde6b3148d96ecf1e7e0c96aab6a10ad6558b52280 HT0.00011556 2.5
0xb12e5a30869abc37eea9ee44a4ab342971a49321e59494e8c1b024b0a416db300x60806040102560912021-11-23 10:11:458 days 14 hrs ago0xd29205598630823f3f8d71664da7dad0c1305f45 IN  Contract Creation0 HT0.000952205 2.5
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TurnoverBooks

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;

contract TurnoverBooks {

    mapping(address => uint256) _data;

    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, uint256 _turnover) external onlyGate
    {
        _data[_sender] += _turnover;
    }

    function get(address _sender) external view returns (uint256)
    {
        return _data[_sender];
    }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"}],"name":"get","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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"},{"internalType":"uint256","name":"_turnover","type":"uint256"}],"name":"write","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5033600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610587806100616000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80635158d42a1461004657806388315a4014610062578063c2bc2efc1461007e575b600080fd5b610060600480360381019061005b919061034c565b6100ae565b005b61007c6004803603810190610077919061038c565b610197565b005b6100986004803603810190610093919061038c565b61026b565b6040516100a591906103c8565b60405180910390f35b3373ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461013e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161013590610440565b60405180910390fd5b806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461018c919061048f565b925050819055505050565b3373ffffffffffffffffffffffffffffffffffffffff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610227576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161021e90610531565b60405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006102e3826102b8565b9050919050565b6102f3816102d8565b81146102fe57600080fd5b50565b600081359050610310816102ea565b92915050565b6000819050919050565b61032981610316565b811461033457600080fd5b50565b60008135905061034681610320565b92915050565b60008060408385031215610363576103626102b3565b5b600061037185828601610301565b925050602061038285828601610337565b9150509250929050565b6000602082840312156103a2576103a16102b3565b5b60006103b084828501610301565b91505092915050565b6103c281610316565b82525050565b60006020820190506103dd60008301846103b9565b92915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206761746500600082015250565b600061042a601f836103e3565b9150610435826103f4565b602082019050919050565b600060208201905081810360008301526104598161041d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061049a82610316565b91506104a583610316565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156104da576104d9610460565b5b828201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061051b6020836103e3565b9150610526826104e5565b602082019050919050565b6000602082019050818103600083015261054a8161050e565b905091905056fea26469706673582212206f5962db162835c6f14eba439e5126b2481d530e74d21b251b8d48e7713f3d6b64736f6c63430008090033

Deployed ByteCode Sourcemap

74:779:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;615:120;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;517:90;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;743:107;;;;;;;;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;615:120;382:10;373:19;;:5;;;;;;;;;;;:19;;;365:63;;;;;;;;;;;;:::i;:::-;;;;;;;;;718:9:::1;700:5;:14:::0;706:7:::1;700:14;;;;;;;;;;;;;;;;:27;;;;;;;:::i;:::-;;;;;;;;615:120:::0;;:::o;517:90::-;259:10;249:20;;:6;;;;;;;;;;;:20;;;241:65;;;;;;;;;;;;:::i;:::-;;;;;;;;;593:6:::1;585:5;;:14;;;;;;;;;;;;;;;;;;517:90:::0;:::o;743:107::-;796:7;828:5;:14;834:7;828:14;;;;;;;;;;;;;;;;821:21;;743:107;;;:::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:77::-;878:7;907:5;896:16;;841:77;;;:::o;924:122::-;997:24;1015:5;997:24;:::i;:::-;990:5;987:35;977:63;;1036:1;1033;1026:12;977:63;924:122;:::o;1052:139::-;1098:5;1136:6;1123:20;1114:29;;1152:33;1179:5;1152:33;:::i;:::-;1052:139;;;;:::o;1197:474::-;1265:6;1273;1322:2;1310:9;1301:7;1297:23;1293:32;1290:119;;;1328:79;;:::i;:::-;1290:119;1448:1;1473:53;1518:7;1509:6;1498:9;1494:22;1473:53;:::i;:::-;1463:63;;1419:117;1575:2;1601:53;1646:7;1637:6;1626:9;1622:22;1601:53;:::i;:::-;1591:63;;1546:118;1197:474;;;;;:::o;1677:329::-;1736:6;1785:2;1773:9;1764:7;1760:23;1756:32;1753:119;;;1791:79;;:::i;:::-;1753:119;1911:1;1936:53;1981:7;1972:6;1961:9;1957:22;1936:53;:::i;:::-;1926:63;;1882:117;1677:329;;;;:::o;2012:118::-;2099:24;2117:5;2099:24;:::i;:::-;2094:3;2087:37;2012:118;;:::o;2136:222::-;2229:4;2267:2;2256:9;2252:18;2244:26;;2280:71;2348:1;2337:9;2333:17;2324:6;2280:71;:::i;:::-;2136:222;;;;:::o;2364:169::-;2448:11;2482:6;2477:3;2470:19;2522:4;2517:3;2513:14;2498:29;;2364:169;;;;:::o;2539:181::-;2679:33;2675:1;2667:6;2663:14;2656:57;2539:181;:::o;2726:366::-;2868:3;2889:67;2953:2;2948:3;2889:67;:::i;:::-;2882:74;;2965:93;3054:3;2965:93;:::i;:::-;3083:2;3078:3;3074:12;3067:19;;2726:366;;;:::o;3098:419::-;3264:4;3302:2;3291:9;3287:18;3279:26;;3351:9;3345:4;3341:20;3337:1;3326:9;3322:17;3315:47;3379:131;3505:4;3379:131;:::i;:::-;3371:139;;3098:419;;;:::o;3523:180::-;3571:77;3568:1;3561:88;3668:4;3665:1;3658:15;3692:4;3689:1;3682:15;3709:305;3749:3;3768:20;3786:1;3768:20;:::i;:::-;3763:25;;3802:20;3820:1;3802:20;:::i;:::-;3797:25;;3956:1;3888:66;3884:74;3881:1;3878:81;3875:107;;;3962:18;;:::i;:::-;3875:107;4006:1;4003;3999:9;3992:16;;3709:305;;;;:::o;4020:182::-;4160:34;4156:1;4148:6;4144:14;4137:58;4020:182;:::o;4208:366::-;4350:3;4371:67;4435:2;4430:3;4371:67;:::i;:::-;4364:74;;4447:93;4536:3;4447:93;:::i;:::-;4565:2;4560:3;4556:12;4549:19;;4208:366;;;:::o;4580:419::-;4746:4;4784:2;4773:9;4769:18;4761:26;;4833:9;4827:4;4823:20;4819:1;4808:9;4804:17;4797:47;4861:131;4987:4;4861:131;:::i;:::-;4853:139;;4580:419;;;:::o

Swarm Source

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