ETH Price: $3,014.95 (+3.92%)
Gas: 4 Gwei

Contract

0xd418049AdA41D59913AbC5bBcfDfA54152E2FA9F
 

Overview

ETH Balance

0.180000000000727496 ETH

Eth Value

$542.69 (@ $3,014.95/ETH)

Token Holdings

Transaction Hash
Method
Block
From
To
Value
Transfer198608942024-05-13 11:47:472 days ago1715600867IN
0xd418049A...152E2FA9F
0.008 ETH0.00008543.8596174
Transfer198448352024-05-11 5:54:474 days ago1715406887IN
0xd418049A...152E2FA9F
0.004 ETH0.000109624.95375378
Transfer198362502024-05-10 1:05:476 days ago1715303147IN
0xd418049A...152E2FA9F
0.004 ETH0.000082093.70987428
Transfer198348542024-05-09 20:24:356 days ago1715286275IN
0xd418049A...152E2FA9F
0.004 ETH0.000092234.16808676
Transfer198220732024-05-08 1:30:238 days ago1715131823IN
0xd418049A...152E2FA9F
0.004 ETH0.0001336.01053903
Transfer198123292024-05-06 16:47:599 days ago1715014079IN
0xd418049A...152E2FA9F
0.004 ETH0.000122575.53909744
Transfer198118142024-05-06 15:03:599 days ago1715007839IN
0xd418049A...152E2FA9F
0.004 ETH0.0003316614.98787209
Transfer198114662024-05-06 13:53:359 days ago1715003615IN
0xd418049A...152E2FA9F
0.004 ETH0.000155197.01340925
Transfer198044862024-05-05 14:27:1110 days ago1714919231IN
0xd418049A...152E2FA9F
0.004 ETH0.000139716.31348032
Transfer197952442024-05-04 7:27:2311 days ago1714807643IN
0xd418049A...152E2FA9F
0.004 ETH0.000145286.56555729
Transfer197923712024-05-03 21:48:4712 days ago1714772927IN
0xd418049A...152E2FA9F
0.004 ETH0.000112645.09052516
Transfer197690972024-04-30 15:43:4715 days ago1714491827IN
0xd418049A...152E2FA9F
0.004 ETH0.0003657516.52815265
Transfer197690592024-04-30 15:36:1115 days ago1714491371IN
0xd418049A...152E2FA9F
0.004 ETH0.0003799417.16969142
Transfer197631812024-04-29 19:54:4716 days ago1714420487IN
0xd418049A...152E2FA9F
0.004 ETH0.000203579.19949353
Transfer197604422024-04-29 10:41:5916 days ago1714387319IN
0xd418049A...152E2FA9F
0.004 ETH0.000199969.03627575
Transfer197599142024-04-29 8:55:5916 days ago1714380959IN
0xd418049A...152E2FA9F
0.004 ETH0.000200339.05286648
Transfer197550912024-04-28 16:44:5917 days ago1714322699IN
0xd418049A...152E2FA9F
0.004 ETH0.000182438.24405437
Transfer197446352024-04-27 5:37:2318 days ago1714196243IN
0xd418049A...152E2FA9F
0.004 ETH0.000119885.41756175
Transfer197440992024-04-27 3:49:3518 days ago1714189775IN
0xd418049A...152E2FA9F
0.004 ETH0.000125065.65169704
Transfer197366882024-04-26 2:54:3520 days ago1714100075IN
0xd418049A...152E2FA9F
0.004 ETH0.00012345.57653774
Transfer197353382024-04-25 22:22:3520 days ago1714083755IN
0xd418049A...152E2FA9F
0.004 ETH0.000149746.76690641
Transfer197243322024-04-24 9:25:3521 days ago1713950735IN
0xd418049A...152E2FA9F
0.004 ETH0.000204649.24765039
Transfer197167632024-04-23 8:00:2322 days ago1713859223IN
0xd418049A...152E2FA9F
0.004 ETH0.000202319.14243036
Transfer197100272024-04-22 9:25:3523 days ago1713777935IN
0xd418049A...152E2FA9F
0.004 ETH0.000207089.3581197
Transfer196992402024-04-20 21:14:2325 days ago1713647663IN
0xd418049A...152E2FA9F
0.004 ETH0.000155387.02159654
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
197425062024-04-26 22:29:3519 days ago1714170575
0xd418049A...152E2FA9F
0.004 ETH
196436132024-04-13 2:14:4733 days ago1712974487
0xd418049A...152E2FA9F
0.504 ETH
191855332024-02-08 19:30:2397 days ago1707420623
0xd418049A...152E2FA9F
0.02 ETH
191759502024-02-07 11:14:3598 days ago1707304475
0xd418049A...152E2FA9F
0.5026318 ETH
190971692024-01-27 9:57:35109 days ago1706349455
0xd418049A...152E2FA9F
0.004 ETH
187539622023-12-10 6:16:11157 days ago1702188971
0xd418049A...152E2FA9F
0.504 ETH
182326932023-09-28 7:16:47230 days ago1695885407
0xd418049A...152E2FA9F
0.5036738 ETH
177441432023-07-21 21:16:35299 days ago1689974195
0xd418049A...152E2FA9F
0.524 ETH
175083412023-06-18 18:07:35332 days ago1687111655
0xd418049A...152E2FA9F
0.004 ETH
172962202023-05-19 21:33:35362 days ago1684532015
0xd418049A...152E2FA9F
0.5018238 ETH
169840642023-04-05 17:31:59406 days ago1680715919
0xd418049A...152E2FA9F
0.50473841 ETH
169191982023-03-27 14:05:23415 days ago1679925923
0xd418049A...152E2FA9F
0.02873841 ETH
169080652023-03-26 0:33:35417 days ago1679790815
0xd418049A...152E2FA9F
0.512 ETH
167542032023-03-04 9:31:23438 days ago1677922283
0xd418049A...152E2FA9F
0.504 ETH
166308882023-02-15 1:33:23456 days ago1676424803
0xd418049A...152E2FA9F
0.004 ETH
165803582023-02-08 0:04:11463 days ago1675814651
0xd418049A...152E2FA9F
0.004 ETH
164499262023-01-20 18:51:35481 days ago1674240695
0xd418049A...152E2FA9F
0.004 ETH
163910392023-01-12 13:31:47489 days ago1673530307
0xd418049A...152E2FA9F
0.504 ETH
162071162022-12-17 21:31:23515 days ago1671312683
0xd418049A...152E2FA9F
0.516 ETH
160902852022-12-01 13:34:23531 days ago1669901663
0xd418049A...152E2FA9F
0.50201803 ETH
158687122022-10-31 14:43:11562 days ago1667227391
0xd418049A...152E2FA9F
0.004 ETH
158687082022-10-31 14:42:23562 days ago1667227343
0xd418049A...152E2FA9F
0.004 ETH
158475282022-10-28 15:42:23565 days ago1666971743
0xd418049A...152E2FA9F
0.004 ETH
157990932022-10-21 21:13:59572 days ago1666386839
0xd418049A...152E2FA9F
0.50341771 ETH
156535482022-10-01 13:15:47592 days ago1664630147
0xd418049A...152E2FA9F
0.004 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ForcedExit

