{"sources":{"@openzeppelin/contracts/interfaces/draft-IERC6093.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC6093.sol)\npragma solidity >=0.8.4;\n\n/**\n * @dev Standard ERC-20 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.\n */\ninterface IERC20Errors {\n    /**\n     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param balance Current balance for the interacting account.\n     * @param needed Minimum amount required to perform a transfer.\n     */\n    error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC20InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC20InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.\n     * @param spender Address that may be allowed to operate on tokens without being their owner.\n     * @param allowance Amount of tokens a `spender` is allowed to operate with.\n     * @param needed Minimum amount required to perform a transfer.\n     */\n    error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC20InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `spender` to be approved. Used in approvals.\n     * @param spender Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC20InvalidSpender(address spender);\n}\n\n/**\n * @dev Standard ERC-721 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.\n */\ninterface IERC721Errors {\n    /**\n     * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.\n     * Used in balance queries.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC721InvalidOwner(address owner);\n\n    /**\n     * @dev Indicates a `tokenId` whose `owner` is the zero address.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC721NonexistentToken(uint256 tokenId);\n\n    /**\n     * @dev Indicates an error related to the ownership over a particular token. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param tokenId Identifier number of a token.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC721InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC721InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC721InsufficientApproval(address operator, uint256 tokenId);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC721InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC721InvalidOperator(address operator);\n}\n\n/**\n * @dev Standard ERC-1155 Errors\n * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.\n */\ninterface IERC1155Errors {\n    /**\n     * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     * @param balance Current balance for the interacting account.\n     * @param needed Minimum amount required to perform a transfer.\n     * @param tokenId Identifier number of a token.\n     */\n    error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);\n\n    /**\n     * @dev Indicates a failure with the token `sender`. Used in transfers.\n     * @param sender Address whose tokens are being transferred.\n     */\n    error ERC1155InvalidSender(address sender);\n\n    /**\n     * @dev Indicates a failure with the token `receiver`. Used in transfers.\n     * @param receiver Address to which tokens are being transferred.\n     */\n    error ERC1155InvalidReceiver(address receiver);\n\n    /**\n     * @dev Indicates a failure with the `operator`’s approval. Used in transfers.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     * @param owner Address of the current owner of a token.\n     */\n    error ERC1155MissingApprovalForAll(address operator, address owner);\n\n    /**\n     * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.\n     * @param approver Address initiating an approval operation.\n     */\n    error ERC1155InvalidApprover(address approver);\n\n    /**\n     * @dev Indicates a failure with the `operator` to be approved. Used in approvals.\n     * @param operator Address that may be allowed to operate on tokens without being their owner.\n     */\n    error ERC1155InvalidOperator(address operator);\n\n    /**\n     * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.\n     * Used in batch transfers.\n     * @param idsLength Length of the array of token identifiers\n     * @param valuesLength Length of the array of token amounts\n     */\n    error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);\n}\n"},"@openzeppelin/contracts/token/ERC20/ERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.20;\n\nimport {IERC20} from \"./IERC20.sol\";\nimport {IERC20Metadata} from \"./extensions/IERC20Metadata.sol\";\nimport {Context} from \"../../utils/Context.sol\";\nimport {IERC20Errors} from \"../../interfaces/draft-IERC6093.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC-20\n * applications.\n */\nabstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {\n    mapping(address account => uint256) private _balances;\n\n    mapping(address account => mapping(address spender => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n\n    /**\n     * @dev Sets the values for {name} and {symbol}.\n     *\n     * Both values are immutable: they can only be set once during construction.\n     */\n    constructor(string memory name_, string memory symbol_) {\n        _name = name_;\n        _symbol = symbol_;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view virtual returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view virtual returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the default value returned by this function, unless\n     * it's overridden.\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view virtual returns (uint8) {\n        return 18;\n    }\n\n    /// @inheritdoc IERC20\n    function totalSupply() public view virtual returns (uint256) {\n        return _totalSupply;\n    }\n\n    /// @inheritdoc IERC20\n    function balanceOf(address account) public view virtual returns (uint256) {\n        return _balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     * - the caller must have a balance of at least `value`.\n     */\n    function transfer(address to, uint256 value) public virtual returns (bool) {\n        address owner = _msgSender();\n        _transfer(owner, to, value);\n        return true;\n    }\n\n    /// @inheritdoc IERC20\n    function allowance(address owner, address spender) public view virtual returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on\n     * `transferFrom`. This is semantically equivalent to an infinite approval.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(address spender, uint256 value) public virtual returns (bool) {\n        address owner = _msgSender();\n        _approve(owner, spender, value);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Skips emitting an {Approval} event indicating an allowance update. This is not\n     * required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].\n     *\n     * NOTE: Does not update the allowance if the current allowance\n     * is the maximum `uint256`.\n     *\n     * Requirements:\n     *\n     * - `from` and `to` cannot be the zero address.\n     * - `from` must have a balance of at least `value`.\n     * - the caller must have allowance for ``from``'s tokens of at least\n     * `value`.\n     */\n    function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {\n        address spender = _msgSender();\n        _spendAllowance(from, spender, value);\n        _transfer(from, to, value);\n        return true;\n    }\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to`.\n     *\n     * This internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead.\n     */\n    function _transfer(address from, address to, uint256 value) internal {\n        if (from == address(0)) {\n            revert ERC20InvalidSender(address(0));\n        }\n        if (to == address(0)) {\n            revert ERC20InvalidReceiver(address(0));\n        }\n        _update(from, to, value);\n    }\n\n    /**\n     * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`\n     * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding\n     * this function.\n     *\n     * Emits a {Transfer} event.\n     */\n    function _update(address from, address to, uint256 value) internal virtual {\n        if (from == address(0)) {\n            // Overflow check required: The rest of the code assumes that totalSupply never overflows\n            _totalSupply += value;\n        } else {\n            uint256 fromBalance = _balances[from];\n            if (fromBalance < value) {\n                revert ERC20InsufficientBalance(from, fromBalance, value);\n            }\n            unchecked {\n                // Overflow not possible: value <= fromBalance <= totalSupply.\n                _balances[from] = fromBalance - value;\n            }\n        }\n\n        if (to == address(0)) {\n            unchecked {\n                // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.\n                _totalSupply -= value;\n            }\n        } else {\n            unchecked {\n                // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.\n                _balances[to] += value;\n            }\n        }\n\n        emit Transfer(from, to, value);\n    }\n\n    /**\n     * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).\n     * Relies on the `_update` mechanism\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead.\n     */\n    function _mint(address account, uint256 value) internal {\n        if (account == address(0)) {\n            revert ERC20InvalidReceiver(address(0));\n        }\n        _update(address(0), account, value);\n    }\n\n    /**\n     * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.\n     * Relies on the `_update` mechanism.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * NOTE: This function is not virtual, {_update} should be overridden instead\n     */\n    function _burn(address account, uint256 value) internal {\n        if (account == address(0)) {\n            revert ERC20InvalidSender(address(0));\n        }\n        _update(account, address(0), value);\n    }\n\n    /**\n     * @dev Sets `value` as the allowance of `spender` over the `owner`'s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     *\n     * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.\n     */\n    function _approve(address owner, address spender, uint256 value) internal {\n        _approve(owner, spender, value, true);\n    }\n\n    /**\n     * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.\n     *\n     * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by\n     * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any\n     * `Approval` event during `transferFrom` operations.\n     *\n     * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to\n     * true using the following override:\n     *\n     * ```solidity\n     * function _approve(address owner, address spender, uint256 value, bool) internal virtual override {\n     *     super._approve(owner, spender, value, true);\n     * }\n     * ```\n     *\n     * Requirements are the same as {_approve}.\n     */\n    function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {\n        if (owner == address(0)) {\n            revert ERC20InvalidApprover(address(0));\n        }\n        if (spender == address(0)) {\n            revert ERC20InvalidSpender(address(0));\n        }\n        _allowances[owner][spender] = value;\n        if (emitEvent) {\n            emit Approval(owner, spender, value);\n        }\n    }\n\n    /**\n     * @dev Updates `owner`'s allowance for `spender` based on spent `value`.\n     *\n     * Does not update the allowance value in case of infinite allowance.\n     * Revert if not enough allowance is available.\n     *\n     * Does not emit an {Approval} event.\n     */\n    function _spendAllowance(address owner, address spender, uint256 value) internal virtual {\n        uint256 currentAllowance = allowance(owner, spender);\n        if (currentAllowance < type(uint256).max) {\n            if (currentAllowance < value) {\n                revert ERC20InsufficientAllowance(spender, currentAllowance, value);\n            }\n            unchecked {\n                _approve(owner, spender, currentAllowance - value, false);\n            }\n        }\n    }\n}\n"},"@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity >=0.6.2;\n\nimport {IERC20} from \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC-20 standard.\n */\ninterface IERC20Metadata is IERC20 {\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() external view returns (string memory);\n\n    /**\n     * @dev Returns the symbol of the token.\n     */\n    function symbol() external view returns (string memory);\n\n    /**\n     * @dev Returns the decimals places of the token.\n     */\n    function decimals() external view returns (uint8);\n}\n"},"@openzeppelin/contracts/token/ERC20/IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)\n\npragma solidity >=0.4.16;\n\n/**\n * @dev Interface of the ERC-20 standard as defined in the ERC.\n */\ninterface IERC20 {\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev Returns the value of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the value of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves a `value` amount of tokens from the caller's account to `to`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address to, uint256 value) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets a `value` amount of tokens as the allowance of `spender` over the\n     * caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 value) external returns (bool);\n\n    /**\n     * @dev Moves a `value` amount of tokens from `from` to `to` using the\n     * allowance mechanism. `value` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address from, address to, uint256 value) external returns (bool);\n}\n"},"@openzeppelin/contracts/utils/Context.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n\n    function _contextSuffixLength() internal view virtual returns (uint256) {\n        return 0;\n    }\n}\n"},"@openzeppelin/contracts/utils/ReentrancyGuard.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v5.1.0) (utils/ReentrancyGuard.sol)\n\npragma solidity ^0.8.20;\n\n/**\n * @dev Contract module that helps prevent reentrant calls to a function.\n *\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\n * available, which can be applied to functions to make sure there are no nested\n * (reentrant) calls to them.\n *\n * Note that because there is a single `nonReentrant` guard, functions marked as\n * `nonReentrant` may not call one another. This can be worked around by making\n * those functions `private`, and then adding `external` `nonReentrant` entry\n * points to them.\n *\n * TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,\n * consider using {ReentrancyGuardTransient} instead.\n *\n * TIP: If you would like to learn more about reentrancy and alternative ways\n * to protect against it, check out our blog post\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\n */\nabstract contract ReentrancyGuard {\n    // Booleans are more expensive than uint256 or any type that takes up a full\n    // word because each write operation emits an extra SLOAD to first read the\n    // slot's contents, replace the bits taken up by the boolean, and then write\n    // back. This is the compiler's defense against contract upgrades and\n    // pointer aliasing, and it cannot be disabled.\n\n    // The values being non-zero value makes deployment a bit more expensive,\n    // but in exchange the refund on every call to nonReentrant will be lower in\n    // amount. Since refunds are capped to a percentage of the total\n    // transaction's gas, it is best to keep them low in cases like this one, to\n    // increase the likelihood of the full refund coming into effect.\n    uint256 private constant NOT_ENTERED = 1;\n    uint256 private constant ENTERED = 2;\n\n    uint256 private _status;\n\n    /**\n     * @dev Unauthorized reentrant call.\n     */\n    error ReentrancyGuardReentrantCall();\n\n    constructor() {\n        _status = NOT_ENTERED;\n    }\n\n    /**\n     * @dev Prevents a contract from calling itself, directly or indirectly.\n     * Calling a `nonReentrant` function from another `nonReentrant`\n     * function is not supported. It is possible to prevent this from happening\n     * by making the `nonReentrant` function external, and making it call a\n     * `private` function that does the actual work.\n     */\n    modifier nonReentrant() {\n        _nonReentrantBefore();\n        _;\n        _nonReentrantAfter();\n    }\n\n    function _nonReentrantBefore() private {\n        // On the first call to nonReentrant, _status will be NOT_ENTERED\n        if (_status == ENTERED) {\n            revert ReentrancyGuardReentrantCall();\n        }\n\n        // Any calls to nonReentrant after this point will fail\n        _status = ENTERED;\n    }\n\n    function _nonReentrantAfter() private {\n        // By storing the original value once again, a refund is triggered (see\n        // https://eips.ethereum.org/EIPS/eip-2200)\n        _status = NOT_ENTERED;\n    }\n\n    /**\n     * @dev Returns true if the reentrancy guard is currently set to \"entered\", which indicates there is a\n     * `nonReentrant` function in the call stack.\n     */\n    function _reentrancyGuardEntered() internal view returns (bool) {\n        return _status == ENTERED;\n    }\n}\n"},"contracts/KagentToken.sol":{"content":"// SPDX-License-Identifier: MIT\npragma solidity ^0.8.24;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {ReentrancyGuard} from \"@openzeppelin/contracts/utils/ReentrancyGuard.sol\";\n\ninterface IIdentity {\n    function identityOf(address account) external view returns (bytes32);\n}\n\ninterface IFactory {\n    function getPair(address, address) external view returns (address);\n    function createPair(address, address) external returns (address);\n}\n\ninterface IPair {\n    function token0() external view returns (address);\n    function token1() external view returns (address);\n    function totalSupply() external view returns (uint256);\n    function balanceOf(address) external view returns (uint256);\n    function mint(address) external returns (uint256);\n    function getReserves() external view returns (uint112, uint112, uint32);\n}\n\ninterface IWBNB {\n    function deposit() external payable;\n    function transfer(address, uint256) external returns (bool);\n    function balanceOf(address) external view returns (uint256);\n}\n\ninterface INFTBinding {\n    function token() external view returns (address);\n    function notifyReward(uint256 amount) external;\n}\n\ninterface IMarketBinding {\n    function nft() external view returns (address);\n}\n\n/// @notice Fixed-supply, identity-limited launch paid in native BNB.\n/// @dev No upgrade, rescue, parameter setters or extra mint. Tax applies to the\n///      immutable official V2 pair only; other venues are not classified.\ncontract KagentToken is ERC20, ReentrancyGuard {\n    uint256 public constant MAX_SHARES = 10_000; // Paid pool only.\n    uint256 public constant MAX_FREE_SHARES = 4_444;\n    uint256 public constant TOTAL_SHARES = 14_444;\n    uint256 public constant MAX_SUPPLY = 1_122_200_000 ether;\n    uint256 public constant TOKENS_PER_SHARE = 50_000 ether;\n    uint256 public constant POOL_TOKENS = 400_000_000 ether;\n    uint256 public constant MINT_DURATION = 72 hours;\n    uint256 public constant LAUNCH_GRACE = 24 hours;\n    uint256 public constant MAX_EXTRA_GRACE = 6 days;\n    address public constant DEAD = address(0xdead);\n\n    /// @dev Bound once after both satellites exist: embedding their creation code\n    ///      here pushes this contract past the EIP-170 limit.\n    address public nft;\n    address public marketplace;\n    IIdentity public immutable identity;\n    IWBNB public immutable wbnb;\n    address public immutable owner;\n    address public immutable treasury;\n    address public immutable pair;\n    uint256 public immutable price;\n\n    uint256 public startedAt;\n    uint256 public soldOutAt;\n    uint256 public sold;\n    uint256 public freeClaimed;\n    mapping(bytes32 => bool) public freeClaimedById;\n    mapping(address => uint256) public freeAllocation;\n    bool public paused;\n    bool public launched;\n    uint256 public refundedShares;\n    mapping(bytes32 => uint256) public mintedById;\n    mapping(bytes32 => uint256) public bonusById;\n    mapping(bytes32 => bytes32) public referrerById;\n    mapping(address => uint256) public paidShares;\n    /// @dev Owner-applied extension of the retry window; capped so launch can never be stalled forever.\n    ///      Declared last on purpose: adding it anywhere earlier would shift every slot below it.\n    uint256 public graceBonus;\n\n    enum Phase {\n        Pending,\n        Minting,\n        AwaitingLaunch,\n        Trading,\n        Refunds\n    }\n\n    error Unauthorized();\n    error InvalidConfig();\n    error WrongPhase();\n    error InvalidAmount();\n    error NoIdentity();\n    error QuotaExceeded();\n    error InvalidReferrer();\n    error SettlementFailed();\n    error TransfersLocked();\n\n    event FreeClaimed(address indexed recipient, bytes32 indexed id);\n    event FreeInvalidated(address indexed recipient, uint256 amount);\n    event UnclaimedFreeBurned(uint256 amount);\n    event Bound(address indexed nft, address indexed marketplace);\n    event Started(uint256 deadline);\n    event PauseChanged(bool paused);\n    event Minted(address indexed payer, bytes32 indexed id, uint256 shares, bytes32 referrer);\n    event ReferralBonus(bytes32 indexed inviter, bytes32 indexed invitee, uint256 bonus);\n    event LaunchDeferred(bytes32 reasonHash);\n    event Launched(address indexed pair, uint256 liquidity);\n    event Refunded(address indexed payer, uint256 shares, uint256 bnbAmount);\n    event GraceExtended(uint256 graceBonus);\n    event FundsWithdrawn(uint256 amount);\n\n    modifier onlyOwner() {\n        if (msg.sender != owner) revert Unauthorized();\n        _;\n    }\n\n    constructor(\n        address identity_,\n        address factory_,\n        address wbnb_,\n        address treasury_,\n        address owner_,\n        uint256 price_\n    ) ERC20(\"Kitten Agent\", \"KAGENT\") {\n        if (\n            identity_.code.length == 0 || factory_.code.length == 0 || wbnb_.code.length == 0\n                || treasury_ == address(0) || owner_ == address(0) || treasury_ == address(this) || price_ == 0\n        ) revert InvalidConfig();\n        identity = IIdentity(identity_);\n        treasury = treasury_;\n        owner = owner_;\n        price = price_;\n        wbnb = IWBNB(wbnb_);\n\n        address p = IFactory(factory_).getPair(address(this), wbnb_);\n        if (p == address(0)) p = IFactory(factory_).createPair(address(this), wbnb_);\n        if (\n            p.code.length == 0 || p == treasury_\n                || !((IPair(p).token0() == address(this) && IPair(p).token1() == wbnb_)\n                    || (IPair(p).token1() == address(this) && IPair(p).token0() == wbnb_))\n        ) revert InvalidConfig();\n        pair = p;\n        super._update(address(0), address(this), MAX_SUPPLY);\n    }\n\n    function phase() public view returns (Phase) {\n        if (launched) return Phase.Trading;\n        if (startedAt == 0) return Phase.Pending;\n        if (sold == MAX_SHARES) {\n            return block.timestamp < soldOutAt + LAUNCH_GRACE + graceBonus ? Phase.AwaitingLaunch : Phase.Refunds;\n        }\n        return block.timestamp < startedAt + MINT_DURATION ? Phase.Minting : Phase.Refunds;\n    }\n\n    /// @notice One-time wiring. Must run before start(); there is no way to re-bind.\n    function bind(address nft_, address market_) external onlyOwner {\n        if (nft != address(0) || nft_.code.length == 0 || market_.code.length == 0) revert InvalidConfig();\n        if (INFTBinding(nft_).token() != address(this) || IMarketBinding(market_).nft() != nft_) {\n            revert InvalidConfig();\n        }\n        nft = nft_;\n        marketplace = market_;\n        emit Bound(nft_, market_);\n    }\n\n    function start() external onlyOwner {\n        if (startedAt != 0 || nft == address(0)) revert WrongPhase();\n        startedAt = block.timestamp;\n        emit Started(startedAt + MINT_DURATION);\n    }\n\n    function setPaused(bool value) external onlyOwner {\n        if (phase() != Phase.Minting) revert WrongPhase();\n        paused = value;\n        emit PauseChanged(value);\n    }\n\n    function remainingQuota(bytes32 id) public view returns (uint256) {\n        if (id == bytes32(0)) return 0;\n        return 9 + bonusById[id] - mintedById[id];\n    }\n\n    /// Free and paid allocations are independent. Only the first PAID mint binds referrals.\n    function claimFree() external nonReentrant {\n        if (phase() != Phase.Minting || paused) revert WrongPhase();\n        bytes32 id = identity.identityOf(msg.sender);\n        if (id == bytes32(0)) revert NoIdentity();\n        if (freeClaimedById[id] || freeClaimed == MAX_FREE_SHARES) revert QuotaExceeded();\n        freeClaimedById[id] = true;\n        ++freeClaimed;\n        freeAllocation[msg.sender] += TOKENS_PER_SHARE;\n        super._update(address(this), msg.sender, TOKENS_PER_SHARE);\n        emit FreeClaimed(msg.sender, id);\n    }\n\n    /// Failed free allocations never unlock. Anyone may clean up the now-invalid ledger balance.\n    function invalidateFree(address recipient) external nonReentrant {\n        if (phase() != Phase.Refunds) revert WrongPhase();\n        _invalidateFree(recipient);\n    }\n\n    function validFreeAllocation(address recipient) external view returns (uint256) {\n        return phase() == Phase.Refunds ? 0 : freeAllocation[recipient];\n    }\n\n    function _invalidateFree(address recipient) private {\n        uint256 amount = freeAllocation[recipient];\n        if (amount != 0) {\n            freeAllocation[recipient] = 0;\n            super._update(recipient, address(0), amount);\n            emit FreeInvalidated(recipient, amount);\n        }\n    }\n\n    /// @param referrer Stable identity, not a wallet or user-supplied hash of a display name.\n    function mint(uint256 requested, bytes32 referrer) external payable nonReentrant returns (uint256 filled) {\n        if (phase() != Phase.Minting || paused) revert WrongPhase();\n        if (requested == 0) revert InvalidAmount();\n        bytes32 id = identity.identityOf(msg.sender);\n        if (id == bytes32(0)) revert NoIdentity();\n        filled = requested < MAX_SHARES - sold ? requested : MAX_SHARES - sold;\n        if (filled > remainingQuota(id)) revert QuotaExceeded();\n        if (mintedById[id] == 0) {\n            if (referrer != bytes32(0)) {\n                if (referrer == id || mintedById[referrer] == 0) revert InvalidReferrer();\n                referrerById[id] = referrer;\n                if (bonusById[referrer] < 10) {\n                    ++bonusById[referrer];\n                    emit ReferralBonus(referrer, id, bonusById[referrer]);\n                }\n            }\n        } else if (referrer != bytes32(0) && referrer != referrerById[id]) {\n            revert InvalidReferrer();\n        }\n        mintedById[id] += filled;\n        paidShares[msg.sender] += filled;\n        sold += filled;\n\n        uint256 cost = filled * price;\n        if (msg.value < cost) revert InvalidAmount();\n        uint256 excess = msg.value - cost;\n        if (excess != 0) {\n            (bool ok,) = msg.sender.call{value: excess}(\"\");\n            if (!ok) revert SettlementFailed();\n        }\n\n        super._update(address(this), msg.sender, filled * TOKENS_PER_SHARE);\n        emit Minted(msg.sender, id, filled, referrerById[id]);\n        if (sold == MAX_SHARES) {\n            soldOutAt = block.timestamp;\n            // Reserve gas for the final share to commit even if pool setup fails.\n            if (gasleft() > 250_000) {\n                try this.executeLaunch{gas: gasleft() - 100_000}() {}\n                catch (bytes memory reason) {\n                    emit LaunchDeferred(keccak256(reason));\n                }\n            } else {\n                emit LaunchDeferred(keccak256(\"INSUFFICIENT_LAUNCH_GAS\"));\n            }\n        }\n    }\n\n    function retryLaunch() external onlyOwner nonReentrant {\n        this.executeLaunch();\n    }\n\n    /// @notice Buys more time to fix a failed launch instead of letting the raise fall into refunds.\n    /// @dev Only while the launch is still pending, and never past LAUNCH_GRACE + MAX_EXTRA_GRACE (7 days).\n    function extendGrace(uint256 seconds_) external onlyOwner {\n        if (phase() != Phase.AwaitingLaunch) revert WrongPhase();\n        if (seconds_ == 0 || graceBonus + seconds_ > MAX_EXTRA_GRACE) revert InvalidAmount();\n        graceBonus += seconds_;\n        emit GraceExtended(graceBonus);\n    }\n\n    /// @dev Self-only atomic subcall: any failure rolls back pool transfers and treasury settlement.\n    ///      BNB is wrapped first: the V2 pair reserves WBNB, never native value.\n    function executeLaunch() external {\n        if (msg.sender != address(this)) revert Unauthorized();\n        if (phase() != Phase.AwaitingLaunch) revert WrongPhase();\n        IPair pool = IPair(pair);\n        if (pool.totalSupply() != 0 || balanceOf(pair) != 0) revert SettlementFailed();\n\n        uint256 raised = MAX_SHARES * price;\n        uint256 poolBnb = raised * 80 / 100;\n        uint256 treasuryBnb = raised - poolBnb;\n        uint256 donated = wbnb.balanceOf(pair);\n\n        super._update(address(this), pair, POOL_TOKENS);\n        wbnb.deposit{value: poolBnb}();\n        if (!wbnb.transfer(pair, poolBnb)) revert SettlementFailed();\n        poolBnb += donated;\n        if (wbnb.balanceOf(pair) != poolBnb) revert SettlementFailed();\n\n        uint256 liquidity = pool.mint(DEAD);\n        if (liquidity == 0 || pool.balanceOf(DEAD) != liquidity || pool.totalSupply() != liquidity + 1000) {\n            revert SettlementFailed();\n        }\n        (uint112 r0, uint112 r1,) = pool.getReserves();\n        bool first = pool.token0() == address(this);\n        if (uint256(first ? r0 : r1) != POOL_TOKENS || uint256(first ? r1 : r0) != poolBnb) {\n            revert SettlementFailed();\n        }\n\n        (bool ok,) = treasury.call{value: treasuryBnb}(\"\");\n        if (!ok) revert SettlementFailed();\n\n        // External pair donations stay in locked liquidity, in addition to the full 80% contribution.\n        // Initial pool price exceeds the mint ratio when a donation exists.\n        uint256 unusedFree = (MAX_FREE_SHARES - freeClaimed) * TOKENS_PER_SHARE;\n        if (unusedFree != 0) {\n            super._update(address(this), address(0), unusedFree);\n            emit UnclaimedFreeBurned(unusedFree);\n        }\n        launched = true;\n        emit Launched(pair, liquidity);\n    }\n\n    function refund() external nonReentrant {\n        if (phase() != Phase.Refunds) revert WrongPhase();\n        uint256 shares = paidShares[msg.sender];\n        if (shares == 0) revert InvalidAmount();\n        paidShares[msg.sender] = 0;\n        refundedShares += shares;\n        _invalidateFree(msg.sender);\n        super._update(msg.sender, address(0), shares * TOKENS_PER_SHARE);\n        uint256 amount = shares * price;\n        (bool ok,) = msg.sender.call{value: amount}(\"\");\n        if (!ok) revert SettlementFailed();\n        emit Refunded(msg.sender, shares, amount);\n    }\n\n    /// @notice Owner drain, partial or full. No phase check, no cap, no delay.\n    /// @dev Pass type(uint256).max (or anything above the balance) to sweep everything.\n    ///      Deliberate trade-off: while this can fire, refund() has no guaranteed backing, so a\n    ///      drain before the refund window closes turns refunds into failed transfers. Also drains\n    ///      the launch commitment, which makes executeLaunch() revert until the contract is refunded.\n    function withdrawFunds(uint256 amount) external onlyOwner nonReentrant {\n        uint256 balance = address(this).balance;\n        if (amount == 0 || balance == 0) revert InvalidAmount();\n        if (amount > balance) amount = balance;\n        (bool ok,) = treasury.call{value: amount}(\"\");\n        if (!ok) revert SettlementFailed();\n        emit FundsWithdrawn(amount);\n    }\n\n    function burnForNFT(address payer, uint256 amount) external {\n        if (msg.sender != nft) revert Unauthorized();\n        if (!launched) revert WrongPhase();\n        _spendAllowance(payer, msg.sender, amount);\n        super._update(payer, address(0), amount);\n    }\n\n    function _update(address from, address to, uint256 amount) internal override {\n        if (!launched && amount != 0) revert TransfersLocked();\n        bool taxed = from == pair || to == pair;\n        uint256 projectTax = taxed ? amount * 100 / 10_000 : 0;\n        uint256 nftTax = taxed ? amount * 50 / 10_000 : 0;\n        if (projectTax != 0) super._update(from, treasury, projectTax);\n        if (nftTax != 0) {\n            super._update(from, nft, nftTax);\n            INFTBinding(nft).notifyReward(nftTax);\n        }\n        super._update(from, to, amount - projectTax - nftTax);\n    }\n\n    /// @dev Reject stray BNB; only mint() accepts value and only executeLaunch() spends it.\n    receive() external payable {\n        revert();\n    }\n}\n"}},"abi":[{"type":"constructor","inputs":[{"name":"identity_","type":"address","internalType":"address"},{"name":"factory_","type":"address","internalType":"address"},{"name":"wbnb_","type":"address","internalType":"address"},{"name":"treasury_","type":"address","internalType":"address"},{"name":"owner_","type":"address","internalType":"address"},{"name":"price_","type":"uint256","internalType":"uint256"}],"stateMutability":"nonpayable"},{"name":"ERC20InsufficientAllowance","type":"error","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"allowance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"name":"ERC20InsufficientBalance","type":"error","inputs":[{"name":"sender","type":"address","internalType":"address"},{"name":"balance","type":"uint256","internalType":"uint256"},{"name":"needed","type":"uint256","internalType":"uint256"}]},{"name":"ERC20InvalidApprover","type":"error","inputs":[{"name":"approver","type":"address","internalType":"address"}]},{"name":"ERC20InvalidReceiver","type":"error","inputs":[{"name":"receiver","type":"address","internalType":"address"}]},{"name":"ERC20InvalidSender","type":"error","inputs":[{"name":"sender","type":"address","internalType":"address"}]},{"name":"ERC20InvalidSpender","type":"error","inputs":[{"name":"spender","type":"address","internalType":"address"}]},{"name":"InvalidAmount","type":"error","inputs":[]},{"name":"InvalidConfig","type":"error","inputs":[]},{"name":"InvalidReferrer","type":"error","inputs":[]},{"name":"NoIdentity","type":"error","inputs":[]},{"name":"QuotaExceeded","type":"error","inputs":[]},{"name":"ReentrancyGuardReentrantCall","type":"error","inputs":[]},{"name":"SettlementFailed","type":"error","inputs":[]},{"name":"TransfersLocked","type":"error","inputs":[]},{"name":"Unauthorized","type":"error","inputs":[]},{"name":"WrongPhase","type":"error","inputs":[]},{"name":"Approval","type":"event","inputs":[{"name":"owner","type":"address","indexed":true,"internalType":"address"},{"name":"spender","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Bound","type":"event","inputs":[{"name":"nft","type":"address","indexed":true,"internalType":"address"},{"name":"marketplace","type":"address","indexed":true,"internalType":"address"}],"anonymous":false},{"name":"FreeClaimed","type":"event","inputs":[{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"id","type":"bytes32","indexed":true,"internalType":"bytes32"}],"anonymous":false},{"name":"FreeInvalidated","type":"event","inputs":[{"name":"recipient","type":"address","indexed":true,"internalType":"address"},{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"FundsWithdrawn","type":"event","inputs":[{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"GraceExtended","type":"event","inputs":[{"name":"graceBonus","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"LaunchDeferred","type":"event","inputs":[{"name":"reasonHash","type":"bytes32","indexed":false,"internalType":"bytes32"}],"anonymous":false},{"name":"Launched","type":"event","inputs":[{"name":"pair","type":"address","indexed":true,"internalType":"address"},{"name":"liquidity","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Minted","type":"event","inputs":[{"name":"payer","type":"address","indexed":true,"internalType":"address"},{"name":"id","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"shares","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"referrer","type":"bytes32","indexed":false,"internalType":"bytes32"}],"anonymous":false},{"name":"PauseChanged","type":"event","inputs":[{"name":"paused","type":"bool","indexed":false,"internalType":"bool"}],"anonymous":false},{"name":"ReferralBonus","type":"event","inputs":[{"name":"inviter","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"invitee","type":"bytes32","indexed":true,"internalType":"bytes32"},{"name":"bonus","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Refunded","type":"event","inputs":[{"name":"payer","type":"address","indexed":true,"internalType":"address"},{"name":"shares","type":"uint256","indexed":false,"internalType":"uint256"},{"name":"bnbAmount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Started","type":"event","inputs":[{"name":"deadline","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"Transfer","type":"event","inputs":[{"name":"from","type":"address","indexed":true,"internalType":"address"},{"name":"to","type":"address","indexed":true,"internalType":"address"},{"name":"value","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"UnclaimedFreeBurned","type":"event","inputs":[{"name":"amount","type":"uint256","indexed":false,"internalType":"uint256"}],"anonymous":false},{"name":"DEAD","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"LAUNCH_GRACE","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"MAX_EXTRA_GRACE","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"MAX_FREE_SHARES","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"MAX_SHARES","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"MAX_SUPPLY","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"MINT_DURATION","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"POOL_TOKENS","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"TOKENS_PER_SHARE","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"TOTAL_SHARES","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"allowance","type":"function","inputs":[{"name":"owner","type":"address","internalType":"address"},{"name":"spender","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"approve","type":"function","inputs":[{"name":"spender","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"balanceOf","type":"function","inputs":[{"name":"account","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"bind","type":"function","inputs":[{"name":"nft_","type":"address","internalType":"address"},{"name":"market_","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"bonusById","type":"function","inputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"burnForNFT","type":"function","inputs":[{"name":"payer","type":"address","internalType":"address"},{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"claimFree","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"decimals","type":"function","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"uint8"}],"stateMutability":"view"},{"name":"executeLaunch","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"extendGrace","type":"function","inputs":[{"name":"seconds_","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"freeAllocation","type":"function","inputs":[{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"freeClaimed","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"freeClaimedById","type":"function","inputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"graceBonus","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"identity","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IIdentity"}],"stateMutability":"view"},{"name":"invalidateFree","type":"function","inputs":[{"name":"recipient","type":"address","internalType":"address"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"launched","type":"function","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"marketplace","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"mint","type":"function","inputs":[{"name":"requested","type":"uint256","internalType":"uint256"},{"name":"referrer","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"filled","type":"uint256","internalType":"uint256"}],"stateMutability":"payable"},{"name":"mintedById","type":"function","inputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"name","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"name":"nft","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"owner","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"paidShares","type":"function","inputs":[{"name":"","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"pair","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"paused","type":"function","inputs":[],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"view"},{"name":"phase","type":"function","inputs":[],"outputs":[{"name":"","type":"uint8","internalType":"enum KagentToken.Phase"}],"stateMutability":"view"},{"name":"price","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"referrerById","type":"function","inputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"bytes32","internalType":"bytes32"}],"stateMutability":"view"},{"name":"refund","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"refundedShares","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"remainingQuota","type":"function","inputs":[{"name":"id","type":"bytes32","internalType":"bytes32"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"retryLaunch","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"setPaused","type":"function","inputs":[{"name":"value","type":"bool","internalType":"bool"}],"outputs":[],"stateMutability":"nonpayable"},{"name":"sold","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"soldOutAt","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"start","type":"function","inputs":[],"outputs":[],"stateMutability":"nonpayable"},{"name":"startedAt","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"symbol","type":"function","inputs":[],"outputs":[{"name":"","type":"string","internalType":"string"}],"stateMutability":"view"},{"name":"totalSupply","type":"function","inputs":[],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"transfer","type":"function","inputs":[{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"transferFrom","type":"function","inputs":[{"name":"from","type":"address","internalType":"address"},{"name":"to","type":"address","internalType":"address"},{"name":"value","type":"uint256","internalType":"uint256"}],"outputs":[{"name":"","type":"bool","internalType":"bool"}],"stateMutability":"nonpayable"},{"name":"treasury","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"address"}],"stateMutability":"view"},{"name":"validFreeAllocation","type":"function","inputs":[{"name":"recipient","type":"address","internalType":"address"}],"outputs":[{"name":"","type":"uint256","internalType":"uint256"}],"stateMutability":"view"},{"name":"wbnb","type":"function","inputs":[],"outputs":[{"name":"","type":"address","internalType":"contract IWBNB"}],"stateMutability":"view"},{"name":"withdrawFunds","type":"function","inputs":[{"name":"amount","type":"uint256","internalType":"uint256"}],"outputs":[],"stateMutability":"nonpayable"},{"type":"receive","stateMutability":"payable"}],"matchId":"58417573","creationMatch":"exact_match","runtimeMatch":"exact_match","verifiedAt":"2026-11-04T22:18:57Z","match":"exact_match","chainId":"56","address":"0xb34105002B19EF0ce43B59011fE848df5c8B174f"}