POL Price: $0.223665 (+2.30%)
 

Overview

POL Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0.00000100001 POL

POL Value

Less Than $0.01 (@ $0.22/POL)

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Run With ETH694851932025-03-25 14:15:5413 mins ago1742912154IN
Bitget Wallet: NFT Exchange
60 POL0.0126570455
Run With ETH694850692025-03-25 14:11:3018 mins ago1742911890IN
Bitget Wallet: NFT Exchange
96.6 POL0.0126590255
Run With ETH694840962025-03-25 13:37:0452 mins ago1742909824IN
Bitget Wallet: NFT Exchange
14.435 POL0.01292555
Run With ETH694840282025-03-25 13:34:3854 mins ago1742909678IN
Bitget Wallet: NFT Exchange
7.495 POL0.01266155
Run With ETH694840062025-03-25 13:33:5255 mins ago1742909632IN
Bitget Wallet: NFT Exchange
4.94 POL0.0129236855
Run With ETH694830172025-03-25 12:58:501 hr ago1742907530IN
Bitget Wallet: NFT Exchange
13 POL0.0117165455
Run With ETH694829622025-03-25 12:56:541 hr ago1742907414IN
Bitget Wallet: NFT Exchange
13 POL0.0119805455
Run With ETH694824752025-03-25 12:39:381 hr ago1742906378IN
Bitget Wallet: NFT Exchange
0.036 POL0.0129197255
Run With ETH694821382025-03-25 12:27:422 hrs ago1742905662IN
Bitget Wallet: NFT Exchange
16.9344 POL0.011717255
Run With ETH694794252025-03-25 10:50:183 hrs ago1742899818IN
Bitget Wallet: NFT Exchange
11.592 POL0.0117178655
Run With ETH694789612025-03-25 10:33:523 hrs ago1742898832IN
Bitget Wallet: NFT Exchange
3.75 POL0.011984555
Run With ETH694789492025-03-25 10:33:263 hrs ago1742898806IN
Bitget Wallet: NFT Exchange
7.5 POL0.011984555
Run With ETH694789302025-03-25 10:32:463 hrs ago1742898766IN
Bitget Wallet: NFT Exchange
7.5 POL0.011984555
Run With ETH694788992025-03-25 10:31:403 hrs ago1742898700IN
Bitget Wallet: NFT Exchange
7.45 POL0.0129243455
Run With ETH694778422025-03-25 9:54:144 hrs ago1742896454IN
Bitget Wallet: NFT Exchange
0.9074 POL0.0129230255
Run With ETH694778112025-03-25 9:53:084 hrs ago1742896388IN
Bitget Wallet: NFT Exchange
4.2205 POL0.0129263255
Run With ETH694777912025-03-25 9:52:244 hrs ago1742896344IN
Bitget Wallet: NFT Exchange
0.51 POL0.0129223655
Run With ETH694774822025-03-25 9:41:284 hrs ago1742895688IN
Bitget Wallet: NFT Exchange
7.5 POL0.011984555
Run With ETH694754602025-03-25 8:29:196 hrs ago1742891359IN
Bitget Wallet: NFT Exchange
0.85 POL0.0136736655
Run With ETH694752412025-03-25 8:21:336 hrs ago1742890893IN
Bitget Wallet: NFT Exchange
2.7675 POL0.0117218255
Run With ETH694729282025-03-25 6:59:397 hrs ago1742885979IN
Bitget Wallet: NFT Exchange
5.049 POL0.01292555
Run With ETH694722002025-03-25 6:33:517 hrs ago1742884431IN
Bitget Wallet: NFT Exchange
3.45 POL0.011984555
Run With ETH694711262025-03-25 5:55:488 hrs ago1742882148IN
Bitget Wallet: NFT Exchange
7 POL0.0117165455
Run With ETH694705072025-03-25 5:33:528 hrs ago1742880832IN
Bitget Wallet: NFT Exchange
12 POL0.0117165455
Run With ETH694703562025-03-25 5:28:329 hrs ago1742880512IN
Bitget Wallet: NFT Exchange
18.75 POL0.0119851655
View all transactions

Latest 25 internal transactions (View All)

Parent Transaction Hash Block From To
694851932025-03-25 14:15:5413 mins ago1742912154
Bitget Wallet: NFT Exchange
60 POL
694850692025-03-25 14:11:3018 mins ago1742911890
Bitget Wallet: NFT Exchange
96.6 POL
694840962025-03-25 13:37:0452 mins ago1742909824
Bitget Wallet: NFT Exchange
14.435 POL
694840282025-03-25 13:34:3854 mins ago1742909678
Bitget Wallet: NFT Exchange
7.495 POL
694840062025-03-25 13:33:5255 mins ago1742909632
Bitget Wallet: NFT Exchange
4.94 POL
694830172025-03-25 12:58:501 hr ago1742907530
Bitget Wallet: NFT Exchange
13 POL
694829622025-03-25 12:56:541 hr ago1742907414
Bitget Wallet: NFT Exchange
13 POL
694824752025-03-25 12:39:381 hr ago1742906378
Bitget Wallet: NFT Exchange
0.036 POL
694821382025-03-25 12:27:422 hrs ago1742905662
Bitget Wallet: NFT Exchange
16.9344 POL
694794252025-03-25 10:50:183 hrs ago1742899818
Bitget Wallet: NFT Exchange
11.592 POL
694789612025-03-25 10:33:523 hrs ago1742898832
Bitget Wallet: NFT Exchange
3.75 POL
694789492025-03-25 10:33:263 hrs ago1742898806
Bitget Wallet: NFT Exchange
7.5 POL
694789302025-03-25 10:32:463 hrs ago1742898766
Bitget Wallet: NFT Exchange
7.5 POL
694788992025-03-25 10:31:403 hrs ago1742898700
Bitget Wallet: NFT Exchange
7.45 POL
694778422025-03-25 9:54:144 hrs ago1742896454
Bitget Wallet: NFT Exchange
0.9074 POL
694778112025-03-25 9:53:084 hrs ago1742896388
Bitget Wallet: NFT Exchange
4.2205 POL
694777912025-03-25 9:52:244 hrs ago1742896344
Bitget Wallet: NFT Exchange
0.51 POL
694774822025-03-25 9:41:284 hrs ago1742895688
Bitget Wallet: NFT Exchange
7.5 POL
694754602025-03-25 8:29:196 hrs ago1742891359
Bitget Wallet: NFT Exchange
0.85 POL
694752412025-03-25 8:21:336 hrs ago1742890893
Bitget Wallet: NFT Exchange
2.7675 POL
694729282025-03-25 6:59:397 hrs ago1742885979
Bitget Wallet: NFT Exchange
5.049 POL
694722002025-03-25 6:33:517 hrs ago1742884431
Bitget Wallet: NFT Exchange
3.45 POL
694711262025-03-25 5:55:488 hrs ago1742882148
Bitget Wallet: NFT Exchange
7 POL
694705072025-03-25 5:33:528 hrs ago1742880832
Bitget Wallet: NFT Exchange
12 POL
694703562025-03-25 5:28:329 hrs ago1742880512
Bitget Wallet: NFT Exchange
18.75 POL
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BKExchangeRouter

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 16 : BKExchangeRouter.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.17;