Compiler Version
v0.7.6+commit.7338295f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 6 : ForcedExit.sol
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;

// SPDX-License-Identifier: MIT OR Apache-2.0





import "./Utils.sol";
import "./Ownable.sol";
import "./ReentrancyGuard.sol";

contract ForcedExit is Ownable, ReentrancyGuard {
    // This is the role of the zkSync server
    // that will be able to withdraw the funds
    address payable public receiver;

    bool public enabled = true;

    constructor(address _master, address _receiver) Ownable(_master) {
        initializeReentrancyGuard();

        // The master is the default receiver
        receiver = payable(_receiver);
    }

    event FundsReceived(uint256 _amount);

    function setReceiver(address payable _newReceiver) external {
        requireMaster(msg.sender);

        receiver = _newReceiver;
    }

    function withdrawPendingFunds(address payable _to) external nonReentrant {
        require(
            msg.sender == receiver || msg.sender == getMaster(),
            "Only the receiver or master can withdraw funds from the smart contract"
        );

        uint256 balance = address(this).balance;

        (bool success, ) = _to.call{value: balance}("");
        require(success, "ETH withdraw failed");
    }

    // We have to use fallback instead of `receive` since the ethabi
    // library can't decode the receive function:
    // https://github.com/rust-ethereum/ethabi/issues/185
    fallback() external payable {
        emit FundsReceived(msg.value);
    }
}

File 3 of 6 : Utils.sol
pragma solidity ^0.7.0;

// SPDX-License-Identifier: MIT OR Apache-2.0



