Contract 0xa40fc0782bee28dd2cf8cb4ac2ecdb05c537f1b5

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xfbdf2f73d5dfe37eb785d8df8706717f6dcc648dfb06079524462581bcf46017Initialize149047722021-05-25 8:10:59119 days 18 hrs ago0xe994d10e7aed125b5e8d85be925063263622857c IN  0xa40fc0782bee28dd2cf8cb4ac2ecdb05c537f1b50 MATIC0.000318171
0xb14af2e7bcc73006ad13107bd22b5fd4c0e827433156607cda59bfb80ef6d0fc0x6080604099458492021-01-23 9:48:16241 days 16 hrs ago0x78655080b65f42e2cee5fa5673689cc44d4e1cfc IN  Contract Creation0 MATIC0.001203875371
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ChildChainManager

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at polygonscan.com on 2021-05-12
*/

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

// File: contracts/child/ChildChainManager/IChildChainManager.sol

pragma solidity 0.6.6;

interface IChildChainManager {
    event TokenMapped(address indexed rootToken, address indexed childToken);

    function mapToken(address rootToken, address childToken) external;
    function cleanMapToken(address rootToken, address childToken) external;
}

// File: contracts/child/ChildToken/IChildToken.sol

pragma solidity 0.6.6;

interface IChildToken {
    function deposit(address user, bytes calldata depositData) external;
}

// File: contracts/common/Initializable.sol

pragma solidity 0.6.6;

contract Initializable {
    bool inited = false;

    modifier initializer() {
        require(!inited, "already inited");
        _;
        inited = true;
    }
}