import "./BKCommon.sol";
import "./utils/TransferHelper.sol";

contract BKExchangeRouter is BKCommon{
    address public immutable BK_EXCHANGE;

    constructor(address bkExchangeAddress, address _owner) {
        BK_EXCHANGE = bkExchangeAddress;
        _transferOwnership(_owner);
    }

    function runWithERC20s(address[] calldata _tokenIns, uint256[] calldata _amountIns, bytes calldata _data)
    external
    payable
    whenNotPaused
    nonReentrant
    {
        require(_tokenIns.length == _amountIns.length, "_tokenIns and _amountIns length mismatched");
        for (uint256 i = 0; i < _tokenIns.length; i++) {
            TransferHelper.safeTransferFrom(
                _tokenIns[i],
                msg.sender,
                BK_EXCHANGE,
                _amountIns[i]
            );
        }

        (bool success, bytes memory resultData) = BK_EXCHANGE.call{
            value : msg.value
        }(_data);

        if (!success) {
            _revertWithData(resultData);
        }
    }

    function runWithETH(bytes calldata _data)
    external
    payable
    whenNotPaused
    nonReentrant
    {
        (bool success, bytes memory resultData) = BK_EXCHANGE.call{
            value : msg.value
        }(_data);

        if (!success) {
            _revertWithData(resultData);
        }
    }
}

File 2 of 16 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

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

File 3 of 16 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.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 {
    /**
     * @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);

    bool private _paused;

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

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

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

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

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

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

File 4 of 16 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @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 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].
 */
abstract contract ReentrancyGuard {
    // 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;

    uint256 private _status;

    constructor() {
        _status = _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();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

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

File 5 of 16 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 6 of 16 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

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

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

File 7 of 16 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

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

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

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

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

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

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

File 8 of 16 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

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

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

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

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 9 of 16 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);
}

File 10 of 16 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

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

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 11 of 16 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with 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;
    }
}

File 12 of 16 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 13 of 16 : BKCommon.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "./interfaces/IBKErrors.sol";
import "./interfaces/IBKCommon.sol";

contract BKCommon is IBKCommon, IBKErrors, Ownable, Pausable, ReentrancyGuard {

    using SafeERC20 for IERC20;

    mapping(address => bool) isOperator;

    event RescueETH(address indexed recipient, uint256 amount);
    event RescueERC20(address indexed asset, address recipient);
    event RescueERC721(address indexed asset, address recipient, uint256[] ids);
    event RescueERC1155(address indexed asset, address recipient, uint256[] ids, uint256[] amounts);

    event SetOperator(address operator, bool isOperator);

    modifier onlyOperator() {
        require(isOperator[_msgSender()], "Operator: caller is not the operator");
        _;
    }

    function setOperator(address[] calldata _operators, bool _isOperator) external onlyOwner {
        for (uint i = 0; i < _operators.length; i++) {
            isOperator[_operators[i]] = _isOperator;
            emit SetOperator(_operators[i], _isOperator);
        }
    }

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

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

    function rescueERC20(address asset, address recipient) external onlyOperator {
        IERC20(asset).safeTransfer(
            recipient,
            IERC20(asset).balanceOf(address(this))
        );
        emit RescueERC20(asset, recipient);
    }
    // Emergency function: In case any ERC721 tokens get stuck in the contract unintentionally
    // Only owner can retrieve the asset balance to a recipient address
    function rescueERC721(address asset, uint256[] calldata ids, address recipient) onlyOperator external {
        for (uint256 i = 0; i < ids.length; i++) {
            IERC721(asset).safeTransferFrom(address(this), recipient, ids[i]);
        }
        emit RescueERC721(asset, recipient, ids);
    }

    // Emergency function: In case any ERC1155 tokens get stuck in the contract unintentionally
    // Only owner can retrieve the asset balance to a recipient address
    function rescueERC1155(address asset, uint256[] calldata ids, uint256[] calldata amounts, address recipient) onlyOperator external {
        require(ids.length == amounts.length, "ids and amounts length mismatched");

        for (uint256 i = 0; i < ids.length; i++) {
            IERC1155(asset).safeTransferFrom(address(this), recipient, ids[i], amounts[i], "");
        }
        emit RescueERC1155(asset, recipient, ids, amounts);
    }

    function rescueETH(address recipient) external onlyOperator {
        _transferEth(recipient, address(this).balance);
    }

    function _transferEth(address _to, uint256 _amount) internal {
        bool callStatus;
        assembly {
        // Transfer the ETH and store if it succeeded or not.
            callStatus := call(gas(), _to, _amount, 0, 0, 0, 0)
        }
        require(callStatus, "_transferEth: Eth transfer failed");
        emit RescueETH(_to, _amount);
    }

    /// @dev Revert with arbitrary bytes.
    /// @param data Revert data.
    function _revertWithData(bytes memory data) internal pure {
        assembly {revert(add(data, 32), mload(data))}
    }

    receive() external payable {}
}

File 14 of 16 : IBKCommon.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.17;

interface IBKCommon {
    function setOperator(address[] calldata _operators, bool _isOperator) external;

    function pause() external;

    function unpause() external;

    function rescueETH(address recipient) external;

    function rescueERC20(address asset, address recipient) external;

    function rescueERC721(address asset, uint256[] calldata ids, address recipient) external;

    function rescueERC1155(address asset, uint256[] calldata ids, uint256[] calldata amounts, address recipient)  external;
}

