BERA Price: $3.65 (-0.79%)

Contract

0xFd88aD4849BA0F729D6fF4bC27Ff948Ab1Ac3dE7

Overview

BERA Balance

Berachain LogoBerachain LogoBerachain Logo0.01367020581775208 BERA

BERA Value

$0.05 (@ $3.65/BERA)

Token Holdings

Multichain Info

1 address found via
Transaction Hash
Method
Block
From
To
Swap40894082025-04-23 14:15:5122 secs ago1745417751IN
Ooga Booga: Aggregator
7.030227 BERA0.000029290.15
Swap40894072025-04-23 14:15:4924 secs ago1745417749IN
Ooga Booga: Aggregator
0 BERA0.00008510.15
Swap40894062025-04-23 14:15:4726 secs ago1745417747IN
Ooga Booga: Aggregator
0 BERA0.000593560.5
Swap40894042025-04-23 14:15:4330 secs ago1745417743IN
Ooga Booga: Aggregator
22 BERA0.000090430.5
Swap40894042025-04-23 14:15:4330 secs ago1745417743IN
Ooga Booga: Aggregator
0 BERA0.000131960.5
Swap40893932025-04-23 14:15:2251 secs ago1745417722IN
Ooga Booga: Aggregator
0 BERA0.000034140.15
Swap40893872025-04-23 14:15:101 min ago1745417710IN
Ooga Booga: Aggregator
0 BERA0.000008330.05
Swap40893782025-04-23 14:14:521 min ago1745417692IN
Ooga Booga: Aggregator
0 BERA0.000015190.05
Swap40893772025-04-23 14:14:501 min ago1745417690IN
Ooga Booga: Aggregator
0 BERA00.000001
Swap40893682025-04-23 14:14:321 min ago1745417672IN
Ooga Booga: Aggregator
0 BERA00.00000005
Swap40893672025-04-23 14:14:301 min ago1745417670IN
Ooga Booga: Aggregator
0 BERA0.000044330.18113377
Swap40893562025-04-23 14:14:092 mins ago1745417649IN
Ooga Booga: Aggregator
11.29 BERA0.000019980.07474274
Swap40893452025-04-23 14:13:472 mins ago1745417627IN
Ooga Booga: Aggregator
0 BERA0.000145240.5
Swap40893422025-04-23 14:13:412 mins ago1745417621IN
Ooga Booga: Aggregator
610 BERA0.000000230.0005
Swap40893382025-04-23 14:13:342 mins ago1745417614IN
Ooga Booga: Aggregator
0 BERA0.000008330.05
Swap40893362025-04-23 14:13:302 mins ago1745417610IN
Ooga Booga: Aggregator
0 BERA0.000000090.000501
Swap40893282025-04-23 14:13:133 mins ago1745417593IN
Ooga Booga: Aggregator
0 BERA0.000015190.05000001
Swap40893262025-04-23 14:13:103 mins ago1745417590IN
Ooga Booga: Aggregator
0 BERA0.000077150.15000001
Swap40893222025-04-23 14:13:013 mins ago1745417581IN
Ooga Booga: Aggregator
0 BERA00.0000001
Swap40893222025-04-23 14:13:013 mins ago1745417581IN
Ooga Booga: Aggregator
0 BERA0.000000080.00053584
Swap40893182025-04-23 14:12:543 mins ago1745417574IN
Ooga Booga: Aggregator
0 BERA0.000058450.15000001
Swap40893132025-04-23 14:12:453 mins ago1745417565IN
Ooga Booga: Aggregator
0 BERA0.000158830.16795721
Swap40893122025-04-23 14:12:433 mins ago1745417563IN
Ooga Booga: Aggregator
0 BERA0.000177350.15000001
Swap40893102025-04-23 14:12:383 mins ago1745417558IN
Ooga Booga: Aggregator
0 BERA0.000057150.07328968
Swap40893052025-04-23 14:12:273 mins ago1745417547IN
Ooga Booga: Aggregator
0 BERA0.000089760.17527436
VIEW ADVANCED FILTER

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
40894082025-04-23 14:15:5121 secs ago1745417751
Ooga Booga: Aggregator
7.030227 BERA
40894042025-04-23 14:15:4329 secs ago1745417743
Ooga Booga: Aggregator
22 BERA
40893772025-04-23 14:14:501 min ago1745417690
Ooga Booga: Aggregator
527.15128679 BERA
40893772025-04-23 14:14:501 min ago1745417690
Ooga Booga: Aggregator
527.15128679 BERA
40893682025-04-23 14:14:321 min ago1745417672
Ooga Booga: Aggregator
527.14960661 BERA
40893672025-04-23 14:14:301 min ago1745417670
Ooga Booga: Aggregator
158.18225421 BERA
40893672025-04-23 14:14:301 min ago1745417670
Ooga Booga: Aggregator
158.18225421 BERA
40893562025-04-23 14:14:092 mins ago1745417649
Ooga Booga: Aggregator
11.29 BERA
40893422025-04-23 14:13:412 mins ago1745417621
Ooga Booga: Aggregator
610 BERA
40893422025-04-23 14:13:412 mins ago1745417621
Ooga Booga: Aggregator
0.00000008 BERA
40893422025-04-23 14:13:412 mins ago1745417621
Ooga Booga: Aggregator
0.00000008 BERA
40893402025-04-23 14:13:372 mins ago1745417617
Ooga Booga: Aggregator
0.001 BERA
40893402025-04-23 14:13:372 mins ago1745417617
Ooga Booga: Aggregator
0.001 BERA
40893362025-04-23 14:13:302 mins ago1745417610
Ooga Booga: Aggregator
906.83838125 BERA
40893362025-04-23 14:13:302 mins ago1745417610
Ooga Booga: Aggregator
906.83838125 BERA
40893222025-04-23 14:13:013 mins ago1745417581
Ooga Booga: Aggregator
5.81675596 BERA
40893222025-04-23 14:13:013 mins ago1745417581
Ooga Booga: Aggregator
5.81675596 BERA
40893022025-04-23 14:12:213 mins ago1745417541
Ooga Booga: Aggregator
31.99807751 BERA
40893022025-04-23 14:12:213 mins ago1745417541
Ooga Booga: Aggregator
31.99807751 BERA
40892762025-04-23 14:11:314 mins ago1745417491
Ooga Booga: Aggregator
0.2994 BERA
40892762025-04-23 14:11:314 mins ago1745417491
Ooga Booga: Aggregator
0.2994 BERA
40892562025-04-23 14:10:505 mins ago1745417450
Ooga Booga: Aggregator
1.203459 BERA
40892562025-04-23 14:10:505 mins ago1745417450
Ooga Booga: Aggregator
1.203459 BERA
40892542025-04-23 14:10:465 mins ago1745417446
Ooga Booga: Aggregator
0.1 BERA
40892542025-04-23 14:10:465 mins ago1745417446
Ooga Booga: Aggregator
0.1 BERA
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OBRouter

Compiler Version
v0.8.27+commit.40a35a09

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion, GNU AGPLv3 license

Contract Source Code (Solidity)

/**
 *Submitted for verification at berascan.com on 2025-02-08
*/

// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.17 ^0.8.20 ^0.8.27;

// contracts/OnlyApproved.sol

abstract contract OnlyApproved {
    error NotApprovedAddress(address caller);

    mapping(address => bool) private approved;

    modifier onlyApproved() {
        if (!approved[msg.sender]) {
            revert NotApprovedAddress(msg.sender);
        }
        _;
    }

    function _addApprovedAddress(address _address) internal {
        approved[_address] = true;
    }

    function _removeApprovedAddress(address _address) internal {
        approved[_address] = false;
    }

    function isApproved(address _address) external view returns (bool) {
        return approved[_address];
    }
}

// contracts/interfaces/IOBExecutor.sol

interface IOBExecutor {
    /// @notice Processes the route generated off-chain. Has a lock
    /// @param route Encoded call path
    function executePath(bytes calldata route) external payable;
}

// contracts/interfaces/IOBRouter.sol

interface IOBRouter {
    /// @dev Contains all information needed to describe the input and output for a swap
    struct permit2Info {
        address contractAddress;
        uint256 nonce;
        uint256 deadline;
        bytes signature;
    }

    /// @dev Contains all information needed to describe the input and output for a swap
    struct swapTokenInfo {
        address inputToken;
        uint256 inputAmount;
        address outputToken;
        uint256 outputQuote;
        uint256 outputMin;
        address outputReceiver;
    }

    /// @dev event for swapping one token for another
    event Swap(
        address indexed sender,
        uint256 inputAmount,
        address indexed inputToken,
        uint256 amountOut,
        address indexed outputToken,
        int256 slippage,
        uint32 referralCode,
        address to
    );

    /// @dev Holds all information for a given referral
    struct referralInfo {
        uint64 referralFee;
        address beneficiary;
        bool registered;
    }

    /// @dev throws when msg.value is not equal to swapTokenInfo.inputAmount
    error NativeDepositValueMismatch(uint256 expected, uint256 received);
    /// @dev throws when outputMin is greater than outputQuote in swap parameters
    error MinimumOutputGreaterThanQuote(uint256 outputMin, uint256 outputQuote);
    /// @dev throws when outputMin is zero
    error MinimumOutputIsZero();
    /// @dev throws when inputToken is equal to outputToken
    error SameTokenInAndOut(address token);
    /// @dev throws when outputAmount is less than outputMin
    error SlippageExceeded(uint256 amountOut, uint256 outputMin);
    /// @dev throws when trying to register an already registered referral code
    error ReferralCodeInUse(uint32 referralCode);
    /// @dev throws when fees set to referral code is too high
    error FeeTooHigh(uint64 fee);
    /// @dev throws when fee set is not accepted in the referralCode range
    error InvalidFeeForCode(uint64 fee);
    /// @dev throws when beneficiary is null when fee is set
    error NullBeneficiary();
    /// @dev throws when paramters for transferRouterFunds are invalid
    error InvalidRouterFundsTransfer();
    /// @dev throws when native value is deposited on an ERC20 swap
    error InvalidNativeValueDepositOnERC20Swap();

    /// @notice Externally facing interface for swapping two tokens
    /// @param tokenInfo All information about the tokens being swapped
    /// @param pathDefinition Encoded path definition for executor
    /// @param executor Address of contract that will execute the path
    /// @param referralCode referral code to specify the source of the swap

    function swap(swapTokenInfo memory tokenInfo, bytes calldata pathDefinition, address executor, uint32 referralCode)
        external
        payable
        returns (uint256 amountOut);

    /// @notice Externally facing interface for swapping two tokens
    /// @param permit2 All additional info for Permit2 transfers
    /// @param tokenInfo All information about the tokens being swapped
    /// @param pathDefinition Encoded path definition for executor
    /// @param executor Address of contract that will execute the path
    /// @param referralCode referral code to specify the source of the swap
    function swapPermit2(
        permit2Info memory permit2,
        swapTokenInfo memory tokenInfo,
        bytes calldata pathDefinition,
        address executor,
        uint32 referralCode
    ) external returns (uint256 amountOut);
}

// contracts/interfaces/ISignatureTransfer.sol

/// @title SignatureTransfer
/// @notice Handles ERC20 token transfers through signature based actions
/// @dev Requires user's token approval on the Permit2 contract
interface ISignatureTransfer {
    /// @notice Thrown when the requested amount for a transfer is larger than the permissioned amount
    /// @param maxAmount The maximum amount a spender can request to transfer
    error InvalidAmount(uint256 maxAmount);

    /// @notice Thrown when the number of tokens permissioned to a spender does not match the number of tokens being transferred
    /// @dev If the spender does not need to transfer the number of tokens permitted, the spender can request amount 0 to be transferred
    error LengthMismatch();

    /// @notice Emits an event when the owner successfully invalidates an unordered nonce.
    event UnorderedNonceInvalidation(address indexed owner, uint256 word, uint256 mask);

    /// @notice The token and amount details for a transfer signed in the permit transfer signature
    struct TokenPermissions {
        // ERC20 token address
        address token;
        // the maximum amount that can be spent
        uint256 amount;
    }

    /// @notice The signed permit message for a single token transfer
    struct PermitTransferFrom {
        TokenPermissions permitted;
        // a unique value for every token owner's signature to prevent signature replays
        uint256 nonce;
        // deadline on the permit signature
        uint256 deadline;
    }

    /// @notice Specifies the recipient address and amount for batched transfers.
    /// @dev Recipients and amounts correspond to the index of the signed token permissions array.
    /// @dev Reverts if the requested amount is greater than the permitted signed amount.
    struct SignatureTransferDetails {
        // recipient address
        address to;
        // spender requested amount
        uint256 requestedAmount;
    }

    /// @notice Used to reconstruct the signed permit message for multiple token transfers
    /// @dev Do not need to pass in spender address as it is required that it is msg.sender
    /// @dev Note that a user still signs over a spender address
    struct PermitBatchTransferFrom {
        // the tokens and corresponding amounts permitted for a transfer
        TokenPermissions[] permitted;
        // a unique value for every token owner's signature to prevent signature replays
        uint256 nonce;
        // deadline on the permit signature
        uint256 deadline;
    }

    /// @notice A map from token owner address and a caller specified word index to a bitmap. Used to set bits in the bitmap to prevent against signature replay protection
    /// @dev Uses unordered nonces so that permit messages do not need to be spent in a certain order
    /// @dev The mapping is indexed first by the token owner, then by an index specified in the nonce
    /// @dev It returns a uint256 bitmap
    /// @dev The index, or wordPosition is capped at type(uint248).max
    function nonceBitmap(address, uint256) external view returns (uint256);

    /// @notice Transfers a token using a signed permit message
    /// @dev Reverts if the requested amount is greater than the permitted signed amount
    /// @param permit The permit data signed over by the owner
    /// @param owner The owner of the tokens to transfer
    /// @param transferDetails The spender's requested transfer details for the permitted token
    /// @param signature The signature to verify
    function permitTransferFrom(
        PermitTransferFrom memory permit,
        SignatureTransferDetails calldata transferDetails,
        address owner,
        bytes calldata signature
    ) external;

    /// @notice Transfers a token using a signed permit message
    /// @notice Includes extra data provided by the caller to verify signature over
    /// @dev The witness type string must follow EIP712 ordering of nested structs and must include the TokenPermissions type definition
    /// @dev Reverts if the requested amount is greater than the permitted signed amount
    /// @param permit The permit data signed over by the owner
    /// @param owner The owner of the tokens to transfer
    /// @param transferDetails The spender's requested transfer details for the permitted token
    /// @param witness Extra data to include when checking the user signature
    /// @param witnessTypeString The EIP-712 type definition for remaining string stub of the typehash
    /// @param signature The signature to verify
    function permitWitnessTransferFrom(
        PermitTransferFrom memory permit,
        SignatureTransferDetails calldata transferDetails,
        address owner,
        bytes32 witness,
        string calldata witnessTypeString,
        bytes calldata signature
    ) external;