// File: @openzeppelin/contracts/utils/EnumerableSet.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256`
 * (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;

        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) { // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            bytes32 lastvalue = set._values[lastIndex];

            // Move the last value to the index where the value to delete is
            set._values[toDeleteIndex] = lastvalue;
            // Update the index for the moved value
            set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        require(set._values.length > index, "EnumerableSet: index out of bounds");
        return set._values[index];
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(value)));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint256(_at(set._inner, index)));
    }


    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

   /**
    * @dev Returns the value stored at position `index` in the set. O(1).
    *
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }
}

// File: @openzeppelin/contracts/utils/Address.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.2;

/**
 * @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) {
        // According to EIP-1052, 0x0 is the value returned for not-yet created accounts
        // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
        // for accounts without code, i.e. `keccak256('')`
        bytes32 codehash;
        bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
        // solhint-disable-next-line no-inline-assembly
        assembly { codehash := extcodehash(account) }
        return (codehash != accountHash && codehash != 0x0);
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");
        return _functionCallWithValue(target, data, value, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// File: @openzeppelin/contracts/GSN/Context.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;

/*
 * @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 GSN 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 Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

// File: @openzeppelin/contracts/access/AccessControl.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;




/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context {
    using EnumerableSet for EnumerableSet.AddressSet;
    using Address for address;

    struct RoleData {
        EnumerableSet.AddressSet members;
        bytes32 adminRole;
    }

    mapping (bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view returns (bool) {
        return _roles[role].members.contains(account);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view returns (uint256) {
        return _roles[role].members.length();
    }

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view returns (address) {
        return _roles[role].members.at(index);
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual {
        require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant");

        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual {
        require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke");

        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        emit RoleAdminChanged(role, _roles[role].adminRole, adminRole);
        _roles[role].adminRole = adminRole;
    }

    function _grantRole(bytes32 role, address account) private {
        if (_roles[role].members.add(account)) {
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (_roles[role].members.remove(account)) {
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

// File: contracts/common/AccessControlMixin.sol

pragma solidity 0.6.6;


contract AccessControlMixin is AccessControl {
    string private _revertMsg;
    function _setupContractId(string memory contractId) internal {
        _revertMsg = string(abi.encodePacked(contractId, ": INSUFFICIENT_PERMISSIONS"));
    }

    modifier only(bytes32 role) {
        require(
            hasRole(role, _msgSender()),
            _revertMsg
        );
        _;
    }
}

// File: contracts/child/IStateReceiver.sol

pragma solidity 0.6.6;

interface IStateReceiver {
    function onStateReceive(uint256 id, bytes calldata data) external;
}

// File: contracts/child/ChildChainManager/ChildChainManager.sol

pragma solidity 0.6.6;







contract ChildChainManager is
    IChildChainManager,
    Initializable,
    AccessControlMixin,
    IStateReceiver
{
    bytes32 public constant DEPOSIT = keccak256("DEPOSIT");
    bytes32 public constant MAP_TOKEN = keccak256("MAP_TOKEN");
    bytes32 public constant MAPPER_ROLE = keccak256("MAPPER_ROLE");
    bytes32 public constant STATE_SYNCER_ROLE = keccak256("STATE_SYNCER_ROLE");

    mapping(address => address) public rootToChildToken;
    mapping(address => address) public childToRootToken;

    function initialize(address _owner) external initializer {
        _setupContractId("ChildChainManager");
        _setupRole(DEFAULT_ADMIN_ROLE, _owner);
        _setupRole(MAPPER_ROLE, _owner);
        _setupRole(STATE_SYNCER_ROLE, _owner);
    }

    /**
     * @notice Map a token to enable its movement via the PoS Portal, callable only by mappers
     * Normally mapping should happen automatically using state sync
     * This function should be used only while initial deployment when state sync is not registrered or if it fails
     * @param rootToken address of token on root chain
     * @param childToken address of token on child chain
     */
    function mapToken(address rootToken, address childToken)
        external
        override
        only(MAPPER_ROLE)
    {
        _mapToken(rootToken, childToken);
    }

    /**
     * @notice Receive state sync data from root chain, only callable by state syncer
     * @dev state syncing mechanism is used for both depositing tokens and mapping them
     * @param data bytes data from RootChainManager contract
     * `data` is made up of bytes32 `syncType` and bytes `syncData`
     * `syncType` determines if it is deposit or token mapping
     * in case of token mapping, `syncData` is encoded address `rootToken`, address `childToken` and bytes32 `tokenType`
     * in case of deposit, `syncData` is encoded address `user`, address `rootToken` and bytes `depositData`
     * `depositData` is token specific data (amount in case of ERC20). It is passed as is to child token
     */
    function onStateReceive(uint256, bytes calldata data)
        external
        override
        only(STATE_SYNCER_ROLE)
    {
        (bytes32 syncType, bytes memory syncData) = abi.decode(
            data,
            (bytes32, bytes)
        );

        if (syncType == DEPOSIT) {
            _syncDeposit(syncData);
        } else if (syncType == MAP_TOKEN) {
            (address rootToken, address childToken, ) = abi.decode(
                syncData,
                (address, address, bytes32)
            );
            _mapToken(rootToken, childToken);
        } else {
            revert("ChildChainManager: INVALID_SYNC_TYPE");
        }
    }

    function _syncDeposit(bytes memory syncData) private {
        (address user, address rootToken, bytes memory depositData) = abi
            .decode(syncData, (address, address, bytes));
        address childTokenAddress = rootToChildToken[rootToken];
        require(
            childTokenAddress != address(0x0),
            "ChildChainManager: TOKEN_NOT_MAPPED"
        );
        IChildToken childTokenContract = IChildToken(childTokenAddress);
        childTokenContract.deposit(user, depositData);
    }

    function _mapToken(address rootToken, address childToken) private {
        address oldChildToken = rootToChildToken[rootToken];
        address oldRootToken = childToRootToken[childToken];

        if (rootToChildToken[oldRootToken] != address(0)) {
            rootToChildToken[oldRootToken] = address(0);
        }

        if (childToRootToken[oldChildToken] != address(0)) {
            childToRootToken[oldChildToken] = address(0);
        }

        rootToChildToken[rootToken] = childToken;
        childToRootToken[childToken] = rootToken;

        emit TokenMapped(rootToken, childToken);
    }

    /**
     * @notice Clean polluted token mapping
     * @param rootToken address of token on root chain. Since rename token was introduced later stage, 
     * clean method is used to clean pollulated mapping
     */
    function cleanMapToken(
        address rootToken,
        address childToken
    ) external override only(MAPPER_ROLE) {
        rootToChildToken[rootToken] = address(0);
        childToRootToken[childToken] = address(0);

        emit TokenMapped(rootToken, childToken);
    }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"rootToken","type":"address"},{"indexed":true,"internalType":"address","name":"childToken","type":"address"}],"name":"TokenMapped","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPOSIT","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAPPER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAP_TOKEN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATE_SYNCER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"childToRootToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"rootToken","type":"address"},{"internalType":"address","name":"childToken","type":"address"}],"name":"cleanMapToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"rootToken","type":"address"},{"internalType":"address","name":"childToken","type":"address"}],"name":"mapToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onStateReceive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"rootToChildToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60806040526000805460ff1916905534801561001a57600080fd5b506113748061002a6000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063886a69ba116100a2578063c4d66de811610071578063c4d66de81461033c578063ca15c87314610362578063d547741f1461037f578063d81c8e52146103ab578063ea60c7c4146103b357610116565b8063886a69ba146102c95780639010d07c146102d157806391d14854146102f4578063a217fddf1461033457610116565b806336568abe116100e957806336568abe1461021d57806347400269146102495780634dee449814610277578063568b80b51461027f5780636e86b7701461028757610116565b80630c3894bb1461011b578063248a9ca31461014b57806326c53bea1461017a5780632f2ff15d146101f1575b600080fd5b6101496004803603604081101561013157600080fd5b506001600160a01b03813581169160200135166103d9565b005b6101686004803603602081101561016157600080fd5b5035610519565b60408051918252519081900360200190f35b6101496004803603604081101561019057600080fd5b813591908101906040810160208201356401000000008111156101b257600080fd5b8201836020820111156101c457600080fd5b803590602001918460018302840111640100000000831117156101e657600080fd5b50909250905061052e565b6101496004803603604081101561020757600080fd5b50803590602001356001600160a01b031661073f565b6101496004803603604081101561023357600080fd5b50803590602001356001600160a01b03166107a6565b6101496004803603604081101561025f57600080fd5b506001600160a01b0381358116916020013516610807565b6101686108a9565b6101686108d2565b6102ad6004803603602081101561029d57600080fd5b50356001600160a01b03166108f5565b604080516001600160a01b039092168252519081900360200190f35b610168610910565b6102ad600480360360408110156102e757600080fd5b5080359060200135610931565b6103206004803603604081101561030a57600080fd5b50803590602001356001600160a01b0316610958565b604080519115158252519081900360200190f35b610168610976565b6101496004803603602081101561035257600080fd5b50356001600160a01b031661097b565b6101686004803603602081101561037857600080fd5b5035610a6b565b6101496004803603604081101561039557600080fd5b50803590602001356001600160a01b0316610a82565b610168610adb565b6102ad600480360360208110156103c957600080fd5b50356001600160a01b0316610afa565b604080516a4d41505045525f524f4c4560a81b8152905190819003600b01902061040a81610405610b15565b610958565b6002906104aa5760405162461bcd60e51b815260206004820190815282546002600019610100600184161502019091160460248301819052909182916044909101908490801561049b5780601f106104705761010080835404028352916020019161049b565b820191906000526020600020905b81548152906001019060200180831161047e57829003601f168201915b50509250505060405180910390fd5b506001600160a01b03808416600081815260036020908152604080832080546001600160a01b03199081169091559487168084526004909252808320805490951690945592517f85920d35e6c72f6b2affffa04298b0cecfeba86e4a9f407df661f1cb8ab5e6179190a3505050565b60009081526001602052604090206002015490565b604080517053544154455f53594e4345525f524f4c4560781b8152905190819003601101902061056081610405610b15565b6002906105c65760405162461bcd60e51b815260206004820190815282546002600019610100600184161502019091160460248301819052909182916044909101908490801561049b5780601f106104705761010080835404028352916020019161049b565b5060006060848460408110156105db57600080fd5b813591908101906040810160208201356401000000008111156105fd57600080fd5b82018360208201111561060f57600080fd5b8035906020019184600183028401116401000000008311171561063157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516611115413d4d25560ca1b815290519081900360070190209698509196505050509184141591506106a490505761069f81610b1a565b610737565b604080516826a0a82faa27a5a2a760b91b81529051908190036009019020821415610700576000808280602001905160608110156106e157600080fd5b50805160209091015190925090506106f98282610d29565b5050610737565b60405162461bcd60e51b81526004018080602001828103825260248152602001806112996024913960400191505060405180910390fd5b505050505050565b60008281526001602052604090206002015461075d90610405610b15565b6107985760405162461bcd60e51b815260040180806020018281038252602f81526020018061126a602f913960400191505060405180910390fd5b6107a28282610e4d565b5050565b6107ae610b15565b6001600160a01b0316816001600160a01b0316146107fd5760405162461bcd60e51b815260040180806020018281038252602f815260200180611310602f913960400191505060405180910390fd5b6107a28282610ebc565b604080516a4d41505045525f524f4c4560a81b8152905190819003600b01902061083381610405610b15565b6002906108995760405162461bcd60e51b815260206004820190815282546002600019610100600184161502019091160460248301819052909182916044909101908490801561049b5780601f106104705761010080835404028352916020019161049b565b506108a48383610d29565b505050565b604080517053544154455f53594e4345525f524f4c4560781b8152905190819003601101902081565b604080516a4d41505045525f524f4c4560a81b8152905190819003600b01902081565b6004602052600090815260409020546001600160a01b031681565b604080516826a0a82faa27a5a2a760b91b8152905190819003600901902081565b600082815260016020526040812061094f908363ffffffff610f2b16565b90505b92915050565b600082815260016020526040812061094f908363ffffffff610f3716565b600081565b60005460ff16156109c4576040805162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481a5b9a5d195960921b604482015290519081900360640190fd5b6109f66040518060400160405280601181526020017021b434b63221b430b4b726b0b730b3b2b960791b815250610f4c565b610a01600082610798565b604080516a4d41505045525f524f4c4560a81b8152905190819003600b019020610a2b9082610798565b604080517053544154455f53594e4345525f524f4c4560781b81529051908190036011019020610a5b9082610798565b506000805460ff19166001179055565b600081815260016020526040812061095290610fea565b600082815260016020526040902060020154610aa090610405610b15565b6107fd5760405162461bcd60e51b81526004018080602001828103825260308152602001806112e06030913960400191505060405180910390fd5b604080516611115413d4d25560ca1b8152905190819003600701902081565b6003602052600090815260409020546001600160a01b031681565b335b90565b6000806060838060200190516060811015610b3457600080fd5b81516020830151604080850180519151939592948301929184640100000000821115610b5f57600080fd5b908301906020820185811115610b7457600080fd5b8251640100000000811182820188101715610b8e57600080fd5b82525081516020918201929091019080838360005b83811015610bbb578181015183820152602001610ba3565b50505050905090810190601f168015610be85780820380516001836020036101000a031916815260200191505b5060409081526001600160a01b0380871660009081526003602052919091205496995094975092955050509116905080610c535760405162461bcd60e51b81526004018080602001828103825260238152602001806112bd6023913960400191505060405180910390fd5b6040805163cf2c52cb60e01b81526001600160a01b03868116600483019081526024830193845285516044840152855185949285169363cf2c52cb938a938993909260640190602085019080838360005b83811015610cbc578181015183820152602001610ca4565b50505050905090810190601f168015610ce95780820380516001836020036101000a031916815260200191505b509350505050600060405180830381600087803b158015610d0957600080fd5b505af1158015610d1d573d6000803e3d6000fd5b50505050505050505050565b6001600160a01b0380831660009081526003602081815260408084205486861685526004835281852054861680865293909252909220549183169290911615610d93576001600160a01b038116600090815260036020526040902080546001600160a01b03191690555b6001600160a01b038281166000908152600460205260409020541615610dda576001600160a01b038216600090815260046020526040902080546001600160a01b03191690555b6001600160a01b03808516600081815260036020908152604080832080549589166001600160a01b0319968716811790915580845260049092528083208054909516841790945592517f85920d35e6c72f6b2affffa04298b0cecfeba86e4a9f407df661f1cb8ab5e6179190a350505050565b6000828152600160205260409020610e6b908263ffffffff610ff516565b156107a257610e78610b15565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152600160205260409020610eda908263ffffffff61100a16565b156107a257610ee7610b15565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b600061094f838361101f565b600061094f836001600160a01b038416611083565b806040516020018082805190602001908083835b60208310610f7f5780518252601f199092019160209182019101610f60565b51815160209384036101000a60001901801990921691161790527f3a20494e53554646494349454e545f5045524d495353494f4e530000000000009190930190815260408051808303600519018152601a909201905280516107a295506002945092019190506111af565b60006109528261109b565b600061094f836001600160a01b03841661109f565b600061094f836001600160a01b0384166110e9565b815460009082106110615760405162461bcd60e51b81526004018080602001828103825260228152602001806112486022913960400191505060405180910390fd5b82600001828154811061107057fe5b9060005260206000200154905092915050565b60009081526001919091016020526040902054151590565b5490565b60006110ab8383611083565b6110e157508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610952565b506000610952565b600081815260018301602052604081205480156111a5578354600019808301919081019060009087908390811061111c57fe5b906000526020600020015490508087600001848154811061113957fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061116957fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050610952565b6000915050610952565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106111f057805160ff191683800117855561121d565b8280016001018555821561121d579182015b8281111561121d578251825591602001919060010190611202565b5061122992915061122d565b5090565b610b1791905b80821115611229576000815560010161123356fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e744368696c64436861696e4d616e616765723a20494e56414c49445f53594e435f545950454368696c64436861696e4d616e616765723a20544f4b454e5f4e4f545f4d4150504544416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220a5fec86060f85be01ba612d5fb9b08e3d2ab381bd6c0ee7290e64a811df4468764736f6c63430006060033