import "./IERC20.sol";
import "./Bytes.sol";

library Utils {
    /// @notice Returns lesser of two values
    function minU32(uint32 a, uint32 b) internal pure returns (uint32) {
        return a < b ? a : b;
    }

    /// @notice Returns lesser of two values
    function minU64(uint64 a, uint64 b) internal pure returns (uint64) {
        return a < b ? a : b;
    }

    /// @notice Sends tokens
    /// @dev NOTE: this function handles tokens that have transfer function not strictly compatible with ERC20 standard
    /// @dev NOTE: call `transfer` to this token may return (bool) or nothing
    /// @param _token Token address
    /// @param _to Address of recipient
    /// @param _amount Amount of tokens to transfer
    /// @return bool flag indicating that transfer is successful
    function sendERC20(
        IERC20 _token,
        address _to,
        uint256 _amount
    ) internal returns (bool) {
        (bool callSuccess, bytes memory callReturnValueEncoded) =
            address(_token).call(abi.encodeWithSignature("transfer(address,uint256)", _to, _amount));
        // `transfer` method may return (bool) or nothing.
        bool returnedSuccess = callReturnValueEncoded.length == 0 || abi.decode(callReturnValueEncoded, (bool));
        return callSuccess && returnedSuccess;
    }

    /// @notice Transfers token from one address to another
    /// @dev NOTE: this function handles tokens that have transfer function not strictly compatible with ERC20 standard
    /// @dev NOTE: call `transferFrom` to this token may return (bool) or nothing
    /// @param _token Token address
    /// @param _from Address of sender
    /// @param _to Address of recipient
    /// @param _amount Amount of tokens to transfer
    /// @return bool flag indicating that transfer is successful
    function transferFromERC20(
        IERC20 _token,
        address _from,
        address _to,
        uint256 _amount
    ) internal returns (bool) {
        (bool callSuccess, bytes memory callReturnValueEncoded) =
            address(_token).call(abi.encodeWithSignature("transferFrom(address,address,uint256)", _from, _to, _amount));
        // `transferFrom` method may return (bool) or nothing.
        bool returnedSuccess = callReturnValueEncoded.length == 0 || abi.decode(callReturnValueEncoded, (bool));
        return callSuccess && returnedSuccess;
    }

    /// @notice Recovers signer's address from ethereum signature for given message
    /// @param _signature 65 bytes concatenated. R (32) + S (32) + V (1)
    /// @param _messageHash signed message hash.
    /// @return address of the signer
    function recoverAddressFromEthSignature(bytes memory _signature, bytes32 _messageHash)
        internal
        pure
        returns (address)
    {
        require(_signature.length == 65, "P"); // incorrect signature length

        bytes32 signR;
        bytes32 signS;
        uint8 signV;
        assembly {
            signR := mload(add(_signature, 32))
            signS := mload(add(_signature, 64))
            signV := byte(0, mload(add(_signature, 96)))
        }

        return ecrecover(_messageHash, signV, signR, signS);
    }

    /// @notice Returns new_hash = hash(old_hash + bytes)
    function concatHash(bytes32 _hash, bytes memory _bytes) internal pure returns (bytes32) {
        bytes32 result;
        assembly {
            let bytesLen := add(mload(_bytes), 32)
            mstore(_bytes, _hash)
            result := keccak256(_bytes, bytesLen)
        }
        return result;
    }

    function hashBytesToBytes20(bytes memory _bytes) internal pure returns (bytes20) {
        return bytes20(uint160(uint256(keccak256(_bytes))));
    }
}

File 4 of 6 : Ownable.sol
pragma solidity ^0.7.0;

// SPDX-License-Identifier: MIT OR Apache-2.0



/// @title Ownable Contract
/// @author Matter Labs
contract Ownable {
    /// @dev Storage position of the masters address (keccak256('eip1967.proxy.admin') - 1)
    bytes32 private constant masterPosition = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;

    /// @notice Contract constructor
    /// @dev Sets msg sender address as masters address
    /// @param masterAddress Master address
    constructor(address masterAddress) {
        setMaster(masterAddress);
    }

    /// @notice Check if specified address is master
    /// @param _address Address to check
    function requireMaster(address _address) internal view {
        require(_address == getMaster(), "1c"); // oro11 - only by master
    }

    /// @notice Returns contract masters address
    /// @return master Master's address
    function getMaster() public view returns (address master) {
        bytes32 position = masterPosition;
        assembly {
            master := sload(position)
        }
    }

    /// @dev Sets new masters address
    /// @param _newMaster New master's address
    function setMaster(address _newMaster) internal {
        bytes32 position = masterPosition;
        assembly {
            sstore(position, _newMaster)
        }
    }

    /// @notice Transfer mastership of the contract to new master
    /// @param _newMaster New masters address
    function transferMastership(address _newMaster) external {
        requireMaster(msg.sender);
        require(_newMaster != address(0), "1d"); // otp11 - new masters address can't be zero address
        setMaster(_newMaster);
    }
}

