ETH Price: $3,656.92 (+2.16%)
Gas: 5.66 Gwei

Contract

0x863CD8459C9D999A84e9326525b8E72Cd2f5e780
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To

There are no matching entries

Please try again later

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TonBridge

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 12 : TonBridge.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 "../synth-core/interfaces/IBridge.sol";


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

contract TonBridge is OwnableUpgradeable {
    struct TonAddress {
        int8 workchain;
        bytes32 address_hash;
    }

    /// ** PUBLIC states **

    address public tonBridge;
    address public symbiosisBridge;
    uint256 public bridgeChainId;
    address public broadcaster;

    /// ** EVENTS **

    event ChangeBridgeChainId(uint256 newBridgeChainId);

    event ChangeTonBridge(address newBridge);

    event ChangeSymbiosisBridge(address newBridge);

    event ChangeBroadcaster(address newBroadcaster);

    /// ** INITIALIZER **

    function initialize(address _tonBridge, address _symbiosisBridge, uint256 _bridgeChainId, address _broadcaster) public virtual initializer {
        __Ownable_init();

        tonBridge = _tonBridge;
        symbiosisBridge = _symbiosisBridge;
        bridgeChainId = _bridgeChainId;
        broadcaster = _broadcaster;
    }

    /// ** TRANSMITTER functions **

    /**
     * @notice transmits request
     */
    function callBridgeRequest(
        uint256 _amount,
        TonAddress memory _tonAddress
    ) public {
        TransferHelper.safeTransferFrom(tonBridge, _msgSender(), broadcaster, _amount);
        bytes memory calldata_ = abi.encodeWithSignature("burn(uint256,(int8,bytes32))",
            _amount, _tonAddress);
        IBridge(symbiosisBridge).transmitRequestV2(
            calldata_,
            tonBridge,
            tonBridge,
            bridgeChainId
        );
    }

    /// ** OWNER functions **

    /**
     * @notice Changes Bridge Chain Id by owner
     */
    function changeBridgeChainId(uint256 _newBridgeChainId) external onlyOwner {
        bridgeChainId = _newBridgeChainId;
        emit ChangeBridgeChainId(_newBridgeChainId);
    }

    /**
     * @notice Changes TON Bridge by owner
     */
    function changeTonBridge(address _newTonBridge) external onlyOwner {
        tonBridge = _newTonBridge;
        emit ChangeTonBridge(_newTonBridge);
    }

    /**
     * @notice Changes Symbiosis Bridge by owner
     */
    function changeSymbiosisBridge(address _newSymbiosisBridge) external onlyOwner {
        symbiosisBridge = _newSymbiosisBridge;
        emit ChangeSymbiosisBridge(_newSymbiosisBridge);
    }

    /**
     * @notice Changes Broadcaster by owner
     */
    function changeBroadcaster(address _newBroadcaster) external onlyOwner {
        broadcaster = _newBroadcaster;
        emit ChangeBroadcaster(_newBroadcaster);
    }
}

File 2 of 12 : 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 3 of 12 : 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 4 of 12 : 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 5 of 12 : 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;
}

File 6 of 12 : 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 7 of 12 : 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 8 of 12 : 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 12 : 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 10 of 12 : 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 11 of 12 : 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 12 of 12 : IBridge.sol
// SPDX-License-Identifier: GPL-3.0

pragma solidity ^0.8.0;

interface IBridge {
  function transmitRequestV2(
    bytes memory _callData,
    address _receiveSide,
    address _oppositeBridge,
    uint256 _chainId
  ) external;
  
