Contract 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e365 7

 
Txn Hash Method
Block
From
To
Value
0x557b63e24743d09d014df80c488e54a044f3ea259cee210d92d10a7556dde0370x608060408985782022-11-29 9:53:45190 days 5 hrs ago0x6dcb5e43b05918505f65bf423088af172c32be33 IN  Create: BridgeV20 Ether0.0016195671
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xe168b9e3ae964484cf75806679e455f7226dbccec993d993c8ab277d3064050810216512023-06-07 14:49:2039 mins ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0x77a28389cd9ce46944ba2955ac53d41e8a2bd996ab5e69caf0e53b8f5c65716b10216472023-06-07 14:45:3242 mins ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0x4726ee01089a9eea6bbc887f804402cbe2504c322f81cf3602f540e2f33fa96510215962023-06-07 13:09:052 hrs 19 mins ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0x43c42c43b3e4e5d7a6bf7fd09e1790c4576f4cc7314c555ae3c147bd0e2ab59e10215572023-06-07 9:34:385 hrs 53 mins ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0xa608cf943f83967fbdb4eef089e65cf34089903300e8417785e8959c2f62c04c10215562023-06-07 9:31:575 hrs 56 mins ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0xe300d9ad3ae90617c7579590026408f8e12bd4ac3820dc925a7e76c267249a2c10215382023-06-07 8:32:046 hrs 56 mins ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0xba4d1280f235394963a9cedc61b2050a14a90a95c26ac49f364f834c0c98963d10215252023-06-07 7:34:327 hrs 53 mins ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0x66de541a247c82cf54fbb6e9c43d3d4cfd5a9f0caf6b87d91546c0425ccd3ab610214592023-06-07 3:12:0212 hrs 16 mins ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0x35d188f0825e42798386618974f49e7830cc5ce3a5777c65ab5718794a14375410213922023-06-06 23:12:3316 hrs 15 mins ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0xcfe3cab3d3726536107b8ef08e08106146765db53e308d8c567b55a1a6daa3be10210232023-06-05 17:41:451 day 21 hrs ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0xdce10f4ab2048db7da43696a0845f68ded1575309f4bc494cb010045f9ca98e310210192023-06-05 17:38:321 day 21 hrs ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0x06aaa9e831a87bde176e62e4251454955e055e9fcb63a2a197418608b5dace6b10209542023-06-05 15:13:132 days 15 mins ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0x95792fe7581247083c8241ab03be9000e66cd4be1f89b435433e7529aaf3333310209502023-06-05 15:08:322 days 19 mins ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0xe97947dcf9fc5668afa8b9f25eac52b8d92dc999b45353c567e43f1ec77c142d10209372023-06-05 13:52:142 days 1 hr ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0xab72f2ef4fb2db2cee3e951e4c259f2dee97e283a90e184a19e3b18c92995ed610209352023-06-05 13:45:322 days 1 hr ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0xa92eb7c153277c3cd31869eae32f28bf2c21d8c474ca0c297d09671baf5f9df210209032023-06-05 11:58:042 days 3 hrs ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0x605029457c66738af0f815574fe13451439eb2559348f97c533929844f51da5a10208992023-06-05 11:48:282 days 3 hrs ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0x375aee13022dcc4a3ecb2371805bc8b1e9ee6d522583058043fda8f6d9f37e2f10208852023-06-05 11:33:082 days 3 hrs ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0x0b9b47c60896aa45d9ecc3532fa9cd9f0708cf9746578e4fb08253fd36b5700010208822023-06-05 11:27:322 days 4 hrs ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0x32a6e3bd00dce06943c7ecb32ccc97d0cab9f4f06f8f6b4a40ef8ca18071dddc10208722023-06-05 9:58:552 days 5 hrs ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0x861a07788a430778fd3249a6758e0bc66dde4f9115de8783675a659bd3eb644110208712023-06-05 9:58:392 days 5 hrs ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0x6410560143b1efb2166240827e5d57d3688eb0c2e11cb62c50c309dac7d74caf10208692023-06-05 9:58:032 days 5 hrs ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0xa66b0e014bddd65f79d24035f45c4a2353f3b83b600bfef784eab64cef5b04e610208672023-06-05 9:42:022 days 5 hrs ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0xeaba7f920178f9f7181613fd53453dd593e327d142856b7e8a77ee1a94a3c84f10208572023-06-05 8:45:322 days 6 hrs ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
0xd0a0f3f92e86cac0381fc1f85158569f436ec03937b2aa455ea7ff8f3268bf8110208562023-06-05 8:44:092 days 6 hrs ago 0x5523985926aa12ba58dc5ad00ddca99678d7227e 0x7057ab3fb2bee9c18e0cde4240de4ff7f159e3650 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BridgeV2

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 2000 runs