    /// @notice Transfers multiple tokens using a signed permit message
    /// @param permit The permit data signed over by the owner
    /// @param owner The owner of the tokens to transfer
    /// @param transferDetails Specifies the recipient and requested amount for the token transfer
    /// @param signature The signature to verify
    function permitTransferFrom(
        PermitBatchTransferFrom memory permit,
        SignatureTransferDetails[] calldata transferDetails,
        address owner,
        bytes calldata signature
    ) external;

    /// @notice Transfers multiple tokens using a signed permit message
    /// @dev The witness type string must follow EIP712 ordering of nested structs and must include the TokenPermissions type definition
    /// @notice Includes extra data provided by the caller to verify signature over
    /// @param permit The permit data signed over by the owner
    /// @param owner The owner of the tokens to transfer
    /// @param transferDetails Specifies the recipient and requested amount for the token transfer
    /// @param witness Extra data to include when checking the user signature
    /// @param witnessTypeString The EIP-712 type definition for remaining string stub of the typehash
    /// @param signature The signature to verify
    function permitWitnessTransferFrom(
        PermitBatchTransferFrom memory permit,
        SignatureTransferDetails[] calldata transferDetails,
        address owner,
        bytes32 witness,
        string calldata witnessTypeString,
        bytes calldata signature
    ) external;

    /// @notice Invalidates the bits specified in mask for the bitmap at the word position
    /// @dev The wordPos is maxed at type(uint248).max
    /// @param wordPos A number to index the nonceBitmap at
    /// @param mask A bitmap masked against msg.sender's current bitmap at the word position
    function invalidateUnorderedNonces(uint256 wordPos, uint256 mask) external;
}

// contracts/interfaces/IWETH.sol

interface IWETH {
    function deposit() external payable;

    function transfer(address to, uint256 value) external returns (bool);

    function withdraw(uint256) external;
}

// lib/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol

// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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);

    /**
     * @dev Returns the value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

// lib/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Permit.sol

// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     *
     * CAUTION: See Security Considerations above.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

// lib/openzeppelin-contracts/contracts/utils/Address.sol

// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert FailedInnerCall();
        }
    }
}

// lib/openzeppelin-contracts/contracts/utils/Context.sol

// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

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

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}

// lib/openzeppelin-contracts/contracts/utils/math/SafeCast.sol

// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SafeCast.sol)
// This file was procedurally generated from scripts/generate/templates/SafeCast.js.

/**
 * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
 * checks.
 *
 * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
 * easily result in undesired exploitation or bugs, since developers usually
 * assume that overflows raise errors. `SafeCast` restores this intuition by
 * reverting the transaction when such an operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeCast {
    /**
     * @dev Value doesn't fit in an uint of `bits` size.
     */
    error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value);

    /**
     * @dev An int value doesn't fit in an uint of `bits` size.
     */
    error SafeCastOverflowedIntToUint(int256 value);

    /**
     * @dev Value doesn't fit in an int of `bits` size.
     */
    error SafeCastOverflowedIntDowncast(uint8 bits, int256 value);

    /**
     * @dev An uint value doesn't fit in an int of `bits` size.
     */
    error SafeCastOverflowedUintToInt(uint256 value);

    /**
     * @dev Returns the downcasted uint248 from uint256, reverting on
     * overflow (when the input is greater than largest uint248).
     *
     * Counterpart to Solidity's `uint248` operator.
     *
     * Requirements:
     *
     * - input must fit into 248 bits
     */
    function toUint248(uint256 value) internal pure returns (uint248) {
        if (value > type(uint248).max) {
            revert SafeCastOverflowedUintDowncast(248, value);
        }
        return uint248(value);
    }

    /**
     * @dev Returns the downcasted uint240 from uint256, reverting on
     * overflow (when the input is greater than largest uint240).
     *
     * Counterpart to Solidity's `uint240` operator.
     *
     * Requirements:
     *
     * - input must fit into 240 bits
     */
    function toUint240(uint256 value) internal pure returns (uint240) {
        if (value > type(uint240).max) {
            revert SafeCastOverflowedUintDowncast(240, value);
        }
        return uint240(value);
    }

    /**
     * @dev Returns the downcasted uint232 from uint256, reverting on
     * overflow (when the input is greater than largest uint232).
     *
     * Counterpart to Solidity's `uint232` operator.
     *
     * Requirements:
     *
     * - input must fit into 232 bits
     */
    function toUint232(uint256 value) internal pure returns (uint232) {
        if (value > type(uint232).max) {
            revert SafeCastOverflowedUintDowncast(232, value);
        }
        return uint232(value);
    }

    /**
     * @dev Returns the downcasted uint224 from uint256, reverting on
     * overflow (when the input is greater than largest uint224).
     *
     * Counterpart to Solidity's `uint224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     */
    function toUint224(uint256 value) internal pure returns (uint224) {
        if (value > type(uint224).max) {
            revert SafeCastOverflowedUintDowncast(224, value);
        }
        return uint224(value);
    }

    /**
     * @dev Returns the downcasted uint216 from uint256, reverting on
     * overflow (when the input is greater than largest uint216).
     *
     * Counterpart to Solidity's `uint216` operator.
     *
     * Requirements:
     *
     * - input must fit into 216 bits
     */
    function toUint216(uint256 value) internal pure returns (uint216) {
        if (value > type(uint216).max) {
            revert SafeCastOverflowedUintDowncast(216, value);
        }
        return uint216(value);
    }

    /**
     * @dev Returns the downcasted uint208 from uint256, reverting on
     * overflow (when the input is greater than largest uint208).
     *
     * Counterpart to Solidity's `uint208` operator.
     *
     * Requirements:
     *
     * - input must fit into 208 bits
     */
    function toUint208(uint256 value) internal pure returns (uint208) {
        if (value > type(uint208).max) {
            revert SafeCastOverflowedUintDowncast(208, value);
        }
        return uint208(value);
    }

    /**
     * @dev Returns the downcasted uint200 from uint256, reverting on
     * overflow (when the input is greater than largest uint200).
     *
     * Counterpart to Solidity's `uint200` operator.
     *
     * Requirements:
     *
     * - input must fit into 200 bits
     */
    function toUint200(uint256 value) internal pure returns (uint200) {
        if (value > type(uint200).max) {
            revert SafeCastOverflowedUintDowncast(200, value);
        }
        return uint200(value);
    }

    /**
     * @dev Returns the downcasted uint192 from uint256, reverting on
     * overflow (when the input is greater than largest uint192).
     *
     * Counterpart to Solidity's `uint192` operator.
     *
     * Requirements:
     *
     * - input must fit into 192 bits
     */
    function toUint192(uint256 value) internal pure returns (uint192) {
        if (value > type(uint192).max) {
            revert SafeCastOverflowedUintDowncast(192, value);
        }
        return uint192(value);
    }

    /**
     * @dev Returns the downcasted uint184 from uint256, reverting on
     * overflow (when the input is greater than largest uint184).
     *
     * Counterpart to Solidity's `uint184` operator.
     *
     * Requirements:
     *
     * - input must fit into 184 bits
     */
    function toUint184(uint256 value) internal pure returns (uint184) {
        if (value > type(uint184).max) {
            revert SafeCastOverflowedUintDowncast(184, value);
        }
        return uint184(value);
    }

    /**
     * @dev Returns the downcasted uint176 from uint256, reverting on
     * overflow (when the input is greater than largest uint176).
     *
     * Counterpart to Solidity's `uint176` operator.
     *
     * Requirements:
     *
     * - input must fit into 176 bits
     */
    function toUint176(uint256 value) internal pure returns (uint176) {
        if (value > type(uint176).max) {
            revert SafeCastOverflowedUintDowncast(176, value);
        }
        return uint176(value);
    }

    /**
     * @dev Returns the downcasted uint168 from uint256, reverting on
     * overflow (when the input is greater than largest uint168).
     *
     * Counterpart to Solidity's `uint168` operator.
     *
     * Requirements:
     *
     * - input must fit into 168 bits
     */
    function toUint168(uint256 value) internal pure returns (uint168) {
        if (value > type(uint168).max) {
            revert SafeCastOverflowedUintDowncast(168, value);
        }
        return uint168(value);
    }

    /**
     * @dev Returns the downcasted uint160 from uint256, reverting on
     * overflow (when the input is greater than largest uint160).
     *
     * Counterpart to Solidity's `uint160` operator.
     *
     * Requirements:
     *
     * - input must fit into 160 bits
     */
    function toUint160(uint256 value) internal pure returns (uint160) {
        if (value > type(uint160).max) {
            revert SafeCastOverflowedUintDowncast(160, value);
        }
        return uint160(value);
    }

    /**
     * @dev Returns the downcasted uint152 from uint256, reverting on
     * overflow (when the input is greater than largest uint152).
     *
     * Counterpart to Solidity's `uint152` operator.
     *
     * Requirements:
     *
     * - input must fit into 152 bits
     */
    function toUint152(uint256 value) internal pure returns (uint152) {
        if (value > type(uint152).max) {
            revert SafeCastOverflowedUintDowncast(152, value);
        }
        return uint152(value);
    }

    /**
     * @dev Returns the downcasted uint144 from uint256, reverting on
     * overflow (when the input is greater than largest uint144).
     *
     * Counterpart to Solidity's `uint144` operator.
     *
     * Requirements:
     *
     * - input must fit into 144 bits
     */
    function toUint144(uint256 value) internal pure returns (uint144) {
        if (value > type(uint144).max) {
            revert SafeCastOverflowedUintDowncast(144, value);
        }
        return uint144(value);
    }

    /**
     * @dev Returns the downcasted uint136 from uint256, reverting on
     * overflow (when the input is greater than largest uint136).
     *
     * Counterpart to Solidity's `uint136` operator.
     *
     * Requirements:
     *
     * - input must fit into 136 bits
     */
    function toUint136(uint256 value) internal pure returns (uint136) {
        if (value > type(uint136).max) {
            revert SafeCastOverflowedUintDowncast(136, value);
        }
        return uint136(value);
    }

    /**
     * @dev Returns the downcasted uint128 from uint256, reverting on
     * overflow (when the input is greater than largest uint128).
     *
     * Counterpart to Solidity's `uint128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toUint128(uint256 value) internal pure returns (uint128) {
        if (value > type(uint128).max) {
            revert SafeCastOverflowedUintDowncast(128, value);
        }
        return uint128(value);
    }

    /**
     * @dev Returns the downcasted uint120 from uint256, reverting on
     * overflow (when the input is greater than largest uint120).
     *
     * Counterpart to Solidity's `uint120` operator.
     *
     * Requirements:
     *
     * - input must fit into 120 bits
     */
    function toUint120(uint256 value) internal pure returns (uint120) {
        if (value > type(uint120).max) {
            revert SafeCastOverflowedUintDowncast(120, value);
        }
        return uint120(value);
    }

    /**
     * @dev Returns the downcasted uint112 from uint256, reverting on
     * overflow (when the input is greater than largest uint112).
     *
     * Counterpart to Solidity's `uint112` operator.
     *
     * Requirements:
     *
     * - input must fit into 112 bits
     */
    function toUint112(uint256 value) internal pure returns (uint112) {
        if (value > type(uint112).max) {
            revert SafeCastOverflowedUintDowncast(112, value);
        }
        return uint112(value);
    }

    /**
     * @dev Returns the downcasted uint104 from uint256, reverting on
     * overflow (when the input is greater than largest uint104).
     *
     * Counterpart to Solidity's `uint104` operator.
     *
     * Requirements:
     *
     * - input must fit into 104 bits
     */
    function toUint104(uint256 value) internal pure returns (uint104) {
        if (value > type(uint104).max) {
            revert SafeCastOverflowedUintDowncast(104, value);
        }
        return uint104(value);
    }

    /**
     * @dev Returns the downcasted uint96 from uint256, reverting on
     * overflow (when the input is greater than largest uint96).
     *
     * Counterpart to Solidity's `uint96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     */
    function toUint96(uint256 value) internal pure returns (uint96) {
        if (value > type(uint96).max) {
            revert SafeCastOverflowedUintDowncast(96, value);
        }
        return uint96(value);
    }

    /**
     * @dev Returns the downcasted uint88 from uint256, reverting on
     * overflow (when the input is greater than largest uint88).
     *
     * Counterpart to Solidity's `uint88` operator.
     *
     * Requirements:
     *
     * - input must fit into 88 bits
     */
    function toUint88(uint256 value) internal pure returns (uint88) {
        if (value > type(uint88).max) {
            revert SafeCastOverflowedUintDowncast(88, value);
        }
        return uint88(value);
    }

    /**
     * @dev Returns the downcasted uint80 from uint256, reverting on
     * overflow (when the input is greater than largest uint80).
     *
     * Counterpart to Solidity's `uint80` operator.
     *
     * Requirements:
     *
     * - input must fit into 80 bits
     */
    function toUint80(uint256 value) internal pure returns (uint80) {
        if (value > type(uint80).max) {
            revert SafeCastOverflowedUintDowncast(80, value);
        }
        return uint80(value);
    }

    /**
     * @dev Returns the downcasted uint72 from uint256, reverting on
     * overflow (when the input is greater than largest uint72).
     *
     * Counterpart to Solidity's `uint72` operator.
     *
     * Requirements:
     *
     * - input must fit into 72 bits
     */
    function toUint72(uint256 value) internal pure returns (uint72) {
        if (value > type(uint72).max) {
            revert SafeCastOverflowedUintDowncast(72, value);
        }
        return uint72(value);
    }

    /**
     * @dev Returns the downcasted uint64 from uint256, reverting on
     * overflow (when the input is greater than largest uint64).
     *
     * Counterpart to Solidity's `uint64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toUint64(uint256 value) internal pure returns (uint64) {
        if (value > type(uint64).max) {
            revert SafeCastOverflowedUintDowncast(64, value);
        }
        return uint64(value);
    }

    /**
     * @dev Returns the downcasted uint56 from uint256, reverting on
     * overflow (when the input is greater than largest uint56).
     *
     * Counterpart to Solidity's `uint56` operator.
     *
     * Requirements:
     *
     * - input must fit into 56 bits
     */
    function toUint56(uint256 value) internal pure returns (uint56) {
        if (value > type(uint56).max) {
            revert SafeCastOverflowedUintDowncast(56, value);
        }
        return uint56(value);
    }

    /**
     * @dev Returns the downcasted uint48 from uint256, reverting on
     * overflow (when the input is greater than largest uint48).
     *
     * Counterpart to Solidity's `uint48` operator.
     *
     * Requirements:
     *
     * - input must fit into 48 bits
     */
    function toUint48(uint256 value) internal pure returns (uint48) {
        if (value > type(uint48).max) {
            revert SafeCastOverflowedUintDowncast(48, value);
        }
        return uint48(value);
    }

    /**
     * @dev Returns the downcasted uint40 from uint256, reverting on
     * overflow (when the input is greater than largest uint40).
     *
     * Counterpart to Solidity's `uint40` operator.
     *
     * Requirements:
     *
     * - input must fit into 40 bits
     */
    function toUint40(uint256 value) internal pure returns (uint40) {
        if (value > type(uint40).max) {
            revert SafeCastOverflowedUintDowncast(40, value);
        }
        return uint40(value);
    }

    /**
     * @dev Returns the downcasted uint32 from uint256, reverting on
     * overflow (when the input is greater than largest uint32).
     *
     * Counterpart to Solidity's `uint32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toUint32(uint256 value) internal pure returns (uint32) {
        if (value > type(uint32).max) {
            revert SafeCastOverflowedUintDowncast(32, value);
        }
        return uint32(value);
    }

    /**
     * @dev Returns the downcasted uint24 from uint256, reverting on
     * overflow (when the input is greater than largest uint24).
     *
     * Counterpart to Solidity's `uint24` operator.
     *
     * Requirements:
     *
     * - input must fit into 24 bits
     */
    function toUint24(uint256 value) internal pure returns (uint24) {
        if (value > type(uint24).max) {
            revert SafeCastOverflowedUintDowncast(24, value);
        }
        return uint24(value);
    }

    /**
     * @dev Returns the downcasted uint16 from uint256, reverting on
     * overflow (when the input is greater than largest uint16).
     *
     * Counterpart to Solidity's `uint16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toUint16(uint256 value) internal pure returns (uint16) {
        if (value > type(uint16).max) {
            revert SafeCastOverflowedUintDowncast(16, value);
        }
        return uint16(value);
    }

    /**
     * @dev Returns the downcasted uint8 from uint256, reverting on
     * overflow (when the input is greater than largest uint8).
     *
     * Counterpart to Solidity's `uint8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits
     */
    function toUint8(uint256 value) internal pure returns (uint8) {
        if (value > type(uint8).max) {
            revert SafeCastOverflowedUintDowncast(8, value);
        }
        return uint8(value);
    }

    /**
     * @dev Converts a signed int256 into an unsigned uint256.
     *
     * Requirements:
     *
     * - input must be greater than or equal to 0.
     */
    function toUint256(int256 value) internal pure returns (uint256) {
        if (value < 0) {
            revert SafeCastOverflowedIntToUint(value);
        }
        return uint256(value);
    }

    /**
     * @dev Returns the downcasted int248 from int256, reverting on
     * overflow (when the input is less than smallest int248 or
     * greater than largest int248).
     *
     * Counterpart to Solidity's `int248` operator.
     *
     * Requirements:
     *
     * - input must fit into 248 bits
     */
    function toInt248(int256 value) internal pure returns (int248 downcasted) {
        downcasted = int248(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(248, value);
        }
    }

    /**
     * @dev Returns the downcasted int240 from int256, reverting on
     * overflow (when the input is less than smallest int240 or
     * greater than largest int240).
     *
     * Counterpart to Solidity's `int240` operator.
     *
     * Requirements:
     *
     * - input must fit into 240 bits
     */
    function toInt240(int256 value) internal pure returns (int240 downcasted) {
        downcasted = int240(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(240, value);
        }
    }

    /**
     * @dev Returns the downcasted int232 from int256, reverting on
     * overflow (when the input is less than smallest int232 or
     * greater than largest int232).
     *
     * Counterpart to Solidity's `int232` operator.
     *
     * Requirements:
     *
     * - input must fit into 232 bits
     */
    function toInt232(int256 value) internal pure returns (int232 downcasted) {
        downcasted = int232(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(232, value);
        }
    }

    /**
     * @dev Returns the downcasted int224 from int256, reverting on
     * overflow (when the input is less than smallest int224 or
     * greater than largest int224).
     *
     * Counterpart to Solidity's `int224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     */
    function toInt224(int256 value) internal pure returns (int224 downcasted) {
        downcasted = int224(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(224, value);
        }
    }

    /**
     * @dev Returns the downcasted int216 from int256, reverting on
     * overflow (when the input is less than smallest int216 or
     * greater than largest int216).
     *
     * Counterpart to Solidity's `int216` operator.
     *
     * Requirements:
     *
     * - input must fit into 216 bits
     */
    function toInt216(int256 value) internal pure returns (int216 downcasted) {
        downcasted = int216(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(216, value);
        }
    }

    /**
     * @dev Returns the downcasted int208 from int256, reverting on
     * overflow (when the input is less than smallest int208 or
     * greater than largest int208).
     *
     * Counterpart to Solidity's `int208` operator.
     *
     * Requirements:
     *
     * - input must fit into 208 bits
     */
    function toInt208(int256 value) internal pure returns (int208 downcasted) {
        downcasted = int208(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(208, value);
        }
    }

    /**
     * @dev Returns the downcasted int200 from int256, reverting on
     * overflow (when the input is less than smallest int200 or
     * greater than largest int200).
     *
     * Counterpart to Solidity's `int200` operator.
     *
     * Requirements:
     *
     * - input must fit into 200 bits
     */
    function toInt200(int256 value) internal pure returns (int200 downcasted) {
        downcasted = int200(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(200, value);
        }
    }

    /**
     * @dev Returns the downcasted int192 from int256, reverting on
     * overflow (when the input is less than smallest int192 or
     * greater than largest int192).
     *
     * Counterpart to Solidity's `int192` operator.
     *
     * Requirements:
     *
     * - input must fit into 192 bits
     */
    function toInt192(int256 value) internal pure returns (int192 downcasted) {
        downcasted = int192(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(192, value);
        }
    }

    /**
     * @dev Returns the downcasted int184 from int256, reverting on
     * overflow (when the input is less than smallest int184 or
     * greater than largest int184).
     *
     * Counterpart to Solidity's `int184` operator.
     *
     * Requirements:
     *
     * - input must fit into 184 bits
     */
    function toInt184(int256 value) internal pure returns (int184 downcasted) {
        downcasted = int184(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(184, value);
        }
    }

    /**
     * @dev Returns the downcasted int176 from int256, reverting on
     * overflow (when the input is less than smallest int176 or
     * greater than largest int176).
     *
     * Counterpart to Solidity's `int176` operator.
     *
     * Requirements:
     *
     * - input must fit into 176 bits
     */
    function toInt176(int256 value) internal pure returns (int176 downcasted) {
        downcasted = int176(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(176, value);
        }
    }

    /**
     * @dev Returns the downcasted int168 from int256, reverting on
     * overflow (when the input is less than smallest int168 or
     * greater than largest int168).
     *
     * Counterpart to Solidity's `int168` operator.
     *
     * Requirements:
     *
     * - input must fit into 168 bits
     */
    function toInt168(int256 value) internal pure returns (int168 downcasted) {
        downcasted = int168(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(168, value);
        }
    }

    /**
     * @dev Returns the downcasted int160 from int256, reverting on
     * overflow (when the input is less than smallest int160 or
     * greater than largest int160).
     *
     * Counterpart to Solidity's `int160` operator.
     *
     * Requirements:
     *
     * - input must fit into 160 bits
     */
    function toInt160(int256 value) internal pure returns (int160 downcasted) {
        downcasted = int160(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(160, value);
        }
    }

    /**
     * @dev Returns the downcasted int152 from int256, reverting on
     * overflow (when the input is less than smallest int152 or
     * greater than largest int152).
     *
     * Counterpart to Solidity's `int152` operator.
     *
     * Requirements:
     *
     * - input must fit into 152 bits
     */
    function toInt152(int256 value) internal pure returns (int152 downcasted) {
        downcasted = int152(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(152, value);
        }
    }

    /**
     * @dev Returns the downcasted int144 from int256, reverting on
     * overflow (when the input is less than smallest int144 or
     * greater than largest int144).
     *
     * Counterpart to Solidity's `int144` operator.
     *
     * Requirements:
     *
     * - input must fit into 144 bits
     */
    function toInt144(int256 value) internal pure returns (int144 downcasted) {
        downcasted = int144(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(144, value);
        }
    }

    /**
     * @dev Returns the downcasted int136 from int256, reverting on
     * overflow (when the input is less than smallest int136 or
     * greater than largest int136).
     *
     * Counterpart to Solidity's `int136` operator.
     *
     * Requirements:
     *
     * - input must fit into 136 bits
     */
    function toInt136(int256 value) internal pure returns (int136 downcasted) {
        downcasted = int136(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(136, value);
        }
    }

    /**
     * @dev Returns the downcasted int128 from int256, reverting on
     * overflow (when the input is less than smallest int128 or
     * greater than largest int128).
     *
     * Counterpart to Solidity's `int128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toInt128(int256 value) internal pure returns (int128 downcasted) {
        downcasted = int128(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(128, value);
        }
    }

    /**
     * @dev Returns the downcasted int120 from int256, reverting on
     * overflow (when the input is less than smallest int120 or
     * greater than largest int120).
     *
     * Counterpart to Solidity's `int120` operator.
     *
     * Requirements:
     *
     * - input must fit into 120 bits
     */
    function toInt120(int256 value) internal pure returns (int120 downcasted) {
        downcasted = int120(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(120, value);
        }
    }

    /**
     * @dev Returns the downcasted int112 from int256, reverting on
     * overflow (when the input is less than smallest int112 or
     * greater than largest int112).
     *
     * Counterpart to Solidity's `int112` operator.
     *
     * Requirements:
     *
     * - input must fit into 112 bits
     */
    function toInt112(int256 value) internal pure returns (int112 downcasted) {
        downcasted = int112(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(112, value);
        }
    }

    /**
     * @dev Returns the downcasted int104 from int256, reverting on
     * overflow (when the input is less than smallest int104 or
     * greater than largest int104).
     *
     * Counterpart to Solidity's `int104` operator.
     *
     * Requirements:
     *
     * - input must fit into 104 bits
     */
    function toInt104(int256 value) internal pure returns (int104 downcasted) {
        downcasted = int104(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(104, value);
        }
    }

    /**
     * @dev Returns the downcasted int96 from int256, reverting on
     * overflow (when the input is less than smallest int96 or
     * greater than largest int96).
     *
     * Counterpart to Solidity's `int96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     */
    function toInt96(int256 value) internal pure returns (int96 downcasted) {
        downcasted = int96(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(96, value);
        }
    }

    /**
     * @dev Returns the downcasted int88 from int256, reverting on
     * overflow (when the input is less than smallest int88 or
     * greater than largest int88).
     *
     * Counterpart to Solidity's `int88` operator.
     *
     * Requirements:
     *
     * - input must fit into 88 bits
     */
    function toInt88(int256 value) internal pure returns (int88 downcasted) {
        downcasted = int88(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(88, value);
        }
    }

    /**
     * @dev Returns the downcasted int80 from int256, reverting on
     * overflow (when the input is less than smallest int80 or
     * greater than largest int80).
     *
     * Counterpart to Solidity's `int80` operator.
     *
     * Requirements:
     *
     * - input must fit into 80 bits
     */
    function toInt80(int256 value) internal pure returns (int80 downcasted) {
        downcasted = int80(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(80, value);
        }
    }

    /**
     * @dev Returns the downcasted int72 from int256, reverting on
     * overflow (when the input is less than smallest int72 or
     * greater than largest int72).
     *
     * Counterpart to Solidity's `int72` operator.
     *
     * Requirements:
     *
     * - input must fit into 72 bits
     */
    function toInt72(int256 value) internal pure returns (int72 downcasted) {
        downcasted = int72(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(72, value);
        }
    }

    /**
     * @dev Returns the downcasted int64 from int256, reverting on
     * overflow (when the input is less than smallest int64 or
     * greater than largest int64).
     *
     * Counterpart to Solidity's `int64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toInt64(int256 value) internal pure returns (int64 downcasted) {
        downcasted = int64(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(64, value);
        }
    }

    /**
     * @dev Returns the downcasted int56 from int256, reverting on
     * overflow (when the input is less than smallest int56 or
     * greater than largest int56).
     *
     * Counterpart to Solidity's `int56` operator.
     *
     * Requirements:
     *
     * - input must fit into 56 bits
     */
    function toInt56(int256 value) internal pure returns (int56 downcasted) {
        downcasted = int56(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(56, value);
        }
    }

    /**
     * @dev Returns the downcasted int48 from int256, reverting on
     * overflow (when the input is less than smallest int48 or
     * greater than largest int48).
     *
     * Counterpart to Solidity's `int48` operator.
     *
     * Requirements:
     *
     * - input must fit into 48 bits
     */
    function toInt48(int256 value) internal pure returns (int48 downcasted) {
        downcasted = int48(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(48, value);
        }
    }

    /**
     * @dev Returns the downcasted int40 from int256, reverting on
     * overflow (when the input is less than smallest int40 or
     * greater than largest int40).
     *
     * Counterpart to Solidity's `int40` operator.
     *
     * Requirements:
     *
     * - input must fit into 40 bits
     */
    function toInt40(int256 value) internal pure returns (int40 downcasted) {
        downcasted = int40(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(40, value);
        }
    }

    /**
     * @dev Returns the downcasted int32 from int256, reverting on
     * overflow (when the input is less than smallest int32 or
     * greater than largest int32).
     *
     * Counterpart to Solidity's `int32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toInt32(int256 value) internal pure returns (int32 downcasted) {
        downcasted = int32(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(32, value);
        }
    }

    /**
     * @dev Returns the downcasted int24 from int256, reverting on
     * overflow (when the input is less than smallest int24 or
     * greater than largest int24).
     *
     * Counterpart to Solidity's `int24` operator.
     *
     * Requirements:
     *
     * - input must fit into 24 bits
     */
    function toInt24(int256 value) internal pure returns (int24 downcasted) {
        downcasted = int24(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(24, value);
        }
    }

    /**
     * @dev Returns the downcasted int16 from int256, reverting on
     * overflow (when the input is less than smallest int16 or
     * greater than largest int16).
     *
     * Counterpart to Solidity's `int16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toInt16(int256 value) internal pure returns (int16 downcasted) {
        downcasted = int16(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(16, value);
        }
    }

    /**
     * @dev Returns the downcasted int8 from int256, reverting on
     * overflow (when the input is less than smallest int8 or
     * greater than largest int8).
     *
     * Counterpart to Solidity's `int8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits
     */
    function toInt8(int256 value) internal pure returns (int8 downcasted) {
        downcasted = int8(value);
        if (downcasted != value) {
            revert SafeCastOverflowedIntDowncast(8, value);
        }
    }

    /**
     * @dev Converts an unsigned uint256 into a signed int256.
     *
     * Requirements:
     *
     * - input must be less than or equal to maxInt256.
     */
    function toInt256(uint256 value) internal pure returns (int256) {
        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
        if (value > uint256(type(int256).max)) {
            revert SafeCastOverflowedUintToInt(value);
        }
        return int256(value);
    }
}

