false
false
0
The new Blockscout UI is now open source! Learn how to deploy it here

Contract Address Details

0xCd6f47d1eB24c280BE016C02Ce03Ee1bC46aB682

Token
Cargo Liquidity Provider (CARGO-LP)
Creator
0x310a3f–0d4d63 at 0xedaf3a–1aa178
Balance
100.00000000000001 Cargo
Tokens
Fetching tokens...
Transactions
Fetching transactions...
Transfers
Fetching transfers...
Gas Used
Fetching gas used...
Last Balance Update
1894841
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
CargoPair




Optimization enabled
true
Compiler version
v0.8.20+commit.a1b79de6




Optimization runs
200
EVM Version
paris




Verified at
2026-07-26T19:49:20.749118Z

Contract source code

// SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.20;

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


/**
 * @dev Interface of the ERC-20 standard as defined in the ERC.
 */
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);
}

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



// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)




/**
 * @dev Interface for the optional metadata functions from the ERC-20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

// 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;
    }
}

// OpenZeppelin Contracts (last updated v5.5.0) (interfaces/draft-IERC6093.sol)


/**
 * @dev Standard ERC-20 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.
 */
interface IERC20Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC20InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC20InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     * @param allowance Amount of tokens a `spender` is allowed to operate with.
     * @param needed Minimum amount required to perform a transfer.
     */
    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC20InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.
     * @param spender Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC20InvalidSpender(address spender);
}

/**
 * @dev Standard ERC-721 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
 */
interface IERC721Errors {
    /**
     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-721.
     * Used in balance queries.
     * @param owner Address of the current owner of a token.
     */
    error ERC721InvalidOwner(address owner);

    /**
     * @dev Indicates a `tokenId` whose `owner` is the zero address.
     * @param tokenId Identifier number of a token.
     */
    error ERC721NonexistentToken(uint256 tokenId);

    /**
     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param tokenId Identifier number of a token.
     * @param owner Address of the current owner of a token.
     */
    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC721InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC721InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param tokenId Identifier number of a token.
     */
    error ERC721InsufficientApproval(address operator, uint256 tokenId);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC721InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC721InvalidOperator(address operator);
}

/**
 * @dev Standard ERC-1155 Errors
 * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.
 */
interface IERC1155Errors {
    /**
     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     * @param balance Current balance for the interacting account.
     * @param needed Minimum amount required to perform a transfer.
     * @param tokenId Identifier number of a token.
     */
    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);

    /**
     * @dev Indicates a failure with the token `sender`. Used in transfers.
     * @param sender Address whose tokens are being transferred.
     */
    error ERC1155InvalidSender(address sender);

    /**
     * @dev Indicates a failure with the token `receiver`. Used in transfers.
     * @param receiver Address to which tokens are being transferred.
     */
    error ERC1155InvalidReceiver(address receiver);

    /**
     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     * @param owner Address of the current owner of a token.
     */
    error ERC1155MissingApprovalForAll(address operator, address owner);

    /**
     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
     * @param approver Address initiating an approval operation.
     */
    error ERC1155InvalidApprover(address approver);

    /**
     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.
     * @param operator Address that may be allowed to operate on tokens without being their owner.
     */
    error ERC1155InvalidOperator(address operator);

    /**
     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
     * Used in batch transfers.
     * @param idsLength Length of the array of token identifiers
     * @param valuesLength Length of the array of token amounts
     */
    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}


/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * The default value of {decimals} is 18. To change this, you should override
 * this function so it returns a different value.
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC-20
 * applications.
 */
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
    mapping(address account => uint256) private _balances;

    mapping(address account => mapping(address spender => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * Both values are immutable: they can only be set once during construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the default value returned by this function, unless
     * it's overridden.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return 18;
    }

    /// @inheritdoc IERC20
    function totalSupply() public view virtual returns (uint256) {
        return _totalSupply;
    }

    /// @inheritdoc IERC20
    function balanceOf(address account) public view virtual returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `value`.
     */
    function transfer(address to, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, value);
        return true;
    }

    /// @inheritdoc IERC20
    function allowance(address owner, address spender) public view virtual returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 value) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, value);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Skips emitting an {Approval} event indicating an allowance update. This is not
     * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `value`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `value`.
     */
    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, value);
        _transfer(from, to, value);
        return true;
    }

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _transfer(address from, address to, uint256 value) internal {
        if (from == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        if (to == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(from, to, value);
    }

    /**
     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
     * this function.
     *
     * Emits a {Transfer} event.
     */
    function _update(address from, address to, uint256 value) internal virtual {
        if (from == address(0)) {
            // Overflow check required: The rest of the code assumes that totalSupply never overflows
            _totalSupply += value;
        } else {
            uint256 fromBalance = _balances[from];
            if (fromBalance < value) {
                revert ERC20InsufficientBalance(from, fromBalance, value);
            }
            unchecked {
                // Overflow not possible: value <= fromBalance <= totalSupply.
                _balances[from] = fromBalance - value;
            }
        }

        if (to == address(0)) {
            unchecked {
                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
                _totalSupply -= value;
            }
        } else {
            unchecked {
                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
                _balances[to] += value;
            }
        }

        emit Transfer(from, to, value);
    }

    /**
     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
     * Relies on the `_update` mechanism
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead.
     */
    function _mint(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidReceiver(address(0));
        }
        _update(address(0), account, value);
    }

    /**
     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
     * Relies on the `_update` mechanism.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * NOTE: This function is not virtual, {_update} should be overridden instead
     */
    function _burn(address account, uint256 value) internal {
        if (account == address(0)) {
            revert ERC20InvalidSender(address(0));
        }
        _update(account, address(0), value);
    }

    /**
     * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     *
     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
     */
    function _approve(address owner, address spender, uint256 value) internal {
        _approve(owner, spender, value, true);
    }

    /**
     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
     *
     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
     * `_spendAllowance` during the `transferFrom` operation sets the flag to false. This saves gas by not emitting any
     * `Approval` event during `transferFrom` operations.
     *
     * Anyone who wishes to continue emitting `Approval` events on the `transferFrom` operation can force the flag to
     * true using the following override:
     *
     * ```solidity
     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
     *     super._approve(owner, spender, value, true);
     * }
     * ```
     *
     * Requirements are the same as {_approve}.
     */
    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
        if (owner == address(0)) {
            revert ERC20InvalidApprover(address(0));
        }
        if (spender == address(0)) {
            revert ERC20InvalidSpender(address(0));
        }
        _allowances[owner][spender] = value;
        if (emitEvent) {
            emit Approval(owner, spender, value);
        }
    }

    /**
     * @dev Updates `owner`'s allowance for `spender` based on spent `value`.
     *
     * Does not update the allowance value in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Does not emit an {Approval} event.
     */
    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance < type(uint256).max) {
            if (currentAllowance < value) {
                revert ERC20InsufficientAllowance(spender, currentAllowance, value);
            }
            unchecked {
                _approve(owner, spender, currentAllowance - value, false);
            }
        }
    }
}

// OpenZeppelin Contracts (last updated v5.5.0) (utils/ReentrancyGuard.sol)


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


/**
 * @dev Library for reading and writing primitive types to specific storage slots.
 *
 * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
 * This library helps with reading and writing to such slots without the need for inline assembly.
 *
 * The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
 *
 * Example usage to set ERC-1967 implementation slot:
 * ```solidity
 * contract ERC1967 {
 *     // Define the slot. Alternatively, use the SlotDerivation library to derive the slot.
 *     bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
 *
 *     function _getImplementation() internal view returns (address) {
 *         return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
 *     }
 *
 *     function _setImplementation(address newImplementation) internal {
 *         require(newImplementation.code.length > 0);
 *         StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
 *     }
 * }
 * ```
 *
 * TIP: Consider using this library along with {SlotDerivation}.
 */