Other Settings:
default evmVersion
File 1 of 13 : BridgeV2.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.4;

import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "@uniswap/lib/contracts/libraries/TransferHelper.sol";
import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol";

import "../../utils/AdminableUpgradeable.sol";
import "../../utils/RevertMessageParser.sol";


contract BridgeV2 is Initializable, AdminableUpgradeable {
    /// ** PUBLIC states **

    address public newMPC;
    address public oldMPC;
    uint256 public newMPCEffectiveTime;

    mapping(address => bool) public isTransmitter;

    /// ** EVENTS **

    event LogChangeMPC(
        address indexed oldMPC,
        address indexed newMPC,
        uint256 indexed effectiveTime,
        uint256 chainId
    );
    event SetTransmitterStatus(address indexed transmitter, bool status);

    event OracleRequest(
        address bridge,
        bytes callData,
        address receiveSide,
        address oppositeBridge,
        uint256 chainId
    );

    /// ** MODIFIERs **

    modifier onlyMPC() {
        require(msg.sender == mpc(), "BridgeV2: forbidden");
        _;
    }

    modifier onlyTransmitter() {
        require(isTransmitter[msg.sender], "BridgeV2: not a transmitter");
        _;
    }

    modifier onlyOwnerOrMPC() {
        require(
            mpc() == msg.sender || owner() == msg.sender,
            "BridgeV2: only owner or MPC can call"
        );
        _;
    }

    modifier onlySignedByMPC(bytes32 hash, bytes memory signature) {
        require(SignatureChecker.isValidSignatureNow(mpc(), hash, signature), "BridgeV2: invalid signature");
        _;
    }

    /// ** INITIALIZER **

    function initialize(address _mpc) public virtual initializer {
        __Ownable_init();

        newMPC = _mpc;
        newMPCEffectiveTime = block.timestamp;
    }

    /// ** VIEW functions **

    /**
     * @notice Returns MPC
     */
    function mpc() public view returns (address) {
        if (block.timestamp >= newMPCEffectiveTime) {
            return newMPC;
        }

        return oldMPC;
    }

    /**
     * @notice Returns chain ID of block
     */
    function currentChainId() public view returns (uint256) {
        return block.chainid;
    }

    /// ** MPC functions **

    /**
     * @notice Receives requests
     */
    function receiveRequestV2(bytes memory _callData, address _receiveSide)
    external
    onlyMPC
    {
        _processRequest(_callData, _receiveSide);
    }

    /**
     * @notice Receives requests
     */
    function receiveRequestV2Signed(bytes memory _callData, address _receiveSide, bytes memory signature)
    external
    onlySignedByMPC(keccak256(bytes.concat("receiveRequestV2", _callData, bytes20(_receiveSide),
        bytes32(block.chainid), bytes20(address(this)))), signature)
    {
        _processRequest(_callData, _receiveSide);
    }

    /// ** TRANSMITTER functions **

    /**
     * @notice transmits request
     */
    function transmitRequestV2(
        bytes memory _callData,
        address _receiveSide,
        address _oppositeBridge,
        uint256 _chainId
    ) public onlyTransmitter {
        emit OracleRequest(
            address(this),
            _callData,
            _receiveSide,
            _oppositeBridge,
            _chainId
        );
    }

    /// ** OWNER functions **

    /**
     * @notice Sets transmitter status
     */
    function setTransmitterStatus(address _transmitter, bool _status)
    external
    onlyOwner
    {
        isTransmitter[_transmitter] = _status;
        emit SetTransmitterStatus(_transmitter, _status);
    }

    /**
     * @notice Changes MPC by owner or MPC
     */
    function changeMPC(address _newMPC) external onlyOwnerOrMPC returns (bool) {
        return _changeMPC(_newMPC);
    }

    /**
     * @notice Changes MPC with signature
     */
    function changeMPCSigned(address _newMPC, bytes memory signature)
    external
    onlySignedByMPC(keccak256(bytes.concat("changeMPC", bytes20(_newMPC), bytes32(block.chainid),
        bytes20(address(this)))), signature)
    returns (bool)
    {
        return _changeMPC(_newMPC);
    }

    /**
     * @notice Withdraw fee by owner or admin
     */
    function withdrawFee(address token, address to, uint256 amount) external onlyOwnerOrAdmin returns (bool) {
        TransferHelper.safeTransfer(token, to, amount);
        return true;
    }

    /// ** Private functions **

    /**
     * @notice Private function that handles request processing
     */
    function _processRequest(bytes memory _callData, address _receiveSide)
    private
    {
        require(isTransmitter[_receiveSide], "BridgeV2: untrusted transmitter");

        (bool success, bytes memory data) = _receiveSide.call(_callData);

        if (!success) {
            revert(RevertMessageParser.getRevertMessage(data, "BridgeV2: call failed"));
        }
    }

    /**
     * @notice Private function that changes MPC
     */
    function _changeMPC(address _newMPC) private returns (bool) {
        require(_newMPC != address(0), "BridgeV2: address(0x0)");
        oldMPC = mpc();
        newMPC = _newMPC;
        newMPCEffectiveTime = block.timestamp;
        emit LogChangeMPC(
            oldMPC,
            newMPC,
            newMPCEffectiveTime,
            currentChainId()
        );
        return true;
    }
}