// lib/openzeppelin-contracts/contracts/access/Ownable.sol

// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

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

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

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

// lib/openzeppelin-contracts/contracts/utils/Pausable.sol

// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    bool private _paused;

    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

// lib/openzeppelin-contracts/contracts/token/ERC20/utils/SafeERC20.sol

// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

// contracts/TokenHelper.sol

library TokenHelper {
    using SafeERC20 for IERC20;

    error InvalidNativeTransfer();

    /// @dev The zero address is uniquely used to represent native token since it is already
    /// recognized as an invalid ERC20, and due to its gas efficiency
    address constant NATIVE_TOKEN = address(0);

    /// @notice helper function to get balance of ERC20 or native coin for this contract
    /// @param token address of the token to check, null for native coin
    /// @return balance of specified coin or token
    function universalBalance(address token) internal view returns (uint256) {
        if (token == NATIVE_TOKEN) {
            return address(this).balance;
        } else {
            return IERC20(token).balanceOf(address(this));
        }
    }

    /// @notice helper function to transfer ERC20 or native coin
    /// @param token address of the token being transferred, null for native coin
    /// @param to address to transfer to
    /// @param amount to transfer
    function universalTransfer(address token, address to, uint256 amount) internal {
        if (token == NATIVE_TOKEN) {
            (bool success,) = payable(to).call{value: amount}("");
            require(success, InvalidNativeTransfer());
        } else {
            IERC20(token).safeTransfer(to, amount);
        }
    }
}

// contracts/OBRouter.sol