library StorageSlot {
    struct AddressSlot {
        address value;
    }

    struct BooleanSlot {
        bool value;
    }

    struct Bytes32Slot {
        bytes32 value;
    }

    struct Uint256Slot {
        uint256 value;
    }

    struct Int256Slot {
        int256 value;
    }

    struct StringSlot {
        string value;
    }

    struct BytesSlot {
        bytes value;
    }

    /**
     * @dev Returns an `AddressSlot` with member `value` located at `slot`.
     */
    function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns a `BooleanSlot` with member `value` located at `slot`.
     */
    function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns a `Bytes32Slot` with member `value` located at `slot`.
     */
    function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns a `Uint256Slot` with member `value` located at `slot`.
     */
    function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns a `Int256Slot` with member `value` located at `slot`.
     */
    function getInt256Slot(bytes32 slot) internal pure returns (Int256Slot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns a `StringSlot` with member `value` located at `slot`.
     */
    function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `StringSlot` representation of the string storage pointer `store`.
     */
    function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
        assembly ("memory-safe") {
            r.slot := store.slot
        }
    }

    /**
     * @dev Returns a `BytesSlot` with member `value` located at `slot`.
     */
    function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
        assembly ("memory-safe") {
            r.slot := slot
        }
    }

    /**
     * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
     */
    function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
        assembly ("memory-safe") {
            r.slot := store.slot
        }
    }
}


/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
 * consider using {ReentrancyGuardTransient} instead.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 *
 * IMPORTANT: Deprecated. This storage-based reentrancy guard will be removed and replaced
 * by the {ReentrancyGuardTransient} variant in v6.0.
 *
 * @custom:stateless
 */
abstract contract ReentrancyGuard {
    using StorageSlot for bytes32;

    // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.ReentrancyGuard")) - 1)) & ~bytes32(uint256(0xff))
    bytes32 private constant REENTRANCY_GUARD_STORAGE =
        0x9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00;

    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _reentrancyGuardStorageSlot().getUint256Slot().value = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    /**
     * @dev A `view` only version of {nonReentrant}. Use to block view functions
     * from being called, preventing reading from inconsistent contract state.
     *
     * CAUTION: This is a "view" modifier and does not change the reentrancy
     * status. Use it only on view functions. For payable or non-payable functions,
     * use the standard {nonReentrant} modifier instead.
     */
    modifier nonReentrantView() {
        _nonReentrantBeforeView();
        _;
    }

    function _nonReentrantBeforeView() private view {
        if (_reentrancyGuardEntered()) {
            revert ReentrancyGuardReentrantCall();
        }
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        _nonReentrantBeforeView();

        // Any calls to nonReentrant after this point will fail
        _reentrancyGuardStorageSlot().getUint256Slot().value = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _reentrancyGuardStorageSlot().getUint256Slot().value = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _reentrancyGuardStorageSlot().getUint256Slot().value == ENTERED;
    }

    function _reentrancyGuardStorageSlot() internal pure virtual returns (bytes32) {
        return REENTRANCY_GUARD_STORAGE;
    }
}

// OpenZeppelin Contracts (last updated v5.3.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 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());
    }
}


/// @title CargoMath — Safe math utilities for AMM calculations
library CargoMath {
    /// @notice Returns the minimum of two uint256 values
    function min(uint256 x, uint256 y) internal pure returns (uint256 z) {
        z = x < y ? x : y;
    }

    /// @notice Babylonian method for integer square root
    /// @dev Accurate for all uint256 inputs, gas-optimized
    function sqrt(uint256 y) internal pure returns (uint256 z) {
        if (y > 3) {
            z = y;
            uint256 x = y;
            if (y > 0xffffffffffffffffffffffffffffffff) { x >>= 128; z >>= 64; }
            if (x > 0xffffffffffffffff) { x >>= 64; z >>= 32; }
            if (x > 0xffffffff) { x >>= 32; z >>= 16; }
            if (x > 0xffff) { x >>= 16; z >>= 8; }
            if (x > 0xff) { x >>= 8; z >>= 4; }
            if (x > 0xf) { x >>= 4; z >>= 2; }
            if (x > 0x3) { z >>= 1; }
            z = (z + y / z) >> 1;
            z = (z + y / z) >> 1;
            z = (z + y / z) >> 1;
            z = (z + y / z) >> 1;
            z = (z + y / z) >> 1;
            z = (z + y / z) >> 1;
            z = (z + y / z) >> 1;
            uint256 z1 = y / z;
            if (z > z1) z = z1;
        } else if (y != 0) {
            z = 1;
        }
    }
}


/// @title ICargoFactory — Factory Interface
/// @notice Interface for CargoFactory fee configuration
interface ICargoFactory {
    function feeTo() external view returns (address);
    function feeToSetter() external view returns (address);
    function allPairsLength() external view returns (uint256);
    function owner() external view returns (address);
}