File 5 of 6 : ReentrancyGuard.sol
pragma solidity ^0.7.0;

// SPDX-License-Identifier: MIT OR Apache-2.0



/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 *
 * _Since v2.5.0:_ this module is now much more gas efficient, given net gas
 * metering changes introduced in the Istanbul hardfork.
 */
contract ReentrancyGuard {
    /// @dev Address of lock flag variable.
    /// @dev Flag is placed at random memory location to not interfere with Storage contract.
    uint256 private constant LOCK_FLAG_ADDRESS = 0x8e94fed44239eb2314ab7a406345e6c5a8f0ccedf3b600de3d004e672c33abf4; // keccak256("ReentrancyGuard") - 1;

    function initializeReentrancyGuard() internal {
        // Storing an initial non-zero value makes deployment a bit more
        // expensive, but in exchange the refund on every call to nonReentrant
        // will be lower in amount. Since refunds are capped to a percetange of
        // the total transaction's gas, it is best to keep them low in cases
        // like this one, to increase the likelihood of the full refund coming
        // into effect.
        assembly {
            sstore(LOCK_FLAG_ADDRESS, 1)
        }
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        bool notEntered;
        assembly {
            notEntered := sload(LOCK_FLAG_ADDRESS)
        }

        // On the first call to nonReentrant, _notEntered will be true
        require(notEntered, "1b");

        // Any calls to nonReentrant after this point will fail
        assembly {
            sstore(LOCK_FLAG_ADDRESS, 0)
        }

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        assembly {
            sstore(LOCK_FLAG_ADDRESS, 1)
        }
    }
}

File 6 of 6 : IERC20.sol
pragma solidity ^0.7.0;

// SPDX-License-Identifier: UNLICENSED


/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see {ERC20Detailed}.
 */
interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @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);
}

File 7 of 6 : Bytes.sol
pragma solidity ^0.7.0;

// SPDX-License-Identifier: MIT OR Apache-2.0



// Functions named bytesToX, except bytesToBytes20, where X is some type of size N < 32 (size of one word)
// implements the following algorithm:
// f(bytes memory input, uint offset) -> X out
// where byte representation of out is N bytes from input at the given offset
// 1) We compute memory location of the word W such that last N bytes of W is input[offset..offset+N]
// W_address = input + 32 (skip stored length of bytes) + offset - (32 - N) == input + offset + N
// 2) We load W from memory into out, last N bytes of W are placed into out