/// @title Routing contract for Ooga Booga SOR
/// @notice Wrapper with security gaurantees around execution of arbitrary operations on user tokens
contract OBRouter is Ownable, Pausable, IOBRouter, OnlyApproved {
    using SafeERC20 for IERC20;
    using TokenHelper for address;
    using SafeCast for uint256;

    // @dev constants for managing referrals and fees
    uint256 public constant REFERRAL_WITH_FEE_THRESHOLD = 1 << 31;
    uint256 public constant FEE_DENOM = 1e18;
    address public immutable WETH;

    /// @dev Register referral fee and information
    mapping(uint32 => referralInfo) public referralLookup;

    /// @dev Set the null referralCode as "Unregistered" with no additional fee
    constructor(address _owner, address _weth) Ownable(_owner) {
        referralLookup[0].referralFee = 0;
        referralLookup[0].beneficiary = address(0);
        referralLookup[0].registered = true;
        WETH = _weth;
        _addApprovedAddress(_owner);
    }

    /// @dev Must exist in order for contract to receive eth
    receive() external payable {}

    /// @dev Pause swap restricted to the owner
    function pause() external onlyOwner {
        _pause();
    }

    /// @dev Unpause swap restricted to the owner
    function unpause() external onlyOwner {
        _unpause();
    }

    /// @notice Externally facing interface for swapping two tokens
    /// @param tokenInfo All information about the tokens being swapped
    /// @param pathDefinition Encoded path definition for executor
    /// @param executor Address of contract that will execute the path
    /// @param referralCode referral code to specify the source of the swap
    function swap(swapTokenInfo memory tokenInfo, bytes calldata pathDefinition, address executor, uint32 referralCode)
        external
        payable
        whenNotPaused
        returns (uint256 amountOut)
    {
        return _swapApproval(tokenInfo, pathDefinition, executor, referralCode);
    }

    /// @notice Internal function for initiating approval transfers
    /// @param tokenInfo All information about the tokens being swapped
    /// @param pathDefinition Encoded path definition for executor
    /// @param executor Address of contract that will execute the path
    /// @param referralCode referral code to specify the source of the swap
    function _swapApproval(
        swapTokenInfo memory tokenInfo,
        bytes calldata pathDefinition,
        address executor,
        uint32 referralCode
    ) internal returns (uint256 amountOut) {
        if (tokenInfo.inputToken == TokenHelper.NATIVE_TOKEN) {
            // Support rebasing tokens by allowing the user to trade the entire balance
            if (tokenInfo.inputAmount == 0) {
                tokenInfo.inputAmount = msg.value;
            } else {
                require(
                    msg.value == tokenInfo.inputAmount, NativeDepositValueMismatch(tokenInfo.inputAmount, msg.value)
                );
            }
        } else {
            require(msg.value == 0, InvalidNativeValueDepositOnERC20Swap());
            // Support rebasing tokens by allowing the user to trade the entire balance
            if (tokenInfo.inputAmount == 0) {
                tokenInfo.inputAmount = IERC20(tokenInfo.inputToken).balanceOf(msg.sender);
            }
            IERC20(tokenInfo.inputToken).safeTransferFrom(msg.sender, executor, tokenInfo.inputAmount);
        }
        return _swap(tokenInfo, pathDefinition, executor, referralCode);
    }

    /// @notice Externally facing interface for swapping two tokens
    /// @param permit2 All additional info for Permit2 transfers
    /// @param tokenInfo All information about the tokens being swapped
    /// @param pathDefinition Encoded path definition for executor
    /// @param executor Address of contract that will execute the path
    /// @param referralCode referral code to specify the source of the swap
    function swapPermit2(
        permit2Info calldata permit2,
        swapTokenInfo calldata tokenInfo,
        bytes calldata pathDefinition,
        address executor,
        uint32 referralCode
    ) external whenNotPaused returns (uint256 amountOut) {
        ISignatureTransfer(permit2.contractAddress).permitTransferFrom(
            ISignatureTransfer.PermitTransferFrom(
                ISignatureTransfer.TokenPermissions(tokenInfo.inputToken, tokenInfo.inputAmount),
                permit2.nonce,
                permit2.deadline
            ),
            ISignatureTransfer.SignatureTransferDetails(executor, tokenInfo.inputAmount),
            msg.sender,
            permit2.signature
        );
        return _swap(tokenInfo, pathDefinition, executor, referralCode);
    }

    /// @notice contains the main logic for swapping one token for another
    /// Assumes input tokens have already been sent to their destinations and
    /// that msg.value is set to expected ETH input value, or 0 for ERC20 input
    /// @param tokenInfo All information about the tokens being swapped
    /// @param pathDefinition Encoded path definition for executor
    /// @param executor Address of contract that will execute the path
    /// @param referralCode referral code to specify the source of the swap
    function _swap(swapTokenInfo memory tokenInfo, bytes calldata pathDefinition, address executor, uint32 referralCode)
        internal
        returns (uint256 amountOut)
    {
        // Check for valid output specifications
        require(
            tokenInfo.outputMin <= tokenInfo.outputQuote,
            MinimumOutputGreaterThanQuote(tokenInfo.outputMin, tokenInfo.outputQuote)
        );
        require(tokenInfo.outputMin > 0, MinimumOutputIsZero());
        require(tokenInfo.inputToken != tokenInfo.outputToken, SameTokenInAndOut(tokenInfo.inputToken));

        uint256 balanceBefore = tokenInfo.outputToken.universalBalance();

        IOBExecutor(executor).executePath{value: msg.value}(pathDefinition);

        amountOut = tokenInfo.outputToken.universalBalance() - balanceBefore;

        if (referralCode > REFERRAL_WITH_FEE_THRESHOLD) {
            referralInfo memory thisReferralInfo = referralLookup[referralCode];

            if (thisReferralInfo.beneficiary != address(this)) {
                tokenInfo.outputToken.universalTransfer(
                    thisReferralInfo.beneficiary, amountOut * thisReferralInfo.referralFee * 8 / (FEE_DENOM * 10)
                );
            }

            // Takes the fees and keeps them in this contract
            amountOut = amountOut * (FEE_DENOM - thisReferralInfo.referralFee) / FEE_DENOM;
        }
        int256 slippage = amountOut.toInt256() - tokenInfo.outputQuote.toInt256();
        if (slippage > 0) {
            amountOut = tokenInfo.outputQuote;
        }
        require(amountOut >= tokenInfo.outputMin, SlippageExceeded(amountOut, tokenInfo.outputMin));

        // Transfer out the final output to the end user
        tokenInfo.outputToken.universalTransfer(tokenInfo.outputReceiver, amountOut);

        emit Swap(
            msg.sender,
            tokenInfo.inputAmount,
            tokenInfo.inputToken,
            amountOut,
            tokenInfo.outputToken,
            slippage,
            referralCode,
            tokenInfo.outputReceiver
        );
    }

    /// @notice Register a new referrer, optionally with an additional swap fee
    /// @param _referralCode the referral code to use for the new referral
    /// @param _referralFee the additional fee to add to each swap using this code
    /// @param _beneficiary the address to send the referral's share of fees to
    function registerReferralCode(uint32 _referralCode, uint64 _referralFee, address _beneficiary) external onlyOwner {
        // Do not allow for any overwriting of referral codes
        require(!referralLookup[_referralCode].registered, ReferralCodeInUse(_referralCode));

        // Maximum additional fee a referral can set is 2%
        require(_referralFee <= FEE_DENOM / 50, FeeTooHigh(_referralFee));

        // Reserve the lower half of referral codes to be informative only
        if (_referralCode <= REFERRAL_WITH_FEE_THRESHOLD) {
            require(_referralFee == 0, InvalidFeeForCode(_referralFee));
        } else {
            require(_referralFee > 0, InvalidFeeForCode(_referralFee));

            // Make sure the beneficiary is not the null address if there is a fee
            require(_beneficiary != address(0), NullBeneficiary());
        }
        referralLookup[_referralCode].referralFee = _referralFee;
        referralLookup[_referralCode].beneficiary = _beneficiary;
        referralLookup[_referralCode].registered = true;
    }

    /// @notice Allows the owner to assign approved addresses to withdraw fees
    /// @param _address the address to add to the approved list
    function addApprovedAddress(address _address) external onlyOwner {
        _addApprovedAddress(_address);
    }

    /// @notice Allows the owner to remove approved addresses from withdraw fees
    /// @param _address the address to remove from the approved list
    function removeApprovedAddress(address _address) external onlyOwner {
        _removeApprovedAddress(_address);
    }

    /// @notice Allows the owner to transfer funds held by the router contract
    /// @param tokens List of token address to be transferred
    /// @param amounts List of amounts of each token to be transferred
    /// @param dest Address to which the funds should be sent
    function transferRouterFunds(address[] calldata tokens, uint256[] calldata amounts, address dest)
        external
        onlyApproved
    {
        require(tokens.length == amounts.length, InvalidRouterFundsTransfer());
        for (uint256 i = 0; i < tokens.length; i++) {
            if (tokens[i] == TokenHelper.NATIVE_TOKEN) {
                uint256 amount = amounts[i] == 0 ? tokens[i].universalBalance() : amounts[i];
                IWETH(WETH).deposit{value: amount}();
                IERC20(WETH).safeTransfer(dest, amount);
            } else {
                IERC20(tokens[i]).safeTransfer(dest, amounts[i] == 0 ? tokens[i].universalBalance() : amounts[i]);
            }
        }
    }
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_weth","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"uint64","name":"fee","type":"uint64"}],"name":"FeeTooHigh","type":"error"},{"inputs":[{"internalType":"uint64","name":"fee","type":"uint64"}],"name":"InvalidFeeForCode","type":"error"},{"inputs":[],"name":"InvalidNativeTransfer","type":"error"},{"inputs":[],"name":"InvalidNativeValueDepositOnERC20Swap","type":"error"},{"inputs":[],"name":"InvalidRouterFundsTransfer","type":"error"},{"inputs":[{"internalType":"uint256","name":"outputMin","type":"uint256"},{"internalType":"uint256","name":"outputQuote","type":"uint256"}],"name":"MinimumOutputGreaterThanQuote","type":"error"},{"inputs":[],"name":"MinimumOutputIsZero","type":"error"},{"inputs":[{"internalType":"uint256","name":"expected","type":"uint256"},{"internalType":"uint256","name":"received","type":"uint256"}],"name":"NativeDepositValueMismatch","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"NotApprovedAddress","type":"error"},{"inputs":[],"name":"NullBeneficiary","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"uint32","name":"referralCode","type":"uint32"}],"name":"ReferralCodeInUse","type":"error"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"SafeCastOverflowedUintToInt","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SameTokenInAndOut","type":"error"},{"inputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"},{"internalType":"uint256","name":"outputMin","type":"uint256"}],"name":"SlippageExceeded","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"inputAmount","type":"uint256"},{"indexed":true,"internalType":"address","name":"inputToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"},{"indexed":true,"internalType":"address","name":"outputToken","type":"address"},{"indexed":false,"internalType":"int256","name":"slippage","type":"int256"},{"indexed":false,"internalType":"uint32","name":"referralCode","type":"uint32"},{"indexed":false,"internalType":"address","name":"to","type":"address"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"FEE_DENOM","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REFERRAL_WITH_FEE_THRESHOLD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"addApprovedAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isApproved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"referralLookup","outputs":[{"internalType":"uint64","name":"referralFee","type":"uint64"},{"internalType":"address","name":"beneficiary","type":"address"},{"internalType":"bool","name":"registered","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"_referralCode","type":"uint32"},{"internalType":"uint64","name":"_referralFee","type":"uint64"},{"internalType":"address","name":"_beneficiary","type":"address"}],"name":"registerReferralCode","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"removeApprovedAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"inputToken","type":"address"},{"internalType":"uint256","name":"inputAmount","type":"uint256"},{"internalType":"address","name":"outputToken","type":"address"},{"internalType":"uint256","name":"outputQuote","type":"uint256"},{"internalType":"uint256","name":"outputMin","type":"uint256"},{"internalType":"address","name":"outputReceiver","type":"address"}],"internalType":"struct IOBRouter.swapTokenInfo","name":"tokenInfo","type":"tuple"},{"internalType":"bytes","name":"pathDefinition","type":"bytes"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"uint32","name":"referralCode","type":"uint32"}],"name":"swap","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct IOBRouter.permit2Info","name":"permit2","type":"tuple"},{"components":[{"internalType":"address","name":"inputToken","type":"address"},{"internalType":"uint256","name":"inputAmount","type":"uint256"},{"internalType":"address","name":"outputToken","type":"address"},{"internalType":"uint256","name":"outputQuote","type":"uint256"},{"internalType":"uint256","name":"outputMin","type":"uint256"},{"internalType":"address","name":"outputReceiver","type":"address"}],"internalType":"struct IOBRouter.swapTokenInfo","name":"tokenInfo","type":"tuple"},{"internalType":"bytes","name":"pathDefinition","type":"bytes"},{"internalType":"address","name":"executor","type":"address"},{"internalType":"uint32","name":"referralCode","type":"uint32"}],"name":"swapPermit2","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokens","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address","name":"dest","type":"address"}],"name":"transferRouterFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a060405234801561001057600080fd5b50604051611a93380380611a9383398101604081905261002f91610146565b816001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b610067816100da565b506000805460ff60a01b191681557fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b80546001600160e81b031916600160e01b1790556001600160a01b0382811660805283168152600160208190526040909120805460ff191690911790555050610179565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b038116811461014157600080fd5b919050565b6000806040838503121561015957600080fd5b6101628361012a565b91506101706020840161012a565b90509250929050565b6080516118f16101a26000396000818161029e015281816104ca015261054801526118f16000f3fe6080604052600436106101025760003560e01c8063715018a611610095578063d2ac1c8e11610064578063d2ac1c8e146102c0578063d46cadbc146102e0578063e10895f9146102f3578063f2fde38b14610313578063f827065e1461033357600080fd5b8063715018a6146102305780638456cb59146102455780638da5cb5b1461025a578063ad5c46481461028c57600080fd5b806356fda29b116100d157806356fda29b146101945780635c975abb146101b4578063673448dd146101df5780636c082c131461021857600080fd5b8063174da6211461010e57806320f1d85b146101305780633f4ba83a146101505780634886c6751461016557600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b5061012e610129366004611378565b6103b5565b005b34801561013c57600080fd5b5061012e61014b3660046113fc565b610617565b34801561015c57600080fd5b5061012e610647565b34801561017157600080fd5b50610181670de0b6b3a764000081565b6040519081526020015b60405180910390f35b3480156101a057600080fd5b506101816101af36600461146c565b610659565b3480156101c057600080fd5b50600054600160a01b900460ff165b604051901515815260200161018b565b3480156101eb57600080fd5b506101cf6101fa3660046113fc565b6001600160a01b031660009081526001602052604090205460ff1690565b34801561022457600080fd5b50610181638000000081565b34801561023c57600080fd5b5061012e61076a565b34801561025157600080fd5b5061012e61077c565b34801561026657600080fd5b506000546001600160a01b03165b6040516001600160a01b03909116815260200161018b565b34801561029857600080fd5b506102747f000000000000000000000000000000000000000000000000000000000000000081565b3480156102cc57600080fd5b5061012e6102db3660046113fc565b61078c565b6101816102ee3660046115b8565b6107bf565b3480156102ff57600080fd5b5061012e61030e366004611624565b6107e0565b34801561031f57600080fd5b5061012e61032e3660046113fc565b61097e565b34801561033f57600080fd5b5061038661034e366004611675565b6002602052600090815260409020546001600160401b03811690600160401b81046001600160a01b031690600160e01b900460ff1683565b604080516001600160401b0390941684526001600160a01b03909216602084015215159082015260600161018b565b3360009081526001602052604090205460ff166103ec57604051633d13f0fb60e01b81523360048201526024015b60405180910390fd5b83821461040c57604051633505680160e21b815260040160405180910390fd5b60005b8481101561060f57600086868381811061042b5761042b611690565b905060200201602081019061044091906113fc565b6001600160a01b03160361057957600084848381811061046257610462611690565b9050602002013560001461048e5784848381811061048257610482611690565b905060200201356104c6565b6104c68787848181106104a3576104a3611690565b90506020020160208101906104b891906113fc565b6001600160a01b03166109b9565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561052357600080fd5b505af1158015610537573d6000803e3d6000fd5b506105739350506001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016915085905083610a43565b50610607565b6106078285858481811061058f5761058f611690565b905060200201356000146105bb578585848181106105af576105af611690565b905060200201356105d0565b6105d08888858181106104a3576104a3611690565b8888858181106105e2576105e2611690565b90506020020160208101906105f791906113fc565b6001600160a01b03169190610a43565b60010161040f565b505050505050565b61061f610aa7565b610644816001600160a01b03166000908152600160205260409020805460ff19169055565b50565b61064f610aa7565b610657610ad4565b565b6000610663610b29565b61067060208801886113fc565b6040805160a081019091526001600160a01b0391909116906330f28b7a908060608101806106a160208d018d6113fc565b6001600160a01b03908116825260208d8101359281018390529284528d830135848401526040808f01359481019490945283518085019094528916835290820152336106f060608d018d6116a6565b6040518663ffffffff1660e01b8152600401610710959493929190611715565b600060405180830381600087803b15801561072a57600080fd5b505af115801561073e573d6000803e3d6000fd5b5050505061075f868036038101906107569190611790565b86868686610b54565b979650505050505050565b610772610aa7565b6106576000610ea0565b610784610aa7565b610657610ef0565b610794610aa7565b610644816001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b60006107c9610b29565b6107d68686868686610f33565b9695505050505050565b6107e8610aa7565b63ffffffff83166000908152600260205260409020548390600160e01b900460ff16156108315760405163cf1fd01160e01b815263ffffffff90911660048201526024016103e3565b506108456032670de0b6b3a76400006117c2565b826001600160401b03161115829061087c57604051630cf6f2d560e31b81526001600160401b0390911660048201526024016103e3565b5063800000008363ffffffff16116108c857816001600160401b038116156108c257604051625c80bf60e71b81526001600160401b0390911660048201526024016103e3565b50610923565b816001600160401b0381166108fb57604051625c80bf60e71b81526001600160401b0390911660048201526024016103e3565b506001600160a01b03811661092357604051636793040360e11b815260040160405180910390fd5b63ffffffff9290921660009081526002602052604090208054600160e01b6001600160401b03939093166001600160e01b031990911617600160401b6001600160a01b03909416939093029290921760ff60e01b1916179055565b610986610aa7565b6001600160a01b0381166109b057604051631e4fbdf760e01b8152600060048201526024016103e3565b61064481610ea0565b60006001600160a01b0382166109d0575047919050565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610a14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3891906117e4565b92915050565b919050565b6040516001600160a01b03838116602483015260448201839052610aa291859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505061105b565b505050565b6000546001600160a01b031633146106575760405163118cdaa760e01b81523360048201526024016103e3565b610adc6110be565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600054600160a01b900460ff16156106575760405163d93c066560e01b815260040160405180910390fd5b6060850151608086015160009180821115610b8b57604051636da5807160e01b8152600481019290925260248201526044016103e3565b50506000866080015111610bb257604051637833ebb160e11b815260040160405180910390fd5b60408601518651906001600160a01b03828116911603610bf15760405163fa463c6960e01b81526001600160a01b0390911660048201526024016103e3565b506000610c0a87604001516001600160a01b03166109b9565b9050836001600160a01b0316633e9a21613488886040518463ffffffff1660e01b8152600401610c3b9291906117fd565b6000604051808303818588803b158015610c5457600080fd5b505af1158015610c68573d6000803e3d6000fd5b505050505080610c8488604001516001600160a01b03166109b9565b610c8e9190611819565b915063800000008363ffffffff161115610d925763ffffffff8316600090815260026020908152604091829020825160608101845290546001600160401b0381168252600160401b81046001600160a01b0316928201839052600160e01b900460ff161515928101929092523014610d5b576020810151610d5b90610d1c670de0b6b3a7640000600a61182c565b8351610d31906001600160401b03168761182c565b610d3c90600861182c565b610d4691906117c2565b60408b01516001600160a01b031691906110e8565b8051670de0b6b3a764000090610d7a906001600160401b031682611819565b610d84908561182c565b610d8e91906117c2565b9250505b6000610da18860600151611184565b610daa84611184565b610db49190611843565b90506000811315610dc757876060015192505b6080880151839080821015610df8576040516371c4efed60e01b8152600481019290925260248201526044016103e3565b5050610e208860a00151848a604001516001600160a01b03166110e89092919063ffffffff16565b60408089015189516020808c015160a0808e0151865192835292820189905294810186905263ffffffff891660608201526001600160a01b0391821660808201529281169391169133917fbe8d53b75ac1d2225422895f1bbce48684ecdb57a7c77e0a89982bee7674f7c5910160405180910390a4505095945050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610ef8610b29565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610b0c3390565b84516000906001600160a01b0316610f92578560200151600003610f5c5734602087015261104e565b602086015134808214610f8b576040516336d3450760e21b8152600481019290925260248201526044016103e3565b505061104e565b3415610fb157604051631ae2632b60e21b815260040160405180910390fd5b856020015160000361102e5785516040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611004573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102891906117e4565b60208701525b6020860151865161104e916001600160a01b0390911690339086906111b5565b6107d68686868686610b54565b60006110706001600160a01b038416836111ee565b90508051600014158015611095575080806020019051810190611093919061186a565b155b15610aa257604051635274afe760e01b81526001600160a01b03841660048201526024016103e3565b600054600160a01b900460ff1661065757604051638dfc202b60e01b815260040160405180910390fd5b6001600160a01b038316611170576000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611143576040519150601f19603f3d011682016040523d82523d6000602084013e611148565b606091505b505090508061116a57604051633cff557560e11b815260040160405180910390fd5b50505050565b610aa26001600160a01b0384168383610a43565b60006001600160ff1b038211156111b15760405163123baf0360e11b8152600481018390526024016103e3565b5090565b6040516001600160a01b03848116602483015283811660448301526064820183905261116a9186918216906323b872dd90608401610a70565b60606111fc83836000611203565b9392505050565b6060814710156112285760405163cd78605960e01b81523060048201526024016103e3565b600080856001600160a01b03168486604051611244919061188c565b60006040518083038185875af1925050503d8060008114611281576040519150601f19603f3d011682016040523d82523d6000602084013e611286565b606091505b50915091506107d68683836060826112a6576112a1826112ed565b6111fc565b81511580156112bd57506001600160a01b0384163b155b156112e657604051639996b31560e01b81526001600160a01b03851660048201526024016103e3565b50806111fc565b8051156112fd5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60008083601f84011261132857600080fd5b5081356001600160401b0381111561133f57600080fd5b6020830191508360208260051b850101111561135a57600080fd5b9250929050565b80356001600160a01b0381168114610a3e57600080fd5b60008060008060006060868803121561139057600080fd5b85356001600160401b038111156113a657600080fd5b6113b288828901611316565b90965094505060208601356001600160401b038111156113d157600080fd5b6113dd88828901611316565b90945092506113f0905060408701611361565b90509295509295909350565b60006020828403121561140e57600080fd5b6111fc82611361565b60008083601f84011261142957600080fd5b5081356001600160401b0381111561144057600080fd5b60208301915083602082850101111561135a57600080fd5b803563ffffffff81168114610a3e57600080fd5b60008060008060008086880361014081121561148757600080fd5b87356001600160401b0381111561149d57600080fd5b88016080818b0312156114af57600080fd5b965060c0601f19820112156114c357600080fd5b5060208701945060e08701356001600160401b038111156114e357600080fd5b6114ef89828a01611417565b909550935061150390506101008801611361565b91506115126101208801611458565b90509295509295509295565b600060c0828403121561153057600080fd5b60405160c081018181106001600160401b038211171561156057634e487b7160e01b600052604160045260246000fd5b60405290508061156f83611361565b81526020838101359082015261158760408401611361565b604082015260608381013590820152608080840135908201526115ac60a08401611361565b60a08201525092915050565b600080600080600061012086880312156115d157600080fd5b6115db878761151e565b945060c08601356001600160401b038111156115f657600080fd5b61160288828901611417565b9095509350611615905060e08701611361565b91506113f06101008701611458565b60008060006060848603121561163957600080fd5b61164284611458565b925060208401356001600160401b038116811461165e57600080fd5b915061166c60408501611361565b90509250925092565b60006020828403121561168757600080fd5b6111fc82611458565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126116bd57600080fd5b8301803591506001600160401b038211156116d757600080fd5b60200191503681900382131561135a57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61173381875180516001600160a01b03168252602090810151910152565b6020860151604082015260408601516060820152611767608082018680516001600160a01b03168252602090810151910152565b6001600160a01b03841660c082015261010060e0820181905260009061075f90830184866116ec565b600060c082840312156117a257600080fd5b6111fc838361151e565b634e487b7160e01b600052601160045260246000fd5b6000826117df57634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156117f657600080fd5b5051919050565b6020815260006118116020830184866116ec565b949350505050565b81810381811115610a3857610a386117ac565b8082028115828204841417610a3857610a386117ac565b8181036000831280158383131683831282161715611863576118636117ac565b5092915050565b60006020828403121561187c57600080fd5b815180151581146111fc57600080fd5b6000825160005b818110156118ad5760208186018101518583015201611893565b50600092019182525091905056fea26469706673582212207642173e009772895dc2d2d7538d52d9f42870a6c035809a1ce9230a1f3df65664736f6c634300081b0033000000000000000000000000b009a55e7181fee7f02ba80b85f08919452623510000000000000000000000006969696969696969696969696969696969696969

Deployed Bytecode

