Contract Overview
Balance: 0 Ether
Transactions: 4 txns
 Latest 4 txns

TxHash Age From To Value [TxFee]
0x95d22446df516eb3d88ecb25dd0e4c6d573ad79a1fd8101248b6705021cea13611 days 7 hrs ago0xb551fc0b211599a1b91fc1acb0aaef7e6f48cc09  IN   0xfd46c7160e48847e3f61c5fbe6b5f01c4942e3c00 Ether0.001169484
0x8784807894f4737af6a38329f0a0f036372fbc85765d74dd401acddc69d82c9d11 days 7 hrs ago0xb551fc0b211599a1b91fc1acb0aaef7e6f48cc09  IN   0xfd46c7160e48847e3f61c5fbe6b5f01c4942e3c00 Ether0.000988387
0x8a5f450cd768ec24964fc8db3ff3922a7e842fc83a317ea1b00489fc609fd18411 days 7 hrs ago0xb551fc0b211599a1b91fc1acb0aaef7e6f48cc09  IN   0xfd46c7160e48847e3f61c5fbe6b5f01c4942e3c00 Ether0.000988387
0x002c7462accd459838b4507ea9d749f30efe9b242e5c177100249a9dbf61517911 days 7 hrs ago0xb551fc0b211599a1b91fc1acb0aaef7e6f48cc09  IN    Contract Creation0 Ether0.000596169
[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: EscrowTT
Compiler Text: v0.4.24+commit.e67f0147
Optimization Enabled: Yes
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.24;

library SafeMath {

  /**
  * @dev Multiplies two numbers, throws on overflow.
  */
  function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
    if (_a == 0) {
      return 0;
    }

    c = _a * _b;
    assert(c / _a == _b);
    return c;
  }

  /**
  * Integer division of two numbers, truncating the quotient.
  */
  function div(uint256 _a, uint256 _b) internal pure returns (uint256) {
    return _a / _b;
  }

  /**
  * Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
  */
  function sub(uint256 _a, uint256 _b) internal pure returns (uint256) {
    assert(_b <= _a);
    return _a - _b;
  }

  /**
  *  Adds two numbers, throws on overflow.
  */
  function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) {
    c = _a + _b;
    assert(c >= _a);
    return c;
  }
}


contract IERC20Token {
  uint256 public totalSupply;

  function balanceOf(address _who) public view returns (uint256);

  function allowance(address _owner, address _spender) public view returns (uint256);

  function transfer(address _to, uint256 _value) public returns (bool);
  
  function approve(address _spender, uint256 _value) public returns (bool);

  function transferFrom(address _from, address _to, uint256 _value) public returns (bool);

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

  event Approval(address indexed owner, address indexed spender, uint256 value);
  
  event Burn(address indexed from, uint256 value);
}