/// @title CargoPair — AMM Liquidity Pool
/// @notice Uniswap V2 fork with ETH/native token support
/// @dev WARNING: TWAP oracle is for internal use only. Use Chainlink for external pricing.
contract CargoPair is ERC20, ReentrancyGuard, Pausable {
    using CargoMath for uint256;

    // ── Errors ──────────────────────────────────────────────────────────
    error NotInitialized();
    error AlreadyInitialized();
    error Forbidden();
    error Expired();
    error ZeroValue();
    error ZeroAddress();
    error InsufficientInput();
    error InsufficientOutput();
    error InsufficientLiquidity();
    error InsufficientLiquidityMinted();
    error InsufficientLiquidityBurned();
    error InsufficientCargoOut();
    error InsufficientTokenOut();
    error InsufficientTokenAmount();
    error NoLiquidity();
    error StaleReservesSync();
    error CargoTransferFailed();
    error TokenTransferFailed();
    error LiquidityTooLow();
    error PairedContractReverted();

    // ── Events ──────────────────────────────────────────────────────────
    event Mint(address indexed sender, uint256 amountCargo, uint256 amountToken);
    event Burn(address indexed sender, uint256 amountCargo, uint256 amountToken, address indexed to);
    event Swap(
        address indexed sender,
        uint256 amountCargoIn,
        uint256 amountTokenIn,
        uint256 amountCargoOut,
        uint256 amountTokenOut,
        address indexed to
    );
    event Sync(uint256 reserveCargo, uint256 reserveToken);
    event PermanentLiquidityBurned(uint256 amount);
    event Initialized(address indexed token);
    event PairSkimmed(address indexed to, uint256 cargoAmount, uint256 tokenAmount);

    // ── State ───────────────────────────────────────────────────────────
    address public factory;
    address public token;
    bool private _initialized;

    uint256 private constant MINIMUM_LIQUIDITY = 10 ** 3;
    uint256 private constant FEE_NUMERATOR = 997;
    uint256 private constant FEE_DENOMINATOR = 1000;

    uint256 public reserveCargo;
    uint256 public reserveToken;

    uint256 public price0CumulativeLast;
    uint256 public price1CumulativeLast;
    uint256 public kLast;

    uint256 private _blockTimestampLast;

    // ── Modifiers ───────────────────────────────────────────────────────
    modifier onlyFactory() {
        // Allow factory contract OR factory owner
        if (msg.sender != factory && msg.sender != ICargoFactory(factory).owner()) revert Forbidden();
        _;
    }

    modifier initialized() {
        if (!_initialized) revert NotInitialized();
        _;
    }

    modifier checkDeadline(uint256 deadline) {
        if (block.timestamp > deadline) revert Expired();
        _;
    }

    // ── Constructor ─────────────────────────────────────────────────────
    constructor() ERC20("Cargo Liquidity Provider", "CARGO-LP") {
        factory = msg.sender;
    }

    // ── Initialization ──────────────────────────────────────────────────
    function initialize(address _token) external {
        if (_initialized) revert AlreadyInitialized();
        if (_token == address(0)) revert ZeroAddress();
        token = _token;
        _initialized = true;
        emit Initialized(_token);
    }

    // ── View Functions ──────────────────────────────────────────────────
    function getReserves() public view returns (uint256 cargo, uint256 tokenAmt, uint256 ts) {
        cargo = reserveCargo;
        tokenAmt = reserveToken;
        ts = _blockTimestampLast;
    }

    // ── Internal Functions ──────────────────────────────────────────────
    function _update(uint256 balanceCargo, uint256 balanceToken) private {
        uint256 timeElapsed = block.timestamp - _blockTimestampLast;
        if (timeElapsed > 0 && reserveCargo != 0 && reserveToken != 0) {
            unchecked {
                price0CumulativeLast += (reserveToken * timeElapsed) / reserveCargo;
                price1CumulativeLast += (reserveCargo * timeElapsed) / reserveToken;
            }
        }
        reserveCargo = balanceCargo;
        reserveToken = balanceToken;
        _blockTimestampLast = block.timestamp;
        emit Sync(reserveCargo, reserveToken);
    }

    function _mintFee(uint256 _reserveCargo, uint256 _reserveToken) private returns (bool feeOn) {
        address feeTo = ICargoFactory(factory).feeTo();
        feeOn = feeTo != address(0);
        uint256 _kLast = kLast;
        if (feeOn) {
            if (_kLast != 0) {
                uint256 rootK = CargoMath.sqrt(_reserveCargo * _reserveToken);
                uint256 rootKLast = CargoMath.sqrt(_kLast);
                if (rootK > rootKLast) {
                    uint256 numerator = totalSupply() * (rootK - rootKLast);
                    uint256 denominator = rootK * 5 + rootKLast;
                    uint256 liquidity = numerator / denominator;
                    if (liquidity > 0) _mint(feeTo, liquidity);
                }
            }
        } else if (_kLast != 0) {
            kLast = 0;
        }
    }

    function _safeTransfer(address tokenAddr, address to, uint256 value) private {
        (bool success, bytes memory data) = tokenAddr.call(
            abi.encodeWithSelector(IERC20.transfer.selector, to, value)
        );
        if (!success || (data.length != 0 && !abi.decode(data, (bool)))) revert TokenTransferFailed();
    }

    function _safeTransferFrom(address tokenAddr, address from, address to, uint256 value) private {
        (bool success, bytes memory data) = tokenAddr.call(
            abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value)
        );
        if (!success || (data.length != 0 && !abi.decode(data, (bool)))) revert TokenTransferFailed();
    }

    /// @notice Safe ETH transfer with failure handling
    /// @dev Uses call with success check — reverts on failure to protect users
    function _safeTransferETH(address to, uint256 value) private {
        (bool success, ) = payable(to).call{value: value}("");
        if (!success) revert CargoTransferFailed();
    }

    // ── Liquidity Functions ─────────────────────────────────────────────
    function addLiquidity(
        address to,
        uint256 maxTokenIn,
        uint256 deadline
    ) external payable nonReentrant initialized whenNotPaused checkDeadline(deadline) returns (uint256 liquidity, uint256 tokenUsed) {
        if (to == address(0)) revert ZeroAddress();
        if (msg.value == 0) revert ZeroValue();
        if (maxTokenIn == 0) revert InsufficientInput();

        uint256 _reserveCargo = reserveCargo;
        uint256 _reserveToken = reserveToken;

        if (_reserveCargo == 0 && _reserveToken == 0) {
            require(maxTokenIn > 0, "CargoPair: INITIAL_TOKEN_REQUIRED");
            _safeTransferFrom(token, msg.sender, address(this), maxTokenIn);
            tokenUsed = maxTokenIn;
        } else {
            if (_reserveCargo == 0) revert StaleReservesSync();
            uint256 optimalToken = (msg.value * _reserveToken) / _reserveCargo;
            if (optimalToken > maxTokenIn) revert InsufficientTokenAmount();
            if (optimalToken == 0) revert InsufficientInput();
            _safeTransferFrom(token, msg.sender, address(this), optimalToken);
            tokenUsed = optimalToken;
        }

        uint256 balanceCargo = address(this).balance;
        uint256 balanceToken = IERC20(token).balanceOf(address(this));
        uint256 amountCargo = balanceCargo - _reserveCargo;
        uint256 amountToken = balanceToken - _reserveToken;

        _mintFee(_reserveCargo, _reserveToken);

        uint256 _totalSupply = totalSupply();
        if (_totalSupply == 0) {
            uint256 rootK = CargoMath.sqrt(amountCargo * amountToken);
            if (rootK <= MINIMUM_LIQUIDITY) revert LiquidityTooLow();
            liquidity = rootK - MINIMUM_LIQUIDITY;
            _mint(0x000000000000000000000000000000000000dEaD, MINIMUM_LIQUIDITY);
            emit PermanentLiquidityBurned(MINIMUM_LIQUIDITY);
        } else {
            liquidity = CargoMath.min(
                (amountCargo * _totalSupply) / _reserveCargo,
                (amountToken * _totalSupply) / _reserveToken
            );
        }
        if (liquidity == 0) revert InsufficientLiquidityMinted();

        _mint(to, liquidity);
        _update(balanceCargo, balanceToken);
        kLast = reserveCargo * reserveToken;
        emit Mint(msg.sender, amountCargo, amountToken);
    }

    function removeLiquidity(
        uint256 liquidity,
        address to,
        uint256 deadline
    ) external nonReentrant initialized whenNotPaused checkDeadline(deadline) returns (uint256 amountCargo, uint256 amountToken) {
        if (to == address(0)) revert ZeroAddress();
        if (liquidity == 0) revert InsufficientLiquidityBurned();
        if (balanceOf(msg.sender) < liquidity) revert InsufficientLiquidityBurned();

        uint256 balanceCargo = address(this).balance;
        uint256 balanceToken = IERC20(token).balanceOf(address(this));

        _mintFee(reserveCargo, reserveToken);

        uint256 _totalSupply = totalSupply();
        amountCargo = (liquidity * balanceCargo) / _totalSupply;
        amountToken = (liquidity * balanceToken) / _totalSupply;

        if (amountCargo == 0) revert InsufficientCargoOut();
        if (amountToken == 0) revert InsufficientTokenOut();

        _burn(msg.sender, liquidity);

        _safeTransfer(token, to, amountToken);
        _safeTransferETH(to, amountCargo);

        balanceCargo = address(this).balance;
        balanceToken = IERC20(token).balanceOf(address(this));

        _update(balanceCargo, balanceToken);
        kLast = reserveCargo * reserveToken;
        emit Burn(msg.sender, amountCargo, amountToken, to);
    }

    // ── Swap Functions ──────────────────────────────────────────────────
    function swapExactCargoForTokens(
        uint256 amountOutMin,
        address to,
        uint256 deadline
    ) external payable nonReentrant initialized whenNotPaused checkDeadline(deadline) returns (uint256 amountOut) {
        if (to == address(0)) revert ZeroAddress();
        uint256 amountIn = msg.value;
        if (amountIn == 0) revert ZeroValue();

        uint256 _reserveCargo = reserveCargo;
        uint256 _reserveToken = reserveToken;
        if (_reserveCargo == 0 || _reserveToken == 0) revert NoLiquidity();

        amountOut = (amountIn * FEE_NUMERATOR * _reserveToken) /
            ((_reserveCargo * FEE_DENOMINATOR) + (amountIn * FEE_NUMERATOR));

        if (amountOut < amountOutMin) revert InsufficientOutput();
        if (amountOut >= _reserveToken) revert InsufficientLiquidity();

        _safeTransfer(token, to, amountOut);
        _update(address(this).balance, IERC20(token).balanceOf(address(this)));
        emit Swap(msg.sender, amountIn, 0, 0, amountOut, to);
    }

    function swapExactTokensForCargo(
        uint256 amountIn,
        uint256 amountOutMin,
        address to,
        uint256 deadline
    ) external nonReentrant initialized whenNotPaused checkDeadline(deadline) returns (uint256 amountOut) {
        if (to == address(0)) revert ZeroAddress();
        if (amountIn == 0) revert ZeroValue();

        _safeTransferFrom(token, msg.sender, address(this), amountIn);

        uint256 _reserveCargo = reserveCargo;
        uint256 _reserveToken = reserveToken;
        if (_reserveCargo == 0 || _reserveToken == 0) revert NoLiquidity();

        amountOut = (amountIn * FEE_NUMERATOR * _reserveCargo) /
            ((_reserveToken * FEE_DENOMINATOR) + (amountIn * FEE_NUMERATOR));

        if (amountOut < amountOutMin) revert InsufficientOutput();
        if (amountOut >= _reserveCargo) revert InsufficientLiquidity();

        _safeTransferETH(to, amountOut);

        _update(address(this).balance, IERC20(token).balanceOf(address(this)));
        emit Swap(msg.sender, 0, amountIn, amountOut, 0, to);
    }

    // ── Admin Functions ─────────────────────────────────────────────────
    /// @notice Skim excess tokens/ETH to owner only
    /// @dev Restricted to factory owner to prevent griefing
    function skim(address to) external nonReentrant onlyFactory {
        if (to == address(0)) revert ZeroAddress();
        address _token = token;
        uint256 tokenBalance = IERC20(_token).balanceOf(address(this));
        uint256 cargoBalance = address(this).balance;
        uint256 tExcess = tokenBalance > reserveToken ? tokenBalance - reserveToken : 0;
        uint256 cExcess = cargoBalance > reserveCargo ? cargoBalance - reserveCargo : 0;
        if (tExcess > 0) {
            _safeTransfer(_token, to, tExcess);
        }
        if (cExcess > 0) {
            _safeTransferETH(to, cExcess);
        }
        emit PairSkimmed(to, cExcess, tExcess);
    }

    function sync() external nonReentrant onlyFactory {
        _update(address(this).balance, IERC20(token).balanceOf(address(this)));
    }

    function pause() external onlyFactory {
        _pause();
    }

    function unpause() external onlyFactory {
        _unpause();
    }

    // ── Receive ─────────────────────────────────────────────────────────
    receive() external payable {}
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[]},{"type":"error","name":"AlreadyInitialized","inputs":[]},{"type":"error","name":"CargoTransferFailed","inputs":[]},{"type":"error","name":"ERC20InsufficientAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"allowance","internalType":"uint256"},{"type":"uint256","name":"needed","internalType":"uint256"}]},{"type":"error","name":"ERC20InsufficientBalance","inputs":[{"type":"address","name":"sender","internalType":"address"},{"type":"uint256","name":"balance","internalType":"uint256"},{"type":"uint256","name":"needed","internalType":"uint256"}]},{"type":"error","name":"ERC20InvalidApprover","inputs":[{"type":"address","name":"approver","internalType":"address"}]},{"type":"error","name":"ERC20InvalidReceiver","inputs":[{"type":"address","name":"receiver","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSender","inputs":[{"type":"address","name":"sender","internalType":"address"}]},{"type":"error","name":"ERC20InvalidSpender","inputs":[{"type":"address","name":"spender","internalType":"address"}]},{"type":"error","name":"EnforcedPause","inputs":[]},{"type":"error","name":"ExpectedPause","inputs":[]},{"type":"error","name":"Expired","inputs":[]},{"type":"error","name":"Forbidden","inputs":[]},{"type":"error","name":"InsufficientCargoOut","inputs":[]},{"type":"error","name":"InsufficientInput","inputs":[]},{"type":"error","name":"InsufficientLiquidity","inputs":[]},{"type":"error","name":"InsufficientLiquidityBurned","inputs":[]},{"type":"error","name":"InsufficientLiquidityMinted","inputs":[]},{"type":"error","name":"InsufficientOutput","inputs":[]},{"type":"error","name":"InsufficientTokenAmount","inputs":[]},{"type":"error","name":"InsufficientTokenOut","inputs":[]},{"type":"error","name":"LiquidityTooLow","inputs":[]},{"type":"error","name":"NoLiquidity","inputs":[]},{"type":"error","name":"NotInitialized","inputs":[]},{"type":"error","name":"PairedContractReverted","inputs":[]},{"type":"error","name":"ReentrancyGuardReentrantCall","inputs":[]},{"type":"error","name":"StaleReservesSync","inputs":[]},{"type":"error","name":"TokenTransferFailed","inputs":[]},{"type":"error","name":"ZeroAddress","inputs":[]},{"type":"error","name":"ZeroValue","inputs":[]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Burn","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"uint256","name":"amountCargo","internalType":"uint256","indexed":false},{"type":"uint256","name":"amountToken","internalType":"uint256","indexed":false},{"type":"address","name":"to","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Initialized","inputs":[{"type":"address","name":"token","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Mint","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"uint256","name":"amountCargo","internalType":"uint256","indexed":false},{"type":"uint256","name":"amountToken","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"PairSkimmed","inputs":[{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"cargoAmount","internalType":"uint256","indexed":false},{"type":"uint256","name":"tokenAmount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"PermanentLiquidityBurned","inputs":[{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Swap","inputs":[{"type":"address","name":"sender","internalType":"address","indexed":true},{"type":"uint256","name":"amountCargoIn","internalType":"uint256","indexed":false},{"type":"uint256","name":"amountTokenIn","internalType":"uint256","indexed":false},{"type":"uint256","name":"amountCargoOut","internalType":"uint256","indexed":false},{"type":"uint256","name":"amountTokenOut","internalType":"uint256","indexed":false},{"type":"address","name":"to","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Sync","inputs":[{"type":"uint256","name":"reserveCargo","internalType":"uint256","indexed":false},{"type":"uint256","name":"reserveToken","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"payable","outputs":[{"type":"uint256","name":"liquidity","internalType":"uint256"},{"type":"uint256","name":"tokenUsed","internalType":"uint256"}],"name":"addLiquidity","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"maxTokenIn","internalType":"uint256"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"factory","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"cargo","internalType":"uint256"},{"type":"uint256","name":"tokenAmt","internalType":"uint256"},{"type":"uint256","name":"ts","internalType":"uint256"}],"name":"getReserves","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"address","name":"_token","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"kLast","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"price0CumulativeLast","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"price1CumulativeLast","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"amountCargo","internalType":"uint256"},{"type":"uint256","name":"amountToken","internalType":"uint256"}],"name":"removeLiquidity","inputs":[{"type":"uint256","name":"liquidity","internalType":"uint256"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"reserveCargo","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"reserveToken","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"skim","inputs":[{"type":"address","name":"to","internalType":"address"}]},{"type":"function","stateMutability":"payable","outputs":[{"type":"uint256","name":"amountOut","internalType":"uint256"}],"name":"swapExactCargoForTokens","inputs":[{"type":"uint256","name":"amountOutMin","internalType":"uint256"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"amountOut","internalType":"uint256"}],"name":"swapExactTokensForCargo","inputs":[{"type":"uint256","name":"amountIn","internalType":"uint256"},{"type":"uint256","name":"amountOutMin","internalType":"uint256"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"deadline","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"sync","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"token","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"value","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]},{"type":"receive","stateMutability":"payable"}]
              

Contract Creation Code

0x60806040523480156200001157600080fd5b506040518060400160405280601881526020017f436172676f204c69717569646974792050726f76696465720000000000000000815250604051806040016040528060088152602001670434152474f2d4c560c41b81525081600390816200007a91906200018c565b5060046200008982826200018c565b5050506001620000a5620000a2620000c360201b60201c565b90565b5560058054610100600160a81b031916336101000217905562000258565b7f9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f0090565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200011257607f821691505b6020821081036200013357634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200018757600081815260208120601f850160051c81016020861015620001625750805b601f850160051c820191505b8181101562000183578281556001016200016e565b5050505b505050565b81516001600160401b03811115620001a857620001a8620000e7565b620001c081620001b98454620000fd565b8462000139565b602080601f831160018114620001f85760008415620001df5750858301515b600019600386901b1c1916600185901b17855562000183565b600085815260208120601f198616915b82811015620002295788860151825594840194600190910190840162000208565b5085821015620002485787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61250880620002686000396000f3fe6080604052600436106101a05760003560e01c80637464fc3d116100ec578063c45a01551161008a578063dd62ed3e11610064578063dd62ed3e14610496578063f4325d67146104dc578063fc0c546a146104f2578063fff6cae91461051257600080fd5b8063c45a015514610419578063c4ccdeea14610456578063c4d66de81461047657600080fd5b80638acaf74a116100c65780638acaf74a146103ae57806395d89b41146103c4578063a9059cbb146103d9578063bc25cf77146103f957600080fd5b80637464fc3d146103705780638456cb591461038657806386fb37981461039b57600080fd5b8063313ce567116101595780635909c0d5116101335780635909c0d5146102f65780635a3d54931461030c5780635c975abb1461032257806370a082311461033a57600080fd5b8063313ce5671461029b5780633f4ba83a146102b757806355776b77146102ce57600080fd5b806306fdde03146101ac5780630902f1ac146101d7578063092d2d7f14610208578063095ea7b31461023657806318160ddd1461026657806323b872dd1461027b57600080fd5b366101a757005b600080fd5b3480156101b857600080fd5b506101c1610527565b6040516101ce91906121d3565b60405180910390f35b3480156101e357600080fd5b50600754600854600c54604080519384526020840192909252908201526060016101ce565b34801561021457600080fd5b5061022861022336600461221b565b6105b9565b6040519081526020016101ce565b34801561024257600080fd5b5061025661025136600461225a565b610824565b60405190151581526020016101ce565b34801561027257600080fd5b50600254610228565b34801561028757600080fd5b50610256610296366004612286565b61083e565b3480156102a757600080fd5b50604051601281526020016101ce565b3480156102c357600080fd5b506102cc610864565b005b6102e16102dc3660046122c7565b610934565b604080519283526020830191909152016101ce565b34801561030257600080fd5b5061022860095481565b34801561031857600080fd5b50610228600a5481565b34801561032e57600080fd5b5060055460ff16610256565b34801561034657600080fd5b506102286103553660046122fc565b6001600160a01b031660009081526020819052604090205490565b34801561037c57600080fd5b50610228600b5481565b34801561039257600080fd5b506102cc610d46565b6102286103a9366004612319565b610e14565b3480156103ba57600080fd5b5061022860075481565b3480156103d057600080fd5b506101c161102d565b3480156103e557600080fd5b506102566103f436600461225a565b61103c565b34801561040557600080fd5b506102cc6104143660046122fc565b61104a565b34801561042557600080fd5b5060055461043e9061010090046001600160a01b031681565b6040516001600160a01b0390911681526020016101ce565b34801561046257600080fd5b506102e1610471366004612319565b61127d565b34801561048257600080fd5b506102cc6104913660046122fc565b61156d565b3480156104a257600080fd5b506102286104b1366004612340565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156104e857600080fd5b5061022860085481565b3480156104fe57600080fd5b5060065461043e906001600160a01b031681565b34801561051e57600080fd5b506102cc61160e565b60606003805461053690612379565b80601f016020809104026020016040519081016040528092919081815260200182805461056290612379565b80156105af5780601f10610584576101008083540402835291602001916105af565b820191906000526020600020905b81548152906001019060200180831161059257829003601f168201915b5050505050905090565b60006105c3611729565b600654600160a01b900460ff166105ed576040516321c4e35760e21b815260040160405180910390fd5b6105f5611745565b818042111561061757604051630407b05b60e31b815260040160405180910390fd5b6001600160a01b03841661063e5760405163d92e233d60e01b815260040160405180910390fd5b8560000361065f57604051637c946ed760e01b815260040160405180910390fd5b600654610677906001600160a01b0316333089611769565b600754600854811580610688575080155b156106a657604051636180f03f60e11b815260040160405180910390fd5b6106b26103e5896123c9565b6106be6103e8836123c9565b6106c891906123e0565b826106d56103e58b6123c9565b6106df91906123c9565b6106e99190612409565b93508684101561070c5760405163bb2875c360e01b815260040160405180910390fd5b81841061072c5760405163bb55fd2760e01b815260040160405180910390fd5b6107368685611863565b6006546040516370a0823160e01b81523060048201526107ae9147916001600160a01b03909116906370a08231906024015b602060405180830381865afa158015610785573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a9919061242b565b6118dc565b604080516000808252602082018b9052818301879052606082015290516001600160a01b0388169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350505061081c60016000805160206124b383398151915255565b949350505050565b6000336108328185856119a2565b60019150505b92915050565b60003361084c8582856119af565b610857858585611a2e565b60019150505b9392505050565b60055461010090046001600160a01b0316331480159061090c5750600560019054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f69190612444565b6001600160a01b0316336001600160a01b031614155b1561092a57604051631dd2188d60e31b815260040160405180910390fd5b610932611a8d565b565b60008061093f611729565b600654600160a01b900460ff16610969576040516321c4e35760e21b815260040160405180910390fd5b610971611745565b828042111561099357604051630407b05b60e31b815260040160405180910390fd5b6001600160a01b0386166109ba5760405163d92e233d60e01b815260040160405180910390fd5b346000036109db57604051637c946ed760e01b815260040160405180910390fd5b846000036109fc5760405163f8b3bb6160e01b815260040160405180910390fd5b60075460085481158015610a0e575080155b15610a925760008711610a725760405162461bcd60e51b815260206004820152602160248201527f436172676f506169723a20494e495449414c5f544f4b454e5f524551554952456044820152601160fa1b60648201526084015b60405180910390fd5b600654610a8a906001600160a01b031633308a611769565b869350610b29565b81600003610ab357604051635b16157d60e11b815260040160405180910390fd5b600082610ac083346123c9565b610aca9190612409565b905087811115610aed57604051631762402160e11b815260040160405180910390fd5b80600003610b0e5760405163f8b3bb6160e01b815260040160405180910390fd5b600654610b26906001600160a01b0316333084611769565b93505b6006546040516370a0823160e01b815230600482015247916000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610b76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9a919061242b565b90506000610ba88584612461565b90506000610bb68584612461565b9050610bc28686611adf565b506000610bce60025490565b905080600003610c67576000610bec610be784866123c9565b611c12565b90506103e88111610c1057604051634088b74160e01b815260040160405180910390fd5b610c1c6103e882612461565b9a50610c2c61dead6103e8611da9565b6040516103e881527fae3369a6140e1e652814c880a1f87b0e0aa329ec50ab97a7d4de5e7caaf249c09060200160405180910390a150610c9c565b610c9987610c7583866123c9565b610c7f9190612409565b87610c8a84866123c9565b610c949190612409565b611de3565b99505b89600003610cbd57604051633489be7560e21b815260040160405180910390fd5b610cc78d8b611da9565b610cd185856118dc565b600854600754610ce191906123c9565b600b55604080518481526020810184905233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a25050505050505050610d3e60016000805160206124b383398151915255565b935093915050565b60055461010090046001600160a01b03163314801590610dee5750600560019054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610db4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd89190612444565b6001600160a01b0316336001600160a01b031614155b15610e0c57604051631dd2188d60e31b815260040160405180910390fd5b610932611df9565b6000610e1e611729565b600654600160a01b900460ff16610e48576040516321c4e35760e21b815260040160405180910390fd5b610e50611745565b8180421115610e7257604051630407b05b60e31b815260040160405180910390fd5b6001600160a01b038416610e995760405163d92e233d60e01b815260040160405180910390fd5b346000819003610ebc57604051637c946ed760e01b815260040160405180910390fd5b600754600854811580610ecd575080155b15610eeb57604051636180f03f60e11b815260040160405180910390fd5b610ef76103e5846123c9565b610f036103e8846123c9565b610f0d91906123e0565b81610f1a6103e5866123c9565b610f2491906123c9565b610f2e9190612409565b945087851015610f515760405163bb2875c360e01b815260040160405180910390fd5b808510610f715760405163bb55fd2760e01b815260040160405180910390fd5b600654610f88906001600160a01b03168887611e36565b6006546040516370a0823160e01b8152306004820152610fbe9147916001600160a01b03909116906370a0823190602401610768565b60408051848152600060208201819052818301526060810187905290516001600160a01b0389169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a35050505061085d60016000805160206124b383398151915255565b60606004805461053690612379565b600033610832818585611a2e565b611052611729565b60055461010090046001600160a01b031633148015906110fa5750600560019054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e49190612444565b6001600160a01b0316336001600160a01b031614155b1561111857604051631dd2188d60e31b815260040160405180910390fd5b6001600160a01b03811661113f5760405163d92e233d60e01b815260040160405180910390fd5b6006546040516370a0823160e01b81523060048201526001600160a01b039091169060009082906370a0823190602401602060405180830381865afa15801561118c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b0919061242b565b90506000479050600060085483116111c95760006111d6565b6008546111d69084612461565b9050600060075483116111ea5760006111f7565b6007546111f79084612461565b9050811561120a5761120a858784611e36565b801561121a5761121a8682611863565b60408051828152602081018490526001600160a01b038816917fe2459372bf2d601eff5e11bdcdd16c39436da3a1b7744bb08a2e287057a92705910160405180910390a2505050505061127a60016000805160206124b383398151915255565b50565b600080611288611729565b600654600160a01b900460ff166112b2576040516321c4e35760e21b815260040160405180910390fd5b6112ba611745565b82804211156112dc57604051630407b05b60e31b815260040160405180910390fd5b6001600160a01b0385166113035760405163d92e233d60e01b815260040160405180910390fd5b856000036113245760405163749383ad60e01b815260040160405180910390fd5b336000908152602081905260409020548611156113545760405163749383ad60e01b815260040160405180910390fd5b6006546040516370a0823160e01b815230600482015247916000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156113a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c5919061242b565b90506113d5600754600854611adf565b5060006113e160025490565b9050806113ee848b6123c9565b6113f89190612409565b955080611405838b6123c9565b61140f9190612409565b94508560000361143257604051632332fef360e21b815260040160405180910390fd5b8460000361145357604051633dec066560e01b815260040160405180910390fd5b61145d338a611f27565b600654611474906001600160a01b03168987611e36565b61147e8887611863565b6006546040516370a0823160e01b81523060048201524794506001600160a01b03909116906370a0823190602401602060405180830381865afa1580156114c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ed919061242b565b91506114f983836118dc565b60085460075461150991906123c9565b600b5560408051878152602081018790526001600160a01b038a169133917fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496910160405180910390a350505050610d3e60016000805160206124b383398151915255565b600654600160a01b900460ff16156115975760405162dc149f60e41b815260040160405180910390fd5b6001600160a01b0381166115be5760405163d92e233d60e01b815260040160405180910390fd5b600680546001600160a81b0319166001600160a01b038316908117600160a01b179091556040517f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e690600090a250565b611616611729565b60055461010090046001600160a01b031633148015906116be5750600560019054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a89190612444565b6001600160a01b0316336001600160a01b031614155b156116dc57604051631dd2188d60e31b815260040160405180910390fd5b6006546040516370a0823160e01b81523060048201526117129147916001600160a01b03909116906370a0823190602401610768565b61093260016000805160206124b383398151915255565b611731611f5d565b60026000805160206124b383398151915255565b60055460ff16156109325760405163d93c066560e01b815260040160405180910390fd5b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916117cd9190612474565b6000604051808303816000865af19150503d806000811461180a576040519150601f19603f3d011682016040523d82523d6000602084013e61180f565b606091505b509150915081158061183d575080511580159061183d57508080602001905181019061183b9190612490565b155b1561185b5760405163022e258160e11b815260040160405180910390fd5b505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146118b0576040519150601f19603f3d011682016040523d82523d6000602084013e6118b5565b606091505b50509050806118d757604051630136109160e01b815260040160405180910390fd5b505050565b6000600c54426118ec9190612461565b90506000811180156118ff575060075415155b801561190c575060085415155b1561195657600754816008540281611926576119266123f3565b60098054929091049091019055600854600754820281611948576119486123f3565b600a80549290910490910190555b6007839055600882905542600c5560408051848152602081018490527fcf2aa50876cdfbb541206f89af0ee78d44a2abf8d328e37fa4917f982149848a910160405180910390a1505050565b6118d78383836001611f8d565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811015611a285781811015611a1957604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610a69565b611a2884848484036000611f8d565b50505050565b6001600160a01b038316611a5857604051634b637e8f60e11b815260006004820152602401610a69565b6001600160a01b038216611a825760405163ec442f0560e01b815260006004820152602401610a69565b6118d7838383612062565b611a9561218c565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080600560019054906101000a90046001600160a01b03166001600160a01b031663017e7e586040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b599190612444565b600b546001600160a01b038216158015945091925090611bfe578015611bf9576000611b88610be786886123c9565b90506000611b9583611c12565b905080821115611bf6576000611bab8284612461565b600254611bb891906123c9565b9050600082611bc88560056123c9565b611bd291906123e0565b90506000611be08284612409565b90508015611bf257611bf28782611da9565b5050505b50505b611c0a565b8015611c0a576000600b555b505092915050565b60006003821115611d9a575080806fffffffffffffffffffffffffffffffff811115611c435760409190911c9060801c5b67ffffffffffffffff811115611c5e5760209190911c9060401c5b63ffffffff811115611c755760109190911c9060201c5b61ffff811115611c8a5760089190911c9060101c5b60ff811115611c9e5760049190911c9060081c5b600f811115611cb25760029190911c9060041c5b6003811115611cc357600182901c91505b6001611ccf8385612409565b611cd990846123e0565b901c91506001611ce98385612409565b611cf390846123e0565b901c91506001611d038385612409565b611d0d90846123e0565b901c91506001611d1d8385612409565b611d2790846123e0565b901c91506001611d378385612409565b611d4190846123e0565b901c91506001611d518385612409565b611d5b90846123e0565b901c91506001611d6b8385612409565b611d7590846123e0565b901c91506000611d858385612409565b905080831115611d93578092505b5050919050565b8115611da4575060015b919050565b6001600160a01b038216611dd35760405163ec442f0560e01b815260006004820152602401610a69565b611ddf60008383612062565b5050565b6000818310611df2578161085d565b5090919050565b611e01611745565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ac23390565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092839290871691611e929190612474565b6000604051808303816000865af19150503d8060008114611ecf576040519150601f19603f3d011682016040523d82523d6000602084013e611ed4565b606091505b5091509150811580611f025750805115801590611f02575080806020019051810190611f009190612490565b155b15611f205760405163022e258160e11b815260040160405180910390fd5b5050505050565b6001600160a01b038216611f5157604051634b637e8f60e11b815260006004820152602401610a69565b611ddf82600083612062565b6000805160206124b38339815191525460020361093257604051633ee5aeb560e01b815260040160405180910390fd5b6001600160a01b038416611fb75760405163e602df0560e01b815260006004820152602401610a69565b6001600160a01b038316611fe157604051634a1406b160e11b815260006004820152602401610a69565b6001600160a01b0380851660009081526001602090815260408083209387168352929052208290558015611a2857826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161205491815260200190565b60405180910390a350505050565b6001600160a01b03831661208d57806002600082825461208291906123e0565b909155506120ff9050565b6001600160a01b038316600090815260208190526040902054818110156120e05760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610a69565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661211b5760028054829003905561213a565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161217f91815260200190565b60405180910390a3505050565b60055460ff1661093257604051638dfc202b60e01b815260040160405180910390fd5b60005b838110156121ca5781810151838201526020016121b2565b50506000910152565b60208152600082518060208401526121f28160408501602087016121af565b601f01601f19169190910160400192915050565b6001600160a01b038116811461127a57600080fd5b6000806000806080858703121561223157600080fd5b8435935060208501359250604085013561224a81612206565b9396929550929360600135925050565b6000806040838503121561226d57600080fd5b823561227881612206565b946020939093013593505050565b60008060006060848603121561229b57600080fd5b83356122a681612206565b925060208401356122b681612206565b929592945050506040919091013590565b6000806000606084860312156122dc57600080fd5b83356122e781612206565b95602085013595506040909401359392505050565b60006020828403121561230e57600080fd5b813561085d81612206565b60008060006060848603121561232e57600080fd5b8335925060208401356122b681612206565b6000806040838503121561235357600080fd5b823561235e81612206565b9150602083013561236e81612206565b809150509250929050565b600181811c9082168061238d57607f821691505b6020821081036123ad57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610838576108386123b3565b80820180821115610838576108386123b3565b634e487b7160e01b600052601260045260246000fd5b60008261242657634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561243d57600080fd5b5051919050565b60006020828403121561245657600080fd5b815161085d81612206565b81810381811115610838576108386123b3565b600082516124868184602087016121af565b9190910192915050565b6000602082840312156124a257600080fd5b8151801515811461085d57600080fdfe9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00a2646970667358221220358d1723e74193a9386c5ebafead988f19775e55766403a448315fe1144007d264736f6c63430008140033

Deployed ByteCode

0x6080604052600436106101a05760003560e01c80637464fc3d116100ec578063c45a01551161008a578063dd62ed3e11610064578063dd62ed3e14610496578063f4325d67146104dc578063fc0c546a146104f2578063fff6cae91461051257600080fd5b8063c45a015514610419578063c4ccdeea14610456578063c4d66de81461047657600080fd5b80638acaf74a116100c65780638acaf74a146103ae57806395d89b41146103c4578063a9059cbb146103d9578063bc25cf77146103f957600080fd5b80637464fc3d146103705780638456cb591461038657806386fb37981461039b57600080fd5b8063313ce567116101595780635909c0d5116101335780635909c0d5146102f65780635a3d54931461030c5780635c975abb1461032257806370a082311461033a57600080fd5b8063313ce5671461029b5780633f4ba83a146102b757806355776b77146102ce57600080fd5b806306fdde03146101ac5780630902f1ac146101d7578063092d2d7f14610208578063095ea7b31461023657806318160ddd1461026657806323b872dd1461027b57600080fd5b366101a757005b600080fd5b3480156101b857600080fd5b506101c1610527565b6040516101ce91906121d3565b60405180910390f35b3480156101e357600080fd5b50600754600854600c54604080519384526020840192909252908201526060016101ce565b34801561021457600080fd5b5061022861022336600461221b565b6105b9565b6040519081526020016101ce565b34801561024257600080fd5b5061025661025136600461225a565b610824565b60405190151581526020016101ce565b34801561027257600080fd5b50600254610228565b34801561028757600080fd5b50610256610296366004612286565b61083e565b3480156102a757600080fd5b50604051601281526020016101ce565b3480156102c357600080fd5b506102cc610864565b005b6102e16102dc3660046122c7565b610934565b604080519283526020830191909152016101ce565b34801561030257600080fd5b5061022860095481565b34801561031857600080fd5b50610228600a5481565b34801561032e57600080fd5b5060055460ff16610256565b34801561034657600080fd5b506102286103553660046122fc565b6001600160a01b031660009081526020819052604090205490565b34801561037c57600080fd5b50610228600b5481565b34801561039257600080fd5b506102cc610d46565b6102286103a9366004612319565b610e14565b3480156103ba57600080fd5b5061022860075481565b3480156103d057600080fd5b506101c161102d565b3480156103e557600080fd5b506102566103f436600461225a565b61103c565b34801561040557600080fd5b506102cc6104143660046122fc565b61104a565b34801561042557600080fd5b5060055461043e9061010090046001600160a01b031681565b6040516001600160a01b0390911681526020016101ce565b34801561046257600080fd5b506102e1610471366004612319565b61127d565b34801561048257600080fd5b506102cc6104913660046122fc565b61156d565b3480156104a257600080fd5b506102286104b1366004612340565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156104e857600080fd5b5061022860085481565b3480156104fe57600080fd5b5060065461043e906001600160a01b031681565b34801561051e57600080fd5b506102cc61160e565b60606003805461053690612379565b80601f016020809104026020016040519081016040528092919081815260200182805461056290612379565b80156105af5780601f10610584576101008083540402835291602001916105af565b820191906000526020600020905b81548152906001019060200180831161059257829003601f168201915b5050505050905090565b60006105c3611729565b600654600160a01b900460ff166105ed576040516321c4e35760e21b815260040160405180910390fd5b6105f5611745565b818042111561061757604051630407b05b60e31b815260040160405180910390fd5b6001600160a01b03841661063e5760405163d92e233d60e01b815260040160405180910390fd5b8560000361065f57604051637c946ed760e01b815260040160405180910390fd5b600654610677906001600160a01b0316333089611769565b600754600854811580610688575080155b156106a657604051636180f03f60e11b815260040160405180910390fd5b6106b26103e5896123c9565b6106be6103e8836123c9565b6106c891906123e0565b826106d56103e58b6123c9565b6106df91906123c9565b6106e99190612409565b93508684101561070c5760405163bb2875c360e01b815260040160405180910390fd5b81841061072c5760405163bb55fd2760e01b815260040160405180910390fd5b6107368685611863565b6006546040516370a0823160e01b81523060048201526107ae9147916001600160a01b03909116906370a08231906024015b602060405180830381865afa158015610785573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a9919061242b565b6118dc565b604080516000808252602082018b9052818301879052606082015290516001600160a01b0388169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a350505061081c60016000805160206124b383398151915255565b949350505050565b6000336108328185856119a2565b60019150505b92915050565b60003361084c8582856119af565b610857858585611a2e565b60019150505b9392505050565b60055461010090046001600160a01b0316331480159061090c5750600560019054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156108d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f69190612444565b6001600160a01b0316336001600160a01b031614155b1561092a57604051631dd2188d60e31b815260040160405180910390fd5b610932611a8d565b565b60008061093f611729565b600654600160a01b900460ff16610969576040516321c4e35760e21b815260040160405180910390fd5b610971611745565b828042111561099357604051630407b05b60e31b815260040160405180910390fd5b6001600160a01b0386166109ba5760405163d92e233d60e01b815260040160405180910390fd5b346000036109db57604051637c946ed760e01b815260040160405180910390fd5b846000036109fc5760405163f8b3bb6160e01b815260040160405180910390fd5b60075460085481158015610a0e575080155b15610a925760008711610a725760405162461bcd60e51b815260206004820152602160248201527f436172676f506169723a20494e495449414c5f544f4b454e5f524551554952456044820152601160fa1b60648201526084015b60405180910390fd5b600654610a8a906001600160a01b031633308a611769565b869350610b29565b81600003610ab357604051635b16157d60e11b815260040160405180910390fd5b600082610ac083346123c9565b610aca9190612409565b905087811115610aed57604051631762402160e11b815260040160405180910390fd5b80600003610b0e5760405163f8b3bb6160e01b815260040160405180910390fd5b600654610b26906001600160a01b0316333084611769565b93505b6006546040516370a0823160e01b815230600482015247916000916001600160a01b03909116906370a0823190602401602060405180830381865afa158015610b76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9a919061242b565b90506000610ba88584612461565b90506000610bb68584612461565b9050610bc28686611adf565b506000610bce60025490565b905080600003610c67576000610bec610be784866123c9565b611c12565b90506103e88111610c1057604051634088b74160e01b815260040160405180910390fd5b610c1c6103e882612461565b9a50610c2c61dead6103e8611da9565b6040516103e881527fae3369a6140e1e652814c880a1f87b0e0aa329ec50ab97a7d4de5e7caaf249c09060200160405180910390a150610c9c565b610c9987610c7583866123c9565b610c7f9190612409565b87610c8a84866123c9565b610c949190612409565b611de3565b99505b89600003610cbd57604051633489be7560e21b815260040160405180910390fd5b610cc78d8b611da9565b610cd185856118dc565b600854600754610ce191906123c9565b600b55604080518481526020810184905233917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f910160405180910390a25050505050505050610d3e60016000805160206124b383398151915255565b935093915050565b60055461010090046001600160a01b03163314801590610dee5750600560019054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610db4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd89190612444565b6001600160a01b0316336001600160a01b031614155b15610e0c57604051631dd2188d60e31b815260040160405180910390fd5b610932611df9565b6000610e1e611729565b600654600160a01b900460ff16610e48576040516321c4e35760e21b815260040160405180910390fd5b610e50611745565b8180421115610e7257604051630407b05b60e31b815260040160405180910390fd5b6001600160a01b038416610e995760405163d92e233d60e01b815260040160405180910390fd5b346000819003610ebc57604051637c946ed760e01b815260040160405180910390fd5b600754600854811580610ecd575080155b15610eeb57604051636180f03f60e11b815260040160405180910390fd5b610ef76103e5846123c9565b610f036103e8846123c9565b610f0d91906123e0565b81610f1a6103e5866123c9565b610f2491906123c9565b610f2e9190612409565b945087851015610f515760405163bb2875c360e01b815260040160405180910390fd5b808510610f715760405163bb55fd2760e01b815260040160405180910390fd5b600654610f88906001600160a01b03168887611e36565b6006546040516370a0823160e01b8152306004820152610fbe9147916001600160a01b03909116906370a0823190602401610768565b60408051848152600060208201819052818301526060810187905290516001600160a01b0389169133917fd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d8229181900360800190a35050505061085d60016000805160206124b383398151915255565b60606004805461053690612379565b600033610832818585611a2e565b611052611729565b60055461010090046001600160a01b031633148015906110fa5750600560019054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110e49190612444565b6001600160a01b0316336001600160a01b031614155b1561111857604051631dd2188d60e31b815260040160405180910390fd5b6001600160a01b03811661113f5760405163d92e233d60e01b815260040160405180910390fd5b6006546040516370a0823160e01b81523060048201526001600160a01b039091169060009082906370a0823190602401602060405180830381865afa15801561118c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111b0919061242b565b90506000479050600060085483116111c95760006111d6565b6008546111d69084612461565b9050600060075483116111ea5760006111f7565b6007546111f79084612461565b9050811561120a5761120a858784611e36565b801561121a5761121a8682611863565b60408051828152602081018490526001600160a01b038816917fe2459372bf2d601eff5e11bdcdd16c39436da3a1b7744bb08a2e287057a92705910160405180910390a2505050505061127a60016000805160206124b383398151915255565b50565b600080611288611729565b600654600160a01b900460ff166112b2576040516321c4e35760e21b815260040160405180910390fd5b6112ba611745565b82804211156112dc57604051630407b05b60e31b815260040160405180910390fd5b6001600160a01b0385166113035760405163d92e233d60e01b815260040160405180910390fd5b856000036113245760405163749383ad60e01b815260040160405180910390fd5b336000908152602081905260409020548611156113545760405163749383ad60e01b815260040160405180910390fd5b6006546040516370a0823160e01b815230600482015247916000916001600160a01b03909116906370a0823190602401602060405180830381865afa1580156113a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c5919061242b565b90506113d5600754600854611adf565b5060006113e160025490565b9050806113ee848b6123c9565b6113f89190612409565b955080611405838b6123c9565b61140f9190612409565b94508560000361143257604051632332fef360e21b815260040160405180910390fd5b8460000361145357604051633dec066560e01b815260040160405180910390fd5b61145d338a611f27565b600654611474906001600160a01b03168987611e36565b61147e8887611863565b6006546040516370a0823160e01b81523060048201524794506001600160a01b03909116906370a0823190602401602060405180830381865afa1580156114c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ed919061242b565b91506114f983836118dc565b60085460075461150991906123c9565b600b5560408051878152602081018790526001600160a01b038a169133917fdccd412f0b1252819cb1fd330b93224ca42612892bb3f4f789976e6d81936496910160405180910390a350505050610d3e60016000805160206124b383398151915255565b600654600160a01b900460ff16156115975760405162dc149f60e41b815260040160405180910390fd5b6001600160a01b0381166115be5760405163d92e233d60e01b815260040160405180910390fd5b600680546001600160a81b0319166001600160a01b038316908117600160a01b179091556040517f908408e307fc569b417f6cbec5d5a06f44a0a505ac0479b47d421a4b2fd6a1e690600090a250565b611616611729565b60055461010090046001600160a01b031633148015906116be5750600560019054906101000a90046001600160a01b03166001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a89190612444565b6001600160a01b0316336001600160a01b031614155b156116dc57604051631dd2188d60e31b815260040160405180910390fd5b6006546040516370a0823160e01b81523060048201526117129147916001600160a01b03909116906370a0823190602401610768565b61093260016000805160206124b383398151915255565b611731611f5d565b60026000805160206124b383398151915255565b60055460ff16156109325760405163d93c066560e01b815260040160405180910390fd5b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17905291516000928392908816916117cd9190612474565b6000604051808303816000865af19150503d806000811461180a576040519150601f19603f3d011682016040523d82523d6000602084013e61180f565b606091505b509150915081158061183d575080511580159061183d57508080602001905181019061183b9190612490565b155b1561185b5760405163022e258160e11b815260040160405180910390fd5b505050505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146118b0576040519150601f19603f3d011682016040523d82523d6000602084013e6118b5565b606091505b50509050806118d757604051630136109160e01b815260040160405180910390fd5b505050565b6000600c54426118ec9190612461565b90506000811180156118ff575060075415155b801561190c575060085415155b1561195657600754816008540281611926576119266123f3565b60098054929091049091019055600854600754820281611948576119486123f3565b600a80549290910490910190555b6007839055600882905542600c5560408051848152602081018490527fcf2aa50876cdfbb541206f89af0ee78d44a2abf8d328e37fa4917f982149848a910160405180910390a1505050565b6118d78383836001611f8d565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811015611a285781811015611a1957604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610a69565b611a2884848484036000611f8d565b50505050565b6001600160a01b038316611a5857604051634b637e8f60e11b815260006004820152602401610a69565b6001600160a01b038216611a825760405163ec442f0560e01b815260006004820152602401610a69565b6118d7838383612062565b611a9561218c565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600080600560019054906101000a90046001600160a01b03166001600160a01b031663017e7e586040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b35573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b599190612444565b600b546001600160a01b038216158015945091925090611bfe578015611bf9576000611b88610be786886123c9565b90506000611b9583611c12565b905080821115611bf6576000611bab8284612461565b600254611bb891906123c9565b9050600082611bc88560056123c9565b611bd291906123e0565b90506000611be08284612409565b90508015611bf257611bf28782611da9565b5050505b50505b611c0a565b8015611c0a576000600b555b505092915050565b60006003821115611d9a575080806fffffffffffffffffffffffffffffffff811115611c435760409190911c9060801c5b67ffffffffffffffff811115611c5e5760209190911c9060401c5b63ffffffff811115611c755760109190911c9060201c5b61ffff811115611c8a5760089190911c9060101c5b60ff811115611c9e5760049190911c9060081c5b600f811115611cb25760029190911c9060041c5b6003811115611cc357600182901c91505b6001611ccf8385612409565b611cd990846123e0565b901c91506001611ce98385612409565b611cf390846123e0565b901c91506001611d038385612409565b611d0d90846123e0565b901c91506001611d1d8385612409565b611d2790846123e0565b901c91506001611d378385612409565b611d4190846123e0565b901c91506001611d518385612409565b611d5b90846123e0565b901c91506001611d6b8385612409565b611d7590846123e0565b901c91506000611d858385612409565b905080831115611d93578092505b5050919050565b8115611da4575060015b919050565b6001600160a01b038216611dd35760405163ec442f0560e01b815260006004820152602401610a69565b611ddf60008383612062565b5050565b6000818310611df2578161085d565b5090919050565b611e01611745565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ac23390565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b1790529151600092839290871691611e929190612474565b6000604051808303816000865af19150503d8060008114611ecf576040519150601f19603f3d011682016040523d82523d6000602084013e611ed4565b606091505b5091509150811580611f025750805115801590611f02575080806020019051810190611f009190612490565b155b15611f205760405163022e258160e11b815260040160405180910390fd5b5050505050565b6001600160a01b038216611f5157604051634b637e8f60e11b815260006004820152602401610a69565b611ddf82600083612062565b6000805160206124b38339815191525460020361093257604051633ee5aeb560e01b815260040160405180910390fd5b6001600160a01b038416611fb75760405163e602df0560e01b815260006004820152602401610a69565b6001600160a01b038316611fe157604051634a1406b160e11b815260006004820152602401610a69565b6001600160a01b0380851660009081526001602090815260408083209387168352929052208290558015611a2857826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161205491815260200190565b60405180910390a350505050565b6001600160a01b03831661208d57806002600082825461208291906123e0565b909155506120ff9050565b6001600160a01b038316600090815260208190526040902054818110156120e05760405163391434e360e21b81526001600160a01b03851660048201526024810182905260448101839052606401610a69565b6001600160a01b03841660009081526020819052604090209082900390555b6001600160a01b03821661211b5760028054829003905561213a565b6001600160a01b03821660009081526020819052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405161217f91815260200190565b60405180910390a3505050565b60055460ff1661093257604051638dfc202b60e01b815260040160405180910390fd5b60005b838110156121ca5781810151838201526020016121b2565b50506000910152565b60208152600082518060208401526121f28160408501602087016121af565b601f01601f19169190910160400192915050565b6001600160a01b038116811461127a57600080fd5b6000806000806080858703121561223157600080fd5b8435935060208501359250604085013561224a81612206565b9396929550929360600135925050565b6000806040838503121561226d57600080fd5b823561227881612206565b946020939093013593505050565b60008060006060848603121561229b57600080fd5b83356122a681612206565b925060208401356122b681612206565b929592945050506040919091013590565b6000806000606084860312156122dc57600080fd5b83356122e781612206565b95602085013595506040909401359392505050565b60006020828403121561230e57600080fd5b813561085d81612206565b60008060006060848603121561232e57600080fd5b8335925060208401356122b681612206565b6000806040838503121561235357600080fd5b823561235e81612206565b9150602083013561236e81612206565b809150509250929050565b600181811c9082168061238d57607f821691505b6020821081036123ad57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610838576108386123b3565b80820180821115610838576108386123b3565b634e487b7160e01b600052601260045260246000fd5b60008261242657634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561243d57600080fd5b5051919050565b60006020828403121561245657600080fd5b815161085d81612206565b81810381811115610838576108386123b3565b600082516124868184602087016121af565b9190910192915050565b6000602082840312156124a257600080fd5b8151801515811461085d57600080fdfe9b779b17422d0df92223018b32b4d1fa46e071723d6817e2486d003becc55f00a2646970667358221220358d1723e74193a9386c5ebafead988f19775e55766403a448315fe1144007d264736f6c63430008140033