0x6080604052600436106101025760003560e01c8063715018a611610095578063d2ac1c8e11610064578063d2ac1c8e146102c0578063d46cadbc146102e0578063e10895f9146102f3578063f2fde38b14610313578063f827065e1461033357600080fd5b8063715018a6146102305780638456cb59146102455780638da5cb5b1461025a578063ad5c46481461028c57600080fd5b806356fda29b116100d157806356fda29b146101945780635c975abb146101b4578063673448dd146101df5780636c082c131461021857600080fd5b8063174da6211461010e57806320f1d85b146101305780633f4ba83a146101505780634886c6751461016557600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b5061012e610129366004611378565b6103b5565b005b34801561013c57600080fd5b5061012e61014b3660046113fc565b610617565b34801561015c57600080fd5b5061012e610647565b34801561017157600080fd5b50610181670de0b6b3a764000081565b6040519081526020015b60405180910390f35b3480156101a057600080fd5b506101816101af36600461146c565b610659565b3480156101c057600080fd5b50600054600160a01b900460ff165b604051901515815260200161018b565b3480156101eb57600080fd5b506101cf6101fa3660046113fc565b6001600160a01b031660009081526001602052604090205460ff1690565b34801561022457600080fd5b50610181638000000081565b34801561023c57600080fd5b5061012e61076a565b34801561025157600080fd5b5061012e61077c565b34801561026657600080fd5b506000546001600160a01b03165b6040516001600160a01b03909116815260200161018b565b34801561029857600080fd5b506102747f000000000000000000000000696969696969696969696969696969696969696981565b3480156102cc57600080fd5b5061012e6102db3660046113fc565b61078c565b6101816102ee3660046115b8565b6107bf565b3480156102ff57600080fd5b5061012e61030e366004611624565b6107e0565b34801561031f57600080fd5b5061012e61032e3660046113fc565b61097e565b34801561033f57600080fd5b5061038661034e366004611675565b6002602052600090815260409020546001600160401b03811690600160401b81046001600160a01b031690600160e01b900460ff1683565b604080516001600160401b0390941684526001600160a01b03909216602084015215159082015260600161018b565b3360009081526001602052604090205460ff166103ec57604051633d13f0fb60e01b81523360048201526024015b60405180910390fd5b83821461040c57604051633505680160e21b815260040160405180910390fd5b60005b8481101561060f57600086868381811061042b5761042b611690565b905060200201602081019061044091906113fc565b6001600160a01b03160361057957600084848381811061046257610462611690565b9050602002013560001461048e5784848381811061048257610482611690565b905060200201356104c6565b6104c68787848181106104a3576104a3611690565b90506020020160208101906104b891906113fc565b6001600160a01b03166109b9565b90507f00000000000000000000000069696969696969696969696969696969696969696001600160a01b031663d0e30db0826040518263ffffffff1660e01b81526004016000604051808303818588803b15801561052357600080fd5b505af1158015610537573d6000803e3d6000fd5b506105739350506001600160a01b037f000000000000000000000000696969696969696969696969696969696969696916915085905083610a43565b50610607565b6106078285858481811061058f5761058f611690565b905060200201356000146105bb578585848181106105af576105af611690565b905060200201356105d0565b6105d08888858181106104a3576104a3611690565b8888858181106105e2576105e2611690565b90506020020160208101906105f791906113fc565b6001600160a01b03169190610a43565b60010161040f565b505050505050565b61061f610aa7565b610644816001600160a01b03166000908152600160205260409020805460ff19169055565b50565b61064f610aa7565b610657610ad4565b565b6000610663610b29565b61067060208801886113fc565b6040805160a081019091526001600160a01b0391909116906330f28b7a908060608101806106a160208d018d6113fc565b6001600160a01b03908116825260208d8101359281018390529284528d830135848401526040808f01359481019490945283518085019094528916835290820152336106f060608d018d6116a6565b6040518663ffffffff1660e01b8152600401610710959493929190611715565b600060405180830381600087803b15801561072a57600080fd5b505af115801561073e573d6000803e3d6000fd5b5050505061075f868036038101906107569190611790565b86868686610b54565b979650505050505050565b610772610aa7565b6106576000610ea0565b610784610aa7565b610657610ef0565b610794610aa7565b610644816001600160a01b03166000908152600160208190526040909120805460ff19169091179055565b60006107c9610b29565b6107d68686868686610f33565b9695505050505050565b6107e8610aa7565b63ffffffff83166000908152600260205260409020548390600160e01b900460ff16156108315760405163cf1fd01160e01b815263ffffffff90911660048201526024016103e3565b506108456032670de0b6b3a76400006117c2565b826001600160401b03161115829061087c57604051630cf6f2d560e31b81526001600160401b0390911660048201526024016103e3565b5063800000008363ffffffff16116108c857816001600160401b038116156108c257604051625c80bf60e71b81526001600160401b0390911660048201526024016103e3565b50610923565b816001600160401b0381166108fb57604051625c80bf60e71b81526001600160401b0390911660048201526024016103e3565b506001600160a01b03811661092357604051636793040360e11b815260040160405180910390fd5b63ffffffff9290921660009081526002602052604090208054600160e01b6001600160401b03939093166001600160e01b031990911617600160401b6001600160a01b03909416939093029290921760ff60e01b1916179055565b610986610aa7565b6001600160a01b0381166109b057604051631e4fbdf760e01b8152600060048201526024016103e3565b61064481610ea0565b60006001600160a01b0382166109d0575047919050565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa158015610a14573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3891906117e4565b92915050565b919050565b6040516001600160a01b03838116602483015260448201839052610aa291859182169063a9059cbb906064015b604051602081830303815290604052915060e01b6020820180516001600160e01b03838183161783525050505061105b565b505050565b6000546001600160a01b031633146106575760405163118cdaa760e01b81523360048201526024016103e3565b610adc6110be565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600054600160a01b900460ff16156106575760405163d93c066560e01b815260040160405180910390fd5b6060850151608086015160009180821115610b8b57604051636da5807160e01b8152600481019290925260248201526044016103e3565b50506000866080015111610bb257604051637833ebb160e11b815260040160405180910390fd5b60408601518651906001600160a01b03828116911603610bf15760405163fa463c6960e01b81526001600160a01b0390911660048201526024016103e3565b506000610c0a87604001516001600160a01b03166109b9565b9050836001600160a01b0316633e9a21613488886040518463ffffffff1660e01b8152600401610c3b9291906117fd565b6000604051808303818588803b158015610c5457600080fd5b505af1158015610c68573d6000803e3d6000fd5b505050505080610c8488604001516001600160a01b03166109b9565b610c8e9190611819565b915063800000008363ffffffff161115610d925763ffffffff8316600090815260026020908152604091829020825160608101845290546001600160401b0381168252600160401b81046001600160a01b0316928201839052600160e01b900460ff161515928101929092523014610d5b576020810151610d5b90610d1c670de0b6b3a7640000600a61182c565b8351610d31906001600160401b03168761182c565b610d3c90600861182c565b610d4691906117c2565b60408b01516001600160a01b031691906110e8565b8051670de0b6b3a764000090610d7a906001600160401b031682611819565b610d84908561182c565b610d8e91906117c2565b9250505b6000610da18860600151611184565b610daa84611184565b610db49190611843565b90506000811315610dc757876060015192505b6080880151839080821015610df8576040516371c4efed60e01b8152600481019290925260248201526044016103e3565b5050610e208860a00151848a604001516001600160a01b03166110e89092919063ffffffff16565b60408089015189516020808c015160a0808e0151865192835292820189905294810186905263ffffffff891660608201526001600160a01b0391821660808201529281169391169133917fbe8d53b75ac1d2225422895f1bbce48684ecdb57a7c77e0a89982bee7674f7c5910160405180910390a4505095945050505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610ef8610b29565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610b0c3390565b84516000906001600160a01b0316610f92578560200151600003610f5c5734602087015261104e565b602086015134808214610f8b576040516336d3450760e21b8152600481019290925260248201526044016103e3565b505061104e565b3415610fb157604051631ae2632b60e21b815260040160405180910390fd5b856020015160000361102e5785516040516370a0823160e01b81523360048201526001600160a01b03909116906370a0823190602401602060405180830381865afa158015611004573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102891906117e4565b60208701525b6020860151865161104e916001600160a01b0390911690339086906111b5565b6107d68686868686610b54565b60006110706001600160a01b038416836111ee565b90508051600014158015611095575080806020019051810190611093919061186a565b155b15610aa257604051635274afe760e01b81526001600160a01b03841660048201526024016103e3565b600054600160a01b900460ff1661065757604051638dfc202b60e01b815260040160405180910390fd5b6001600160a01b038316611170576000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611143576040519150601f19603f3d011682016040523d82523d6000602084013e611148565b606091505b505090508061116a57604051633cff557560e11b815260040160405180910390fd5b50505050565b610aa26001600160a01b0384168383610a43565b60006001600160ff1b038211156111b15760405163123baf0360e11b8152600481018390526024016103e3565b5090565b6040516001600160a01b03848116602483015283811660448301526064820183905261116a9186918216906323b872dd90608401610a70565b60606111fc83836000611203565b9392505050565b6060814710156112285760405163cd78605960e01b81523060048201526024016103e3565b600080856001600160a01b03168486604051611244919061188c565b60006040518083038185875af1925050503d8060008114611281576040519150601f19603f3d011682016040523d82523d6000602084013e611286565b606091505b50915091506107d68683836060826112a6576112a1826112ed565b6111fc565b81511580156112bd57506001600160a01b0384163b155b156112e657604051639996b31560e01b81526001600160a01b03851660048201526024016103e3565b50806111fc565b8051156112fd5780518082602001fd5b604051630a12f52160e11b815260040160405180910390fd5b60008083601f84011261132857600080fd5b5081356001600160401b0381111561133f57600080fd5b6020830191508360208260051b850101111561135a57600080fd5b9250929050565b80356001600160a01b0381168114610a3e57600080fd5b60008060008060006060868803121561139057600080fd5b85356001600160401b038111156113a657600080fd5b6113b288828901611316565b90965094505060208601356001600160401b038111156113d157600080fd5b6113dd88828901611316565b90945092506113f0905060408701611361565b90509295509295909350565b60006020828403121561140e57600080fd5b6111fc82611361565b60008083601f84011261142957600080fd5b5081356001600160401b0381111561144057600080fd5b60208301915083602082850101111561135a57600080fd5b803563ffffffff81168114610a3e57600080fd5b60008060008060008086880361014081121561148757600080fd5b87356001600160401b0381111561149d57600080fd5b88016080818b0312156114af57600080fd5b965060c0601f19820112156114c357600080fd5b5060208701945060e08701356001600160401b038111156114e357600080fd5b6114ef89828a01611417565b909550935061150390506101008801611361565b91506115126101208801611458565b90509295509295509295565b600060c0828403121561153057600080fd5b60405160c081018181106001600160401b038211171561156057634e487b7160e01b600052604160045260246000fd5b60405290508061156f83611361565b81526020838101359082015261158760408401611361565b604082015260608381013590820152608080840135908201526115ac60a08401611361565b60a08201525092915050565b600080600080600061012086880312156115d157600080fd5b6115db878761151e565b945060c08601356001600160401b038111156115f657600080fd5b61160288828901611417565b9095509350611615905060e08701611361565b91506113f06101008701611458565b60008060006060848603121561163957600080fd5b61164284611458565b925060208401356001600160401b038116811461165e57600080fd5b915061166c60408501611361565b90509250925092565b60006020828403121561168757600080fd5b6111fc82611458565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126116bd57600080fd5b8301803591506001600160401b038211156116d757600080fd5b60200191503681900382131561135a57600080fd5b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b61173381875180516001600160a01b03168252602090810151910152565b6020860151604082015260408601516060820152611767608082018680516001600160a01b03168252602090810151910152565b6001600160a01b03841660c082015261010060e0820181905260009061075f90830184866116ec565b600060c082840312156117a257600080fd5b6111fc838361151e565b634e487b7160e01b600052601160045260246000fd5b6000826117df57634e487b7160e01b600052601260045260246000fd5b500490565b6000602082840312156117f657600080fd5b5051919050565b6020815260006118116020830184866116ec565b949350505050565b81810381811115610a3857610a386117ac565b8082028115828204841417610a3857610a386117ac565b8181036000831280158383131683831282161715611863576118636117ac565b5092915050565b60006020828403121561187c57600080fd5b815180151581146111fc57600080fd5b6000825160005b818110156118ad5760208186018101518583015201611893565b50600092019182525091905056fea26469706673582212207642173e009772895dc2d2d7538d52d9f42870a6c035809a1ce9230a1f3df65664736f6c634300081b0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000b009a55e7181fee7f02ba80b85f08919452623510000000000000000000000006969696969696969696969696969696969696969

-----Decoded View---------------
Arg [0] : _owner (address): 0xB009A55E7181fEe7f02BA80b85F0891945262351
Arg [1] : _weth (address): 0x6969696969696969696969696969696969696969

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000b009a55e7181fee7f02ba80b85f0891945262351
Arg [1] : 0000000000000000000000006969696969696969696969696969696969696969


Deployed Bytecode Sourcemap