Deployed ByteCode Sourcemap

27355:4464:0:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;27355:4464:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;31530:286:0;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;31530:286:0;;;;;;;;;;:::i;:::-;;23366:114;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;23366:114:0;;:::i;:::-;;;;;;;;;;;;;;;;29465:676;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;29465:676:0;;;;;;;;;;;;;;27:11:-1;11:28;;8:2;;;52:1;49;42:12;8:2;29465:676:0;;41:9:-1;34:4;18:14;14:25;11:40;8:2;;;64:1;61;54:12;8:2;29465:676:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;29465:676:0;;-1:-1:-1;29465:676:0;-1:-1:-1;29465:676:0;:::i;23742:227::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;23742:227:0;;;;;;-1:-1:-1;;;;;23742:227:0;;:::i;24951:209::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;24951:209:0;;;;;;-1:-1:-1;;;;;24951:209:0;;:::i;28554:176::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;;;;;;28554:176:0;;;;;;;;;;:::i;27678:74::-;;;:::i;27609:62::-;;;:::i;27819:51::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;27819:51:0;-1:-1:-1;;;;;27819:51:0;;:::i;:::-;;;;-1:-1:-1;;;;;27819:51:0;;;;;;;;;;;;;;27544:58;;;:::i;23039:138::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;23039:138:0;;;;;;;:::i;22000:139::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;22000:139:0;;;;;;-1:-1:-1;;;;;22000:139:0;;:::i;:::-;;;;;;;;;;;;;;;;;;20745:49;;;:::i;27879:252::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;27879:252:0;-1:-1:-1;;;;;27879:252:0;;:::i;22313:127::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;22313:127:0;;:::i;24214:230::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;24214:230:0;;;;;;-1:-1:-1;;;;;24214:230:0;;:::i;27483:54::-;;;:::i;27761:51::-;;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;-1:-1;27761:51:0;-1:-1:-1;;;;;27761:51:0;;:::i;31530:286::-;27647:24;;;-1:-1:-1;;;27647:24:0;;;;;;;;;;;;26981:27;27647:24;26995:12;:10;:12::i;:::-;26981:7;:27::i;:::-;27023:10;26959:85;;;;;-1:-1:-1;;;26959:85:0;;;;;;;;;;;;-1:-1:-1;;26959:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;31664:27:0;;::::1;31702:1;31664:27:::0;;;:16:::1;:27;::::0;;;;;;;:40;;-1:-1:-1;;;;;;31664:40:0;;::::1;::::0;;;31715:28;;::::1;::::0;;;:16:::1;:28:::0;;;;;;:41;;;;::::1;::::0;;;31774:34;;::::1;::::0;31702:1;31774:34:::1;31530:286:::0;;;:::o;23366:114::-;23423:7;23450:12;;;:6;:12;;;;;:22;;;;23366:114::o;29465:676::-;27722:30;;;-1:-1:-1;;;27722:30:0;;;;;;;;;;;;26981:27;27722:30;26995:12;:10;:12::i;26981:27::-;27023:10;26959:85;;;;;-1:-1:-1;;;26959:85:0;;;;;;;;;;;;-1:-1:-1;;26959:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29605:16:::1;29623:21;29673:4;;15:2:-1;10:3;7:11;4:2;;;31:1;28::::0;21:12:::1;4:2;29648:71:0::0;::::1;::::0;;;::::1;::::0;;;;::::1;::::0;::::1;;27:11:-1;11:28:::0;::::1;8:2;;;52:1;49::::0;42:12:::1;8:2;29648:71:0;;41:9:-1;34:4;18:14;14:25;11:40;8:2;;;64:1;61::::0;54:12:::1;8:2;29648:71:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;39:11;25:12;22:29;11:107;8:2;;;131:1;128::::0;121:12:::1;8:2;29648:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16:::0;::::1;74:27:::0;;;;-1:-1;;27517:20:0::1;::::0;;-1:-1:-1;;;27517:20:0;;;;;;;;::::1;::::0;;;29604:115;;-1:-1:-1;29648:71:0;;-1:-1:-1;;;;29736:19:0;;::::1;29732:402;::::0;-1:-1:-1;29732:402:0::1;::::0;-1:-1:-1;29732:402:0::1;29772:22;29785:8;29772:12;:22::i;:::-;29732:402;;;27580:22;::::0;;-1:-1:-1;;;27580:22:0;;;;;;;;::::1;::::0;;;29816:21;::::1;29812:322;;;29855:17;29874:18:::0;29927:8:::1;29898:98;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28::::0;21:12:::1;4:2;-1:-1:::0;29898:98:0;;::::1;::::0;;::::1;::::0;;;-1:-1:-1;29898:98:0;-1:-1:-1;30011:32:0::1;29898:98:::0;;30011:9:::1;:32::i;:::-;29812:322;;;;;30076:46;;-1:-1:-1::0;;;30076:46:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;29812:322;27055:1;;29465:676:::0;;;;:::o;23742:227::-;23834:12;;;;:6;:12;;;;;:22;;;23826:45;;23858:12;:10;:12::i;23826:45::-;23818:105;;;;-1:-1:-1;;;23818:105:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23936:25;23947:4;23953:7;23936:10;:25::i;:::-;23742:227;;:::o;24951:209::-;25049:12;:10;:12::i;:::-;-1:-1:-1;;;;;25038:23:0;:7;-1:-1:-1;;;;;25038:23:0;;25030:83;;;;-1:-1:-1;;;25030:83:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;25126:26;25138:4;25144:7;25126:11;:26::i;28554:176::-;27647:24;;;-1:-1:-1;;;27647:24:0;;;;;;;;;;;;26981:27;27647:24;26995:12;:10;:12::i;26981:27::-;27023:10;26959:85;;;;;-1:-1:-1;;;26959:85:0;;;;;;;;;;;;-1:-1:-1;;26959:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28690:32:::1;28700:9;28711:10;28690:9;:32::i;:::-;28554:176:::0;;;:::o;27678:74::-;27722:30;;;-1:-1:-1;;;27722:30:0;;;;;;;;;;;;27678:74;:::o;27609:62::-;27647:24;;;-1:-1:-1;;;27647:24:0;;;;;;;;;;;;27609:62;:::o;27819:51::-;;;;;;;;;;;;-1:-1:-1;;;;;27819:51:0;;:::o;27544:58::-;27580:22;;;-1:-1:-1;;;27580:22:0;;;;;;;;;;;;27544:58;:::o;23039:138::-;23112:7;23139:12;;;:6;:12;;;;;:30;;23163:5;23139:30;:23;:30;:::i;:::-;23132:37;;23039:138;;;;;:::o;22000:139::-;22069:4;22093:12;;;:6;:12;;;;;:38;;22123:7;22093:38;:29;:38;:::i;20745:49::-;20790:4;20745:49;:::o;27879:252::-;3555:6;;;;3554:7;3546:34;;;;;-1:-1:-1;;;3546:34:0;;;;;;;;;;;;-1:-1:-1;;;3546:34:0;;;;;;;;;;;;;;;27947:37:::1;;;;;;;;;;;;;;-1:-1:-1::0;;;27947:37:0::1;;::::0;:16:::1;:37::i;:::-;27995:38;20790:4;28026:6:::0;27995:10:::1;:38::i;:::-;27647:24;::::0;;-1:-1:-1;;;27647:24:0;;;;;;;;::::1;::::0;;;28044:31:::1;::::0;28068:6;28044:10:::1;:31::i;:::-;27722:30;::::0;;-1:-1:-1;;;27722:30:0;;;;;;;;::::1;::::0;;;28086:37:::1;::::0;28116:6;28086:10:::1;:37::i;:::-;-1:-1:-1::0;3603:6:0;:13;;-1:-1:-1;;3603:13:0;3612:4;3603:13;;;27879:252::o;22313:127::-;22376:7;22403:12;;;:6;:12;;;;;:29;;:27;:29::i;24214:230::-;24307:12;;;;:6;:12;;;;;:22;;;24299:45;;24331:12;:10;:12::i;24299:45::-;24291:106;;;;-1:-1:-1;;;24291:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27483:54;27517:20;;;-1:-1:-1;;;27517:20:0;;;;;;;;;;;;27483:54;:::o;27761:51::-;;;;;;;;;;;;-1:-1:-1;;;;;27761:51:0;;:::o;18655:106::-;18743:10;18655:106;;:::o;30149:520::-;30214:12;30228:17;30247:24;30300:8;30275:61;;;;;15:2:-1;10:3;7:11;4:2;;;31:1;28;21:12;4:2;30275:61:0;;;;;;;;;;;;;;;;;;;;;;;19:11:-1;11:20;;8:2;;;44:1;41;34:12;8:2;62:21;;;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;261:11;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;372:25;;-1:-1;30275:61:0;;420:4:-1;411:14;;;;30275:61:0;;;;;411:14:-1;30275:61:0;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;30275:61:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;30275:61:0;;;;-1:-1:-1;;;;;30375:27:0;;;30347:25;30375:27;;;:16;:27;;;;;;;30213:123;;-1:-1:-1;30213:123:0;;-1:-1:-1;30213:123:0;;-1:-1:-1;;;30375:27:0;;;-1:-1:-1;30435:33:0;30413:118;;;;-1:-1:-1;;;30413:118:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30616:45;;;-1:-1:-1;;;30616:45:0;;-1:-1:-1;;;;;30616:45:0;;;;;;;;;;;;;;;;;;;;;;;30587:17;;30616:26;;;;;;30643:4;;30649:11;;30616:45;;;;;;;;;;;;30542:30;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;30616:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;30616:45:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;30616:45:0;;;;30149:520;;;;;;:::o;30677:620::-;-1:-1:-1;;;;;30778:27:0;;;30754:21;30778:27;;;:16;:27;;;;;;;;;30839:28;;;;;:16;:28;;;;;;;;30884:30;;;;;;;;;;;30778:27;;;;30839:28;;30884:30;:44;30880:120;;-1:-1:-1;;;;;30945:30:0;;30986:1;30945:30;;;:16;:30;;;;;:43;;-1:-1:-1;;;;;;30945:43:0;;;30880:120;-1:-1:-1;;;;;31016:31:0;;;31059:1;31016:31;;;:16;:31;;;;;;;:45;31012:122;;-1:-1:-1;;;;;31078:31:0;;31120:1;31078:31;;;:16;:31;;;;;:44;;-1:-1:-1;;;;;;31078:44:0;;;31012:122;-1:-1:-1;;;;;31146:27:0;;;;;;;:16;:27;;;;;;;;:40;;;;;-1:-1:-1;;;;;;31146:40:0;;;;;;;;31197:28;;;:16;:28;;;;;;:40;;;;;;;;;;31255:34;;;;31146:27;31255:34;30677:620;;;;:::o;26194:188::-;26268:12;;;;:6;:12;;;;;:33;;26293:7;26268:33;:24;:33;:::i;:::-;26264:111;;;26350:12;:10;:12::i;:::-;-1:-1:-1;;;;;26323:40:0;26341:7;-1:-1:-1;;;;;26323:40:0;26335:4;26323:40;;;;;;;;;;26194:188;;:::o;26390:192::-;26465:12;;;;:6;:12;;;;;:36;;26493:7;26465:36;:27;:36;:::i;:::-;26461:114;;;26550:12;:10;:12::i;:::-;-1:-1:-1;;;;;26523:40:0;26541:7;-1:-1:-1;;;;;26523:40:0;26535:4;26523:40;;;;;;;;;;26390:192;;:::o;9960:149::-;10034:7;10077:22;10081:3;10093:5;10077:3;:22::i;9255:158::-;9335:4;9359:46;9369:3;-1:-1:-1;;;;;9389:14:0;;9359:9;:46::i;26753:159::-;26862:10;26845:58;;;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;299:10;344;;263:2;259:12;;;254:3;250:22;-1:-1;;246:30;311:9;;295:26;;;340:21;;377:20;365:33;;26845:58:0;;;;;;;;;;;26:21:-1;;;-1:-1;;22:32;6:49;;26845:58:0;;;;;;26825:79;;;;-1:-1:-1;26825:10:0;;-1:-1:-1;26825:79:0;;;;-1:-1:-1;26825:79:0;:::i;9499:117::-;9562:7;9589:19;9597:3;9589:7;:19::i;8701:143::-;8771:4;8795:41;8800:3;-1:-1:-1;;;;;8820:14:0;;8795:4;:41::i;9020:149::-;9093:4;9117:44;9125:3;-1:-1:-1;;;;;9145:14:0;;9117:7;:44::i;8243:204::-;8338:18;;8310:7;;8338:26;-1:-1:-1;8330:73:0;;;;-1:-1:-1;;;8330:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8421:3;:11;;8433:5;8421:18;;;;;;;;;;;;;;;;8414:25;;8243:204;;;;:::o;7575:129::-;7648:4;7672:19;;;:12;;;;;:19;;;;;;:24;;;7575:129::o;7790:109::-;7873:18;;7790:109::o;5355:414::-;5418:4;5440:21;5450:3;5455:5;5440:9;:21::i;:::-;5435:327;;-1:-1:-1;27:10;;39:1;23:18;;;45:23;;5478:11:0;:23;;;;;;;;;;;;;5661:18;;5639:19;;;:12;;;:19;;;;;;:40;;;;5694:11;;5435:327;-1:-1:-1;5745:5:0;5738:12;;5945:1544;6011:4;6150:19;;;:12;;;:19;;;;;;6186:15;;6182:1300;;6621:18;;-1:-1:-1;;6572:14:0;;;;6621:22;;;;6548:21;;6621:3;;:22;;6908;;;;;;;;;;;;;;6888:42;;7054:9;7025:3;:11;;7037:13;7025:26;;;;;;;;;;;;;;;;;;;:38;;;;7131:23;;;7173:1;7131:12;;;:23;;;;;;7157:17;;;7131:43;;7283:17;;7131:3;;7283:17;;;;;;;;;;;;;;;;;;;;;;7378:3;:12;;:19;7391:5;7378:19;;;;;;;;;;;7371:26;;;7421:4;7414:11;;;;;;;;6182:1300;7465:5;7458:12;;;;;27355:4464;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;27355:4464:0;;;-1:-1:-1;27355:4464:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;

Swarm Source

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