ETH Price: $3,205.90 (+1.09%)

Contract

0x0BB5867166Aa38189B5BBf1ed64BB26079901B02
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Swap64795252018-10-09 0:03:162228 days ago1539043396IN
0x0BB58671...079901B02
0.01 ETH0.0035953918
Swap64795192018-10-09 0:01:582228 days ago1539043318IN
0x0BB58671...079901B02
2.95 ETH0.0035967618
Swap64791542018-10-08 22:36:392228 days ago1539038199IN
0x0BB58671...079901B02
0.52 ETH0.0035967618
Swap64790962018-10-08 22:24:252228 days ago1539037465IN
0x0BB58671...079901B02
1.29 ETH0.0035944518
Swap64790482018-10-08 22:13:542228 days ago1539036834IN
0x0BB58671...079901B02
1.6 ETH0.0035979118
Swap64788822018-10-08 21:36:192228 days ago1539034579IN
0x0BB58671...079901B02
0.86 ETH0.0038679118
Swap64774232018-10-08 15:58:002228 days ago1539014280IN
0x0BB58671...079901B02
0.11 ETH0.0033306319.3
Swap64739642018-10-08 2:27:032229 days ago1538965623IN
0x0BB58671...079901B02
0.001 ETH0.0045955823
Swap64339232018-10-01 14:33:262235 days ago1538404406IN
0x0BB58671...079901B02
0.3 ETH0.0058233527.1
Swap64210082018-09-29 11:37:082237 days ago1538221028IN
0x0BB58671...079901B02
0.12 ETH0.0051769925.9
Swap64177462018-09-28 22:52:162238 days ago1538175136IN
0x0BB58671...079901B02
0.8 ETH0.0053768726.9
Swap64026582018-09-26 11:18:382240 days ago1537960718IN
0x0BB58671...079901B02
0.26741 ETH0.0036197922.2
Swap63930912018-09-24 21:42:552242 days ago1537825375IN
0x0BB58671...079901B02
0.003159 ETH0.0038908723.9
Swap63924512018-09-24 19:10:252242 days ago1537816225IN
0x0BB58671...079901B02
0.03147 ETH0.0040047722.5
Swap63898422018-09-24 8:49:142243 days ago1537778954IN
0x0BB58671...079901B02
0.02234232 ETH0.001458137.3
Swap63884632018-09-24 3:28:202243 days ago1537759700IN
0x0BB58671...079901B02
0.001 ETH0.0040174220.1
Swap63876652018-09-24 0:18:222243 days ago1537748302IN
0x0BB58671...079901B02
0.29 ETH0.0040763220.4
Swap63875632018-09-23 23:55:162243 days ago1537746916IN
0x0BB58671...079901B02
0.79 ETH0.0040763220.4
Swap63770732018-09-22 6:25:152245 days ago1537597515IN
0x0BB58671...079901B02
0.00842679 ETH0.0042559121.3
Swap63767922018-09-22 5:24:252245 days ago1537593865IN
0x0BB58671...079901B02
4.05 ETH0.0043406520.2
Swap63746922018-09-21 21:09:252245 days ago1537564165IN
0x0BB58671...079901B02
0.484 ETH0.004414622.1
Swap63739312018-09-21 18:15:452245 days ago1537553745IN
0x0BB58671...079901B02
0.0488 ETH0.0045525721.2
Swap63453682018-09-17 0:40:442250 days ago1537144844IN
0x0BB58671...079901B02
0.00010611 ETH0.0036153618.1
Swap63299772018-09-14 11:45:512252 days ago1536925551IN
0x0BB58671...079901B02
0.01 ETH0.0030968119
Swap63286382018-09-14 6:19:412253 days ago1536905981IN
0x0BB58671...079901B02
0.01 ETH0.003399619.1
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
64795252018-10-09 0:03:162228 days ago1539043396
0x0BB58671...079901B02
0.01 ETH
64795192018-10-09 0:01:582228 days ago1539043318
0x0BB58671...079901B02
2.95 ETH
64791542018-10-08 22:36:392228 days ago1539038199
0x0BB58671...079901B02
0.52 ETH
64790962018-10-08 22:24:252228 days ago1539037465
0x0BB58671...079901B02
1.29 ETH
64790482018-10-08 22:13:542228 days ago1539036834
0x0BB58671...079901B02
1.6 ETH
64788822018-10-08 21:36:192228 days ago1539034579
0x0BB58671...079901B02
0.86 ETH
64774232018-10-08 15:58:002228 days ago1539014280
0x0BB58671...079901B02
0.11 ETH
64739642018-10-08 2:27:032229 days ago1538965623
0x0BB58671...079901B02
0.001 ETH
64339232018-10-01 14:33:262235 days ago1538404406
0x0BB58671...079901B02
0.3 ETH
64210082018-09-29 11:37:082237 days ago1538221028
0x0BB58671...079901B02
0.12 ETH
64177462018-09-28 22:52:162238 days ago1538175136
0x0BB58671...079901B02
0.8 ETH
64026582018-09-26 11:18:382240 days ago1537960718
0x0BB58671...079901B02
0.26741 ETH
63930912018-09-24 21:42:552242 days ago1537825375
0x0BB58671...079901B02
0.003159 ETH
63924512018-09-24 19:10:252242 days ago1537816225
0x0BB58671...079901B02
0.03147 ETH
63898422018-09-24 8:49:142243 days ago1537778954
0x0BB58671...079901B02
0.02234232 ETH
63884632018-09-24 3:28:202243 days ago1537759700
0x0BB58671...079901B02
0.001 ETH
63876652018-09-24 0:18:222243 days ago1537748302
0x0BB58671...079901B02
0.29 ETH
63875632018-09-23 23:55:162243 days ago1537746916
0x0BB58671...079901B02
0.79 ETH
63770732018-09-22 6:25:152245 days ago1537597515
0x0BB58671...079901B02
0.00842679 ETH
63767922018-09-22 5:24:252245 days ago1537593865
0x0BB58671...079901B02
4.05 ETH
63746922018-09-21 21:09:252245 days ago1537564165
0x0BB58671...079901B02
0.484 ETH
63739312018-09-21 18:15:452245 days ago1537553745
0x0BB58671...079901B02
0.0488 ETH
63453682018-09-17 0:40:442250 days ago1537144844
0x0BB58671...079901B02
0.00010611 ETH
63299772018-09-14 11:45:512252 days ago1536925551
0x0BB58671...079901B02
0.01 ETH
63286382018-09-14 6:19:412253 days ago1536905981
0x0BB58671...079901B02
0.01 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HydroSwap

Compiler Version
v0.4.24+commit.e67f0147

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-09-07
*/

/*

  Copyright 2018 HydroProtocol.

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

*/

pragma solidity 0.4.24;

contract ERC20 {
    function transfer(address to, uint tokens) public;
    function approve(address spender, uint tokens) public returns (bool success);
    function transferFrom(address from, address to, uint tokens) public returns (bool success);
}

contract Exchange {
    function fillOrder(address[5], uint[6], uint, bool, uint8, bytes32, bytes32) public returns (uint);
}

contract WETH {
    function deposit() public payable;
    function withdraw(uint) public;
}

contract HydroSwap {
    address exchangeAddress;
    address tokenProxyAddress;
    address wethAddress;

    uint256 constant MAX_UINT = 2 ** 256 - 1;

    event LogSwapSuccess(bytes32 indexed id);

    constructor(address _exchangeAddress, address _tokenProxyAddress, address _wethAddress) public {
        exchangeAddress = _exchangeAddress;
        tokenProxyAddress = _tokenProxyAddress;
        wethAddress = _wethAddress;
    }

    function swap(
        bytes32 id,
        address[5] orderAddresses,
        uint[6] orderValues,
        uint8 v,
        bytes32 r,
        bytes32 s)
        external
        payable
        returns (uint256 takerTokenFilledAmount)
    {
        address makerTokenAddress = orderAddresses[2];
        address takerTokenAddress = orderAddresses[3];
        uint makerTokenAmount = orderValues[0];
        uint takerTokenAmount = orderValues[1];

        if (takerTokenAddress == wethAddress) {
            require(takerTokenAmount == msg.value, "WRONG_ETH_AMOUNT");
            WETH(wethAddress).deposit.value(takerTokenAmount)();
        } else {
            require(ERC20(takerTokenAddress).transferFrom(msg.sender, this, takerTokenAmount), "TOKEN_TRANSFER_FROM_ERROR");
        }

        require(ERC20(takerTokenAddress).approve(tokenProxyAddress, takerTokenAmount), "TOKEN_APPROVE_ERROR");

        require(
            Exchange(exchangeAddress).fillOrder(orderAddresses, orderValues, takerTokenAmount, true, v, r, s) == takerTokenAmount,
            "FILL_ORDER_ERROR"
        );

        if (makerTokenAddress == wethAddress) {
            WETH(wethAddress).withdraw(makerTokenAmount);
            msg.sender.transfer(makerTokenAmount);
        } else {
            ERC20(makerTokenAddress).transfer(msg.sender, makerTokenAmount);
        }

        emit LogSwapSuccess(id);

        return takerTokenAmount;
    }

    // Need payable fallback function to accept the WETH withdraw funds.
    function() public payable {}
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"name":"id","type":"bytes32"},{"name":"orderAddresses","type":"address[5]"},{"name":"orderValues","type":"uint256[6]"},{"name":"v","type":"uint8"},{"name":"r","type":"bytes32"},{"name":"s","type":"bytes32"}],"name":"swap","outputs":[{"name":"takerTokenFilledAmount","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"inputs":[{"name":"_exchangeAddress","type":"address"},{"name":"_tokenProxyAddress","type":"address"},{"name":"_wethAddress","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"id","type":"bytes32"}],"name":"LogSwapSuccess","type":"event"}]

608060405234801561001057600080fd5b506040516060806106c483398101604090815281516020830151919092015160008054600160a060020a0319908116600160a060020a0395861617825560018054821694861694909417909355600280549093169390911692909217905561064690819061007e90396000f3006080604052600436106100405763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166362c1f3898114610042575b005b610060600435602460c460ff61018435166101a4356101c435610072565b60408051918252519081900360200190f35b600254600090600160a060020a036040880135811691606089013582169188359160208a01359116831415610182573481146100f8576040805160e560020a62461bcd02815260206004820152601060248201527f57524f4e475f4554485f414d4f554e5400000000000000000000000000000000604482015290519081900360640190fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663d0e30db0826040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016000604051808303818588803b15801561016457600080fd5b505af1158015610178573d6000803e3d6000fd5b5050505050610272565b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018390529051600160a060020a038516916323b872dd9160648083019260209291908290030181600087803b1580156101f057600080fd5b505af1158015610204573d6000803e3d6000fd5b505050506040513d602081101561021a57600080fd5b50511515610272576040805160e560020a62461bcd02815260206004820152601960248201527f544f4b454e5f5452414e534645525f46524f4d5f4552524f5200000000000000604482015290519081900360640190fd5b600154604080517f095ea7b3000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201526024810184905290519185169163095ea7b3916044808201926020929091908290030181600087803b1580156102e157600080fd5b505af11580156102f5573d6000803e3d6000fd5b505050506040513d602081101561030b57600080fd5b50511515610363576040805160e560020a62461bcd02815260206004820152601360248201527f544f4b454e5f415050524f56455f4552524f5200000000000000000000000000604482015290519081900360640190fd5b6000546040517fbc61394a0000000000000000000000000000000000000000000000000000000081528291600160a060020a03169063bc61394a908d908d9085906001908f908f908f90600401808860a08082843790910190508760c080828437909101968752505092151560208086019190915260ff90921660408086019190915260608501919091526080840192909252905160a08084019550919350918290030181600087803b15801561041957600080fd5b505af115801561042d573d6000803e3d6000fd5b505050506040513d602081101561044357600080fd5b50511461049a576040805160e560020a62461bcd02815260206004820152601060248201527f46494c4c5f4f524445525f4552524f5200000000000000000000000000000000604482015290519081900360640190fd5b600254600160a060020a038581169116141561056157600254604080517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018590529051600160a060020a0390921691632e1a7d4d9160248082019260009290919082900301818387803b15801561051657600080fd5b505af115801561052a573d6000803e3d6000fd5b505060405133925084156108fc02915084906000818181858888f1935050505015801561055b573d6000803e3d6000fd5b506105e1565b604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018490529051600160a060020a0386169163a9059cbb91604480830192600092919082900301818387803b1580156105c857600080fd5b505af11580156105dc573d6000803e3d6000fd5b505050505b6040518b907f963ef0ecf379b815c892a12de830d9e78624ccbd332b264e0b781072fb61158490600090a29a99505050505050505050505600a165627a7a723058201abdda7c98001a65cb6a7fa96d798727ad1337726b1926a726469d77e9d611be002900000000000000000000000012459c951127e0c374ff9105dda097662a0270930000000000000000000000008da0d80f5007ef1e431dd2127178d224e32c2ef4000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

Deployed Bytecode

0x6080604052600436106100405763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166362c1f3898114610042575b005b610060600435602460c460ff61018435166101a4356101c435610072565b60408051918252519081900360200190f35b600254600090600160a060020a036040880135811691606089013582169188359160208a01359116831415610182573481146100f8576040805160e560020a62461bcd02815260206004820152601060248201527f57524f4e475f4554485f414d4f554e5400000000000000000000000000000000604482015290519081900360640190fd5b600260009054906101000a9004600160a060020a0316600160a060020a031663d0e30db0826040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004016000604051808303818588803b15801561016457600080fd5b505af1158015610178573d6000803e3d6000fd5b5050505050610272565b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018390529051600160a060020a038516916323b872dd9160648083019260209291908290030181600087803b1580156101f057600080fd5b505af1158015610204573d6000803e3d6000fd5b505050506040513d602081101561021a57600080fd5b50511515610272576040805160e560020a62461bcd02815260206004820152601960248201527f544f4b454e5f5452414e534645525f46524f4d5f4552524f5200000000000000604482015290519081900360640190fd5b600154604080517f095ea7b3000000000000000000000000000000000000000000000000000000008152600160a060020a0392831660048201526024810184905290519185169163095ea7b3916044808201926020929091908290030181600087803b1580156102e157600080fd5b505af11580156102f5573d6000803e3d6000fd5b505050506040513d602081101561030b57600080fd5b50511515610363576040805160e560020a62461bcd02815260206004820152601360248201527f544f4b454e5f415050524f56455f4552524f5200000000000000000000000000604482015290519081900360640190fd5b6000546040517fbc61394a0000000000000000000000000000000000000000000000000000000081528291600160a060020a03169063bc61394a908d908d9085906001908f908f908f90600401808860a08082843790910190508760c080828437909101968752505092151560208086019190915260ff90921660408086019190915260608501919091526080840192909252905160a08084019550919350918290030181600087803b15801561041957600080fd5b505af115801561042d573d6000803e3d6000fd5b505050506040513d602081101561044357600080fd5b50511461049a576040805160e560020a62461bcd02815260206004820152601060248201527f46494c4c5f4f524445525f4552524f5200000000000000000000000000000000604482015290519081900360640190fd5b600254600160a060020a038581169116141561056157600254604080517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018590529051600160a060020a0390921691632e1a7d4d9160248082019260009290919082900301818387803b15801561051657600080fd5b505af115801561052a573d6000803e3d6000fd5b505060405133925084156108fc02915084906000818181858888f1935050505015801561055b573d6000803e3d6000fd5b506105e1565b604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018490529051600160a060020a0386169163a9059cbb91604480830192600092919082900301818387803b1580156105c857600080fd5b505af11580156105dc573d6000803e3d6000fd5b505050505b6040518b907f963ef0ecf379b815c892a12de830d9e78624ccbd332b264e0b781072fb61158490600090a29a99505050505050505050505600a165627a7a723058201abdda7c98001a65cb6a7fa96d798727ad1337726b1926a726469d77e9d611be0029

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000012459c951127e0c374ff9105dda097662a0270930000000000000000000000008da0d80f5007ef1e431dd2127178d224e32c2ef4000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

-----Decoded View---------------
Arg [0] : _exchangeAddress (address): 0x12459C951127e0c374FF9105DdA097662A027093
Arg [1] : _tokenProxyAddress (address): 0x8da0D80f5007ef1e431DD2127178d224E32C2eF4
Arg [2] : _wethAddress (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000012459c951127e0c374ff9105dda097662a027093
Arg [1] : 0000000000000000000000008da0d80f5007ef1e431dd2127178d224e32c2ef4
Arg [2] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2


Swarm Source

bzzr://1abdda7c98001a65cb6a7fa96d798727ad1337726b1926a726469d77e9d611be

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
Loading...
Loading
[ Download: CSV Export  ]
[ 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.