75236:10272:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;84788:717;;;;;;;;;;-1:-1:-1;84788:717:0;;;;;:::i;:::-;;:::i;:::-;;84383:119;;;;;;;;;;-1:-1:-1;84383:119:0;;;;;:::i;:::-;;:::i;76363:67::-;;;;;;;;;;;;;:::i;75534:40::-;;;;;;;;;;;;75570:4;75534:40;;;;;1748:25:1;;;1736:2;1721:18;75534:40:0;;;;;;;;79100:805;;;;;;;;;;-1:-1:-1;79100:805:0;;;;;:::i;:::-;;:::i;66894:86::-;;;;;;;;;;-1:-1:-1;66941:4:0;66965:7;-1:-1:-1;;;66965:7:0;;;;66894:86;;;3477:14:1;;3470:22;3452:41;;3440:2;3425:18;66894:86:0;3312:187:1;625:111:0;;;;;;;;;;-1:-1:-1;625:111:0;;;;;:::i;:::-;-1:-1:-1;;;;;710:18:0;686:4;710:18;;;:8;:18;;;;;;;;;625:111;75466:61;;;;;;;;;;;;75520:7;75466:61;;64183:103;;;;;;;;;;;;;:::i;76241:63::-;;;;;;;;;;;;;:::i;63508:87::-;;;;;;;;;;-1:-1:-1;63554:7:0;63581:6;-1:-1:-1;;;;;63581:6:0;63508:87;;;-1:-1:-1;;;;;3668:32:1;;;3650:51;;3638:2;3623:18;63508:87:0;3504:203:1;75581:29:0;;;;;;;;;;;;;;;84110:113;;;;;;;;;;-1:-1:-1;84110:113:0;;;;;:::i;:::-;;:::i;76797:306::-;;;;;;:::i;:::-;;:::i;82877:1080::-;;;;;;;;;;-1:-1:-1;82877:1080:0;;;;;:::i;:::-;;:::i;64441:220::-;;;;;;;;;;-1:-1:-1;64441:220:0;;;;;:::i;:::-;;:::i;75671:53::-;;;;;;;;;;-1:-1:-1;75671:53:0;;;;;:::i;:::-;;;;;;;;;;;;-1:-1:-1;;;;;75671:53:0;;;-1:-1:-1;;;75671:53:0;;-1:-1:-1;;;;;75671:53:0;;-1:-1:-1;;;75671:53:0;;;;;;;;;;-1:-1:-1;;;;;6259:31:1;;;6241:50;;-1:-1:-1;;;;;6327:32:1;;;6322:2;6307:18;;6300:60;6403:14;6396:22;6376:18;;;6369:50;6229:2;6214:18;75671:53:0;6047:378:1;84788:717:0;301:10;292:20;;;;:8;:20;;;;;;;;287:91;;336:30;;-1:-1:-1;;;336:30:0;;355:10;336:30;;;3650:51:1;3623:18;;336:30:0;;;;;;;;287:91;84950:31;;::::1;84942:70;;;;-1:-1:-1::0;;;84942:70:0::1;;;;;;;;;;;;85028:9;85023:475;85043:17:::0;;::::1;85023:475;;;74007:1;85086:6:::0;;85093:1;85086:9;;::::1;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;85086:37:0::1;::::0;85082:405:::1;;85144:14;85161:7;;85169:1;85161:10;;;;;;;:::i;:::-;;;;;;;85175:1;85161:15;:59;;85210:7;;85218:1;85210:10;;;;;;;:::i;:::-;;;;;;;85161:59;;;85179:28;:6;;85186:1;85179:9;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;85179:26:0::1;;:28::i;:::-;85144:76;;85245:4;-1:-1:-1::0;;;;;85239:19:0::1;;85266:6;85239:36;;;;;;;;;;;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;85294:39:0::1;::::0;-1:-1:-1;;;;;;;85301:4:0::1;85294:25;::::0;-1:-1:-1;85320:4:0;;-1:-1:-1;85326:6:0;85294:25:::1;:39::i;:::-;85125:224;85082:405;;;85374:97;85405:4;85411:7;;85419:1;85411:10;;;;;;;:::i;:::-;;;;;;;85425:1;85411:15;:59;;85460:7;;85468:1;85460:10;;;;;;;:::i;:::-;;;;;;;85411:59;;;85429:28;:6;;85436:1;85429:9;;;;;;;:::i;:28::-;85381:6;;85388:1;85381:9;;;;;;;:::i;:::-;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;85374:30:0::1;::::0;:97;:30:::1;:97::i;:::-;85062:3;;85023:475;;;;84788:717:::0;;;;;:::o;84383:119::-;63394:13;:11;:13::i;:::-;84462:32:::1;84485:8;-1:-1:-1::0;;;;;583:18:0;604:5;583:18;;;:8;:18;;;;;:26;;-1:-1:-1;;583:26:0;;;513:104;84462:32:::1;84383:119:::0;:::o;76363:67::-;63394:13;:11;:13::i;:::-;76412:10:::1;:8;:10::i;:::-;76363:67::o:0;79100:805::-;79339:17;66499:19;:17;:19::i;:::-;79388:23:::1;;::::0;::::1;:7:::0;:23:::1;:::i;:::-;79446:218;::::0;;79502:80;;;;;;-1:-1:-1;;;;;79369:62:0;;;::::1;::::0;::::1;::::0;79446:218;::::1;::::0;::::1;::::0;79538:20:::1;;::::0;::::1;:9:::0;:20:::1;:::i;:::-;-1:-1:-1::0;;;;;79502:80:0;;::::1;::::0;;::::1;79560:21:::0;;::::1;;79502:80:::0;;::::1;::::0;;;79446:218;;;79601:13;;::::1;;79446:218:::0;;::::1;::::0;;79633:16;;::::1;;79446:218:::0;;;;;;;79679:76;;;;::::1;::::0;;;;::::1;::::0;;;;::::1;::::0;79770:10:::1;79795:17;;::::0;::::1;79601:7:::0;79795:17:::1;:::i;:::-;79369:454;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;79841:56;79847:9;79841:56;;;;;;;;;;:::i;:::-;79858:14;;79874:8;79884:12;79841:5;:56::i;:::-;79834:63:::0;79100:805;-1:-1:-1;;;;;;;79100:805:0:o;64183:103::-;63394:13;:11;:13::i;:::-;64248:30:::1;64275:1;64248:18;:30::i;76241:63::-:0;63394:13;:11;:13::i;:::-;76288:8:::1;:6;:8::i;84110:113::-:0;63394:13;:11;:13::i;:::-;84186:29:::1;84206:8;-1:-1:-1::0;;;;;472:18:0;;;;;493:4;472:18;;;;;;;;:25;;-1:-1:-1;;472:25:0;;;;;;405:100;76797:306;76989:17;66499:19;:17;:19::i;:::-;77031:64:::1;77045:9;77056:14;;77072:8;77082:12;77031:13;:64::i;:::-;77024:71:::0;76797:306;-1:-1:-1;;;;;;76797:306:0:o;82877:1080::-;63394:13;:11;:13::i;:::-;83074:29:::1;::::0;::::1;;::::0;;;:14:::1;:29;::::0;;;;:40;:29;;-1:-1:-1;;;83074:40:0;::::1;;;83073:41;83065:84;;;::::0;-1:-1:-1;;;83065:84:0;;8798:10:1;8786:23;;;83065:84:0::1;::::0;::::1;8768:42:1::0;8741:18;;83065:84:0::1;8624:192:1::0;83065:84:0::1;-1:-1:-1::0;83246:14:0::1;83258:2;75570:4;83246:14;:::i;:::-;83230:12;-1:-1:-1::0;;;;;83230:30:0::1;;;83273:12;83222:65;;;;::::0;-1:-1:-1;;;83222:65:0;;-1:-1:-1;;;;;9337:31:1;;;83222:65:0::1;::::0;::::1;9319:50:1::0;9292:18;;83222:65:0::1;9175:200:1::0;83222:65:0::1;;75520:7;83380:13;:44;;;83376:382;;83449:12:::0;-1:-1:-1;;;;;83449:17:0;::::1;::::0;83441:59:::1;;;::::0;-1:-1:-1;;;83441:59:0;;-1:-1:-1;;;;;9337:31:1;;;83441:59:0::1;::::0;::::1;9319:50:1::0;9292:18;;83441:59:0::1;9175:200:1::0;83441:59:0::1;;83376:382;;;83541:12:::0;-1:-1:-1;;;;;83541:16:0;::::1;83533:58;;;::::0;-1:-1:-1;;;83533:58:0;;-1:-1:-1;;;;;9337:31:1;;;83533:58:0::1;::::0;::::1;9319:50:1::0;9292:18;;83533:58:0::1;9175:200:1::0;83533:58:0::1;-1:-1:-1::0;;;;;;83700:26:0;::::1;83692:54;;;;-1:-1:-1::0;;;83692:54:0::1;;;;;;;;;;;;83768:29;::::0;;;::::1;;::::0;;;:14:::1;:29;::::0;;;;:56;;-1:-1:-1;;;;;;;;83768:56:0;;;::::1;-1:-1:-1::0;;;;;;83835:56:0;;;;-1:-1:-1;;;;;;;;83835:56:0;;::::1;::::0;;;::::1;::::0;;;::::1;-1:-1:-1::0;;;;83902:47:0::1;;::::0;;82877:1080::o;64441:220::-;63394:13;:11;:13::i;:::-;-1:-1:-1;;;;;64526:22:0;::::1;64522:93;;64572:31;::::0;-1:-1:-1;;;64572:31:0;;64600:1:::1;64572:31;::::0;::::1;3650:51:1::0;3623:18;;64572:31:0::1;3504:203:1::0;64522:93:0::1;64625:28;64644:8;64625:18;:28::i;74234:251::-:0;74298:7;-1:-1:-1;;;;;74322:21:0;;74318:160;;-1:-1:-1;74367:21:0;;74234:251;-1:-1:-1;74234:251:0:o;74318:160::-;74428:38;;-1:-1:-1;;;74428:38:0;;74460:4;74428:38;;;3650:51:1;-1:-1:-1;;;;;74428:23:0;;;;;3623:18:1;;74428:38:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;74421:45;74234:251;-1:-1:-1;;74234:251:0:o;74318:160::-;74234:251;;;:::o;69118:162::-;69228:43;;-1:-1:-1;;;;;9761:32:1;;;69228:43:0;;;9743:51:1;9810:18;;;9803:34;;;69201:71:0;;69221:5;;69243:14;;;;;9716:18:1;;69228:43:0;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;69228:43:0;;;;;;;;;;;69201:19;:71::i;:::-;69118:162;;;:::o;63673:166::-;63554:7;63581:6;-1:-1:-1;;;;;63581:6:0;25769:10;63733:23;63729:103;;63780:40;;-1:-1:-1;;;63780:40:0;;25769:10;63780:40;;;3650:51:1;3623:18;;63780:40:0;3504:203:1;67795:120:0;66758:16;:14;:16::i;:::-;67864:5:::1;67854:15:::0;;-1:-1:-1;;;;67854:15:0::1;::::0;;67885:22:::1;25769:10:::0;67894:12:::1;67885:22;::::0;-1:-1:-1;;;;;3668:32:1;;;3650:51;;3638:2;3623:18;67885:22:0::1;;;;;;;67795:120::o:0;67053:132::-;66941:4;66965:7;-1:-1:-1;;;66965:7:0;;;;67115:63;;;67151:15;;-1:-1:-1;;;67151:15:0;;;;;;;;;;;80439:2108;80722:21;;;;80699:19;;;;80592:17;;80699:44;;;;80677:165;;;;-1:-1:-1;;;80677:165:0;;;;;10022:25:1;;;;10063:18;;;10056:34;9995:18;;80677:165:0;9848:248:1;80677:165:0;;;80883:1;80861:9;:19;;;:23;80853:55;;;;-1:-1:-1;;;80853:55:0;;;;;;;;;;;;80951:21;;;;80927:20;;;-1:-1:-1;;;;;80927:45:0;;;;;;80919:95;;;;-1:-1:-1;;;80919:95:0;;-1:-1:-1;;;;;3668:32:1;;;80919:95:0;;;3650:51:1;3623:18;;80919:95:0;3504:203:1;80919:95:0;;81027:21;81051:40;:9;:21;;;-1:-1:-1;;;;;81051:38:0;;:40::i;:::-;81027:64;;81116:8;-1:-1:-1;;;;;81104:33:0;;81145:9;81156:14;;81104:67;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;81239:13;81196:40;:9;:21;;;-1:-1:-1;;;;;81196:38:0;;:40::i;:::-;:56;;;;:::i;:::-;81184:68;;75520:7;81269:12;:42;;;81265:576;;;81367:28;;;81328:36;81367:28;;;:14;:28;;;;;;;;;81328:67;;;;;;;;;-1:-1:-1;;;;;81328:67:0;;;;-1:-1:-1;;;81328:67:0;;-1:-1:-1;;;;;81328:67:0;;;;;;;-1:-1:-1;;;81328:67:0;;;;;;;;;;;;;81456:4;81416:45;81412:260;;81544:28;;;;81482:174;;81622:14;75570:4;81634:2;81622:14;:::i;:::-;81586:28;;81574:40;;-1:-1:-1;;;;;81574:40:0;:9;:40;:::i;:::-;:44;;81617:1;81574:44;:::i;:::-;:63;;;;:::i;:::-;81482:21;;;;-1:-1:-1;;;;;81482:39:0;;:174;:39;:174::i;:::-;81788:28;;75570:4;;81776:40;;-1:-1:-1;;;;;81776:40:0;75570:4;81776:40;:::i;:::-;81763:54;;:9;:54;:::i;:::-;:66;;;;:::i;:::-;81751:78;;81313:528;81265:576;81851:15;81892:32;:9;:21;;;:30;:32::i;:::-;81869:20;:9;:18;:20::i;:::-;:55;;;;:::i;:::-;81851:73;;81950:1;81939:8;:12;81935:78;;;81980:9;:21;;;81968:33;;81935:78;82044:19;;;;82031:9;;:32;;;;82023:91;;;;-1:-1:-1;;;82023:91:0;;;;;10022:25:1;;;;10063:18;;;10056:34;9995:18;;82023:91:0;9848:248:1;82023:91:0;;;82185:76;82225:9;:24;;;82251:9;82185;:21;;;-1:-1:-1;;;;;82185:39:0;;;:76;;;;;:::i;:::-;82418:21;;;;;82359:20;;82323:21;;;;;82504:24;;;;;82279:260;;11116:25:1;;;11157:18;;;11150:34;;;11200:18;;;11193:34;;;11275:10;11263:23;;11258:2;11243:18;;11236:51;-1:-1:-1;;;;;11324:32:1;;;11318:3;11303:19;;11296:61;82279:260:0;;;;;;;82298:10;;82279:260;;11088:19:1;82279:260:0;;;;;;;80616:1931;;80439:2108;;;;;;;:::o;64821:191::-;64895:16;64914:6;;-1:-1:-1;;;;;64931:17:0;;;-1:-1:-1;;;;;;64931:17:0;;;;;;64964:40;;64914:6;;;;;;;64964:40;;64895:16;64964:40;64884:128;64821:191;:::o;67536:118::-;66499:19;:17;:19::i;:::-;67596:7:::1;:14:::0;;-1:-1:-1;;;;67596:14:0::1;-1:-1:-1::0;;;67596:14:0::1;::::0;;67626:20:::1;67633:12;25769:10:::0;;25689:98;77470:1197;77690:20;;77656:17;;-1:-1:-1;;;;;77690:48:0;77686:900;;77848:9;:21;;;77873:1;77848:26;77844:286;;77919:9;77895:21;;;:33;77686:900;;77844:286;78012:21;;;;77999:9;:34;;;77969:145;;;;-1:-1:-1;;;77969:145:0;;;;;10022:25:1;;;;10063:18;;;10056:34;9995:18;;77969:145:0;9848:248:1;77969:145:0;;;77686:900;;;78170:9;:14;78162:63;;;;-1:-1:-1;;;78162:63:0;;;;;;;;;;;;78333:9;:21;;;78358:1;78333:26;78329:141;;78411:20;;78404:50;;-1:-1:-1;;;78404:50:0;;78443:10;78404:50;;;3650:51:1;-1:-1:-1;;;;;78404:38:0;;;;;;3623:18:1;;78404:50:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;78380:21;;;:74;78329:141;78552:21;;;;78491:20;;78484:90;;-1:-1:-1;;;;;78484:45:0;;;;78530:10;;78542:8;;78484:45;:90::i;:::-;78603:56;78609:9;78620:14;;78636:8;78646:12;78603:5;:56::i;71929:638::-;72353:23;72379:33;-1:-1:-1;;;;;72379:27:0;;72407:4;72379:27;:33::i;:::-;72353:59;;72427:10;:17;72448:1;72427:22;;:57;;;;;72465:10;72454:30;;;;;;;;;;;;:::i;:::-;72453:31;72427:57;72423:137;;;72508:40;;-1:-1:-1;;;72508:40:0;;-1:-1:-1;;;;;3668:32:1;;72508:40:0;;;3650:51:1;3623:18;;72508:40:0;3504:203:1;67262:130:0;66941:4;66965:7;-1:-1:-1;;;66965:7:0;;;;67321:64;;67358:15;;-1:-1:-1;;;67358:15:0;;;;;;;;;;;74719:331;-1:-1:-1;;;;;74813:21:0;;74809:234;;74852:12;74877:2;-1:-1:-1;;;;;74869:16:0;74893:6;74869:35;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;74851:53;;;74927:7;74919:41;;;;-1:-1:-1;;;74919:41:0;;;;;;;;;;;;74836:136;69118:162;;;:::o;74809:234::-;74993:38;-1:-1:-1;;;;;74993:26:0;;75020:2;75024:6;74993:26;:38::i;61536:320::-;61592:6;-1:-1:-1;;;;;61715:5:0;:33;61711:107;;;61772:34;;-1:-1:-1;;;61772:34:0;;;;;1748:25:1;;;1721:18;;61772:34:0;1602:177:1;61711:107:0;-1:-1:-1;61842:5:0;61536:320::o;69525:190::-;69653:53;;-1:-1:-1;;;;;12080:32:1;;;69653:53:0;;;12062:51:1;12149:32;;;12129:18;;;12122:60;12198:18;;;12191:34;;;69626:81:0;;69646:5;;69668:18;;;;;12035::1;;69653:53:0;11860:371:1;21368:153:0;21443:12;21475:38;21497:6;21505:4;21511:1;21475:21;:38::i;:::-;21468:45;21368:153;-1:-1:-1;;;21368:153:0:o;21856:398::-;21955:12;22008:5;21984:21;:29;21980:110;;;22037:41;;-1:-1:-1;;;22037:41:0;;22072:4;22037:41;;;3650:51:1;3623:18;;22037:41:0;3504:203:1;21980:110:0;22101:12;22115:23;22142:6;-1:-1:-1;;;;;22142:11:0;22161:5;22168:4;22142:31;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22100:73;;;;22191:55;22218:6;22226:7;22235:10;23480:12;23510:7;23505:417;;23534:19;23542:10;23534:7;:19::i;:::-;23505:417;;;23762:17;;:22;:49;;;;-1:-1:-1;;;;;;23788:18:0;;;:23;23762:49;23758:121;;;23839:24;;-1:-1:-1;;;23839:24:0;;-1:-1:-1;;;;;3668:32:1;;23839:24:0;;;3650:51:1;3623:18;;23839:24:0;3504:203:1;23758:121:0;-1:-1:-1;23900:10:0;23893:17;;24482:528;24615:17;;:21;24611:392;;24847:10;24841:17;24904:15;24891:10;24887:2;24883:19;24876:44;24611:392;24974:17;;-1:-1:-1;;;24974:17:0;;;;;;;;;;;14:367:1;77:8;87:6;141:3;134:4;126:6;122:17;118:27;108:55;;159:1;156;149:12;108:55;-1:-1:-1;182:20:1;;-1:-1:-1;;;;;214:30:1;;211:50;;;257:1;254;247:12;211:50;294:4;286:6;282:17;270:29;;354:3;347:4;337:6;334:1;330:14;322:6;318:27;314:38;311:47;308:67;;;371:1;368;361:12;308:67;14:367;;;;;:::o;386:173::-;454:20;;-1:-1:-1;;;;;503:31:1;;493:42;;483:70;;549:1;546;539:12;564:842;695:6;703;711;719;727;780:2;768:9;759:7;755:23;751:32;748:52;;;796:1;793;786:12;748:52;836:9;823:23;-1:-1:-1;;;;;861:6:1;858:30;855:50;;;901:1;898;891:12;855:50;940:70;1002:7;993:6;982:9;978:22;940:70;:::i;:::-;1029:8;;-1:-1:-1;914:96:1;-1:-1:-1;;1117:2:1;1102:18;;1089:32;-1:-1:-1;;;;;1133:32:1;;1130:52;;;1178:1;1175;1168:12;1130:52;1217:72;1281:7;1270:8;1259:9;1255:24;1217:72;:::i;:::-;1308:8;;-1:-1:-1;1191:98:1;-1:-1:-1;1362:38:1;;-1:-1:-1;1396:2:1;1381:18;;1362:38;:::i;:::-;1352:48;;564:842;;;;;;;;:::o;1411:186::-;1470:6;1523:2;1511:9;1502:7;1498:23;1494:32;1491:52;;;1539:1;1536;1529:12;1491:52;1562:29;1581:9;1562:29;:::i;1784:347::-;1835:8;1845:6;1899:3;1892:4;1884:6;1880:17;1876:27;1866:55;;1917:1;1914;1907:12;1866:55;-1:-1:-1;1940:20:1;;-1:-1:-1;;;;;1972:30:1;;1969:50;;;2015:1;2012;2005:12;1969:50;2052:4;2044:6;2040:17;2028:29;;2104:3;2097:4;2088:6;2080;2076:19;2072:30;2069:39;2066:59;;;2121:1;2118;2111:12;2136:163;2203:20;;2263:10;2252:22;;2242:33;;2232:61;;2289:1;2286;2279:12;2304:1003;2469:6;2477;2485;2493;2501;2509;2553:9;2544:7;2540:23;2583:3;2579:2;2575:12;2572:32;;;2600:1;2597;2590:12;2572:32;2640:9;2627:23;-1:-1:-1;;;;;2665:6:1;2662:30;2659:50;;;2705:1;2702;2695:12;2659:50;2728:22;;2784:3;2766:16;;;2762:26;2759:46;;;2801:1;2798;2791:12;2759:46;2824:2;-1:-1:-1;2860:3:1;-1:-1:-1;;2842:16:1;;2838:26;2835:46;;;2877:1;2874;2867:12;2835:46;;2915:2;2904:9;2900:18;2890:28;;2971:3;2960:9;2956:19;2943:33;-1:-1:-1;;;;;2991:8:1;2988:32;2985:52;;;3033:1;3030;3023:12;2985:52;3072:60;3124:7;3113:8;3102:9;3098:24;3072:60;:::i;:::-;3151:8;;-1:-1:-1;3046:86:1;-1:-1:-1;3205:39:1;;-1:-1:-1;3239:3:1;3224:19;;3205:39;:::i;:::-;3195:49;;3263:38;3296:3;3285:9;3281:19;3263:38;:::i;:::-;3253:48;;2304:1003;;;;;;;;:::o;3712:1017::-;3772:5;3820:4;3808:9;3803:3;3799:19;3795:30;3792:50;;;3838:1;3835;3828:12;3792:50;3871:2;3865:9;3913:4;3905:6;3901:17;3984:6;3972:10;3969:22;-1:-1:-1;;;;;3936:10:1;3933:34;3930:62;3927:185;;;4034:10;4029:3;4025:20;4022:1;4015:31;4069:4;4066:1;4059:15;4097:4;4094:1;4087:15;3927:185;4128:2;4121:22;4161:6;-1:-1:-1;4161:6:1;4191:29;4210:9;4191:29;:::i;:::-;4176:45;;4294:2;4279:18;;;4266:32;4314:15;;;4307:32;4372:38;4406:2;4391:18;;4372:38;:::i;:::-;4367:2;4355:15;;4348:63;4484:2;4469:18;;;4456:32;4504:15;;;4497:32;4602:3;4587:19;;;4574:33;4623:16;;;4616:33;4683:39;4717:3;4702:19;;4683:39;:::i;:::-;4677:3;4669:6;4665:16;4658:65;;3712:1017;;;;:::o;4734:684::-;4859:6;4867;4875;4883;4891;4944:3;4932:9;4923:7;4919:23;4915:33;4912:53;;;4961:1;4958;4951:12;4912:53;4984:51;5027:7;5016:9;4984:51;:::i;:::-;4974:61;;5086:3;5075:9;5071:19;5058:33;-1:-1:-1;;;;;5106:6:1;5103:30;5100:50;;;5146:1;5143;5136:12;5100:50;5185:58;5235:7;5226:6;5215:9;5211:22;5185:58;:::i;:::-;5262:8;;-1:-1:-1;5159:84:1;-1:-1:-1;5316:39:1;;-1:-1:-1;5350:3:1;5335:19;;5316:39;:::i;:::-;5306:49;;5374:38;5407:3;5396:9;5392:19;5374:38;:::i;5423:430::-;5498:6;5506;5514;5567:2;5555:9;5546:7;5542:23;5538:32;5535:52;;;5583:1;5580;5573:12;5535:52;5606:28;5624:9;5606:28;:::i;:::-;5596:38;;5684:2;5673:9;5669:18;5656:32;-1:-1:-1;;;;;5721:5:1;5717:30;5710:5;5707:41;5697:69;;5762:1;5759;5752:12;5697:69;5785:5;-1:-1:-1;5809:38:1;5843:2;5828:18;;5809:38;:::i;:::-;5799:48;;5423:430;;;;;:::o;5858:184::-;5916:6;5969:2;5957:9;5948:7;5944:23;5940:32;5937:52;;;5985:1;5982;5975:12;5937:52;6008:28;6026:9;6008:28;:::i;6430:127::-;6491:10;6486:3;6482:20;6479:1;6472:31;6522:4;6519:1;6512:15;6546:4;6543:1;6536:15;6562:521;6639:4;6645:6;6705:11;6692:25;6799:2;6795:7;6784:8;6768:14;6764:29;6760:43;6740:18;6736:68;6726:96;;6818:1;6815;6808:12;6726:96;6845:33;;6897:20;;;-1:-1:-1;;;;;;6929:30:1;;6926:50;;;6972:1;6969;6962:12;6926:50;7005:4;6993:17;;-1:-1:-1;7036:14:1;7032:27;;;7022:38;;7019:58;;;7073:1;7070;7063:12;7276:266;7364:6;7359:3;7352:19;7416:6;7409:5;7402:4;7397:3;7393:14;7380:43;-1:-1:-1;7468:1:1;7443:16;;;7461:4;7439:27;;;7432:38;;;;7524:2;7503:15;;;-1:-1:-1;;7499:29:1;7490:39;;;7486:50;;7276:266::o;7547:829::-;7922:60;7972:9;7963:6;7957:13;7174:12;;-1:-1:-1;;;;;7170:38:1;7158:51;;7258:4;7247:16;;;7241:23;7225:14;;7218:47;7088:183;7922:60;8038:4;8030:6;8026:17;8020:24;8013:4;8002:9;7998:20;7991:54;8101:4;8093:6;8089:17;8083:24;8076:4;8065:9;8061:20;8054:54;8117:63;8175:3;8164:9;8160:19;8152:6;7174:12;;-1:-1:-1;;;;;7170:38:1;7158:51;;7258:4;7247:16;;;7241:23;7225:14;;7218:47;7088:183;8117:63;-1:-1:-1;;;;;8217:32:1;;8211:3;8196:19;;8189:61;8287:3;8281;8266:19;;8259:32;;;-1:-1:-1;;8308:62:1;;8350:19;;8342:6;8334;8308:62;:::i;8381:238::-;8469:6;8522:3;8510:9;8501:7;8497:23;8493:33;8490:53;;;8539:1;8536;8529:12;8490:53;8562:51;8605:7;8594:9;8562:51;:::i;8821:127::-;8882:10;8877:3;8873:20;8870:1;8863:31;8913:4;8910:1;8903:15;8937:4;8934:1;8927:15;8953:217;8993:1;9019;9009:132;;9063:10;9058:3;9054:20;9051:1;9044:31;9098:4;9095:1;9088:15;9126:4;9123:1;9116:15;9009:132;-1:-1:-1;9155:9:1;;8953:217::o;9380:184::-;9450:6;9503:2;9491:9;9482:7;9478:23;9474:32;9471:52;;;9519:1;9516;9509:12;9471:52;-1:-1:-1;9542:16:1;;9380:184;-1:-1:-1;9380:184:1:o;10101:244::-;10258:2;10247:9;10240:21;10221:4;10278:61;10335:2;10324:9;10320:18;10312:6;10304;10278:61;:::i;:::-;10270:69;10101:244;-1:-1:-1;;;;10101:244:1:o;10350:128::-;10417:9;;;10438:11;;;10435:37;;;10452:18;;:::i;10483:168::-;10556:9;;;10587;;10604:15;;;10598:22;;10584:37;10574:71;;10625:18;;:::i;10656:200::-;10722:9;;;10695:4;10750:9;;10778:10;;10790:12;;;10774:29;10813:12;;;10805:21;;10771:56;10768:82;;;10830:18;;:::i;:::-;10768:82;10656:200;;;;:::o;11368:277::-;11435:6;11488:2;11476:9;11467:7;11463:23;11459:32;11456:52;;;11504:1;11501;11494:12;11456:52;11536:9;11530:16;11589:5;11582:13;11575:21;11568:5;11565:32;11555:60;;11611:1;11608;11601:12;12236:412;12365:3;12403:6;12397:13;12428:1;12438:129;12452:6;12449:1;12446:13;12438:129;;;12550:4;12534:14;;;12530:25;;12524:32;12511:11;;;12504:53;12467:12;12438:129;;;-1:-1:-1;12622:1:1;12586:16;;12611:13;;;-1:-1:-1;12586:16:1;12236:412;-1:-1:-1;12236:412:1:o