contract EscrowTT {
    using SafeMath for uint256;
    
    uint256 public addAmountFee = 20000;
    uint256 public minDeposit = 10000000;
    address public adminAddress = 0xb551fC0b211599A1B91fc1ACB0aAEF7E6f48Cc09;
    address public tokenAddress = 0x546c2E4b8Eac131cD5Ef7cFf01a58Ae6985a7d54;
    
    uint256 public feePool = 0;

    constructor() public {
        
    }
    
    
    mapping(address => mapping(address => uint256)) public escrowBalance;

    function deposit(IERC20Token token, uint256 amount) public {
        require(token == tokenAddress);
        uint256 minVal = minDeposit.add(addAmountFee);
        require(amount >= minVal);
        require(token.transferFrom(msg.sender, this, amount));
        
        feePool = feePool.add(addAmountFee);
        escrowBalance[msg.sender][token] = escrowBalance[msg.sender][token].add(amount.sub(minVal));
    }
    
    
    function setOwner(address newOwner) public {
        require(adminAddress == msg.sender);
        adminAddress = newOwner;
    }
    
    function setFee(uint256 newFee) public {
        require(adminAddress == msg.sender);
        addAmountFee = newFee;
    }
    
    function withdrawFee(IERC20Token token, address owner) public {
        require(adminAddress == msg.sender);
        require(feePool > 0);
        
        uint256 amount = feePool;
        feePool = 0;
        
        require(token.transfer(owner, amount));
    }

    event StartWithdrawal(address indexed account, address token);

    function startWithdrawal(IERC20Token token) public {
       
        emit StartWithdrawal(msg.sender, token);
    }

    function withdraw(IERC20Token token) public {
        require(token == tokenAddress);
        uint256 amount = escrowBalance[msg.sender][token];
        escrowBalance[msg.sender][token] = 0;
        require(token.transfer(msg.sender, amount));
    }

    function transfer(
        address from,
        address to,
        IERC20Token token,
        uint256 tokens
    )
        internal
    {
        require(escrowBalance[from][token] >= tokens, "Insufficient balance.");

        escrowBalance[from][token] -= tokens;
        escrowBalance[to][token] += tokens;
    }
}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"addAmountFee","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"minDeposit","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"}],"name":"startWithdrawal","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"}],"name":"withdraw","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newFee","type":"uint256"}],"name":"setFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"","type":"address"},{"name":"","type":"address"}],"name":"escrowBalance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"feePool","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"token","type":"address"},{"name":"owner","type":"address"}],"name":"withdrawFee","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"adminAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"name":"account","type":"address"},{"indexed":false,"name":"token","type":"address"}],"name":"StartWithdrawal","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6080604052614e2060009081556298968060015560028054600160a060020a031990811673b551fc0b211599a1b91fc1acb0aaef7e6f48cc09179091556003805490911673546c2e4b8eac131cd5ef7cff01a58ae6985a7d5417905560045534801561006a57600080fd5b506106c98061007a6000396000f3006080604052600436106100b95763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663069b162a81146100be57806313af4035146100e557806341b3d1851461010857806347e7ef241461011d57806351cb7fcb1461014157806351cff8d91461016257806369fe0e2d146101835780639499be761461019b5780639d76ea58146101c2578063ae2e933b146101f3578063c879c6d814610208578063fc6f94681461022f575b600080fd5b3480156100ca57600080fd5b506100d3610244565b60408051918252519081900360200190f35b3480156100f157600080fd5b50610106600160a060020a036004351661024a565b005b34801561011457600080fd5b506100d3610290565b34801561012957600080fd5b50610106600160a060020a0360043516602435610296565b34801561014d57600080fd5b50610106600160a060020a0360043516610406565b34801561016e57600080fd5b50610106600160a060020a0360043516610448565b34801561018f57600080fd5b5061010660043561052d565b3480156101a757600080fd5b506100d3600160a060020a0360043581169060243516610549565b3480156101ce57600080fd5b506101d7610566565b60408051600160a060020a039092168252519081900360200190f35b3480156101ff57600080fd5b506100d3610575565b34801561021457600080fd5b50610106600160a060020a036004358116906024351661057b565b34801561023b57600080fd5b506101d7610669565b60005481565b600254600160a060020a0316331461026157600080fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60015481565b600354600090600160a060020a038481169116146102b357600080fd5b6000546001546102c89163ffffffff61067816565b9050808210156102d757600080fd5b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018490529051600160a060020a038516916323b872dd9160648083019260209291908290030181600087803b15801561034557600080fd5b505af1158015610359573d6000803e3d6000fd5b505050506040513d602081101561036f57600080fd5b5051151561037c57600080fd5b6000546004546103919163ffffffff61067816565b6004556103d76103a7838363ffffffff61068b16565b336000908152600560209081526040808320600160a060020a03891684529091529020549063ffffffff61067816565b336000908152600560209081526040808320600160a060020a0397909716835295905293909320929092555050565b60408051600160a060020a0383168152905133917f170c6562466eb39c1ff222fd30fb6c971e5fbe6d00306905b0f9c5915fa208ce919081900360200190a250565b600354600090600160a060020a0383811691161461046557600080fd5b50336000818152600560209081526040808320600160a060020a03861680855290835281842080549085905582517fa9059cbb00000000000000000000000000000000000000000000000000000000815260048101969096526024860181905291519194909363a9059cbb9360448084019491939192918390030190829087803b1580156104f257600080fd5b505af1158015610506573d6000803e3d6000fd5b505050506040513d602081101561051c57600080fd5b5051151561052957600080fd5b5050565b600254600160a060020a0316331461054457600080fd5b600055565b600560209081526000928352604080842090915290825290205481565b600354600160a060020a031681565b60045481565b600254600090600160a060020a0316331461059557600080fd5b6004546000106105a457600080fd5b6004549050600060048190555082600160a060020a031663a9059cbb83836040518363ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018083600160a060020a0316600160a060020a0316815260200182815260200192505050602060405180830381600087803b15801561062d57600080fd5b505af1158015610641573d6000803e3d6000fd5b505050506040513d602081101561065757600080fd5b5051151561066457600080fd5b505050565b600254600160a060020a031681565b8181018281101561068557fe5b92915050565b60008282111561069757fe5b509003905600a165627a7a723058208b08acb936bdc808abd11b5d25c6ebd87d1a9523fd9070124e5c76a771b0a9e60029

   Swarm Source:
bzzr://8b08acb936bdc808abd11b5d25c6ebd87d1a9523fd9070124e5c76a771b0a9e6

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward