Contract 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd64 16

Contract Overview

Balance:
0 xDAI

xDAI Value:
$0.00

Token:
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x29d45a9f7faf6dfb439fb32a075132ed6038be318f9d47b4af0e4037770ba2870x60c06040256100082022-12-24 11:02:15459 days 23 hrs ago0x11799622f4d98a24514011e8527b969f7488ef47 IN  Create: WethUnwrapper0 xDAI0.0004356016
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0x0319bebdb5a2c3a3275d6dad7b3a9df7ca073cbbecc66b0c0bb83ae388f5c3d3331542792024-03-28 8:09:002 hrs 23 mins ago 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640x904c665059cc38ce126c34fdf88d1b1317abee2321.580360933796968678 xDAI
0x0319bebdb5a2c3a3275d6dad7b3a9df7ca073cbbecc66b0c0bb83ae388f5c3d3331542792024-03-28 8:09:002 hrs 23 mins ago Gnosis: WXDAI Token 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd6421.580360933796968678 xDAI
0xf20aeb417a5a81d28afc474e8a67833761c2d25137798cb81c5afef20e7797e4331488412024-03-28 0:06:3010 hrs 25 mins ago 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640x43e0f8fe3727e7a92f23a646459e9b08d14dfe4e0.993136587319637318 xDAI
0xf20aeb417a5a81d28afc474e8a67833761c2d25137798cb81c5afef20e7797e4331488412024-03-28 0:06:3010 hrs 25 mins ago Gnosis: WXDAI Token 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640.993136587319637318 xDAI
0x6fcc7f4b43387804a02ee5c5ed071b48bfd2922427d7463d432509c6932aa0aa331480452024-03-27 22:56:4011 hrs 35 mins ago 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640xbfee7af8264600f12e1e0e9f1f2c86ff62be5fbe1.573865079202756794 xDAI
0x6fcc7f4b43387804a02ee5c5ed071b48bfd2922427d7463d432509c6932aa0aa331480452024-03-27 22:56:4011 hrs 35 mins ago Gnosis: WXDAI Token 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd641.573865079202756794 xDAI
0xbcc923e17e71b451addff49d6d1ebee027ff8931ab9b233a664391bc7b9c0ab7331480112024-03-27 22:53:5011 hrs 38 mins ago 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640xe572d83bc5242eb4f3d62bbdcaa62bc6ea6f2c590.744152001865116866 xDAI
0xbcc923e17e71b451addff49d6d1ebee027ff8931ab9b233a664391bc7b9c0ab7331480112024-03-27 22:53:5011 hrs 38 mins ago Gnosis: WXDAI Token 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640.744152001865116866 xDAI
0xb25ad0e3a1d5eb2c2929839109298227d1f87efbf2447ded86b7d04429f17275331479072024-03-27 22:45:0011 hrs 47 mins ago 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640xbfee7af8264600f12e1e0e9f1f2c86ff62be5fbe1.663433010916854587 xDAI
0xb25ad0e3a1d5eb2c2929839109298227d1f87efbf2447ded86b7d04429f17275331479072024-03-27 22:45:0011 hrs 47 mins ago Gnosis: WXDAI Token 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd641.663433010916854587 xDAI
0xb0eca3e40a05b24308db0986b8d97d9fbee35920e2c6ce2b7d288ea9548424c3331471862024-03-27 21:42:2512 hrs 49 mins ago 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640x24dd1b9b50bbb194025a37006d16d127d945b731208.087754998078752908 xDAI
0xb0eca3e40a05b24308db0986b8d97d9fbee35920e2c6ce2b7d288ea9548424c3331471862024-03-27 21:42:2512 hrs 49 mins ago Gnosis: WXDAI Token 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd64208.087754998078752908 xDAI
0xaede59e52802fc65aa7dea4c3bc722e0f6f222a0afe7b67a9e2ea359e109960b331471282024-03-27 21:37:2512 hrs 54 mins ago 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640x24dd1b9b50bbb194025a37006d16d127d945b7311.1 xDAI
0xaede59e52802fc65aa7dea4c3bc722e0f6f222a0afe7b67a9e2ea359e109960b331471282024-03-27 21:37:2512 hrs 54 mins ago Gnosis: WXDAI Token 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd641.1 xDAI
0x2ea9524d0e50aef99b539e2311e970aa138cbb82e33ac65fd41bddc9b23f4669331465522024-03-27 20:47:1513 hrs 44 mins ago 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640xdaeb86b8e91d551a96cd097520b04bbea4ba08800.05315320664099058 xDAI
0x2ea9524d0e50aef99b539e2311e970aa138cbb82e33ac65fd41bddc9b23f4669331465522024-03-27 20:47:1513 hrs 44 mins ago Gnosis: WXDAI Token 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640.05315320664099058 xDAI
0x9e87569738e72a97a4b2aa8a020907ca69acecd29335b87119d87d8ec4433da7331463972024-03-27 20:33:5013 hrs 58 mins ago 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640x9a2fed1871a32636cb5f7b2c837998bd1f1b9cb99.983259364991927379 xDAI
0x9e87569738e72a97a4b2aa8a020907ca69acecd29335b87119d87d8ec4433da7331463972024-03-27 20:33:5013 hrs 58 mins ago Gnosis: WXDAI Token 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd649.983259364991927379 xDAI
0xd3339552c31f4455641760a52b48d9ed183b2f8202dc2dc1051dc1b0d963da8d331461592024-03-27 20:13:0014 hrs 19 mins ago 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640x9a2fed1871a32636cb5f7b2c837998bd1f1b9cb99.99221941779885962 xDAI
0xd3339552c31f4455641760a52b48d9ed183b2f8202dc2dc1051dc1b0d963da8d331461592024-03-27 20:13:0014 hrs 19 mins ago Gnosis: WXDAI Token 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd649.99221941779885962 xDAI
0xb807a3b0668ec8ffe58510325728437af51de222865f0a0268d52641741ba675331458402024-03-27 19:46:0014 hrs 46 mins ago 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640x77d5ec1a7978a1d54273e92a673dc2259e7756c20.106619919968671471 xDAI
0xb807a3b0668ec8ffe58510325728437af51de222865f0a0268d52641741ba675331458402024-03-27 19:46:0014 hrs 46 mins ago Gnosis: WXDAI Token 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640.106619919968671471 xDAI
0x38e12637ec75e21ab1a336bf79ddd6113eb34ff2bd82769a79b9b7e7f609d138331457942024-03-27 19:42:0514 hrs 49 mins ago 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640x19f4503ab739369e938dee7ba00278633f2927ca0.193595885209257744 xDAI
0x38e12637ec75e21ab1a336bf79ddd6113eb34ff2bd82769a79b9b7e7f609d138331457942024-03-27 19:42:0514 hrs 49 mins ago Gnosis: WXDAI Token 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640.193595885209257744 xDAI
0x54346dc34deeb9ea9ea08bf8a9a8c23fc6e4aae881c704ce6b9ce016bb4c9609331457692024-03-27 19:40:0014 hrs 52 mins ago 0xd41b24bba51fac0e4827b6f94c0d6ddeb183cd640x19f4503ab739369e938dee7ba00278633f2927ca0.19356124772850664 xDAI
[ Download CSV Export 
Index Block
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
WethUnwrapper

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion
File 1 of 7 : WethUnwrapper.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;
pragma abicoder v1;

import "@1inch/solidity-utils/contracts/OnlyWethReceiver.sol";
import "@1inch/solidity-utils/contracts/interfaces/IWETH.sol";

import "../interfaces/IPostInteractionNotificationReceiver.sol";
import "../libraries/Errors.sol";

contract WethUnwrapper is OnlyWethReceiver, IPostInteractionNotificationReceiver {
    IWETH private immutable _WETH;  // solhint-disable-line var-name-mixedcase

    uint256 private constant _RAW_CALL_GAS_LIMIT = 5000;

    constructor(IWETH weth) OnlyWethReceiver(address(weth)) {
        _WETH = weth;
    }

    function fillOrderPostInteraction(
        bytes32 /* orderHash */,
        address maker,
        address /* taker */,
        uint256 /* makingAmount */,
        uint256 takingAmount,
        uint256 /* remainingMakerAmount */,
        bytes calldata interactiveData
    ) external override {
        _WETH.withdraw(takingAmount);
        address receiver = maker;
        if (interactiveData.length == 20) {
            receiver = address(bytes20(interactiveData));
        }
        // solhint-disable-next-line avoid-low-level-calls
        (bool success, ) = receiver.call{value: takingAmount, gas: _RAW_CALL_GAS_LIMIT}("");
        if (!success) revert Errors.ETHTransferFailed();
    }
}

File 2 of 7 : Errors.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;

library Errors {
    error InvalidMsgValue();
    error ETHTransferFailed();
}

File 3 of 7 : IPostInteractionNotificationReceiver.sol
// SPDX-License-Identifier: MIT

pragma solidity 0.8.17;
pragma abicoder v1;

/**
 * @title Interface for interactor which acts after `taker -> maker` transfers.
 * @notice The order filling steps are `preInteraction` =>` Transfer "maker -> taker"` => `Interaction` => `Transfer "taker -> maker"` => **`postInteraction`**
 */
interface IPostInteractionNotificationReceiver {
    /**
     * @notice Callback method that gets called after all funds transfers
     * @param orderHash Hash of the order being processed
     * @param maker Maker address
     * @param taker Taker address
     * @param makingAmount Actual making amount
     * @param takingAmount Actual taking amount
     * @param remainingAmount Limit order remaining maker amount after the swap
     * @param interactionData Interaction calldata
     */
    function fillOrderPostInteraction(
        bytes32 orderHash,
        address maker,
        address taker,
        uint256 makingAmount,
        uint256 takingAmount,
        uint256 remainingAmount,
        bytes memory interactionData
    ) external;
}

File 4 of 7 : OnlyWethReceiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
pragma abicoder v1;

import "./EthReceiver.sol";

abstract contract OnlyWethReceiver is EthReceiver {
    address private immutable _WETH; // solhint-disable-line var-name-mixedcase

    constructor(address weth) {
        _WETH = address(weth);
    }

    function _receive() internal virtual override {
        if (msg.sender != _WETH) revert EthDepositRejected();
    }
}

File 5 of 7 : IWETH.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
pragma abicoder v1;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IWETH is IERC20 {
    function deposit() external payable;

    function withdraw(uint256 amount) external;
}

File 6 of 7 : EthReceiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;
pragma abicoder v1;

abstract contract EthReceiver {
    error EthDepositRejected();

    receive() external payable {
        _receive();
    }

    function _receive() internal virtual {
        // solhint-disable-next-line avoid-tx-origin
        if (msg.sender == tx.origin) revert EthDepositRejected();
    }
}

File 7 of 7 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"contract IWETH","name":"weth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ETHTransferFailed","type":"error"},{"inputs":[],"name":"EthDepositRejected","type":"error"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"address","name":"maker","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"takingAmount","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"interactiveData","type":"bytes"}],"name":"fillOrderPostInteraction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c060405234801561001057600080fd5b506040516103973803806103978339818101604052602081101561003357600080fd5b50516001600160a01b0316608081905260a08190528061032f610068600039600061016401526000610109015261032f6000f3fe6080604052600436106100225760003560e01c80633504ed621461003657600080fd5b366100315761002f6100f1565b005b600080fd5b34801561004257600080fd5b5061002f600480360360e081101561005957600080fd5b81359173ffffffffffffffffffffffffffffffffffffffff602082013581169260408301359091169160608101359160808201359160a08101359181019060e0810160c08201356401000000008111156100b257600080fd5b8201836020820111156100c457600080fd5b803590602001918460018302840111640100000000831117156100e657600080fd5b509092509050610162565b3373ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000001614610160576040517f1b10b0f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d856040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156101d557600080fd5b505af11580156101e9573d6000803e3d6000fd5b50899250505060148290036102085761020282846102b1565b60601c90505b60405160009073ffffffffffffffffffffffffffffffffffffffff83169061138890889084818181858888f193505050503d8060008114610265576040519150601f19603f3d011682016040523d82523d6000602084013e61026a565b606091505b50509050806102a5576040517fb12d13eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156102f15780818660140360031b1b83161692505b50509291505056fea26469706673582212202796b400597a988afcb28ecf5f83180939b37ba2ef7b6c2f72bdab5c034bbf6d64736f6c63430008110033000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d

Deployed Bytecode

0x6080604052600436106100225760003560e01c80633504ed621461003657600080fd5b366100315761002f6100f1565b005b600080fd5b34801561004257600080fd5b5061002f600480360360e081101561005957600080fd5b81359173ffffffffffffffffffffffffffffffffffffffff602082013581169260408301359091169160608101359160808201359160a08101359181019060e0810160c08201356401000000008111156100b257600080fd5b8201836020820111156100c457600080fd5b803590602001918460018302840111640100000000831117156100e657600080fd5b509092509050610162565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d1614610160576040517f1b10b0f900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b7f000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d73ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d856040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156101d557600080fd5b505af11580156101e9573d6000803e3d6000fd5b50899250505060148290036102085761020282846102b1565b60601c90505b60405160009073ffffffffffffffffffffffffffffffffffffffff83169061138890889084818181858888f193505050503d8060008114610265576040519150601f19603f3d011682016040523d82523d6000602084013e61026a565b606091505b50509050806102a5576040517fb12d13eb00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050505050565b7fffffffffffffffffffffffffffffffffffffffff00000000000000000000000081358181169160148510156102f15780818660140360031b1b83161692505b50509291505056fea26469706673582212202796b400597a988afcb28ecf5f83180939b37ba2ef7b6c2f72bdab5c034bbf6d64736f6c63430008110033

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

000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d

-----Decoded View---------------
Arg [0] : weth (address): 0xe91d153e0b41518a2ce8dd3d7944fa863463a97d

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000e91d153e0b41518a2ce8dd3d7944fa863463a97d


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.