File 15 of 16 : IBKErrors.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.17;

interface IBKErrors {
    error InvalidMsgSig();
    error InsufficientEtherSupplied();
    error FeatureNotExist(bytes4 msgSig);
    error FeatureInActive();
    error InvalidCaller();
    error InvalidSigner();
    error InvalidNonce(bytes32 signMsg);
    error InvalidZeroAddress();
    error InvalidFeeRate(uint256 feeRate);
    error SwapEthBalanceNotEnough();
    error SwapTokenBalanceNotEnough();
    error SwapTokenApproveNotEnough();
    error SwapInsuffenceOutPut();
    error SwapTypeNotAvailable();
    error BurnToMuch();
    error IllegalCallTarget();
    error IllegalApproveTarget();
    error InvalidSwapAddress(address);
}

File 16 of 16 : TransferHelper.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.17;

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

library TransferHelper {
    using SafeERC20 for IERC20;

    /// @notice Transfers tokens from the targeted address to the given destination
    /// @notice Errors with 'STF' if transfer fails
    /// @param token The contract address of the token to be transferred
    /// @param from The originating address from which the tokens will be transferred
    /// @param to The destination address of the transfer
    /// @param value The amount to be transferred
    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(
                IERC20.transferFrom.selector,
                from,
                to,
                value
            )
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "STF"
        );
    }

    /// @notice Transfers tokens from msg.sender to a recipient
    /// @dev Errors with ST if transfer fails
    /// @param token The contract address of the token which will be transferred
    /// @param to The recipient of the transfer
    /// @param value The value of the transfer
    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20.transfer.selector, to, value)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "ST"
        );
    }

    /// @notice Approves the stipulated contract to spend the given allowance in the given token
    /// @dev Errors with 'SA' if transfer fails
    /// @param token The contract address of the token to be approved
    /// @param to The target of the approval
    /// @param value The amount of the given token the target will be allowed to spend
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        (bool success, bytes memory data) = token.call(
            abi.encodeWithSelector(IERC20.approve.selector, to, value)
        );
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            "SA"
        );
    }

    /// @notice Transfers ETH to the recipient address
    /// @dev Fails with `STE`
    /// @param to The destination of the transfer
    /// @param value The value to be transferred
    function safeTransferETH(address to, uint256 value) internal {
       (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, "STE");
    }

    function approveMax(
        IERC20 _token,
        address _spender,
        uint256 _amount
    ) internal {
        uint256 allowance = _token.allowance(address(this), address(_spender));
        if (allowance < _amount) {
            if (allowance > 0) {
                _token.safeApprove(address(_spender), 0);
            }
            _token.safeApprove(address(_spender), type(uint256).max);
        }
    }

    function isETH(address _tokenAddress) internal pure returns (bool) {
        return
            (_tokenAddress == 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE) ||
            (_tokenAddress == 0x0000000000000000000000000000000000000000);
    }
}

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"bkExchangeAddress","type":"address"},{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BurnToMuch","type":"error"},{"inputs":[],"name":"FeatureInActive","type":"error"},{"inputs":[{"internalType":"bytes4","name":"msgSig","type":"bytes4"}],"name":"FeatureNotExist","type":"error"},{"inputs":[],"name":"IllegalApproveTarget","type":"error"},{"inputs":[],"name":"IllegalCallTarget","type":"error"},{"inputs":[],"name":"InsufficientEtherSupplied","type":"error"},{"inputs":[],"name":"InvalidCaller","type":"error"},{"inputs":[{"internalType":"uint256","name":"feeRate","type":"uint256"}],"name":"InvalidFeeRate","type":"error"},{"inputs":[],"name":"InvalidMsgSig","type":"error"},{"inputs":[{"internalType":"bytes32","name":"signMsg","type":"bytes32"}],"name":"InvalidNonce","type":"error"},{"inputs":[],"name":"InvalidSigner","type":"error"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"InvalidSwapAddress","type":"error"},{"inputs":[],"name":"InvalidZeroAddress","type":"error"},{"inputs":[],"name":"SwapEthBalanceNotEnough","type":"error"},{"inputs":[],"name":"SwapInsuffenceOutPut","type":"error"},{"inputs":[],"name":"SwapTokenApproveNotEnough","type":"error"},{"inputs":[],"name":"SwapTokenBalanceNotEnough","type":"error"},{"inputs":[],"name":"SwapTypeNotAvailable","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"RescueERC1155","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"}],"name":"RescueERC20","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"RescueERC721","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RescueETH","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"isOperator","type":"bool"}],"name":"SetOperator","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"BK_EXCHANGE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"rescueETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_tokenIns","type":"address[]"},{"internalType":"uint256[]","name":"_amountIns","type":"uint256[]"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"runWithERC20s","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"runWithETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_operators","type":"address[]"},{"internalType":"bool","name":"_isOperator","type":"bool"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a06040523480156200001157600080fd5b5060405162002948380380620029488339818101604052810190620000379190620001fb565b620000576200004b620000c560201b60201c565b620000cd60201b60201c565b60008060146101000a81548160ff021916908315150217905550600180819055508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1681525050620000bd81620000cd60201b60201c565b505062000242565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620001c38262000196565b9050919050565b620001d581620001b6565b8114620001e157600080fd5b50565b600081519050620001f581620001ca565b92915050565b6000806040838503121562000215576200021462000191565b5b60006200022585828601620001e4565b92505060206200023885828601620001e4565b9150509250929050565b6080516126d562000273600039600081816106d5015281816108130152818161086a0152610b9301526126d56000f3fe6080604052600436106100e15760003560e01c80635d799f871161007f5780638da5cb5b116100595780638da5cb5b146102395780638f7db96714610264578063b7ce33a21461028f578063f2fde38b146102b8576100e8565b80635d799f87146101e2578063715018a61461020b5780638456cb5914610222576100e8565b80633f4ba83a116100bb5780633f4ba83a1461016857806346a4fffd1461017f5780635688ec691461019b5780635c975abb146101b7576100e8565b806304824e70146100ed5780631ed6144e1461011657806326e2dca21461013f576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b50610114600480360381019061010f91906116b3565b6102e1565b005b34801561012257600080fd5b5061013d6004803603810190610138919061177d565b610381565b005b34801561014b57600080fd5b5061016660048036038101906101619190611833565b61048e565b005b34801561017457600080fd5b5061017d610623565b005b610199600480360381019061019491906118fd565b6106c0565b005b6101b560048036038101906101b0919061194a565b61077f565b005b3480156101c357600080fd5b506101cc610918565b6040516101d99190611a0d565b60405180910390f35b3480156101ee57600080fd5b5061020960048036038101906102049190611a28565b61092e565b005b34801561021757600080fd5b50610220610ab7565b005b34801561022e57600080fd5b50610237610acb565b005b34801561024557600080fd5b5061024e610b68565b60405161025b9190611a77565b60405180910390f35b34801561027057600080fd5b50610279610b91565b6040516102869190611a77565b60405180910390f35b34801561029b57600080fd5b506102b660048036038101906102b19190611a92565b610bb5565b005b3480156102c457600080fd5b506102df60048036038101906102da91906116b3565b610db3565b005b600260006102ed610e36565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610374576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036b90611bbc565b60405180910390fd5b61037e8147610e3e565b50565b610389610edf565b60005b838390508110156104885781600260008686858181106103af576103ae611bdc565b5b90506020020160208101906103c491906116b3565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f1618a22a3b00b9ac70fd5a82f1f5cdd8cb272bd0f1b740ddf7c26ab05881dd5b84848381811061044957610448611bdc565b5b905060200201602081019061045e91906116b3565b8360405161046d929190611c0b565b60405180910390a1808061048090611c6d565b91505061038c565b50505050565b6002600061049a610e36565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610521576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051890611bbc565b60405180910390fd5b60005b838390508110156105ca578473ffffffffffffffffffffffffffffffffffffffff166342842e0e30848787868181106105605761055f611bdc565b5b905060200201356040518463ffffffff1660e01b815260040161058593929190611cc4565b600060405180830381600087803b15801561059f57600080fd5b505af11580156105b3573d6000803e3d6000fd5b5050505080806105c290611c6d565b915050610524565b508373ffffffffffffffffffffffffffffffffffffffff167fb7c0f01bd3cd8cf11e8a0f823426b7081b303ffd44b950aac4e19a4967c60af182858560405161061593929190611d76565b60405180910390a250505050565b6002600061062f610e36565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166106b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ad90611bbc565b60405180910390fd5b6106be610f5d565b565b6106c8610fbf565b6106d0611009565b6000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1634858560405161071b929190611de7565b60006040518083038185875af1925050503d8060008114610758576040519150601f19603f3d011682016040523d82523d6000602084013e61075d565b606091505b5091509150816107715761077081611058565b5b505061077b611060565b5050565b610787610fbf565b61078f611009565b8383905086869050146107d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ce90611e72565b60405180910390fd5b60005b86869050811015610864576108518787838181106107fb576107fa611bdc565b5b905060200201602081019061081091906116b3565b337f000000000000000000000000000000000000000000000000000000000000000088888681811061084557610844611bdc565b5b90506020020135611069565b808061085c90611c6d565b9150506107da565b506000807f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163485856040516108b0929190611de7565b60006040518083038185875af1925050503d80600081146108ed576040519150601f19603f3d011682016040523d82523d6000602084013e6108f2565b606091505b5091509150816109065761090581611058565b5b5050610910611060565b505050505050565b60008060149054906101000a900460ff16905090565b6002600061093a610e36565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166109c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b890611bbc565b60405180910390fd5b610a65818373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016109fe9190611a77565b602060405180830381865afa158015610a1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3f9190611ebe565b8473ffffffffffffffffffffffffffffffffffffffff166111c19092919063ffffffff16565b8173ffffffffffffffffffffffffffffffffffffffff167f8c4e91db779d40eb9afbcebd8cf9aa9195b7b057611e32ad5dc9e4025f56ada082604051610aab9190611a77565b60405180910390a25050565b610abf610edf565b610ac96000611247565b565b60026000610ad7610e36565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610b5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5590611bbc565b60405180910390fd5b610b6661130b565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f000000000000000000000000000000000000000000000000000000000000000081565b60026000610bc1610e36565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610c48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3f90611bbc565b60405180910390fd5b828290508585905014610c90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8790611f5d565b60405180910390fd5b60005b85859050811015610d54578673ffffffffffffffffffffffffffffffffffffffff1663f242432a3084898986818110610ccf57610cce611bdc565b5b90506020020135888887818110610ce957610ce8611bdc565b5b905060200201356040518563ffffffff1660e01b8152600401610d0f9493929190611fb4565b600060405180830381600087803b158015610d2957600080fd5b505af1158015610d3d573d6000803e3d6000fd5b505050508080610d4c90611c6d565b915050610c93565b508573ffffffffffffffffffffffffffffffffffffffff167f18ede0ce50b21f15fe925075efad95a6f7e9b55bccf57939b3e1b1651e6075b18287878787604051610da395949392919061200c565b60405180910390a2505050505050565b610dbb610edf565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610e2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e21906120c7565b60405180910390fd5b610e3381611247565b50565b600033905090565b600080600080600085875af1905080610e8c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e8390612159565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff167f77f67778e9529a2fd2147ffb2b10ca2e0d1efd8cb925e1f1d5702e39c5fa8da683604051610ed29190612179565b60405180910390a2505050565b610ee7610e36565b73ffffffffffffffffffffffffffffffffffffffff16610f05610b68565b73ffffffffffffffffffffffffffffffffffffffff1614610f5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f52906121e0565b60405180910390fd5b565b610f6561136e565b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610fa8610e36565b604051610fb59190611a77565b60405180910390a1565b610fc7610918565b15611007576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ffe9061224c565b60405180910390fd5b565b60026001540361104e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611045906122b8565b60405180910390fd5b6002600181905550565b805160208201fd5b60018081905550565b6000808573ffffffffffffffffffffffffffffffffffffffff166323b872dd60e01b8686866040516024016110a093929190611cc4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161110a919061233e565b6000604051808303816000865af19150503d8060008114611147576040519150601f19603f3d011682016040523d82523d6000602084013e61114c565b606091505b509150915081801561117a5750600081511480611179575080806020019051810190611178919061236a565b5b5b6111b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111b0906123e3565b60405180910390fd5b505050505050565b6112428363a9059cbb60e01b84846040516024016111e0929190612403565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506113b7565b505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611313610fbf565b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611357610e36565b6040516113649190611a77565b60405180910390a1565b611376610918565b6113b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113ac90612478565b60405180910390fd5b565b6000611419826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661147e9092919063ffffffff16565b90506000815111156114795780806020019051810190611439919061236a565b611478576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146f9061250a565b60405180910390fd5b5b505050565b606061148d8484600085611496565b90509392505050565b6060824710156114db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d29061259c565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611504919061233e565b60006040518083038185875af1925050503d8060008114611541576040519150601f19603f3d011682016040523d82523d6000602084013e611546565b606091505b509150915061155787838387611563565b92505050949350505050565b606083156115c55760008351036115bd5761157d856115d8565b6115bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b390612608565b60405180910390fd5b5b8290506115d0565b6115cf83836115fb565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60008251111561160e5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611642919061267d565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061168082611655565b9050919050565b61169081611675565b811461169b57600080fd5b50565b6000813590506116ad81611687565b92915050565b6000602082840312156116c9576116c861164b565b5b60006116d78482850161169e565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f840112611705576117046116e0565b5b8235905067ffffffffffffffff811115611722576117216116e5565b5b60208301915083602082028301111561173e5761173d6116ea565b5b9250929050565b60008115159050919050565b61175a81611745565b811461176557600080fd5b50565b60008135905061177781611751565b92915050565b6000806000604084860312156117965761179561164b565b5b600084013567ffffffffffffffff8111156117b4576117b3611650565b5b6117c0868287016116ef565b935093505060206117d386828701611768565b9150509250925092565b60008083601f8401126117f3576117f26116e0565b5b8235905067ffffffffffffffff8111156118105761180f6116e5565b5b60208301915083602082028301111561182c5761182b6116ea565b5b9250929050565b6000806000806060858703121561184d5761184c61164b565b5b600061185b8782880161169e565b945050602085013567ffffffffffffffff81111561187c5761187b611650565b5b611888878288016117dd565b9350935050604061189b8782880161169e565b91505092959194509250565b60008083601f8401126118bd576118bc6116e0565b5b8235905067ffffffffffffffff8111156118da576118d96116e5565b5b6020830191508360018202830111156118f6576118f56116ea565b5b9250929050565b600080602083850312156119145761191361164b565b5b600083013567ffffffffffffffff81111561193257611931611650565b5b61193e858286016118a7565b92509250509250929050565b600080600080600080606087890312156119675761196661164b565b5b600087013567ffffffffffffffff81111561198557611984611650565b5b61199189828a016116ef565b9650965050602087013567ffffffffffffffff8111156119b4576119b3611650565b5b6119c089828a016117dd565b9450945050604087013567ffffffffffffffff8111156119e3576119e2611650565b5b6119ef89828a016118a7565b92509250509295509295509295565b611a0781611745565b82525050565b6000602082019050611a2260008301846119fe565b92915050565b60008060408385031215611a3f57611a3e61164b565b5b6000611a4d8582860161169e565b9250506020611a5e8582860161169e565b9150509250929050565b611a7181611675565b82525050565b6000602082019050611a8c6000830184611a68565b92915050565b60008060008060008060808789031215611aaf57611aae61164b565b5b6000611abd89828a0161169e565b965050602087013567ffffffffffffffff811115611ade57611add611650565b5b611aea89828a016117dd565b9550955050604087013567ffffffffffffffff811115611b0d57611b0c611650565b5b611b1989828a016117dd565b93509350506060611b2c89828a0161169e565b9150509295509295509295565b600082825260208201905092915050565b7f4f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260008201527f61746f7200000000000000000000000000000000000000000000000000000000602082015250565b6000611ba6602483611b39565b9150611bb182611b4a565b604082019050919050565b60006020820190508181036000830152611bd581611b99565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000604082019050611c206000830185611a68565b611c2d60208301846119fe565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000819050919050565b6000611c7882611c63565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611caa57611ca9611c34565b5b600182019050919050565b611cbe81611c63565b82525050565b6000606082019050611cd96000830186611a68565b611ce66020830185611a68565b611cf36040830184611cb5565b949350505050565b600082825260208201905092915050565b600080fd5b82818337505050565b6000611d268385611cfb565b93507f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115611d5957611d58611d0c565b5b602083029250611d6a838584611d11565b82840190509392505050565b6000604082019050611d8b6000830186611a68565b8181036020830152611d9e818486611d1a565b9050949350505050565b600081905092915050565b82818337600083830152505050565b6000611dce8385611da8565b9350611ddb838584611db3565b82840190509392505050565b6000611df4828486611dc2565b91508190509392505050565b7f5f746f6b656e496e7320616e64205f616d6f756e74496e73206c656e6774682060008201527f6d69736d61746368656400000000000000000000000000000000000000000000602082015250565b6000611e5c602a83611b39565b9150611e6782611e00565b604082019050919050565b60006020820190508181036000830152611e8b81611e4f565b9050919050565b611e9b81611c63565b8114611ea657600080fd5b50565b600081519050611eb881611e92565b92915050565b600060208284031215611ed457611ed361164b565b5b6000611ee284828501611ea9565b91505092915050565b7f69647320616e6420616d6f756e7473206c656e677468206d69736d617463686560008201527f6400000000000000000000000000000000000000000000000000000000000000602082015250565b6000611f47602183611b39565b9150611f5282611eeb565b604082019050919050565b60006020820190508181036000830152611f7681611f3a565b9050919050565b600082825260208201905092915050565b50565b6000611f9e600083611f7d565b9150611fa982611f8e565b600082019050919050565b600060a082019050611fc96000830187611a68565b611fd66020830186611a68565b611fe36040830185611cb5565b611ff06060830184611cb5565b818103608083015261200181611f91565b905095945050505050565b60006060820190506120216000830188611a68565b8181036020830152612034818688611d1a565b90508181036040830152612049818486611d1a565b90509695505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006120b1602683611b39565b91506120bc82612055565b604082019050919050565b600060208201905081810360008301526120e0816120a4565b9050919050565b7f5f7472616e736665724574683a20457468207472616e73666572206661696c6560008201527f6400000000000000000000000000000000000000000000000000000000000000602082015250565b6000612143602183611b39565b915061214e826120e7565b604082019050919050565b6000602082019050818103600083015261217281612136565b9050919050565b600060208201905061218e6000830184611cb5565b92915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006121ca602083611b39565b91506121d582612194565b602082019050919050565b600060208201905081810360008301526121f9816121bd565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b6000612236601083611b39565b915061224182612200565b602082019050919050565b6000602082019050818103600083015261226581612229565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006122a2601f83611b39565b91506122ad8261226c565b602082019050919050565b600060208201905081810360008301526122d181612295565b9050919050565b600081519050919050565b60005b838110156123015780820151818401526020810190506122e6565b60008484015250505050565b6000612318826122d8565b6123228185611da8565b93506123328185602086016122e3565b80840191505092915050565b600061234a828461230d565b915081905092915050565b60008151905061236481611751565b92915050565b6000602082840312156123805761237f61164b565b5b600061238e84828501612355565b91505092915050565b7f5354460000000000000000000000000000000000000000000000000000000000600082015250565b60006123cd600383611b39565b91506123d882612397565b602082019050919050565b600060208201905081810360008301526123fc816123c0565b9050919050565b60006040820190506124186000830185611a68565b6124256020830184611cb5565b9392505050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b6000612462601483611b39565b915061246d8261242c565b602082019050919050565b6000602082019050818103600083015261249181612455565b9050919050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b60006124f4602a83611b39565b91506124ff82612498565b604082019050919050565b60006020820190508181036000830152612523816124e7565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b6000612586602683611b39565b91506125918261252a565b604082019050919050565b600060208201905081810360008301526125b581612579565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006125f2601d83611b39565b91506125fd826125bc565b602082019050919050565b60006020820190508181036000830152612621816125e5565b9050919050565b600081519050919050565b6000601f19601f8301169050919050565b600061264f82612628565b6126598185611b39565b93506126698185602086016122e3565b61267281612633565b840191505092915050565b600060208201905081810360008301526126978184612644565b90509291505056fea264697066735822122047e579b5944bd97677b7ab38cca66b7c3ad54120c81ab0f40ca66341ab3084a564736f6c634300081100330000000000000000000000006dd3029c172eeae3fded8b7f19ab72af7ddcffe10000000000000000000000005defa9c83085c7f606ceb3b5f75fc107945ed7de

Deployed Bytecode

0x6080604052600436106100e15760003560e01c80635d799f871161007f5780638da5cb5b116100595780638da5cb5b146102395780638f7db96714610264578063b7ce33a21461028f578063f2fde38b146102b8576100e8565b80635d799f87146101e2578063715018a61461020b5780638456cb5914610222576100e8565b80633f4ba83a116100bb5780633f4ba83a1461016857806346a4fffd1461017f5780635688ec691461019b5780635c975abb146101b7576100e8565b806304824e70146100ed5780631ed6144e1461011657806326e2dca21461013f576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b50610114600480360381019061010f91906116b3565b6102e1565b005b34801561012257600080fd5b5061013d6004803603810190610138919061177d565b610381565b005b34801561014b57600080fd5b5061016660048036038101906101619190611833565b61048e565b005b34801561017457600080fd5b5061017d610623565b005b610199600480360381019061019491906118fd565b6106c0565b005b6101b560048036038101906101b0919061194a565b61077f565b005b3480156101c357600080fd5b506101cc610918565b6040516101d99190611a0d565b60405180910390f35b3480156101ee57600080fd5b5061020960048036038101906102049190611a28565b61092e565b005b34801561021757600080fd5b50610220610ab7565b005b34801561022e57600080fd5b50610237610acb565b005b34801561024557600080fd5b5061024e610b68565b60405161025b9190611a77565b60405180910390f35b34801561027057600080fd5b50610279610b91565b6040516102869190611a77565b60405180910390f35b34801561029b57600080fd5b506102b660048036038101906102b19190611a92565b610bb5565b005b3480156102c457600080fd5b506102df60048036038101906102da91906116b3565b610db3565b005b600260006102ed610e36565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610374576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161036b90611bbc565b60405180910390fd5b61037e8147610e3e565b50565b610389610edf565b60005b838390508110156104885781600260008686858181106103af576103ae611bdc565b5b90506020020160208101906103c491906116b3565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f1618a22a3b00b9ac70fd5a82f1f5cdd8cb272bd0f1b740ddf7c26ab05881dd5b84848381811061044957610448611bdc565b5b905060200201602081019061045e91906116b3565b8360405161046d929190611c0b565b60405180910390a1808061048090611c6d565b91505061038c565b50505050565b6002600061049a610e36565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610521576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161051890611bbc565b60405180910390fd5b60005b838390508110156105ca578473ffffffffffffffffffffffffffffffffffffffff166342842e0e30848787868181106105605761055f611bdc565b5b905060200201356040518463ffffffff1660e01b815260040161058593929190611cc4565b600060405180830381600087803b15801561059f57600080fd5b505af11580156105b3573d6000803e3d6000fd5b5050505080806105c290611c6d565b915050610524565b508373ffffffffffffffffffffffffffffffffffffffff167fb7c0f01bd3cd8cf11e8a0f823426b7081b303ffd44b950aac4e19a4967c60af182858560405161061593929190611d76565b60405180910390a250505050565b6002600061062f610e36565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166106b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ad90611bbc565b60405180910390fd5b6106be610f5d565b565b6106c8610fbf565b6106d0611009565b6000807f0000000000000000000000006dd3029c172eeae3fded8b7f19ab72af7ddcffe173ffffffffffffffffffffffffffffffffffffffff1634858560405161071b929190611de7565b60006040518083038185875af1925050503d8060008114610758576040519150601f19603f3d011682016040523d82523d6000602084013e61075d565b606091505b5091509150816107715761077081611058565b5b505061077b611060565b5050565b610787610fbf565b61078f611009565b8383905086869050146107d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ce90611e72565b60405180910390fd5b60005b86869050811015610864576108518787838181106107fb576107fa611bdc565b5b905060200201602081019061081091906116b3565b337f0000000000000000000000006dd3029c172eeae3fded8b7f19ab72af7ddcffe188888681811061084557610844611bdc565b5b90506020020135611069565b808061085c90611c6d565b9150506107da565b506000807f0000000000000000000000006dd3029c172eeae3fded8b7f19ab72af7ddcffe173ffffffffffffffffffffffffffffffffffffffff163485856040516108b0929190611de7565b60006040518083038185875af1925050503d80600081146108ed576040519150601f19603f3d011682016040523d82523d6000602084013e6108f2565b606091505b5091509150816109065761090581611058565b5b5050610910611060565b505050505050565b60008060149054906101000a900460ff16905090565b6002600061093a610e36565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166109c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b890611bbc565b60405180910390fd5b610a65818373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b81526004016109fe9190611a77565b602060405180830381865afa158015610a1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3f9190611ebe565b8473ffffffffffffffffffffffffffffffffffffffff166111c19092919063ffffffff16565b8173ffffffffffffffffffffffffffffffffffffffff167f8c4e91db779d40eb9afbcebd8cf9aa9195b7b057611e32ad5dc9e4025f56ada082604051610aab9190611a77565b60405180910390a25050565b610abf610edf565b610ac96000611247565b565b60026000610ad7610e36565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610b5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5590611bbc565b60405180910390fd5b610b6661130b565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f0000000000000000000000006dd3029c172eeae3fded8b7f19ab72af7ddcffe181565b60026000610bc1610e36565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610c48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3f90611bbc565b60405180910390fd5b828290508585905014610c90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8790611f5d565b60405180910390fd5b60005b85859050811015610d54578673ffffffffffffffffffffffffffffffffffffffff1663f242432a3084898986818110610ccf57610cce611bdc565b5b90506020020135888887818110610ce957610ce8611bdc565b5b905060200201356040518563ffffffff1660e01b8152600401610d0f9493929190611fb4565b600060405180830381600087803b158015610d2957600080fd5b505af1158015610d3d573d6000803e3d6000fd5b505050508080610d4c90611c6d565b915050610c93565b508573ffffffffffffffffffffffffffffffffffffffff167f18ede0ce50b21f15fe925075efad95a6f7e9b55bccf57939b3e1b1651e6075b18287878787604051610da395949392919061200c565b60405180910390a2505050505050565b610dbb610edf565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610e2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e21906120c7565b60405180910390fd5b610e3381611247565b50565b600033905090565b600080600080600085875af1905080610e8c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e8390612159565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff167f77f67778e9529a2fd2147ffb2b10ca2e0d1efd8cb925e1f1d5702e39c5fa8da683604051610ed29190612179565b60405180910390a2505050565b610ee7610e36565b73ffffffffffffffffffffffffffffffffffffffff16610f05610b68565b73ffffffffffffffffffffffffffffffffffffffff1614610f5b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f52906121e0565b60405180910390fd5b565b610f6561136e565b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa610fa8610e36565b604051610fb59190611a77565b60405180910390a1565b610fc7610918565b15611007576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ffe9061224c565b60405180910390fd5b565b60026001540361104e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611045906122b8565b60405180910390fd5b6002600181905550565b805160208201fd5b60018081905550565b6000808573ffffffffffffffffffffffffffffffffffffffff166323b872dd60e01b8686866040516024016110a093929190611cc4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161110a919061233e565b6000604051808303816000865af19150503d8060008114611147576040519150601f19603f3d011682016040523d82523d6000602084013e61114c565b606091505b509150915081801561117a5750600081511480611179575080806020019051810190611178919061236a565b5b5b6111b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111b0906123e3565b60405180910390fd5b505050505050565b6112428363a9059cbb60e01b84846040516024016111e0929190612403565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506113b7565b505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b611313610fbf565b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611357610e36565b6040516113649190611a77565b60405180910390a1565b611376610918565b6113b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113ac90612478565b60405180910390fd5b565b6000611419826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff1661147e9092919063ffffffff16565b90506000815111156114795780806020019051810190611439919061236a565b611478576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146f9061250a565b60405180910390fd5b5b505050565b606061148d8484600085611496565b90509392505050565b6060824710156114db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114d29061259c565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611504919061233e565b60006040518083038185875af1925050503d8060008114611541576040519150601f19603f3d011682016040523d82523d6000602084013e611546565b606091505b509150915061155787838387611563565b92505050949350505050565b606083156115c55760008351036115bd5761157d856115d8565b6115bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b390612608565b60405180910390fd5b5b8290506115d0565b6115cf83836115fb565b5b949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b60008251111561160e5781518083602001fd5b806040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611642919061267d565b60405180910390fd5b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061168082611655565b9050919050565b61169081611675565b811461169b57600080fd5b50565b6000813590506116ad81611687565b92915050565b6000602082840312156116c9576116c861164b565b5b60006116d78482850161169e565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f840112611705576117046116e0565b5b8235905067ffffffffffffffff811115611722576117216116e5565b5b60208301915083602082028301111561173e5761173d6116ea565b5b9250929050565b60008115159050919050565b61175a81611745565b811461176557600080fd5b50565b60008135905061177781611751565b92915050565b6000806000604084860312156117965761179561164b565b5b600084013567ffffffffffffffff8111156117b4576117b3611650565b5b6117c0868287016116ef565b935093505060206117d386828701611768565b9150509250925092565b60008083601f8401126117f3576117f26116e0565b5b8235905067ffffffffffffffff8111156118105761180f6116e5565b5b60208301915083602082028301111561182c5761182b6116ea565b5b9250929050565b6000806000806060858703121561184d5761184c61164b565b5b600061185b8782880161169e565b945050602085013567ffffffffffffffff81111561187c5761187b611650565b5b611888878288016117dd565b9350935050604061189b8782880161169e565b91505092959194509250565b60008083601f8401126118bd576118bc6116e0565b5b8235905067ffffffffffffffff8111156118da576118d96116e5565b5b6020830191508360018202830111156118f6576118f56116ea565b5b9250929050565b600080602083850312156119145761191361164b565b5b600083013567ffffffffffffffff81111561193257611931611650565b5b61193e858286016118a7565b92509250509250929050565b600080600080600080606087890312156119675761196661164b565b5b600087013567ffffffffffffffff81111561198557611984611650565b5b61199189828a016116ef565b9650965050602087013567ffffffffffffffff8111156119b4576119b3611650565b5b6119c089828a016117dd565b9450945050604087013567ffffffffffffffff8111156119e3576119e2611650565b5b6119ef89828a016118a7565b92509250509295509295509295565b611a0781611745565b82525050565b6000602082019050611a2260008301846119fe565b92915050565b60008060408385031215611a3f57611a3e61164b565b5b6000611a4d8582860161169e565b9250506020611a5e8582860161169e565b9150509250929050565b611a7181611675565b82525050565b6000602082019050611a8c6000830184611a68565b92915050565b60008060008060008060808789031215611aaf57611aae61164b565b5b6000611abd89828a0161169e565b965050602087013567ffffffffffffffff811115611ade57611add611650565b5b611aea89828a016117dd565b9550955050604087013567ffffffffffffffff811115611b0d57611b0c611650565b5b611b1989828a016117dd565b93509350506060611b2c89828a0161169e565b9150509295509295509295565b600082825260208201905092915050565b7f4f70657261746f723a2063616c6c6572206973206e6f7420746865206f70657260008201527f61746f7200000000000000000000000000000000000000000000000000000000602082015250565b6000611ba6602483611b39565b9150611bb182611b4a565b604082019050919050565b60006020820190508181036000830152611bd581611b99565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000604082019050611c206000830185611a68565b611c2d60208301846119fe565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000819050919050565b6000611c7882611c63565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611caa57611ca9611c34565b5b600182019050919050565b611cbe81611c63565b82525050565b6000606082019050611cd96000830186611a68565b611ce66020830185611a68565b611cf36040830184611cb5565b949350505050565b600082825260208201905092915050565b600080fd5b82818337505050565b6000611d268385611cfb565b93507f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831115611d5957611d58611d0c565b5b602083029250611d6a838584611d11565b82840190509392505050565b6000604082019050611d8b6000830186611a68565b8181036020830152611d9e818486611d1a565b9050949350505050565b600081905092915050565b82818337600083830152505050565b6000611dce8385611da8565b9350611ddb838584611db3565b82840190509392505050565b6000611df4828486611dc2565b91508190509392505050565b7f5f746f6b656e496e7320616e64205f616d6f756e74496e73206c656e6774682060008201527f6d69736d61746368656400000000000000000000000000000000000000000000602082015250565b6000611e5c602a83611b39565b9150611e6782611e00565b604082019050919050565b60006020820190508181036000830152611e8b81611e4f565b9050919050565b611e9b81611c63565b8114611ea657600080fd5b50565b600081519050611eb881611e92565b92915050565b600060208284031215611ed457611ed361164b565b5b6000611ee284828501611ea9565b91505092915050565b7f69647320616e6420616d6f756e7473206c656e677468206d69736d617463686560008201527f6400000000000000000000000000000000000000000000000000000000000000602082015250565b6000611f47602183611b39565b9150611f5282611eeb565b604082019050919050565b60006020820190508181036000830152611f7681611f3a565b9050919050565b600082825260208201905092915050565b50565b6000611f9e600083611f7d565b9150611fa982611f8e565b600082019050919050565b600060a082019050611fc96000830187611a68565b611fd66020830186611a68565b611fe36040830185611cb5565b611ff06060830184611cb5565b818103608083015261200181611f91565b905095945050505050565b60006060820190506120216000830188611a68565b8181036020830152612034818688611d1a565b90508181036040830152612049818486611d1a565b90509695505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006120b1602683611b39565b91506120bc82612055565b604082019050919050565b600060208201905081810360008301526120e0816120a4565b9050919050565b7f5f7472616e736665724574683a20457468207472616e73666572206661696c6560008201527f6400000000000000000000000000000000000000000000000000000000000000602082015250565b6000612143602183611b39565b915061214e826120e7565b604082019050919050565b6000602082019050818103600083015261217281612136565b9050919050565b600060208201905061218e6000830184611cb5565b92915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006121ca602083611b39565b91506121d582612194565b602082019050919050565b600060208201905081810360008301526121f9816121bd565b9050919050565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b6000612236601083611b39565b915061224182612200565b602082019050919050565b6000602082019050818103600083015261226581612229565b9050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006122a2601f83611b39565b91506122ad8261226c565b602082019050919050565b600060208201905081810360008301526122d181612295565b9050919050565b600081519050919050565b60005b838110156123015780820151818401526020810190506122e6565b60008484015250505050565b6000612318826122d8565b6123228185611da8565b93506123328185602086016122e3565b80840191505092915050565b600061234a828461230d565b915081905092915050565b60008151905061236481611751565b92915050565b6000602082840312156123805761237f61164b565b5b600061238e84828501612355565b91505092915050565b7f5354460000000000000000000000000000000000000000000000000000000000600082015250565b60006123cd600383611b39565b91506123d882612397565b602082019050919050565b600060208201905081810360008301526123fc816123c0565b9050919050565b60006040820190506124186000830185611a68565b6124256020830184611cb5565b9392505050565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b6000612462601483611b39565b915061246d8261242c565b602082019050919050565b6000602082019050818103600083015261249181612455565b9050919050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b60006124f4602a83611b39565b91506124ff82612498565b604082019050919050565b60006020820190508181036000830152612523816124e7565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b6000612586602683611b39565b91506125918261252a565b604082019050919050565b600060208201905081810360008301526125b581612579565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b60006125f2601d83611b39565b91506125fd826125bc565b602082019050919050565b60006020820190508181036000830152612621816125e5565b9050919050565b600081519050919050565b6000601f19601f8301169050919050565b600061264f82612628565b6126598185611b39565b93506126698185602086016122e3565b61267281612633565b840191505092915050565b600060208201905081810360008301526126978184612644565b90509291505056fea264697066735822122047e579b5944bd97677b7ab38cca66b7c3ad54120c81ab0f40ca66341ab3084a564736f6c63430008110033

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

0000000000000000000000006dd3029c172eeae3fded8b7f19ab72af7ddcffe10000000000000000000000005defa9c83085c7f606ceb3b5f75fc107945ed7de

-----Decoded View---------------
Arg [0] : bkExchangeAddress (address): 0x6dD3029C172eeAe3Fded8B7f19aB72aF7dDcffe1
Arg [1] : _owner (address): 0x5DEFa9C83085c7F606CEB3B5f75Fc107945ed7de

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000006dd3029c172eeae3fded8b7f19ab72af7ddcffe1
Arg [1] : 0000000000000000000000005defa9c83085c7f606ceb3b5f75fc107945ed7de


Block Transaction Gas Used Reward
view all blocks produced

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

OVERVIEW

Bitget Wallet is the ultimate Web3 multi-chain wallet, offering a comprehensive platform with wallet, Swap, NFT Market, DApp Browser, and Launchpad functionality. Supporting 100+ public chains, Bitget Wallet aggregates top DEXes and NFT markets to provide users with the best trading prices.

Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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