File 2 of 13 : Initializable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

import "../../utils/AddressUpgradeable.sol";

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        // If the contract is initializing we ignore whether _initialized is set in order to support multiple
        // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the
        // contract may have been reentered.
        require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }

    /**
     * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
     * {initializer} modifier, directly or indirectly.
     */
    modifier onlyInitializing() {
        require(_initializing, "Initializable: contract is not initializing");
        _;
    }

    function _isConstructor() private view returns (bool) {
        return !AddressUpgradeable.isContract(address(this));
    }
}

File 3 of 13 : TransferHelper.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity >=0.6.0;

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeApprove: approve failed'
        );
    }

    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeTransfer: transfer failed'
        );
    }

    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::transferFrom: transferFrom failed'
        );
    }

    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'TransferHelper::safeTransferETH: ETH transfer failed');
    }
}

File 4 of 13 : SignatureChecker.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/SignatureChecker.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";
import "../Address.sol";
import "../../interfaces/IERC1271.sol";

/**
 * @dev Signature verification helper: Provide a single mechanism to verify both private-key (EOA) ECDSA signature and
 * ERC1271 contract signatures. Using this instead of ECDSA.recover in your contract will make them compatible with
 * smart contract wallets such as Argent and Gnosis.
 *
 * Note: unlike ECDSA signatures, contract signature's are revocable, and the outcome of this function can thus change
 * through time. It could return true at block N and false at block N+1 (or the opposite).
 *
 * _Available since v4.1._
 */
library SignatureChecker {
    function isValidSignatureNow(
        address signer,
        bytes32 hash,
        bytes memory signature
    ) internal view returns (bool) {
        (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature);
        if (error == ECDSA.RecoverError.NoError && recovered == signer) {
            return true;
        }

        (bool success, bytes memory result) = signer.staticcall(
            abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature)
        );
        return (success && result.length == 32 && abi.decode(result, (bytes4)) == IERC1271.isValidSignature.selector);
    }
}

File 5 of 13 : AdminableUpgradeable.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

import '@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol';

abstract contract AdminableUpgradeable is OwnableUpgradeable {

    mapping(address => bool) public isAdmin;

    event SetAdminPermission(address indexed admin, bool permission);

    modifier onlyAdmin {
        require(isAdmin[msg.sender], "Only admin can call");
        _;
    }

    modifier onlyOwnerOrAdmin {
        require((owner() == msg.sender) || isAdmin[msg.sender], "Only owner or admin can call");
        _;
    }

    function __Adminable_init() internal onlyInitializing {
        __Ownable_init();
    }

    function setAdminPermission(address _user, bool _permission) external onlyOwner {
        isAdmin[_user] = _permission;

        emit SetAdminPermission(_user, _permission);
    }
}

File 6 of 13 : RevertMessageParser.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

library RevertMessageParser {
    function getRevertMessage(bytes memory _data, string memory _defaultMessage) internal pure returns (string memory) {
        // If the _data length is less than 68, then the transaction failed silently (without a revert message)
        if (_data.length < 68) return _defaultMessage;

        assembly {
            // Slice the sighash
            _data := add(_data, 0x04)
        }
        return abi.decode(_data, (string));
    }
}

File 7 of 13 : AddressUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 8 of 13 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 9 of 13 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 10 of 13 : IERC1271.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC1271 standard signature validation method for
 * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271].
 *
 * _Available since v4.1._
 */