  function receiveRequestV2(
    bytes memory _callData,
    address _receiveSide
  ) external;
}

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

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newBridgeChainId","type":"uint256"}],"name":"ChangeBridgeChainId","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newBroadcaster","type":"address"}],"name":"ChangeBroadcaster","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newBridge","type":"address"}],"name":"ChangeSymbiosisBridge","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newBridge","type":"address"}],"name":"ChangeTonBridge","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"},{"inputs":[],"name":"bridgeChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"broadcaster","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"components":[{"internalType":"int8","name":"workchain","type":"int8"},{"internalType":"bytes32","name":"address_hash","type":"bytes32"}],"internalType":"struct TonBridge.TonAddress","name":"_tonAddress","type":"tuple"}],"name":"callBridgeRequest","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newBridgeChainId","type":"uint256"}],"name":"changeBridgeChainId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newBroadcaster","type":"address"}],"name":"changeBroadcaster","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newSymbiosisBridge","type":"address"}],"name":"changeSymbiosisBridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newTonBridge","type":"address"}],"name":"changeTonBridge","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tonBridge","type":"address"},{"internalType":"address","name":"_symbiosisBridge","type":"address"},{"internalType":"uint256","name":"_bridgeChainId","type":"uint256"},{"internalType":"address","name":"_broadcaster","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbiosisBridge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tonBridge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50611739806100206000396000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b2bac9421161008c578063cf9cdb2511610066578063cf9cdb25146101c4578063d3c24188146101e2578063d7709ed714610200578063f2fde38b1461021c576100cf565b8063b2bac9421461016e578063be2030941461018c578063c7029d1f146101a8576100cf565b8063471a205f146100d45780635952d31f146100f0578063715018a61461010c578063782e8439146101165780638da5cb5b1461013257806391a0fcff14610150575b600080fd5b6100ee60048036038101906100e99190611052565b610238565b005b61010a600480360381019061010591906110f0565b610401565b005b6101146104f8565b005b610130600480360381019061012b91906110f0565b610580565b005b61013a610677565b604051610147919061112c565b60405180910390f35b6101586106a1565b604051610165919061112c565b60405180910390f35b6101766106c7565b604051610183919061112c565b60405180910390f35b6101a660048036038101906101a19190611147565b6106ed565b005b6101c260048036038101906101bd91906111ae565b6108a7565b005b6101cc610964565b6040516101d991906111ea565b60405180910390f35b6101ea61096a565b6040516101f7919061112c565b60405180910390f35b61021a600480360381019061021591906110f0565b610990565b005b610236600480360381019061023191906110f0565b610a87565b005b61028f606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610266610b7f565b606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685610b87565b600082826040516024016102a4929190611252565b6040516020818303038152906040527fe057fbff000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636cebc9c282606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166067546040518563ffffffff1660e01b81526004016103ca9493929190611303565b600060405180830381600087803b1580156103e457600080fd5b505af11580156103f8573d6000803e3d6000fd5b50505050505050565b610409610b7f565b73ffffffffffffffffffffffffffffffffffffffff16610427610677565b73ffffffffffffffffffffffffffffffffffffffff161461047d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610474906113ac565b60405180910390fd5b80606860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fb6b47e84b2d1011e8e0583b92629875cb9d387c400befbe858a6c9f292c6bf1e816040516104ed919061112c565b60405180910390a150565b610500610b7f565b73ffffffffffffffffffffffffffffffffffffffff1661051e610677565b73ffffffffffffffffffffffffffffffffffffffff1614610574576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056b906113ac565b60405180910390fd5b61057e6000610cc0565b565b610588610b7f565b73ffffffffffffffffffffffffffffffffffffffff166105a6610677565b73ffffffffffffffffffffffffffffffffffffffff16146105fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f3906113ac565b60405180910390fd5b80606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f0c0b489e502863cbf6f291d85761d1c219ac8638a454f88eb01655bcb423e85a8160405161066c919061112c565b60405180910390a150565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900460ff166107155760008054906101000a900460ff161561071e565b61071d610d86565b5b61075d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107549061143e565b60405180910390fd5b60008060019054906101000a900460ff1615905080156107ad576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6107b5610d97565b84606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508260678190555081606860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080156108a05760008060016101000a81548160ff0219169083151502179055505b5050505050565b6108af610b7f565b73ffffffffffffffffffffffffffffffffffffffff166108cd610677565b73ffffffffffffffffffffffffffffffffffffffff1614610923576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091a906113ac565b60405180910390fd5b806067819055507fcc86facaebb3591bde092873cabd363ec151fab90b0a4d4dca973d6f24f918598160405161095991906111ea565b60405180910390a150565b60675481565b606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610998610b7f565b73ffffffffffffffffffffffffffffffffffffffff166109b6610677565b73ffffffffffffffffffffffffffffffffffffffff1614610a0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a03906113ac565b60405180910390fd5b80606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f8d4dcc4c1519b8392e0469b6fc003175c89aee34e9fea584bab63d507193c74381604051610a7c919061112c565b60405180910390a150565b610a8f610b7f565b73ffffffffffffffffffffffffffffffffffffffff16610aad610677565b73ffffffffffffffffffffffffffffffffffffffff1614610b03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610afa906113ac565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6a906114d0565b60405180910390fd5b610b7c81610cc0565b50565b600033905090565b6000808573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401610bbb939291906114f0565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610c099190611563565b6000604051808303816000865af19150503d8060008114610c46576040519150601f19603f3d011682016040523d82523d6000602084013e610c4b565b606091505b5091509150818015610c795750600081511480610c78575080806020019051810190610c7791906115b2565b5b5b610cb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610caf90611651565b60405180910390fd5b505050505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000610d9130610df8565b15905090565b600060019054906101000a900460ff16610de6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ddd906116e3565b60405180910390fd5b610dee610e0b565b610df6610e5c565b565b600080823b905060008111915050919050565b600060019054906101000a900460ff16610e5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e51906116e3565b60405180910390fd5b565b600060019054906101000a900460ff16610eab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea2906116e3565b60405180910390fd5b610ebb610eb6610b7f565b610cc0565b565b6000604051905090565b600080fd5b6000819050919050565b610edf81610ecc565b8114610eea57600080fd5b50565b600081359050610efc81610ed6565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610f5082610f07565b810181811067ffffffffffffffff82111715610f6f57610f6e610f18565b5b80604052505050565b6000610f82610ebd565b9050610f8e8282610f47565b919050565b60008160000b9050919050565b610fa981610f93565b8114610fb457600080fd5b50565b600081359050610fc681610fa0565b92915050565b6000819050919050565b610fdf81610fcc565b8114610fea57600080fd5b50565b600081359050610ffc81610fd6565b92915050565b60006040828403121561101857611017610f02565b5b6110226040610f78565b9050600061103284828501610fb7565b600083015250602061104684828501610fed565b60208301525092915050565b6000806060838503121561106957611068610ec7565b5b600061107785828601610eed565b925050602061108885828601611002565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006110bd82611092565b9050919050565b6110cd816110b2565b81146110d857600080fd5b50565b6000813590506110ea816110c4565b92915050565b60006020828403121561110657611105610ec7565b5b6000611114848285016110db565b91505092915050565b611126816110b2565b82525050565b6000602082019050611141600083018461111d565b92915050565b6000806000806080858703121561116157611160610ec7565b5b600061116f878288016110db565b9450506020611180878288016110db565b935050604061119187828801610eed565b92505060606111a2878288016110db565b91505092959194509250565b6000602082840312156111c4576111c3610ec7565b5b60006111d284828501610eed565b91505092915050565b6111e481610ecc565b82525050565b60006020820190506111ff60008301846111db565b92915050565b61120e81610f93565b82525050565b61121d81610fcc565b82525050565b6040820160008201516112396000850182611205565b50602082015161124c6020850182611214565b50505050565b600060608201905061126760008301856111db565b6112746020830184611223565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b838110156112b557808201518184015260208101905061129a565b838111156112c4576000848401525b50505050565b60006112d58261127b565b6112df8185611286565b93506112ef818560208601611297565b6112f881610f07565b840191505092915050565b6000608082019050818103600083015261131d81876112ca565b905061132c602083018661111d565b611339604083018561111d565b61134660608301846111db565b95945050505050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061139660208361134f565b91506113a182611360565b602082019050919050565b600060208201905081810360008301526113c581611389565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000611428602e8361134f565b9150611433826113cc565b604082019050919050565b600060208201905081810360008301526114578161141b565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006114ba60268361134f565b91506114c58261145e565b604082019050919050565b600060208201905081810360008301526114e9816114ad565b9050919050565b6000606082019050611505600083018661111d565b611512602083018561111d565b61151f60408301846111db565b949350505050565b600081905092915050565b600061153d8261127b565b6115478185611527565b9350611557818560208601611297565b80840191505092915050565b600061156f8284611532565b915081905092915050565b60008115159050919050565b61158f8161157a565b811461159a57600080fd5b50565b6000815190506115ac81611586565b92915050565b6000602082840312156115c8576115c7610ec7565b5b60006115d68482850161159d565b91505092915050565b7f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a20747260008201527f616e7366657246726f6d206661696c6564000000000000000000000000000000602082015250565b600061163b60318361134f565b9150611646826115df565b604082019050919050565b6000602082019050818103600083015261166a8161162e565b9050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b60006116cd602b8361134f565b91506116d882611671565b604082019050919050565b600060208201905081810360008301526116fc816116c0565b905091905056fea26469706673582212201de0b0b7dacb13ecc609a95b0cf877510739f5df2288e4d559cfaf89b8c032f764736f6c634300080c0033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063b2bac9421161008c578063cf9cdb2511610066578063cf9cdb25146101c4578063d3c24188146101e2578063d7709ed714610200578063f2fde38b1461021c576100cf565b8063b2bac9421461016e578063be2030941461018c578063c7029d1f146101a8576100cf565b8063471a205f146100d45780635952d31f146100f0578063715018a61461010c578063782e8439146101165780638da5cb5b1461013257806391a0fcff14610150575b600080fd5b6100ee60048036038101906100e99190611052565b610238565b005b61010a600480360381019061010591906110f0565b610401565b005b6101146104f8565b005b610130600480360381019061012b91906110f0565b610580565b005b61013a610677565b604051610147919061112c565b60405180910390f35b6101586106a1565b604051610165919061112c565b60405180910390f35b6101766106c7565b604051610183919061112c565b60405180910390f35b6101a660048036038101906101a19190611147565b6106ed565b005b6101c260048036038101906101bd91906111ae565b6108a7565b005b6101cc610964565b6040516101d991906111ea565b60405180910390f35b6101ea61096a565b6040516101f7919061112c565b60405180910390f35b61021a600480360381019061021591906110f0565b610990565b005b610236600480360381019061023191906110f0565b610a87565b005b61028f606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610266610b7f565b606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1685610b87565b600082826040516024016102a4929190611252565b6040516020818303038152906040527fe057fbff000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050509050606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636cebc9c282606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166067546040518563ffffffff1660e01b81526004016103ca9493929190611303565b600060405180830381600087803b1580156103e457600080fd5b505af11580156103f8573d6000803e3d6000fd5b50505050505050565b610409610b7f565b73ffffffffffffffffffffffffffffffffffffffff16610427610677565b73ffffffffffffffffffffffffffffffffffffffff161461047d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610474906113ac565b60405180910390fd5b80606860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fb6b47e84b2d1011e8e0583b92629875cb9d387c400befbe858a6c9f292c6bf1e816040516104ed919061112c565b60405180910390a150565b610500610b7f565b73ffffffffffffffffffffffffffffffffffffffff1661051e610677565b73ffffffffffffffffffffffffffffffffffffffff1614610574576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056b906113ac565b60405180910390fd5b61057e6000610cc0565b565b610588610b7f565b73ffffffffffffffffffffffffffffffffffffffff166105a6610677565b73ffffffffffffffffffffffffffffffffffffffff16146105fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f3906113ac565b60405180910390fd5b80606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f0c0b489e502863cbf6f291d85761d1c219ac8638a454f88eb01655bcb423e85a8160405161066c919061112c565b60405180910390a150565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900460ff166107155760008054906101000a900460ff161561071e565b61071d610d86565b5b61075d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107549061143e565b60405180910390fd5b60008060019054906101000a900460ff1615905080156107ad576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6107b5610d97565b84606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083606660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508260678190555081606860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080156108a05760008060016101000a81548160ff0219169083151502179055505b5050505050565b6108af610b7f565b73ffffffffffffffffffffffffffffffffffffffff166108cd610677565b73ffffffffffffffffffffffffffffffffffffffff1614610923576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091a906113ac565b60405180910390fd5b806067819055507fcc86facaebb3591bde092873cabd363ec151fab90b0a4d4dca973d6f24f918598160405161095991906111ea565b60405180910390a150565b60675481565b606560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610998610b7f565b73ffffffffffffffffffffffffffffffffffffffff166109b6610677565b73ffffffffffffffffffffffffffffffffffffffff1614610a0c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a03906113ac565b60405180910390fd5b80606560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f8d4dcc4c1519b8392e0469b6fc003175c89aee34e9fea584bab63d507193c74381604051610a7c919061112c565b60405180910390a150565b610a8f610b7f565b73ffffffffffffffffffffffffffffffffffffffff16610aad610677565b73ffffffffffffffffffffffffffffffffffffffff1614610b03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610afa906113ac565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6a906114d0565b60405180910390fd5b610b7c81610cc0565b50565b600033905090565b6000808573ffffffffffffffffffffffffffffffffffffffff166323b872dd868686604051602401610bbb939291906114f0565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051610c099190611563565b6000604051808303816000865af19150503d8060008114610c46576040519150601f19603f3d011682016040523d82523d6000602084013e610c4b565b606091505b5091509150818015610c795750600081511480610c78575080806020019051810190610c7791906115b2565b5b5b610cb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610caf90611651565b60405180910390fd5b505050505050565b6000603360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081603360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000610d9130610df8565b15905090565b600060019054906101000a900460ff16610de6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ddd906116e3565b60405180910390fd5b610dee610e0b565b610df6610e5c565b565b600080823b905060008111915050919050565b600060019054906101000a900460ff16610e5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e51906116e3565b60405180910390fd5b565b600060019054906101000a900460ff16610eab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea2906116e3565b60405180910390fd5b610ebb610eb6610b7f565b610cc0565b565b6000604051905090565b600080fd5b6000819050919050565b610edf81610ecc565b8114610eea57600080fd5b50565b600081359050610efc81610ed6565b92915050565b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610f5082610f07565b810181811067ffffffffffffffff82111715610f6f57610f6e610f18565b5b80604052505050565b6000610f82610ebd565b9050610f8e8282610f47565b919050565b60008160000b9050919050565b610fa981610f93565b8114610fb457600080fd5b50565b600081359050610fc681610fa0565b92915050565b6000819050919050565b610fdf81610fcc565b8114610fea57600080fd5b50565b600081359050610ffc81610fd6565b92915050565b60006040828403121561101857611017610f02565b5b6110226040610f78565b9050600061103284828501610fb7565b600083015250602061104684828501610fed565b60208301525092915050565b6000806060838503121561106957611068610ec7565b5b600061107785828601610eed565b925050602061108885828601611002565b9150509250929050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006110bd82611092565b9050919050565b6110cd816110b2565b81146110d857600080fd5b50565b6000813590506110ea816110c4565b92915050565b60006020828403121561110657611105610ec7565b5b6000611114848285016110db565b91505092915050565b611126816110b2565b82525050565b6000602082019050611141600083018461111d565b92915050565b6000806000806080858703121561116157611160610ec7565b5b600061116f878288016110db565b9450506020611180878288016110db565b935050604061119187828801610eed565b92505060606111a2878288016110db565b91505092959194509250565b6000602082840312156111c4576111c3610ec7565b5b60006111d284828501610eed565b91505092915050565b6111e481610ecc565b82525050565b60006020820190506111ff60008301846111db565b92915050565b61120e81610f93565b82525050565b61121d81610fcc565b82525050565b6040820160008201516112396000850182611205565b50602082015161124c6020850182611214565b50505050565b600060608201905061126760008301856111db565b6112746020830184611223565b9392505050565b600081519050919050565b600082825260208201905092915050565b60005b838110156112b557808201518184015260208101905061129a565b838111156112c4576000848401525b50505050565b60006112d58261127b565b6112df8185611286565b93506112ef818560208601611297565b6112f881610f07565b840191505092915050565b6000608082019050818103600083015261131d81876112ca565b905061132c602083018661111d565b611339604083018561111d565b61134660608301846111db565b95945050505050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061139660208361134f565b91506113a182611360565b602082019050919050565b600060208201905081810360008301526113c581611389565b9050919050565b7f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160008201527f647920696e697469616c697a6564000000000000000000000000000000000000602082015250565b6000611428602e8361134f565b9150611433826113cc565b604082019050919050565b600060208201905081810360008301526114578161141b565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006114ba60268361134f565b91506114c58261145e565b604082019050919050565b600060208201905081810360008301526114e9816114ad565b9050919050565b6000606082019050611505600083018661111d565b611512602083018561111d565b61151f60408301846111db565b949350505050565b600081905092915050565b600061153d8261127b565b6115478185611527565b9350611557818560208601611297565b80840191505092915050565b600061156f8284611532565b915081905092915050565b60008115159050919050565b61158f8161157a565b811461159a57600080fd5b50565b6000815190506115ac81611586565b92915050565b6000602082840312156115c8576115c7610ec7565b5b60006115d68482850161159d565b91505092915050565b7f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a20747260008201527f616e7366657246726f6d206661696c6564000000000000000000000000000000602082015250565b600061163b60318361134f565b9150611646826115df565b604082019050919050565b6000602082019050818103600083015261166a8161162e565b9050919050565b7f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960008201527f6e697469616c697a696e67000000000000000000000000000000000000000000602082015250565b60006116cd602b8361134f565b91506116d882611671565b604082019050919050565b600060208201905081810360008301526116fc816116c0565b905091905056fea26469706673582212201de0b0b7dacb13ecc609a95b0cf877510739f5df2288e4d559cfaf89b8c032f764736f6c634300080c0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

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.