ETH Price: $2,985.45 (+5.57%)
 

More Info

Private Name Tags

Multichain Info

Transaction Hash
Method
Block
From
To
Transfer240201152025-12-15 19:33:114 days ago1765827191IN
0xd418049A...152E2FA9F
0.004 ETH0.000012920.58410925
Transfer239807832025-12-10 7:18:479 days ago1765351127IN
0xd418049A...152E2FA9F
0.004 ETH0.000048022.17001403
Transfer239692612025-12-08 16:25:2311 days ago1765211123IN
0xd418049A...152E2FA9F
0.004 ETH0.0088516400
Transfer237368832025-11-06 1:12:2343 days ago1762391543IN
0xd418049A...152E2FA9F
0.004 ETH0.000050222.26969401
Transfer237282782025-11-04 20:16:2345 days ago1762287383IN
0xd418049A...152E2FA9F
0.004 ETH0.000148746.7218394
Transfer236054162025-10-18 15:27:1162 days ago1760801231IN
0xd418049A...152E2FA9F
0.004 ETH0.000035651.61128495
Transfer236054112025-10-18 15:26:1162 days ago1760801171IN
0xd418049A...152E2FA9F
0.004 ETH0.000035721.61450995
Transfer235754862025-10-14 10:56:2366 days ago1760439383IN
0xd418049A...152E2FA9F
0.004 ETH0.000047052.12624041
Transfer235685402025-10-13 11:37:3567 days ago1760355455IN
0xd418049A...152E2FA9F
0.0040001 ETH0.000050752.29374723
Transfer235635522025-10-12 18:52:2368 days ago1760295143IN
0xd418049A...152E2FA9F
0.004 ETH0.000042441.91828475
Transfer235270662025-10-07 16:27:2373 days ago1759854443IN
0xd418049A...152E2FA9F
0.004 ETH0.000104894.74027424
Transfer234356042025-09-24 21:33:1186 days ago1758749591IN
0xd418049A...152E2FA9F
0.004 ETH0.000025911.17108873
Transfer234028262025-09-20 7:35:1190 days ago1758353711IN
0xd418049A...152E2FA9F
0.004 ETH0.000025751.16393891
Transfer233881682025-09-18 6:27:2392 days ago1758176843IN
0xd418049A...152E2FA9F
0.004 ETH0.000018290.82656303
Transfer233619912025-09-14 14:43:1196 days ago1757860991IN
0xd418049A...152E2FA9F
0.004 ETH0.000032561.47153259
Transfer233315972025-09-10 8:48:35100 days ago1757494115IN
0xd418049A...152E2FA9F
0.008 ETH0.000014930.67469462
Transfer231735732025-08-19 7:17:59122 days ago1755587879IN
0xd418049A...152E2FA9F
0.004 ETH0.000014720.66527526
Transfer231596412025-08-17 8:39:59124 days ago1755419999IN
0xd418049A...152E2FA9F
0.004 ETH0.000047852.16275325
Transfer231388702025-08-14 11:04:23127 days ago1755169463IN
0xd418049A...152E2FA9F
0.004 ETH0.00006713.03258412
Transfer231288822025-08-13 1:35:47128 days ago1755048947IN
0xd418049A...152E2FA9F
0.004 ETH0.000059992.71109744
Transfer231265002025-08-12 17:37:23129 days ago1755020243IN
0xd418049A...152E2FA9F
0.004 ETH0.000099714.50598545
Transfer231157382025-08-11 5:31:59130 days ago1754890319IN
0xd418049A...152E2FA9F
0.004 ETH0.000053262.40680471
Transfer230414272025-07-31 20:20:47141 days ago1753993247IN
0xd418049A...152E2FA9F
0.004 ETH0.000063582.87358166
Transfer230069902025-07-27 0:46:59145 days ago1753577219IN
0xd418049A...152E2FA9F
0.004 ETH0.000048982.21341375
Transfer230062762025-07-26 22:23:47146 days ago1753568627IN
0xd418049A...152E2FA9F
0.004 ETH0.000049442.2344127
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer222958202025-04-18 12:15:47245 days ago1744978547
0xd418049A...152E2FA9F
0.50074077 ETH
Transfer216202082025-01-14 4:03:11339 days ago1736827391
0xd418049A...152E2FA9F
0.004 ETH
Transfer214583632024-12-22 13:34:11362 days ago1734874451
0xd418049A...152E2FA9F
0.004 ETH
Transfer211446552024-11-08 18:16:11406 days ago1731089771
0xd418049A...152E2FA9F
0.50206943 ETH
Transfer201322752024-06-20 10:14:47547 days ago1718878487
0xd418049A...152E2FA9F
0.50080514 ETH
Transfer200618472024-06-10 13:52:11557 days ago1718027531
0xd418049A...152E2FA9F
0.00400001 ETH
Transfer199253782024-05-22 12:19:59576 days ago1716380399
0xd418049A...152E2FA9F
0.016 ETH
Transfer199196222024-05-21 16:58:11577 days ago1716310691
0xd418049A...152E2FA9F
0.004 ETH
Transfer197425062024-04-26 22:29:35602 days ago1714170575
0xd418049A...152E2FA9F
0.004 ETH
Transfer196436132024-04-13 2:14:47615 days ago1712974487
0xd418049A...152E2FA9F
0.504 ETH
Transfer191855332024-02-08 19:30:23680 days ago1707420623
0xd418049A...152E2FA9F
0.02 ETH
Transfer191759502024-02-07 11:14:35681 days ago1707304475
0xd418049A...152E2FA9F
0.5026318 ETH
Transfer190971692024-01-27 9:57:35692 days ago1706349455
0xd418049A...152E2FA9F
0.004 ETH
Transfer187539622023-12-10 6:16:11740 days ago1702188971
0xd418049A...152E2FA9F
0.504 ETH
Transfer182326932023-09-28 7:16:47813 days ago1695885407
0xd418049A...152E2FA9F
0.5036738 ETH
Transfer177441432023-07-21 21:16:35882 days ago1689974195
0xd418049A...152E2FA9F
0.524 ETH
Transfer175083412023-06-18 18:07:35915 days ago1687111655
0xd418049A...152E2FA9F
0.004 ETH
Transfer172962202023-05-19 21:33:35945 days ago1684532015
0xd418049A...152E2FA9F
0.5018238 ETH
Transfer169840642023-04-05 17:31:59989 days ago1680715919
0xd418049A...152E2FA9F
0.50473841 ETH
Transfer169191982023-03-27 14:05:23998 days ago1679925923
0xd418049A...152E2FA9F
0.02873841 ETH
Transfer169080652023-03-26 0:33:35999 days ago1679790815
0xd418049A...152E2FA9F
0.512 ETH
Transfer167542032023-03-04 9:31:231021 days ago1677922283
0xd418049A...152E2FA9F
0.504 ETH
Transfer166308882023-02-15 1:33:231038 days ago1676424803
0xd418049A...152E2FA9F
0.004 ETH
Transfer165803582023-02-08 0:04:111045 days ago1675814651
0xd418049A...152E2FA9F
0.004 ETH
Transfer164499262023-01-20 18:51:351064 days ago1674240695
0xd418049A...152E2FA9F
0.004 ETH
View All Internal Transactions
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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
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);
    }
}

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))));
    }
}

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);
    }
}

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)
        }
    }
}

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);
}

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

API
[{"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 Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
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.