library Bytes {
    function toBytesFromUInt16(uint16 self) internal pure returns (bytes memory _bts) {
        return toBytesFromUIntTruncated(uint256(self), 2);
    }

    function toBytesFromUInt24(uint24 self) internal pure returns (bytes memory _bts) {
        return toBytesFromUIntTruncated(uint256(self), 3);
    }

    function toBytesFromUInt32(uint32 self) internal pure returns (bytes memory _bts) {
        return toBytesFromUIntTruncated(uint256(self), 4);
    }

    function toBytesFromUInt128(uint128 self) internal pure returns (bytes memory _bts) {
        return toBytesFromUIntTruncated(uint256(self), 16);
    }

    // Copies 'len' lower bytes from 'self' into a new 'bytes memory'.
    // Returns the newly created 'bytes memory'. The returned bytes will be of length 'len'.
    function toBytesFromUIntTruncated(uint256 self, uint8 byteLength) private pure returns (bytes memory bts) {
        require(byteLength <= 32, "Q");
        bts = new bytes(byteLength);
        // Even though the bytes will allocate a full word, we don't want
        // any potential garbage bytes in there.
        uint256 data = self << ((32 - byteLength) * 8);
        assembly {
            mstore(
                add(bts, 32), // BYTES_HEADER_SIZE
                data
            )
        }
    }

    // Copies 'self' into a new 'bytes memory'.
    // Returns the newly created 'bytes memory'. The returned bytes will be of length '20'.
    function toBytesFromAddress(address self) internal pure returns (bytes memory bts) {
        bts = toBytesFromUIntTruncated(uint256(self), 20);
    }

    // See comment at the top of this file for explanation of how this function works.
    // NOTE: theoretically possible overflow of (_start + 20)
    function bytesToAddress(bytes memory self, uint256 _start) internal pure returns (address addr) {
        uint256 offset = _start + 20;
        require(self.length >= offset, "R");
        assembly {
            addr := mload(add(self, offset))
        }
    }

    // Reasoning about why this function works is similar to that of other similar functions, except NOTE below.
    // NOTE: that bytes1..32 is stored in the beginning of the word unlike other primitive types
    // NOTE: theoretically possible overflow of (_start + 20)
    function bytesToBytes20(bytes memory self, uint256 _start) internal pure returns (bytes20 r) {
        require(self.length >= (_start + 20), "S");
        assembly {
            r := mload(add(add(self, 0x20), _start))
        }
    }

    // See comment at the top of this file for explanation of how this function works.
    // NOTE: theoretically possible overflow of (_start + 0x2)
    function bytesToUInt16(bytes memory _bytes, uint256 _start) internal pure returns (uint16 r) {
        uint256 offset = _start + 0x2;
        require(_bytes.length >= offset, "T");
        assembly {
            r := mload(add(_bytes, offset))
        }
    }

    // See comment at the top of this file for explanation of how this function works.
    // NOTE: theoretically possible overflow of (_start + 0x3)
    function bytesToUInt24(bytes memory _bytes, uint256 _start) internal pure returns (uint24 r) {
        uint256 offset = _start + 0x3;
        require(_bytes.length >= offset, "U");
        assembly {
            r := mload(add(_bytes, offset))
        }
    }

    // NOTE: theoretically possible overflow of (_start + 0x4)
    function bytesToUInt32(bytes memory _bytes, uint256 _start) internal pure returns (uint32 r) {
        uint256 offset = _start + 0x4;
        require(_bytes.length >= offset, "V");
        assembly {
            r := mload(add(_bytes, offset))
        }
    }

    // NOTE: theoretically possible overflow of (_start + 0x10)
    function bytesToUInt128(bytes memory _bytes, uint256 _start) internal pure returns (uint128 r) {
        uint256 offset = _start + 0x10;
        require(_bytes.length >= offset, "W");
        assembly {
            r := mload(add(_bytes, offset))
        }
    }

    // See comment at the top of this file for explanation of how this function works.
    // NOTE: theoretically possible overflow of (_start + 0x14)
    function bytesToUInt160(bytes memory _bytes, uint256 _start) internal pure returns (uint160 r) {
        uint256 offset = _start + 0x14;
        require(_bytes.length >= offset, "X");
        assembly {
            r := mload(add(_bytes, offset))
        }
    }

    // NOTE: theoretically possible overflow of (_start + 0x20)
    function bytesToBytes32(bytes memory _bytes, uint256 _start) internal pure returns (bytes32 r) {
        uint256 offset = _start + 0x20;
        require(_bytes.length >= offset, "Y");
        assembly {
            r := mload(add(_bytes, offset))
        }
    }

    // Original source code: https://github.com/GNSPS/solidity-bytes-utils/blob/master/contracts/BytesLib.sol#L228
    // Get slice from bytes arrays
    // Returns the newly created 'bytes memory'
    // NOTE: theoretically possible overflow of (_start + _length)
    function slice(
        bytes memory _bytes,
        uint256 _start,
        uint256 _length
    ) internal pure returns (bytes memory) {
        require(_bytes.length >= (_start + _length), "Z"); // bytes length is less then start byte + length bytes

        bytes memory tempBytes = new bytes(_length);

        if (_length != 0) {
            assembly {
                let slice_curr := add(tempBytes, 0x20)
                let slice_end := add(slice_curr, _length)

                for {
                    let array_current := add(_bytes, add(_start, 0x20))
                } lt(slice_curr, slice_end) {
                    slice_curr := add(slice_curr, 0x20)
                    array_current := add(array_current, 0x20)
                } {
                    mstore(slice_curr, mload(array_current))
                }
            }
        }

        return tempBytes;
    }

    /// Reads byte stream
    /// @return new_offset - offset + amount of bytes read
    /// @return data - actually read data
    // NOTE: theoretically possible overflow of (_offset + _length)
    function read(
        bytes memory _data,
        uint256 _offset,
        uint256 _length
    ) internal pure returns (uint256 new_offset, bytes memory data) {
        data = slice(_data, _offset, _length);
        new_offset = _offset + _length;
    }

    // NOTE: theoretically possible overflow of (_offset + 1)
    function readBool(bytes memory _data, uint256 _offset) internal pure returns (uint256 new_offset, bool r) {
        new_offset = _offset + 1;
        r = uint8(_data[_offset]) != 0;
    }

    // NOTE: theoretically possible overflow of (_offset + 1)
    function readUint8(bytes memory _data, uint256 _offset) internal pure returns (uint256 new_offset, uint8 r) {
        new_offset = _offset + 1;
        r = uint8(_data[_offset]);
    }

    // NOTE: theoretically possible overflow of (_offset + 2)
    function readUInt16(bytes memory _data, uint256 _offset) internal pure returns (uint256 new_offset, uint16 r) {
        new_offset = _offset + 2;
        r = bytesToUInt16(_data, _offset);
    }

    // NOTE: theoretically possible overflow of (_offset + 3)
    function readUInt24(bytes memory _data, uint256 _offset) internal pure returns (uint256 new_offset, uint24 r) {
        new_offset = _offset + 3;
        r = bytesToUInt24(_data, _offset);
    }

    // NOTE: theoretically possible overflow of (_offset + 4)
    function readUInt32(bytes memory _data, uint256 _offset) internal pure returns (uint256 new_offset, uint32 r) {
        new_offset = _offset + 4;
        r = bytesToUInt32(_data, _offset);
    }

    // NOTE: theoretically possible overflow of (_offset + 16)
    function readUInt128(bytes memory _data, uint256 _offset) internal pure returns (uint256 new_offset, uint128 r) {
        new_offset = _offset + 16;
        r = bytesToUInt128(_data, _offset);
    }

    // NOTE: theoretically possible overflow of (_offset + 20)
    function readUInt160(bytes memory _data, uint256 _offset) internal pure returns (uint256 new_offset, uint160 r) {
        new_offset = _offset + 20;
        r = bytesToUInt160(_data, _offset);
    }

    // NOTE: theoretically possible overflow of (_offset + 20)
    function readAddress(bytes memory _data, uint256 _offset) internal pure returns (uint256 new_offset, address r) {
        new_offset = _offset + 20;
        r = bytesToAddress(_data, _offset);
    }

    // NOTE: theoretically possible overflow of (_offset + 20)
    function readBytes20(bytes memory _data, uint256 _offset) internal pure returns (uint256 new_offset, bytes20 r) {
        new_offset = _offset + 20;
        r = bytesToBytes20(_data, _offset);
    }

    // NOTE: theoretically possible overflow of (_offset + 32)
    function readBytes32(bytes memory _data, uint256 _offset) internal pure returns (uint256 new_offset, bytes32 r) {
        new_offset = _offset + 32;
        r = bytesToBytes32(_data, _offset);
    }

    /// Trim bytes into single word
    function trim(bytes memory _data, uint256 _new_length) internal pure returns (uint256 r) {
        require(_new_length <= 0x20, "10"); // new_length is longer than word
        require(_data.length >= _new_length, "11"); // data is to short

        uint256 a;
        assembly {
            a := mload(add(_data, 0x20)) // load bytes into uint256
        }

        return a >> ((0x20 - _new_length) * 8);
    }

    // Helper function for hex conversion.
    function halfByteToHex(bytes1 _byte) internal pure returns (bytes1 _hexByte) {
        require(uint8(_byte) < 0x10, "hbh11"); // half byte's value is out of 0..15 range.

        // "FEDCBA9876543210" ASCII-encoded, shifted and automatically truncated.
        return bytes1(uint8(0x66656463626139383736353433323130 >> (uint8(_byte) * 8)));
    }

    // Convert bytes to ASCII hex representation
    function bytesToHexASCIIBytes(bytes memory _input) internal pure returns (bytes memory _output) {
        bytes memory outStringBytes = new bytes(_input.length * 2);

        // code in `assembly` construction is equivalent of the next code:
        // for (uint i = 0; i < _input.length; ++i) {
        //     outStringBytes[i*2] = halfByteToHex(_input[i] >> 4);
        //     outStringBytes[i*2+1] = halfByteToHex(_input[i] & 0x0f);
        // }
        assembly {
            let input_curr := add(_input, 0x20)
            let input_end := add(input_curr, mload(_input))

            for {
                let out_curr := add(outStringBytes, 0x20)
            } lt(input_curr, input_end) {
                input_curr := add(input_curr, 0x01)
                out_curr := add(out_curr, 0x02)
            } {
                let curr_input_byte := shr(0xf8, mload(input_curr))
                // here outStringByte from each half of input byte calculates by the next:
                //
                // "FEDCBA9876543210" ASCII-encoded, shifted and automatically truncated.
                // outStringByte = byte (uint8 (0x66656463626139383736353433323130 >> (uint8 (_byteHalf) * 8)))
                mstore(
                    out_curr,
                    shl(0xf8, shr(mul(shr(0x04, curr_input_byte), 0x08), 0x66656463626139383736353433323130))
                )
                mstore(
                    add(out_curr, 0x01),
                    shl(0xf8, shr(mul(and(0x0f, curr_input_byte), 0x08), 0x66656463626139383736353433323130))
                )
            }
        }
        return outStringBytes;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_master","type":"address"},{"internalType":"address","name":"_receiver","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"FundsReceived","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"enabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaster","outputs":[{"internalType":"address","name":"master","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"receiver","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_newReceiver","type":"address"}],"name":"setReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newMaster","type":"address"}],"name":"transferMastership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"}],"name":"withdrawPendingFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000805460ff60a01b1916600160a01b17905534801561002357600080fd5b5060405161065e38038061065e833981016040819052610042916100e1565b8161004c8161007b565b5061005561009f565b600080546001600160a01b0319166001600160a01b039290921691909117905550610113565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b60017f8e94fed44239eb2314ab7a406345e6c5a8f0ccedf3b600de3d004e672c33abf455565b80516001600160a01b03811681146100dc57600080fd5b919050565b600080604083850312156100f3578182fd5b6100fc836100c5565b915061010a602084016100c5565b90509250929050565b61053c806101226000396000f3fe6080604052600436106100555760003560e01c8063238dafe01461008e5780635a99719e146100b9578063718da7ee146100db5780637be9c682146100fd578063c3f596871461011d578063f7260d3e1461013d575b7fbcdc7071c1beb6dcf2744621e0b29a2f2432ee20812d9ca5e3d5e8f9308d93a33460405161008491906104e8565b60405180910390a1005b34801561009a57600080fd5b506100a3610152565b6040516100b09190610444565b60405180910390f35b3480156100c557600080fd5b506100ce610162565b6040516100b09190610430565b3480156100e757600080fd5b506100fb6100f636600461040a565b610187565b005b34801561010957600080fd5b506100fb61011836600461040a565b6101b2565b34801561012957600080fd5b506100fb61013836600461040a565b610330565b34801561014957600080fd5b506100ce610385565b600054600160a01b900460ff1681565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b61019033610394565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b7f8e94fed44239eb2314ab7a406345e6c5a8f0ccedf3b600de3d004e672c33abf4548061020b576040805162461bcd60e51b815260206004820152600260248201526118b160f11b604482015290519081900360640190fd5b60007f8e94fed44239eb2314ab7a406345e6c5a8f0ccedf3b600de3d004e672c33abf4819055546001600160a01b0316331480610260575061024b610162565b6001600160a01b0316336001600160a01b0316145b6102855760405162461bcd60e51b815260040161027c9061044f565b60405180910390fd5b60004790506000836001600160a01b0316826040516102a39061042d565b60006040518083038185875af1925050503d80600081146102e0576040519150601f19603f3d011682016040523d82523d6000602084013e6102e5565b606091505b50509050806103065760405162461bcd60e51b815260040161027c906104bb565b505060017f8e94fed44239eb2314ab7a406345e6c5a8f0ccedf3b600de3d004e672c33abf4555050565b61033933610394565b6001600160a01b038116610379576040805162461bcd60e51b81526020600482015260026024820152610c5960f21b604482015290519081900360640190fd5b610382816103e6565b50565b6000546001600160a01b031681565b61039c610162565b6001600160a01b0316816001600160a01b031614610382576040805162461bcd60e51b8152602060048201526002602482015261316360f01b604482015290519081900360640190fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b60006020828403121561041b578081fd5b8135610426816104f1565b9392505050565b90565b6001600160a01b0391909116815260200190565b901515815260200190565b60208082526046908201527f4f6e6c7920746865207265636569766572206f72206d61737465722063616e2060408201527f77697468647261772066756e64732066726f6d2074686520736d61727420636f6060820152651b9d1c9858dd60d21b608082015260a00190565b602080825260139082015272115512081dda5d1a191c985dc819985a5b1959606a1b604082015260600190565b90815260200190565b6001600160a01b038116811461038257600080fdfea2646970667358221220decd52e1c341444dbc13a791684bce3446f39ed8924f43c96c5555d5f4a564c464736f6c63430007060033000000000000000000000000017674bd734f120a60b43965fb76fbcd0a89cd24000000000000000000000000e1fab3efd74a77c23b426c302d96372140ff7d0c

