Contract 0xf817Ad50F5AAB69AD32146617433321b7B8608D9 4

Contract Overview

Balance:
0 Ether
Txn Hash
Method
Block
From
To
Value
0x0c92762cf86320088724bb732bfc1964a9056ddb25938849e0b85b94925232790x60806040101953412021-05-08 8:51:24468 days 15 hrs ago0xc37f3a8c511329c9028b8d82f491847256b56de7 IN  Contract Creation0 Ether0.0100963512
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0x9B893781Ee099ea1d3831336cD38F91AF2c5f36c

Contract Name:
IntermediaryBank

Compiler Version
v0.5.16+commit.9c3226ce

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, Unlicense license
/**
 *Submitted for verification at Etherscan.io on 2022-06-04
*/

/**
 *Submitted for verification at Etherscan.io on 2021-04-23
*/

// SPDX-License-Identifier: MIT

pragma solidity ^0.5.16;


library SafeMath {
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }
        uint256 c = a * b;
        require(c / a == b);
        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0);
        uint256 c = a / b;
        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a);
        uint256 c = a - b;
        return c;
    }

    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a);
        return c;
    }

    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0);
        return a % b;
    }
}

contract IntermediaryBank {

using SafeMath for uint256;

address public bonusPool;
address public _admin;

    event LOG_SETADMIN(
        address indexed caller,
        address indexed admin
    );
    
    event LOG_SETPOOL(
        address indexed caller,
        address indexed pool
    );
    
    event LOG_ETHTRANSFER(
        address indexed to,
        uint256 amount
    );


   constructor(
    address _pool
  ) public {
      _admin=msg.sender;
      bonusPool=_pool;
  }
    function () external payable {}
    function setAdmin(address b)
        external
    {
        require(msg.sender == _admin, "ERR_NOT_ADMIN");
        emit LOG_SETADMIN(msg.sender, b);
        _admin = b;
    }
    function setBonusPool(address b)
        external
    {
        require(msg.sender == _admin, "ERR_NOT_ADMIN");
        emit LOG_SETPOOL(msg.sender, b);
        bonusPool = b;
    }
    
    function poolTransferALL()
        external
    {
        require(msg.sender == _admin, "ERR_NOT_ADMIN");
        uint256 balance=address(this).balance;
        (bool success, ) =address(uint160(bonusPool)).call.value(balance)("");
        require(success,"ERR contract transfer eth to bonusPool fail,maybe gas fail");
        emit LOG_ETHTRANSFER(bonusPool, balance);
    }
    function transferPercentage(address _to, uint256 _percentage)
        external
    {
        require(msg.sender == _admin, "ERR_NOT_ADMIN");
        require(_percentage<=100, "ERR_PERCENTAGE_TOO_LARGE");
        uint256 balance=(address(this).balance).mul(_percentage).div(100);
        (bool success, ) =address(uint160(_to)).call.value(balance)("");
        require(success,"ERR contract transfer eth fail,maybe gas fail");
        emit LOG_ETHTRANSFER(_to, balance);
    }
    
    function transfer(address _to, uint256 _rawAmount)
        external
    {
        require(msg.sender == _admin, "ERR_NOT_ADMIN");
        
        uint256 balance=address(this).balance;
        
        require(_rawAmount<=balance, "amount exceed balance");
        
        (bool success, ) =address(uint160(_to)).call.value(_rawAmount)("");
        require(success,"ERR contract transfer eth fail,maybe gas fail");
        emit LOG_ETHTRANSFER(_to, _rawAmount);
    }
  
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"_pool","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LOG_ETHTRANSFER","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"admin","type":"address"}],"name":"LOG_SETADMIN","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"pool","type":"address"}],"name":"LOG_SETPOOL","type":"event"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":true,"inputs":[],"name":"_admin","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"bonusPool","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"poolTransferALL","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"b","type":"address"}],"name":"setAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"b","type":"address"}],"name":"setBonusPool","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_rawAmount","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"transferPercentage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50604051610e4f380380610e4f8339818101604052602081101561003357600080fd5b810190808051906020019092919050505033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050610d7a806100d56000396000f3fe6080604052600436106100705760003560e01c80638bd25eb61161004e5780638bd25eb614610171578063a9059cbb146101cc578063b275203914610227578063bf57de651461027857610070565b806301bc45c9146100725780632693ee80146100c9578063704b6c0214610120575b005b34801561007e57600080fd5b5061008761028f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100d557600080fd5b506100de6102b5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561012c57600080fd5b5061016f6004803603602081101561014357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506102da565b005b34801561017d57600080fd5b506101ca6004803603604081101561019457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061043b565b005b3480156101d857600080fd5b50610225600480360360408110156101ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106b2565b005b34801561023357600080fd5b506102766004803603602081101561024a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610903565b005b34801561028457600080fd5b5061028d610a63565b005b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461039d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f41444d494e0000000000000000000000000000000000000081525060200191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fbfa680069f0f0e6a95e5ea3c7badfe8494328a6204ff7f67e11f6c008e3a3d5660405160405180910390a380600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146104fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f41444d494e0000000000000000000000000000000000000081525060200191505060405180910390fd5b6064811115610575576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4552525f50455243454e544147455f544f4f5f4c41524745000000000000000081525060200191505060405180910390fd5b600061059d606461058f8447610c7e90919063ffffffff16565b610cb890919063ffffffff16565b905060008373ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d80600081146105ff576040519150601f19603f3d011682016040523d82523d6000602084013e610604565b606091505b505090508061065e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180610d19602d913960400191505060405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff167f08f45e439569b53730fcc6b48bcacd06fec1cebb798cc47c2f1bcae918397803836040518082815260200191505060405180910390a250505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610775576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f41444d494e0000000000000000000000000000000000000081525060200191505060405180910390fd5b6000479050808211156107f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260158152602001807f616d6f756e74206578636565642062616c616e6365000000000000000000000081525060200191505060405180910390fd5b60008373ffffffffffffffffffffffffffffffffffffffff168360405180600001905060006040518083038185875af1925050503d8060008114610850576040519150601f19603f3d011682016040523d82523d6000602084013e610855565b606091505b50509050806108af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180610d19602d913960400191505060405180910390fd5b8373ffffffffffffffffffffffffffffffffffffffff167f08f45e439569b53730fcc6b48bcacd06fec1cebb798cc47c2f1bcae918397803846040518082815260200191505060405180910390a250505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109c6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f41444d494e0000000000000000000000000000000000000081525060200191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f7959082318446c07030a54dd68217235a26890c95af69c3a39f4d0cebea6a15560405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610b26576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f4552525f4e4f545f41444d494e0000000000000000000000000000000000000081525060200191505060405180910390fd5b600047905060008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114610bac576040519150601f19603f3d011682016040523d82523d6000602084013e610bb1565b606091505b5050905080610c0b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180610cdf603a913960400191505060405180910390fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f08f45e439569b53730fcc6b48bcacd06fec1cebb798cc47c2f1bcae918397803836040518082815260200191505060405180910390a25050565b600080831415610c915760009050610cb2565b6000828402905082848281610ca257fe5b0414610cad57600080fd5b809150505b92915050565b6000808211610cc657600080fd5b6000828481610cd157fe5b049050809150509291505056fe45525220636f6e7472616374207472616e736665722065746820746f20626f6e7573506f6f6c206661696c2c6d6179626520676173206661696c45525220636f6e7472616374207472616e7366657220657468206661696c2c6d6179626520676173206661696ca265627a7a723158208127d7e5621216a4920479499c629e418f4e0cec3485fe68614e9182ac6152e064736f6c63430005100032000000000000000000000000c37f3a8c511329c9028b8d82f491847256b56de7

