ETH Price: $2,019.36 (+1.76%)

Transaction Decoder

Block:
11947549 at Feb-28-2021 06:53:22 PM +UTC
Transaction Fee:
0.00720108 ETH $14.54
Gas Used:
100,015 Gas / 72 Gwei

Account State Difference:

  Address   Before After State Difference Code
(Miner: 0x6eb...31a)
812.348021734601558528 Eth812.355222814601558528 Eth0.00720108
0x7A598486...DF5CB013c
0.028646135438553745 Eth
Nonce: 7
0.021445055438553745 Eth
Nonce: 8
0.00720108

Execution Trace

ETH 0.00964516129032258 AdminUpgradeabilityProxy.0f694584( )
  • ETH 0.00964516129032258 ServiceV9.payFee( nodeId=1 )
    File 1 of 2: AdminUpgradeabilityProxy
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.6.0;
    import './UpgradeabilityProxy.sol';
    /**
     * @title AdminUpgradeabilityProxy
     * @dev This contract combines an upgradeability proxy with an authorization
     * mechanism for administrative tasks.
     * All external functions in this contract must be guarded by the
     * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity
     * feature proposal that would enable this to be done automatically.
     */
    contract AdminUpgradeabilityProxy is UpgradeabilityProxy {
      /**
       * Contract constructor.
       * @param _logic address of the initial implementation.
       * @param _admin Address of the proxy administrator.
       * @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
       * It should include the signature and the parameters of the function to be called, as described in
       * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.
       * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.
       */
      constructor(address _logic, address _admin, bytes memory _data) UpgradeabilityProxy(_logic, _data) public payable {
        assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1));
        _setAdmin(_admin);
      }
      /**
       * @dev Emitted when the administration has been transferred.
       * @param previousAdmin Address of the previous admin.
       * @param newAdmin Address of the new admin.
       */
      event AdminChanged(address previousAdmin, address newAdmin);
      /**
       * @dev Storage slot with the admin of the contract.
       * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is
       * validated in the constructor.
       */
      bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103;
      /**
       * @dev Modifier to check whether the `msg.sender` is the admin.
       * If it is, it will run the function. Otherwise, it will delegate the call
       * to the implementation.
       */
      modifier ifAdmin() {
        if (msg.sender == _admin()) {
          _;
        } else {
          _fallback();
        }
      }
      /**
       * @return The address of the proxy admin.
       */
      function admin() external ifAdmin returns (address) {
        return _admin();
      }
      /**
       * @return The address of the implementation.
       */
      function implementation() external ifAdmin returns (address) {
        return _implementation();
      }
      /**
       * @dev Changes the admin of the proxy.
       * Only the current admin can call this function.
       * @param newAdmin Address to transfer proxy administration to.
       */
      function changeAdmin(address newAdmin) external ifAdmin {
        require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address");
        emit AdminChanged(_admin(), newAdmin);
        _setAdmin(newAdmin);
      }
      /**
       * @dev Upgrade the backing implementation of the proxy.
       * Only the admin can call this function.
       * @param newImplementation Address of the new implementation.
       */
      function upgradeTo(address newImplementation) external ifAdmin {
        _upgradeTo(newImplementation);
      }
      /**
       * @dev Upgrade the backing implementation of the proxy and call a function
       * on the new implementation.
       * This is useful to initialize the proxied contract.
       * @param newImplementation Address of the new implementation.
       * @param data Data to send as msg.data in the low level call.
       * It should include the signature and the parameters of the function to be called, as described in
       * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.
       */
      function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin {
        _upgradeTo(newImplementation);
        (bool success,) = newImplementation.delegatecall(data);
        require(success);
      }
      /**
       * @return adm The admin slot.
       */
      function _admin() internal view returns (address adm) {
        bytes32 slot = ADMIN_SLOT;
        assembly {
          adm := sload(slot)
        }
      }
      /**
       * @dev Sets the address of the proxy admin.
       * @param newAdmin Address of the new proxy admin.
       */
      function _setAdmin(address newAdmin) internal {
        bytes32 slot = ADMIN_SLOT;
        assembly {
          sstore(slot, newAdmin)
        }
      }
      /**
       * @dev Only fall back when the sender is not the admin.
       */
      function _willFallback() internal override virtual {
        require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin");
        super._willFallback();
      }
    }
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.6.0;
    import './Proxy.sol';
    import '@openzeppelin/contracts/utils/Address.sol';
    /**
     * @title UpgradeabilityProxy
     * @dev This contract implements a proxy that allows to change the
     * implementation address to which it will delegate.
     * Such a change is called an implementation upgrade.
     */
    contract UpgradeabilityProxy is Proxy {
      /**
       * @dev Contract constructor.
       * @param _logic Address of the initial implementation.
       * @param _data Data to send as msg.data to the implementation to initialize the proxied contract.
       * It should include the signature and the parameters of the function to be called, as described in
       * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding.
       * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped.
       */
      constructor(address _logic, bytes memory _data) public payable {
        assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1));
        _setImplementation(_logic);
        if(_data.length > 0) {
          (bool success,) = _logic.delegatecall(_data);
          require(success);
        }
      }  
      /**
       * @dev Emitted when the implementation is upgraded.
       * @param implementation Address of the new implementation.
       */
      event Upgraded(address indexed implementation);
      /**
       * @dev Storage slot with the address of the current implementation.
       * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is
       * validated in the constructor.
       */
      bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
      /**
       * @dev Returns the current implementation.
       * @return impl Address of the current implementation
       */
      function _implementation() internal override view returns (address impl) {
        bytes32 slot = IMPLEMENTATION_SLOT;
        assembly {
          impl := sload(slot)
        }
      }
      /**
       * @dev Upgrades the proxy to a new implementation.
       * @param newImplementation Address of the new implementation.
       */
      function _upgradeTo(address newImplementation) internal {
        _setImplementation(newImplementation);
        emit Upgraded(newImplementation);
      }
      /**
       * @dev Sets the implementation address of the proxy.
       * @param newImplementation Address of the new implementation.
       */
      function _setImplementation(address newImplementation) internal {
        require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address");
        bytes32 slot = IMPLEMENTATION_SLOT;
        assembly {
          sstore(slot, newImplementation)
        }
      }
    }
    // SPDX-License-Identifier: MIT
    pragma solidity ^0.6.0;
    /**
     * @title Proxy
     * @dev Implements delegation of calls to other contracts, with proper
     * forwarding of return values and bubbling of failures.
     * It defines a fallback function that delegates all calls to the address
     * returned by the abstract _implementation() internal function.
     */
    abstract contract Proxy {
      /**
       * @dev Fallback function.
       * Implemented entirely in `_fallback`.
       */
      fallback () payable external {
        _fallback();
      }
      /**
       * @dev Receive function.
       * Implemented entirely in `_fallback`.
       */
      receive () payable external {
        _fallback();
      }
      /**
       * @return The Address of the implementation.
       */
      function _implementation() internal virtual view returns (address);
      /**
       * @dev Delegates execution to an implementation contract.
       * This is a low level function that doesn't return to its internal call site.
       * It will return to the external caller whatever the implementation returns.
       * @param implementation Address to delegate.
       */
      function _delegate(address implementation) internal {
        assembly {
          // Copy msg.data. We take full control of memory in this inline assembly
          // block because it will not return to Solidity code. We overwrite the
          // Solidity scratch pad at memory position 0.
          calldatacopy(0, 0, calldatasize())
          // Call the implementation.
          // out and outsize are 0 because we don't know the size yet.
          let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)
          // Copy the returned data.
          returndatacopy(0, 0, returndatasize())
          switch result
          // delegatecall returns 0 on error.
          case 0 { revert(0, returndatasize()) }
          default { return(0, returndatasize()) }
        }
      }
      /**
       * @dev Function that is run as the first thing in the fallback function.
       * Can be redefined in derived contracts to add functionality.
       * Redefinitions must call super._willFallback().
       */
      function _willFallback() internal virtual {
      }
      /**
       * @dev fallback implementation.
       * Extracted to enable manual triggering.
       */
      function _fallback() internal {
        _willFallback();
        _delegate(_implementation());
      }
    }
    // SPDX-License-Identifier: MIT
    pragma solidity >=0.6.2 <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;
            // solhint-disable-next-line no-inline-assembly
            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");
            // 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");
            require(isContract(target), "Address: call to non-contract");
            // solhint-disable-next-line avoid-low-level-calls
            (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");
            // solhint-disable-next-line avoid-low-level-calls
            (bool success, bytes memory returndata) = target.staticcall(data);
            return _verifyCallResult(success, returndata, errorMessage);
        }
        function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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
                    // solhint-disable-next-line no-inline-assembly
                    assembly {
                        let returndata_size := mload(returndata)
                        revert(add(32, returndata), returndata_size)
                    }
                } else {
                    revert(errorMessage);
                }
            }
        }
    }
    

    File 2 of 2: ServiceV9
    {"IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity \u003e=0.6.0 \u003c0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller\u0027s account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller\u0027s tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender\u0027s allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller\u0027s\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"},"SafeMath.sol":{"content":"// SPDX-License-Identifier: MIT\n\npragma solidity \u003e=0.6.0 \u003c0.8.0;\n\n/**\n * @dev Wrappers over Solidity\u0027s arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it\u0027s recommended to use it always.\n */\nlibrary SafeMath {\n    /**\n     * @dev Returns the addition of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity\u0027s `+` operator.\n     *\n     * Requirements:\n     *\n     * - Addition cannot overflow.\n     */\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        uint256 c = a + b;\n        require(c \u003e= a, \"SafeMath: addition overflow\");\n\n        return c;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting on\n     * overflow (when the result is negative).\n     *\n     * Counterpart to Solidity\u0027s `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        return sub(a, b, \"SafeMath: subtraction overflow\");\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n     * overflow (when the result is negative).\n     *\n     * Counterpart to Solidity\u0027s `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n        require(b \u003c= a, errorMessage);\n        uint256 c = a - b;\n\n        return c;\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity\u0027s `*` operator.\n     *\n     * Requirements:\n     *\n     * - Multiplication cannot overflow.\n     */\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n        // Gas optimization: this is cheaper than requiring \u0027a\u0027 not being zero, but the\n        // benefit is lost if \u0027b\u0027 is also tested.\n        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n        if (a == 0) {\n            return 0;\n        }\n\n        uint256 c = a * b;\n        require(c / a == b, \"SafeMath: multiplication overflow\");\n\n        return c;\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers. Reverts on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity\u0027s `/` operator. Note: this function uses a\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\n     * uses an invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\n        return div(a, b, \"SafeMath: division by zero\");\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity\u0027s `/` operator. Note: this function uses a\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\n     * uses an invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n        require(b \u003e 0, errorMessage);\n        uint256 c = a / b;\n        // assert(a == b * c + a % b); // There is no case in which this doesn\u0027t hold\n\n        return c;\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * Reverts when dividing by zero.\n     *\n     * Counterpart to Solidity\u0027s `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n        return mod(a, b, \"SafeMath: modulo by zero\");\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * Reverts with custom message when dividing by zero.\n     *\n     * Counterpart to Solidity\u0027s `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n        require(b != 0, errorMessage);\n        return a % b;\n    }\n}\n"},"ServiceV9.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity 0.6.12;\n\nimport \"./IERC20.sol\";\nimport \"./SafeMath.sol\";\nimport \"./StrongPoolInterface.sol\";\n\ncontract ServiceV9 {\n  event Requested(address indexed miner);\n  event Claimed(address indexed miner, uint256 reward);\n\n  using SafeMath for uint256;\n  bool public initDone;\n  address public admin;\n  address public pendingAdmin;\n  address public superAdmin;\n  address public pendingSuperAdmin;\n  address public serviceAdmin;\n  address public parameterAdmin;\n  address payable public feeCollector;\n\n  IERC20 public strongToken;\n  StrongPoolInterface public strongPool;\n\n  uint256 public rewardPerBlockNumerator;\n  uint256 public rewardPerBlockDenominator;\n\n  uint256 public naasRewardPerBlockNumerator;\n  uint256 public naasRewardPerBlockDenominator;\n\n  uint256 public claimingFeeNumerator;\n  uint256 public claimingFeeDenominator;\n\n  uint256 public requestingFeeInWei;\n\n  uint256 public strongFeeInWei;\n\n  uint256 public recurringFeeInWei;\n  uint256 public recurringNaaSFeeInWei;\n  uint256 public recurringPaymentCycleInBlocks;\n\n  uint256 public rewardBalance;\n\n  mapping(address =\u003e uint256) public entityBlockLastClaimedOn;\n\n  address[] public entities;\n  mapping(address =\u003e uint256) public entityIndex;\n  mapping(address =\u003e bool) public entityActive;\n  mapping(address =\u003e bool) public requestPending;\n  mapping(address =\u003e bool) public entityIsNaaS;\n  mapping(address =\u003e uint256) public paidOnBlock;\n  uint256 public activeEntities;\n\n  string public desciption;\n\n  uint256 public claimingFeeInWei;\n\n  uint256 public naasRequestingFeeInWei;\n\n  uint256 public naasStrongFeeInWei;\n\n  bool public removedTokens;\n\n  mapping(address =\u003e uint256) public traunch;\n\n  uint256 public currentTraunch;\n\n  mapping(bytes =\u003e bool) public entityNodeIsActive;\n  mapping(bytes =\u003e bool) public entityNodeIsBYON;\n  mapping(bytes =\u003e uint256) public entityNodeTraunch;\n  mapping(bytes =\u003e uint256) public entityNodePaidOnBlock;\n  mapping(bytes =\u003e uint256) public entityNodeClaimedOnBlock;\n  mapping(address =\u003e uint128) public entityNodeCount;\n\n  event Paid(address indexed entity, uint128 nodeId, bool isBYON, bool isRenewal, uint256 upToBlockNumber);\n  event Migrated(address indexed from, address indexed to, uint128 fromNodeId, uint128 toNodeId, bool isBYON);\n\n  function init(\n    address strongTokenAddress,\n    address strongPoolAddress,\n    address adminAddress,\n    address superAdminAddress,\n    uint256 rewardPerBlockNumeratorValue,\n    uint256 rewardPerBlockDenominatorValue,\n    uint256 naasRewardPerBlockNumeratorValue,\n    uint256 naasRewardPerBlockDenominatorValue,\n    uint256 requestingFeeInWeiValue,\n    uint256 strongFeeInWeiValue,\n    uint256 recurringFeeInWeiValue,\n    uint256 recurringNaaSFeeInWeiValue,\n    uint256 recurringPaymentCycleInBlocksValue,\n    uint256 claimingFeeNumeratorValue,\n    uint256 claimingFeeDenominatorValue,\n    string memory desc\n  ) public {\n    require(!initDone, \u0027init done\u0027);\n    strongToken = IERC20(strongTokenAddress);\n    strongPool = StrongPoolInterface(strongPoolAddress);\n    admin = adminAddress;\n    superAdmin = superAdminAddress;\n    rewardPerBlockNumerator = rewardPerBlockNumeratorValue;\n    rewardPerBlockDenominator = rewardPerBlockDenominatorValue;\n    naasRewardPerBlockNumerator = naasRewardPerBlockNumeratorValue;\n    naasRewardPerBlockDenominator = naasRewardPerBlockDenominatorValue;\n    requestingFeeInWei = requestingFeeInWeiValue;\n    strongFeeInWei = strongFeeInWeiValue;\n    recurringFeeInWei = recurringFeeInWeiValue;\n    recurringNaaSFeeInWei = recurringNaaSFeeInWeiValue;\n    claimingFeeNumerator = claimingFeeNumeratorValue;\n    claimingFeeDenominator = claimingFeeDenominatorValue;\n    recurringPaymentCycleInBlocks = recurringPaymentCycleInBlocksValue;\n    desciption = desc;\n    initDone = true;\n  }\n\n  // ADMIN\n  // *************************************************************************************\n\n  function updateServiceAdmin(address newServiceAdmin) public {\n    require(msg.sender == superAdmin);\n    serviceAdmin = newServiceAdmin;\n  }\n\n  function updateParameterAdmin(address newParameterAdmin) public {\n    require(newParameterAdmin != address(0), \u0027zero\u0027);\n    require(msg.sender == superAdmin);\n    parameterAdmin = newParameterAdmin;\n  }\n\n  function updateFeeCollector(address payable newFeeCollector) public {\n    require(newFeeCollector != address(0), \u0027zero\u0027);\n    require(msg.sender == superAdmin);\n    feeCollector = newFeeCollector;\n  }\n\n  function setPendingAdmin(address newPendingAdmin) public {\n    require(msg.sender == admin, \u0027not admin\u0027);\n    pendingAdmin = newPendingAdmin;\n  }\n\n  function acceptAdmin() public {\n    require(msg.sender == pendingAdmin \u0026\u0026 msg.sender != address(0), \u0027not pendingAdmin\u0027);\n    admin = pendingAdmin;\n    pendingAdmin = address(0);\n  }\n\n  function setPendingSuperAdmin(address newPendingSuperAdmin) public {\n    require(msg.sender == superAdmin, \u0027not superAdmin\u0027);\n    pendingSuperAdmin = newPendingSuperAdmin;\n  }\n\n  function acceptSuperAdmin() public {\n    require(msg.sender == pendingSuperAdmin \u0026\u0026 msg.sender != address(0), \u0027not pendingSuperAdmin\u0027);\n    superAdmin = pendingSuperAdmin;\n    pendingSuperAdmin = address(0);\n  }\n\n  // ENTITIES\n  // *************************************************************************************\n\n  function getEntities() public view returns (address[] memory) {\n    return entities;\n  }\n\n  function isEntityActive(address entity) public view returns (bool) {\n    // TODO: Check if node is active (exists and paid the fee)\n    return entityActive[entity] || doesNodeExist(entity, 1);\n  }\n\n  // TRAUNCH\n  // *************************************************************************************\n\n  function updateCurrentTraunch(uint256 value) public {\n    require(msg.sender == admin || msg.sender == parameterAdmin || msg.sender == superAdmin, \u0027not an admin\u0027);\n    currentTraunch = value;\n  }\n\n  function getTraunch(address entity) public view returns (uint256) {\n    return traunch[entity];\n  }\n\n  // REWARD\n  // *************************************************************************************\n\n  function updateRewardPerBlock(uint256 numerator, uint256 denominator) public {\n    require(msg.sender == admin || msg.sender == parameterAdmin || msg.sender == superAdmin, \u0027not an admin\u0027);\n    require(denominator != 0, \u0027invalid value\u0027);\n    rewardPerBlockNumerator = numerator;\n    rewardPerBlockDenominator = denominator;\n  }\n\n  function updateNaaSRewardPerBlock(uint256 numerator, uint256 denominator) public {\n    require(msg.sender == admin || msg.sender == parameterAdmin || msg.sender == superAdmin, \u0027not an admin\u0027);\n    require(denominator != 0, \u0027invalid value\u0027);\n    naasRewardPerBlockNumerator = numerator;\n    naasRewardPerBlockDenominator = denominator;\n  }\n\n  function deposit(uint256 amount) public {\n    require(msg.sender == superAdmin, \u0027not an admin\u0027);\n    require(amount \u003e 0, \u0027zero\u0027);\n    strongToken.transferFrom(msg.sender, address(this), amount);\n    rewardBalance = rewardBalance.add(amount);\n  }\n\n  function withdraw(address destination, uint256 amount) public {\n    require(msg.sender == superAdmin, \u0027not an admin\u0027);\n    require(amount \u003e 0, \u0027zero\u0027);\n    require(rewardBalance \u003e= amount, \u0027not enough\u0027);\n    strongToken.transfer(destination, amount);\n    rewardBalance = rewardBalance.sub(amount);\n  }\n\n  function removeTokens() public {\n    require(!removedTokens, \u0027already removed\u0027);\n    require(msg.sender == superAdmin, \u0027not an admin\u0027);\n    // removing 2500 STRONG tokens sent in this tx: 0xe27640beda32a5e49aad3b6692790b9d380ed25da0cf8dca7fd5f3258efa600a\n    strongToken.transfer(superAdmin, 2500000000000000000000);\n    removedTokens = true;\n  }\n\n  // FEES\n  // *************************************************************************************\n\n  function updateRequestingFee(uint256 feeInWei) public {\n    require(msg.sender == admin || msg.sender == parameterAdmin || msg.sender == superAdmin, \u0027not an admin\u0027);\n    requestingFeeInWei = feeInWei;\n  }\n\n  function updateStrongFee(uint256 feeInWei) public {\n    require(msg.sender == admin || msg.sender == parameterAdmin || msg.sender == superAdmin, \u0027not an admin\u0027);\n    strongFeeInWei = feeInWei;\n  }\n\n  function updateNaasRequestingFee(uint256 feeInWei) public {\n    require(msg.sender == admin || msg.sender == parameterAdmin || msg.sender == superAdmin, \u0027not an admin\u0027);\n    naasRequestingFeeInWei = feeInWei;\n  }\n\n  function updateNaasStrongFee(uint256 feeInWei) public {\n    require(msg.sender == admin || msg.sender == parameterAdmin || msg.sender == superAdmin, \u0027not an admin\u0027);\n    naasStrongFeeInWei = feeInWei;\n  }\n\n  function updateClaimingFee(uint256 numerator, uint256 denominator) public {\n    require(msg.sender == admin || msg.sender == parameterAdmin || msg.sender == superAdmin, \u0027not an admin\u0027);\n    require(denominator != 0, \u0027invalid value\u0027);\n    claimingFeeNumerator = numerator;\n    claimingFeeDenominator = denominator;\n  }\n\n  function updateRecurringFee(uint256 feeInWei) public {\n    require(msg.sender == admin || msg.sender == parameterAdmin || msg.sender == superAdmin, \u0027not an admin\u0027);\n    recurringFeeInWei = feeInWei;\n  }\n\n  function updateRecurringNaaSFee(uint256 feeInWei) public {\n    require(msg.sender == admin || msg.sender == parameterAdmin || msg.sender == superAdmin, \u0027not an admin\u0027);\n    recurringNaaSFeeInWei = feeInWei;\n  }\n\n  function updateRecurringPaymentCycleInBlocks(uint256 blocks) public {\n    require(msg.sender == admin || msg.sender == parameterAdmin || msg.sender == superAdmin, \u0027not an admin\u0027);\n    require(blocks \u003e 0, \u0027zero\u0027);\n    recurringPaymentCycleInBlocks = blocks;\n  }\n\n  // CORE\n  // *************************************************************************************\n\n  function requestAccess(bool isNaaS) public payable {\n    uint256 rFee;\n    uint256 sFee;\n\n    if (hasLegacyNode(msg.sender)) {\n      migrateLegacyNode(msg.sender);\n    }\n\n    uint128 nodeId = entityNodeCount[msg.sender] + 1;\n    bytes memory id = getNodeId(msg.sender, nodeId);\n\n    if (isNaaS) {\n      rFee = naasRequestingFeeInWei;\n      sFee = naasStrongFeeInWei;\n      activeEntities = activeEntities.add(1);\n    } else {\n      rFee = requestingFeeInWei;\n      sFee = strongFeeInWei;\n      entityNodeIsBYON[id] = true;\n    }\n\n    require(msg.value == rFee, \u0027invalid fee\u0027);\n\n    entityNodePaidOnBlock[id] = block.number;\n    entityNodeTraunch[id] = currentTraunch;\n    entityNodeClaimedOnBlock[id] = block.number;\n    entityNodeCount[msg.sender] = entityNodeCount[msg.sender] + 1;\n\n    feeCollector.transfer(msg.value);\n    strongToken.transferFrom(msg.sender, address(this), sFee);\n    strongToken.transfer(feeCollector, sFee);\n\n    emit Paid(msg.sender, nodeId, entityNodeIsBYON[id], false, entityNodePaidOnBlock[id].add(recurringPaymentCycleInBlocks));\n  }\n\n  function setEntityActiveStatus(address entity, bool status) public {\n    require(msg.sender == admin || msg.sender == serviceAdmin || msg.sender == superAdmin, \u0027not admin\u0027);\n    uint256 index = entityIndex[entity];\n    require(entities[index] == entity, \u0027invalid entity\u0027);\n    require(entityActive[entity] != status, \u0027already set\u0027);\n    entityActive[entity] = status;\n    if (status) {\n      activeEntities = activeEntities.add(1);\n      entityBlockLastClaimedOn[entity] = block.number;\n    } else {\n      activeEntities = activeEntities.sub(1);\n      entityBlockLastClaimedOn[entity] = 0;\n    }\n  }\n\n  function setTraunch(address entity, uint256 value) public {\n    require(msg.sender == admin || msg.sender == serviceAdmin || msg.sender == superAdmin, \u0027not admin\u0027);\n\n    traunch[entity] = value;\n  }\n\n  function payFee(uint128 nodeId) public payable {\n    address sender = msg.sender == address(this) ? tx.origin : msg.sender;\n    bytes memory id = getNodeId(sender, nodeId);\n\n    if (hasLegacyNode(sender)) {\n      migrateLegacyNode(sender);\n    }\n\n    require(doesNodeExist(sender, nodeId), \u0027doesnt exist\u0027);\n\n    if (entityNodeIsBYON[id]) {\n      require(msg.value == recurringFeeInWei, \u0027invalid fee\u0027);\n    } else {\n      require(msg.value == recurringNaaSFeeInWei, \u0027invalid fee\u0027);\n    }\n\n    feeCollector.transfer(msg.value);\n    entityNodePaidOnBlock[id] = entityNodePaidOnBlock[id].add(recurringPaymentCycleInBlocks);\n\n    emit Paid(sender, nodeId, entityNodeIsBYON[id], true, entityNodePaidOnBlock[id]);\n  }\n\n  function getReward(address entity, uint128 nodeId) public view returns (uint256) {\n    return getRewardByBlock(entity, nodeId, block.number);\n  }\n\n  function getRewardByBlock(address entity, uint128 nodeId, uint256 blockNumber) public view returns (uint256) {\n    bytes memory id = getNodeId(entity, nodeId);\n\n    if (hasLegacyNode(entity)) {\n      return getRewardByBlockLegacy(entity, blockNumber);\n    }\n\n    uint256 blockLastClaimedOn = entityNodeClaimedOnBlock[id] != 0 ? entityNodeClaimedOnBlock[id] : entityNodePaidOnBlock[id];\n\n    if (blockNumber \u003e block.number) return 0;\n    if (blockLastClaimedOn == 0) return 0;\n    if (blockNumber \u003c blockLastClaimedOn) return 0;\n    if (activeEntities == 0) return 0;\n    if (entityNodeIsBYON[id] \u0026\u0026 !entityNodeIsActive[id]) return 0;\n\n    uint256 blockResult = blockNumber.sub(blockLastClaimedOn);\n    uint256 rewardNumerator;\n    uint256 rewardDenominator;\n\n    if (entityNodeIsBYON[id]) {\n      rewardNumerator = rewardPerBlockNumerator;\n      rewardDenominator = rewardPerBlockDenominator;\n    } else {\n      rewardNumerator = naasRewardPerBlockNumerator;\n      rewardDenominator = naasRewardPerBlockDenominator;\n    }\n\n    uint256 rewardPerBlockResult = blockResult.mul(rewardNumerator).div(rewardDenominator);\n\n    return rewardPerBlockResult;\n  }\n\n  function getRewardByBlockLegacy(address entity, uint256 blockNumber) public view returns (uint256) {\n    if (blockNumber \u003e block.number) return 0;\n    if (entityBlockLastClaimedOn[entity] == 0) return 0;\n    if (blockNumber \u003c entityBlockLastClaimedOn[entity]) return 0;\n    if (activeEntities == 0) return 0;\n    uint256 blockResult = blockNumber.sub(entityBlockLastClaimedOn[entity]);\n    uint256 rewardNumerator;\n    uint256 rewardDenominator;\n    if (entityIsNaaS[entity]) {\n      rewardNumerator = naasRewardPerBlockNumerator;\n      rewardDenominator = naasRewardPerBlockDenominator;\n    } else {\n      rewardNumerator = rewardPerBlockNumerator;\n      rewardDenominator = rewardPerBlockDenominator;\n    }\n    uint256 rewardPerBlockResult = blockResult.mul(rewardNumerator).div(rewardDenominator);\n\n    return rewardPerBlockResult;\n  }\n\n  function claim(uint128 nodeId, uint256 blockNumber, bool toStrongPool) public payable {\n    address sender = msg.sender == address(this) ? tx.origin : msg.sender;\n    bytes memory id = getNodeId(sender, nodeId);\n\n    if (hasLegacyNode(sender)) {\n      migrateLegacyNode(sender);\n    }\n\n    uint256 blockLastClaimedOn = entityNodeClaimedOnBlock[id] != 0 ? entityNodeClaimedOnBlock[id] : entityNodePaidOnBlock[id];\n    uint256 blockLastPaidOn = entityNodePaidOnBlock[id];\n\n    require(blockLastClaimedOn != 0, \u0027never claimed\u0027);\n    require(blockNumber \u003c= block.number, \u0027invalid block\u0027);\n    require(blockNumber \u003e blockLastClaimedOn, \u0027too soon\u0027);\n    require(!entityNodeIsBYON[id] || entityNodeIsActive[id], \u0027not active\u0027);\n\n    if (\n      (!entityNodeIsBYON[id] \u0026\u0026 recurringNaaSFeeInWei != 0) || (entityNodeIsBYON[id] \u0026\u0026 recurringFeeInWei != 0)\n    ) {\n      require(blockNumber \u003c blockLastPaidOn.add(recurringPaymentCycleInBlocks), \u0027pay fee\u0027);\n    }\n\n    uint256 reward = getRewardByBlock(sender, nodeId, blockNumber);\n    require(reward \u003e 0, \u0027no reward\u0027);\n\n    uint256 fee = reward.mul(claimingFeeNumerator).div(claimingFeeDenominator);\n    require(msg.value \u003e= fee, \u0027invalid fee\u0027);\n\n    feeCollector.transfer(msg.value);\n\n    if (toStrongPool) {\n      strongToken.approve(address(strongPool), reward);\n      strongPool.mineFor(sender, reward);\n    } else {\n      strongToken.transfer(sender, reward);\n    }\n\n    rewardBalance = rewardBalance.sub(reward);\n    entityNodeClaimedOnBlock[id] = blockNumber;\n    emit Claimed(sender, reward);\n  }\n\n  function getRewardAll(address entity, uint256 blockNumber) public view returns (uint256) {\n    uint256 rewardsAll = 0;\n\n    for (uint128 i = 1; i \u003c= entityNodeCount[entity]; i++) {\n      rewardsAll = rewardsAll.add(getRewardByBlock(entity, i, blockNumber \u003e 0 ? blockNumber : block.number));\n    }\n\n    return rewardsAll;\n  }\n\n  function doesNodeExist(address entity, uint128 nodeId) public view returns (bool) {\n    bytes memory id = getNodeId(entity, nodeId);\n    return entityNodePaidOnBlock[id] \u003e 0;\n  }\n\n  function getNodeId(address entity, uint128 nodeId) public view returns (bytes memory) {\n    uint128 id = nodeId != 0 ? nodeId : entityNodeCount[entity] + 1;\n    return abi.encodePacked(entity, id);\n  }\n\n  function getNodePaidOn(address entity, uint128 nodeId) public view returns (uint256) {\n    bytes memory id = getNodeId(entity, nodeId);\n    return entityNodePaidOnBlock[id];\n  }\n\n  function getNodeFee(address entity, uint128 nodeId) public view returns (uint256) {\n    bytes memory id = getNodeId(entity, nodeId);\n    return entityNodeIsBYON[id] ? recurringFeeInWei : recurringNaaSFeeInWei;\n  }\n\n  function isNodeActive(address entity, uint128 nodeId) public view returns (bool) {\n    bytes memory id = getNodeId(entity, nodeId);\n    return entityNodeIsActive[id] || !entityNodeIsBYON[id];\n  }\n\n  function isNodeBYON(address entity, uint128 nodeId) public view returns (bool) {\n    bytes memory id = getNodeId(entity, nodeId);\n    return entityNodeIsBYON[id];\n  }\n\n  function hasLegacyNode(address entity) public view returns (bool) {\n    return entityActive[entity] \u0026\u0026 entityNodeCount[entity] == 0;\n  }\n\n  function approveBYONNode(address entity, uint128 nodeId) public {\n    require(msg.sender == admin || msg.sender == serviceAdmin || msg.sender == superAdmin, \u0027not admin\u0027);\n\n    bytes memory id = getNodeId(entity, nodeId);\n    entityNodeIsActive[id] = true;\n    entityNodeClaimedOnBlock[id] = block.number;\n    activeEntities = activeEntities.add(1);\n  }\n\n  function suspendBYONNode(address entity, uint128 nodeId) public {\n    require(msg.sender == admin || msg.sender == serviceAdmin || msg.sender == superAdmin, \u0027not admin\u0027);\n\n    bytes memory id = getNodeId(entity, nodeId);\n    entityNodeIsActive[id] = false;\n    activeEntities = activeEntities.sub(1);\n  }\n\n  function setNodeIsActive(address entity, uint128 nodeId, bool isActive) public {\n    require(msg.sender == admin || msg.sender == serviceAdmin || msg.sender == superAdmin, \u0027not admin\u0027);\n    bytes memory id = getNodeId(entity, nodeId);\n\n    if (isActive \u0026\u0026 !entityNodeIsActive[id]) {\n      activeEntities = activeEntities.add(1);\n      entityNodeClaimedOnBlock[id] = block.number;\n    }\n\n    if (!isActive \u0026\u0026 entityNodeIsActive[id]) {\n      activeEntities = activeEntities.sub(1);\n    }\n\n    entityNodeIsActive[id] = isActive;\n  }\n\n  function setNodeIsNaaS(address entity, uint128 nodeId, bool isNaaS) public {\n    require(msg.sender == admin || msg.sender == serviceAdmin || msg.sender == superAdmin, \u0027not admin\u0027);\n    bytes memory id = getNodeId(entity, nodeId);\n\n    entityNodeIsBYON[id] = !isNaaS;\n  }\n\n  function migrateLegacyNode(address entity) private {\n    bytes memory id = getNodeId(entity, 1);\n    entityNodeClaimedOnBlock[id] = entityBlockLastClaimedOn[entity];\n    entityNodePaidOnBlock[id] = paidOnBlock[entity];\n    entityNodeTraunch[id] = traunch[entity];\n    entityNodeIsBYON[id] = !entityIsNaaS[entity];\n    if (entityNodeIsBYON[id]) {\n      entityNodeIsActive[id] = true;\n    }\n    entityNodeCount[msg.sender] = 1;\n  }\n\n  function migrateNode(uint128 nodeId, address to) public {\n    if (hasLegacyNode(msg.sender)) {\n      migrateLegacyNode(msg.sender);\n    }\n\n    require(doesNodeExist(msg.sender, nodeId), \u0027doesnt exist\u0027);\n\n    uint128 toNodeId = entityNodeCount[to] + 1;\n    bytes memory fromId = getNodeId(msg.sender, nodeId);\n    bytes memory toId = getNodeId(to, toNodeId);\n\n    // move node to another address\n    entityNodeIsActive[toId] = entityNodeIsActive[fromId];\n    entityNodeIsBYON[toId] = entityNodeIsBYON[fromId];\n    entityNodePaidOnBlock[toId] = entityNodePaidOnBlock[fromId];\n    entityNodeClaimedOnBlock[toId] = entityNodeClaimedOnBlock[fromId];\n    entityNodeTraunch[toId] = entityNodeTraunch[fromId];\n    entityNodeCount[to] = entityNodeCount[to] + 1;\n\n    // deactivate node\n    entityNodeIsActive[fromId] = false;\n    entityNodePaidOnBlock[fromId] = 0;\n    entityNodeClaimedOnBlock[fromId] = 0;\n    entityNodeCount[msg.sender] = entityNodeCount[msg.sender] - 1;\n\n    emit Migrated(msg.sender, to, nodeId, toNodeId, entityNodeIsBYON[fromId]);\n  }\n\n  function claimAll(uint256 blockNumber, bool toStrongPool) public payable {\n    for (uint16 i = 1; i \u003c= entityNodeCount[msg.sender]; i++) {\n      uint256 reward = getRewardByBlock(msg.sender, i, blockNumber);\n      uint256 fee = reward.mul(claimingFeeNumerator).div(claimingFeeDenominator);\n      this.claim{ value: fee }(i, blockNumber, toStrongPool);\n    }\n  }\n\n  function payAll() public payable {\n    for (uint16 i = 1; i \u003c= entityNodeCount[msg.sender]; i++) {\n      bytes memory id = getNodeId(msg.sender, i);\n      uint256 fee = entityNodeIsBYON[id] ? recurringFeeInWei : recurringNaaSFeeInWei;\n      this.payFee{ value: fee }(i);\n    }\n  }\n}\n"},"StrongPoolInterface.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.6.12;\n\ninterface StrongPoolInterface {\n  function mineFor(address miner, uint256 amount) external;\n}\n"}}