interface IERC1271 {
    /**
     * @dev Should return whether the signature provided is valid for the provided data
     * @param hash      Hash of the data to be signed
     * @param signature Signature byte array associated with _data
     */
    function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue);
}

File 11 of 13 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 12 of 13 : OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    function __Ownable_init() internal onlyInitializing {
        __Context_init_unchained();
        __Ownable_init_unchained();
    }

    function __Ownable_init_unchained() internal onlyInitializing {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
    uint256[49] private __gap;
}

File 13 of 13 : ContextUpgradeable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract ContextUpgradeable is Initializable {
    function __Context_init() internal onlyInitializing {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal onlyInitializing {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
    uint256[50] private __gap;
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldMPC","type":"address"},{"indexed":true,"internalType":"address","name":"newMPC","type":"address"},{"indexed":true,"internalType":"uint256","name":"effectiveTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"LogChangeMPC","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"bridge","type":"address"},{"indexed":false,"internalType":"bytes","name":"callData","type":"bytes"},{"indexed":false,"internalType":"address","name":"receiveSide","type":"address"},{"indexed":false,"internalType":"address","name":"oppositeBridge","type":"address"},{"indexed":false,"internalType":"uint256","name":"chainId","type":"uint256"}],"name":"OracleRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"admin","type":"address"},{"indexed":false,"internalType":"bool","name":"permission","type":"bool"}],"name":"SetAdminPermission","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"transmitter","type":"address"},{"indexed":false,"internalType":"bool","name":"status","type":"bool"}],"name":"SetTransmitterStatus","type":"event"},{"inputs":[{"internalType":"address","name":"_newMPC","type":"address"}],"name":"changeMPC","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newMPC","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"changeMPCSigned","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_mpc","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isTransmitter","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mpc","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newMPC","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newMPCEffectiveTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oldMPC","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"_callData","type":"bytes"},{"internalType":"address","name":"_receiveSide","type":"address"}],"name":"receiveRequestV2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_callData","type":"bytes"},{"internalType":"address","name":"_receiveSide","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"receiveRequestV2Signed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"bool","name":"_permission","type":"bool"}],"name":"setAdminPermission","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_transmitter","type":"address"},{"internalType":"bool","name":"_status","type":"bool"}],"name":"setTransmitterStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_callData","type":"bytes"},{"internalType":"address","name":"_receiveSide","type":"address"},{"internalType":"address","name":"_oppositeBridge","type":"address"},{"internalType":"uint256","name":"_chainId","type":"uint256"}],"name":"transmitRequestV2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawFee","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50611969806100206000396000f3fe608060405234801561001057600080fd5b50600436106101515760003560e01c80636fac3007116100cd578063c00f8a3d11610081578063f2fde38b11610066578063f2fde38b146102bf578063f75c2664146102d2578063f7f1baf0146102da57600080fd5b8063c00f8a3d14610299578063c4d66de8146102ac57600080fd5b806375f3974b116100b257806375f3974b1461026257806384d61c97146102755780638da5cb5b1461028857600080fd5b80636fac300714610237578063715018a61461025a57600080fd5b8063405fb4f7116101245780635b7b018c116101095780635b7b018c1461020b5780636cbadbfa1461021e5780636cebc9c21461022457600080fd5b8063405fb4f7146101c9578063474a245a146101e057600080fd5b80631095b6d71461015657806319117d931461017e57806324d7806c1461019357806338899935146101b6575b600080fd5b610169610164366004611465565b6102ed565b60405190151581526020015b60405180910390f35b61019161018c3660046114a1565b61038d565b005b6101696101a136600461144a565b60656020526000908152604090205460ff1681565b6101696101c43660046114d8565b610447565b6101d260685481565b604051908152602001610175565b6066546101f3906001600160a01b031681565b6040516001600160a01b039091168152602001610175565b61016961021936600461144a565b610526565b466101d2565b6101916102323660046115d3565b6105e1565b61016961024536600461144a565b60696020526000908152604090205460ff1681565b610191610685565b6101916102703660046114a1565b6106eb565b610191610283366004611639565b61079d565b6033546001600160a01b03166101f3565b6067546101f3906001600160a01b031681565b6101916102ba36600461144a565b610839565b6101916102cd36600461144a565b610970565b6101f3610a52565b6101916102e8366004611585565b610a7d565b6000336103026033546001600160a01b031690565b6001600160a01b0316148061032657503360009081526065602052604090205460ff165b6103775760405162461bcd60e51b815260206004820152601c60248201527f4f6e6c79206f776e6572206f722061646d696e2063616e2063616c6c0000000060448201526064015b60405180910390fd5b610382848484610aef565b5060015b9392505050565b6033546001600160a01b031633146103e75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161036e565b6001600160a01b038216600081815260696020908152604091829020805460ff191685151590811790915591519182527feeec8b4e2d317fc608f301f859237a6081b9813f150a3fcfb02fd54276c8be4091015b60405180910390a25050565b6040517f6368616e67654d5043000000000000000000000000000000000000000000000060208201526bffffffffffffffffffffffff19606084811b8216602984015246603d84015230901b16605d82015260009060710160405160208183030381529060405280519060200120826104c86104c1610a52565b8383610c57565b6105145760405162461bcd60e51b815260206004820152601b60248201527f42726964676556323a20696e76616c6964207369676e61747572650000000000604482015260640161036e565b61051d85610e01565b95945050505050565b600033610531610a52565b6001600160a01b0316148061055f5750336105546033546001600160a01b031690565b6001600160a01b0316145b6105d05760405162461bcd60e51b8152602060048201526024808201527f42726964676556323a206f6e6c79206f776e6572206f72204d50432063616e2060448201527f63616c6c00000000000000000000000000000000000000000000000000000000606482015260840161036e565b6105d982610e01565b90505b919050565b3360009081526069602052604090205460ff166106405760405162461bcd60e51b815260206004820152601b60248201527f42726964676556323a206e6f742061207472616e736d69747465720000000000604482015260640161036e565b7f532dbb6d061eee97ab4370060f60ede10b3dc361cc1214c07ae5e34dd86e6aaf30858585856040516106779594939291906117cf565b60405180910390a150505050565b6033546001600160a01b031633146106df5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161036e565b6106e96000610ee6565b565b6033546001600160a01b031633146107455760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161036e565b6001600160a01b038216600081815260656020908152604091829020805460ff191685151590811790915591519182527f0e7bea53cb2b3130dd1aac8d56b61cc8da7ebab0432e2d1622513523d848f2e7910161043b565b6040516107ba908490606085811b91469130901b90602001611763565b60405160208183030381529060405280519060200120816107dc6104c1610a52565b6108285760405162461bcd60e51b815260206004820152601b60248201527f42726964676556323a20696e76616c6964207369676e61747572650000000000604482015260640161036e565b6108328585610f45565b5050505050565b600054610100900460ff166108545760005460ff1615610858565b303b155b6108ca5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840161036e565b600054610100900460ff1615801561090957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000166101011790555b610911611072565b6066805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03841617905542606855801561096c57600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1690555b5050565b6033546001600160a01b031633146109ca5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161036e565b6001600160a01b038116610a465760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161036e565b610a4f81610ee6565b50565b60006068544210610a6d57506066546001600160a01b031690565b506067546001600160a01b031690565b610a85610a52565b6001600160a01b0316336001600160a01b031614610ae55760405162461bcd60e51b815260206004820152601360248201527f42726964676556323a20666f7262696464656e00000000000000000000000000604482015260640161036e565b61096c8282610f45565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790529151600092839290871691610b799190611747565b6000604051808303816000865af19150503d8060008114610bb6576040519150601f19603f3d011682016040523d82523d6000602084013e610bbb565b606091505b5091509150818015610be5575080511580610be5575080806020019051810190610be59190611526565b6108325760405162461bcd60e51b815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201527f616e73666572206661696c656400000000000000000000000000000000000000606482015260840161036e565b6000806000610c6685856110ff565b90925090506000816004811115610c7f57610c7f6118c7565b148015610c9d5750856001600160a01b0316826001600160a01b0316145b15610cad57600192505050610386565b600080876001600160a01b0316631626ba7e60e01b8888604051602401610cd592919061180e565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff00000000000000000000000000000000000000000000000000000000909416939093179092529051610d409190611747565b600060405180830381855afa9150503d8060008114610d7b576040519150601f19603f3d011682016040523d82523d6000602084013e610d80565b606091505b5091509150818015610d93575080516020145b8015610df5575080517f1626ba7e0000000000000000000000000000000000000000000000000000000090610dd19083016020908101908401611543565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b98975050505050505050565b60006001600160a01b038216610e595760405162461bcd60e51b815260206004820152601660248201527f42726964676556323a2061646472657373283078302900000000000000000000604482015260640161036e565b610e61610a52565b606780546001600160a01b0392831673ffffffffffffffffffffffffffffffffffffffff19918216811790925560668054938616939091168317905542606881905591907fcda32bc39904597666dfa9f9c845714756e1ffffad55b52e0d344673a2198121610ecd4690565b60405190815260200160405180910390a4506001919050565b603380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b03811660009081526069602052604090205460ff16610fad5760405162461bcd60e51b815260206004820152601f60248201527f42726964676556323a20756e74727573746564207472616e736d697474657200604482015260640161036e565b600080826001600160a01b031684604051610fc89190611747565b6000604051808303816000865af19150503d8060008114611005576040519150601f19603f3d011682016040523d82523d6000602084013e61100a565b606091505b50915091508161106c57611053816040518060400160405280601581526020017f42726964676556323a2063616c6c206661696c6564000000000000000000000081525061116f565b60405162461bcd60e51b815260040161036e919061182f565b50505050565b600054610100900460ff166110ef5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161036e565b6110f76111a5565b6106e9611222565b6000808251604114156111365760208301516040840151606085015160001a61112a878285856112a8565b94509450505050611168565b8251604014156111605760208301516040840151611155868383611395565b935093505050611168565b506000905060025b9250929050565b606060448351101561118257508061119f565b6004830192508280602001905181019061119c91906116ad565b90505b92915050565b600054610100900460ff166106e95760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161036e565b600054610100900460ff1661129f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e67000000000000000000000000000000000000000000606482015260840161036e565b6106e933610ee6565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156112df575060009050600361138c565b8460ff16601b141580156112f757508460ff16601c14155b15611308575060009050600461138c565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561135c573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166113855760006001925092505061138c565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b016113cf878288856112a8565b935093505050935093915050565b80356001600160a01b03811681146105dc57600080fd5b600082601f83011261140557600080fd5b813561141861141382611873565b611842565b81815284602083860101111561142d57600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561145c57600080fd5b61119c826113dd565b60008060006060848603121561147a57600080fd5b611483846113dd565b9250611491602085016113dd565b9150604084013590509250925092565b600080604083850312156114b457600080fd5b6114bd836113dd565b915060208301356114cd81611925565b809150509250929050565b600080604083850312156114eb57600080fd5b6114f4836113dd565b9150602083013567ffffffffffffffff81111561151057600080fd5b61151c858286016113f4565b9150509250929050565b60006020828403121561153857600080fd5b815161038681611925565b60006020828403121561155557600080fd5b81517fffffffff000000000000000000000000000000000000000000000000000000008116811461038657600080fd5b6000806040838503121561159857600080fd5b823567ffffffffffffffff8111156115af57600080fd5b6115bb858286016113f4565b9250506115ca602084016113dd565b90509250929050565b600080600080608085870312156115e957600080fd5b843567ffffffffffffffff81111561160057600080fd5b61160c878288016113f4565b94505061161b602086016113dd565b9250611629604086016113dd565b9396929550929360600135925050565b60008060006060848603121561164e57600080fd5b833567ffffffffffffffff8082111561166657600080fd5b611672878388016113f4565b9450611680602087016113dd565b9350604086013591508082111561169657600080fd5b506116a3868287016113f4565b9150509250925092565b6000602082840312156116bf57600080fd5b815167ffffffffffffffff8111156116d657600080fd5b8201601f810184136116e757600080fd5b80516116f561141382611873565b81815285602083850101111561170a57600080fd5b61051d82602083016020860161189b565b6000815180845261173381602086016020860161189b565b601f01601f19169290920160200192915050565b6000825161175981846020870161189b565b9190910192915050565b7f726563656976655265717565737456320000000000000000000000000000000081526000855161179b816010850160208a0161189b565b6bffffffffffffffffffffffff19958616601093909101928301525060248101929092529091166044820152605801919050565b60006001600160a01b03808816835260a060208401526117f260a084018861171b565b9581166040840152939093166060820152608001525092915050565b828152604060208201526000611827604083018461171b565b949350505050565b60208152600061119c602083018461171b565b604051601f8201601f1916810167ffffffffffffffff8111828210171561186b5761186b6118f6565b604052919050565b600067ffffffffffffffff82111561188d5761188d6118f6565b50601f01601f191660200190565b60005b838110156118b657818101518382015260200161189e565b8381111561106c5750506000910152565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b8015158114610a4f57600080fdfea2646970667358221220e98886659424a1d3863b2dcf74b14cc988d9236de336592d014fad06f4d9306864736f6c63430008070033

Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.