Deployed ByteCode Sourcemap

975:2316:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1064:21;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1064:21:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1037:24;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1037:24:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1533:181;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1533:181:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1533:181:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;2307:484;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2307:484:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2307:484:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2803:481;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2803:481:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;2803:481:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;1720:187;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1720:187:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;1720:187:0;;;;;;;;;;;;;;;;;;;:::i;:::-;;1919:382;;8:9:-1;5:2;;;30:1;27;20:12;5:2;1919:382:0;;;:::i;:::-;;1064:21;;;;;;;;;;;;;:::o;1037:24::-;;;;;;;;;;;;;:::o;1533:181::-;1618:6;;;;;;;;;;;1604:20;;:10;:20;;;1596:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1683:1;1658:27;;1671:10;1658:27;;;;;;;;;;;;1705:1;1696:6;;:10;;;;;;;;;;;;;;;;;;1533:181;:::o;2307:484::-;2425:6;;;;;;;;;;;2411:20;;:10;:20;;;2403:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2481:3;2468:11;:16;;2460:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2524:15;2540:49;2585:3;2540:40;2568:11;2541:21;2540:27;;:40;;;;:::i;:::-;:44;;:49;;;;:::i;:::-;2524:65;;2601:12;2634:3;2618:26;;2651:7;2618:45;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;2600:63:0;;;2682:7;2674:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2770:3;2754:29;;;2775:7;2754:29;;;;;;;;;;;;;;;;;;2307:484;;;;:::o;2803:481::-;2910:6;;;;;;;;;;;2896:20;;:10;:20;;;2888:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2955:15;2971:21;2955:37;;3033:7;3021:10;:19;;3013:53;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3088:12;3121:3;3105:26;;3138:10;3105:48;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;3087:66:0;;;3172:7;3164:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3260:3;3244:32;;;3265:10;3244:32;;;;;;;;;;;;;;;;;;2803:481;;;;:::o;1720:187::-;1809:6;;;;;;;;;;;1795:20;;:10;:20;;;1787:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1873:1;1849:26;;1861:10;1849:26;;;;;;;;;;;;1898:1;1886:9;;:13;;;;;;;;;;;;;;;;;;1720:187;:::o;1919:382::-;2002:6;;;;;;;;;;;1988:20;;:10;:20;;;1980:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2037:15;2053:21;2037:37;;2086:12;2119:9;;;;;;;;;;;2103:32;;2142:7;2103:51;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;2085:69:0;;;2173:7;2165:77;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2274:9;;;;;;;;;;;2258:35;;;2285:7;2258:35;;;;;;;;;;;;;;;;;;1919:382;;:::o;160:209::-;218:7;247:1;242;:6;238:47;;;272:1;265:8;;;;238:47;295:9;311:1;307;:5;295:17;;340:1;335;331;:5;;;;;;:10;323:19;;;;;;360:1;353:8;;;160:209;;;;;:::o;377:147::-;435:7;467:1;463;:5;455:14;;;;;;480:9;496:1;492;:5;;;;;;480:17;;515:1;508:8;;;377:147;;;;:::o

Swarm Source

bzzr://8127d7e5621216a4920479499c629e418f4e0cec3485fe68614e9182ac6152e0
Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading

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.