Deployed Bytecode

0x6080604052600436106100555760003560e01c8063238dafe01461008e5780635a99719e146100b9578063718da7ee146100db5780637be9c682146100fd578063c3f596871461011d578063f7260d3e1461013d575b7fbcdc7071c1beb6dcf2744621e0b29a2f2432ee20812d9ca5e3d5e8f9308d93a33460405161008491906104e8565b60405180910390a1005b34801561009a57600080fd5b506100a3610152565b6040516100b09190610444565b60405180910390f35b3480156100c557600080fd5b506100ce610162565b6040516100b09190610430565b3480156100e757600080fd5b506100fb6100f636600461040a565b610187565b005b34801561010957600080fd5b506100fb61011836600461040a565b6101b2565b34801561012957600080fd5b506100fb61013836600461040a565b610330565b34801561014957600080fd5b506100ce610385565b600054600160a01b900460ff1681565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b61019033610394565b600080546001600160a01b0319166001600160a01b0392909216919091179055565b7f8e94fed44239eb2314ab7a406345e6c5a8f0ccedf3b600de3d004e672c33abf4548061020b576040805162461bcd60e51b815260206004820152600260248201526118b160f11b604482015290519081900360640190fd5b60007f8e94fed44239eb2314ab7a406345e6c5a8f0ccedf3b600de3d004e672c33abf4819055546001600160a01b0316331480610260575061024b610162565b6001600160a01b0316336001600160a01b0316145b6102855760405162461bcd60e51b815260040161027c9061044f565b60405180910390fd5b60004790506000836001600160a01b0316826040516102a39061042d565b60006040518083038185875af1925050503d80600081146102e0576040519150601f19603f3d011682016040523d82523d6000602084013e6102e5565b606091505b50509050806103065760405162461bcd60e51b815260040161027c906104bb565b505060017f8e94fed44239eb2314ab7a406345e6c5a8f0ccedf3b600de3d004e672c33abf4555050565b61033933610394565b6001600160a01b038116610379576040805162461bcd60e51b81526020600482015260026024820152610c5960f21b604482015290519081900360640190fd5b610382816103e6565b50565b6000546001600160a01b031681565b61039c610162565b6001600160a01b0316816001600160a01b031614610382576040805162461bcd60e51b8152602060048201526002602482015261316360f01b604482015290519081900360640190fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b60006020828403121561041b578081fd5b8135610426816104f1565b9392505050565b90565b6001600160a01b0391909116815260200190565b901515815260200190565b60208082526046908201527f4f6e6c7920746865207265636569766572206f72206d61737465722063616e2060408201527f77697468647261772066756e64732066726f6d2074686520736d61727420636f6060820152651b9d1c9858dd60d21b608082015260a00190565b602080825260139082015272115512081dda5d1a191c985dc819985a5b1959606a1b604082015260600190565b90815260200190565b6001600160a01b038116811461038257600080fdfea2646970667358221220decd52e1c341444dbc13a791684bce3446f39ed8924f43c96c5555d5f4a564c464736f6c63430007060033

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

000000000000000000000000017674bd734f120a60b43965fb76fbcd0a89cd24000000000000000000000000e1fab3efd74a77c23b426c302d96372140ff7d0c

-----Decoded View---------------
Arg [0] : _master (address): 0x017674bD734f120a60B43965fB76FbCd0a89Cd24
Arg [1] : _receiver (address): 0xe1faB3eFD74A77C23B426c302D96372140FF7d0C

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000017674bd734f120a60b43965fb76fbcd0a89cd24
Arg [1] : 000000000000000000000000e1fab3efd74a77c23b426c302d96372140ff7d0c


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.