Swarm Source

ipfs://7642173e009772895dc2d2d7538d52d9f42870a6c035809a1ce9230a1f3df656

Block Transaction Gas Used Reward
view all blocks produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Chain Token Portfolio % Price Amount Value
ARB54.86%$1,795.90.00549958$9.88
BERA18.70%$3.650.9225$3.37
BERA2.56%$0.9988990.4614$0.4609
BERA2.44%$0.0607437.2449$0.44
BERA2.28%$10.4094$0.4098
BERA2.14%$10.3848$0.3848
BERA2.10%$1.050.3591$0.3774
BERA1.77%$92,8000.00000343$0.3183
BERA1.74%$0.02505112.4991$0.3131
BERA1.51%$10.2715$0.2714
BERA1.08%$0.0001451,340.4069$0.1943
BERA1.03%$0.0051236.2856$0.1857
BERA1.01%$1,907.650.00009543$0.182
BERA0.96%$0.9991530.1738$0.1736
BERA0.96%$1.170.1478$0.1728
BERA0.93%$21.720.00774222$0.1681
BERA0.81%$92,0570.00000159$0.1463
BERA0.79%$93,2510.00000153$0.1425
BERA0.78%$0.1020821.3821$0.141
BERA0.67%$0.0239525.0642$0.1212
BERA0.60%$5.760.0186$0.1072
BERA
Bera (BERA)
0.28%$3.650.0137$0.049923
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.