Contract 0x9b0128d10c300fe01a40e09eefe8d401d9db10b1

 
Txn Hash
Block
From
To
Value [Txn Fee]
0x2364ccfab0a51c567a0cebbfe0059360ad29e100243a3a232989ab4ee2edff0277681892021-05-27 8:00:0463 days 14 hrs ago0x6b5310c58abae255860d02b23f2904a8e7015030 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001207445
0x5a214471167047e6adc315b7f12297b3e175fa9f081a763965955518470e3f9477681892021-05-27 8:00:0463 days 14 hrs ago0x0a2d3dd46e44acec0da085268502880bb384bcc0 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001207445
0xa07783750292db3ef15ee41bef3bfb2f351a0c036925b16b6057dcbf1ab38a8d77681772021-05-27 7:59:2863 days 14 hrs ago0x6b5310c58abae255860d02b23f2904a8e7015030 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001207445
0xa58c24895054de9003d48b2ce32233d2b6a1bce29dba355e59ea6f763c4a9e0a77680282021-05-27 7:52:0163 days 14 hrs ago0x6b5310c58abae255860d02b23f2904a8e7015030 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001207445
0x507b89da6fd5412abab39327710466e862a5d83aa0dca858fceae268ba2f00f977679792021-05-27 7:49:3463 days 14 hrs ago0x3f83f93ee57feeb0ff225b921141d71b286ee749 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001207445
0xbeb444dc496bd72791c73d86fd436f7e7ca8b6120250fc078cbb07a76f9bc34577679692021-05-27 7:49:0463 days 14 hrs ago0x3f83f93ee57feeb0ff225b921141d71b286ee749 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001207325
0x0408e355d34f7d4a71b4b2d032b1742cf7c0e29afb18ab4dcfd57fcfbc8138fb77679582021-05-27 7:48:3163 days 14 hrs ago0x3f83f93ee57feeb0ff225b921141d71b286ee749 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001207445
0xe2066f2798082a315219f26190b89dad7297543c713987eaed74521dae059aa777679402021-05-27 7:47:3763 days 14 hrs ago0x3f83f93ee57feeb0ff225b921141d71b286ee749 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.00120744
0x2c5a94e65db5ba2b94929097c4e52a87265039ca1675edf278cd93e034cd79ed77679282021-05-27 7:47:0163 days 14 hrs ago0x830608acb7bc0b77324ee87bfb40b3c06f12e3b1 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001111445
0x7afafc7ec34cb7e34e0ce8e1c9f689f6f590c7b5239ea158136e7b01ab7e3ea977679242021-05-27 7:46:4963 days 14 hrs ago0x6b5310c58abae255860d02b23f2904a8e7015030 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001207325
0xd63d523f23dee06c12f7891d9c42c6656690fb700b903566249f8cc686545e6077678622021-05-27 7:43:4363 days 14 hrs ago0x1f1cf8e2b2dc666c28a1668bfa97b40511923512 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001207445
0xc374a55079dcd64d5ac7fc19dbee909c4e70d0bfaed79d924afc2db89fc8fa6e77678612021-05-27 7:43:4063 days 14 hrs ago0x4e12eb25d526d808af8b503be3f30e0c7ae49f4c IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001207325
0x908863019fe5c947909a8605b44366e46bdacadeae2e387dfdb46efc13d4c30877678342021-05-27 7:42:1963 days 14 hrs ago0x4e12eb25d526d808af8b503be3f30e0c7ae49f4c IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001207445
0xf7bc7e6c5c9be74ec2e773556f8b39319792b0bb4fcaed7ca8eee9e31dbeb61777674812021-05-27 7:24:3763 days 14 hrs ago0x721f5d24c041d02f9316245d96dac0094429ce53 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001207445
0x898d322e75a0ceec489a2d81ec1a9df58df990638937fc6609bb6c3cbd883ddf77674812021-05-27 7:24:3763 days 14 hrs ago0x1f1cf8e2b2dc666c28a1668bfa97b40511923512 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001207445
0x630efbcf5ea6342eb9a940a0f2708f5218db32a2d77ed096a55d14f81e88057377674432021-05-27 7:22:3963 days 15 hrs ago0x721f5d24c041d02f9316245d96dac0094429ce53 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001186445
0x3596724847000348154e7eabad6fd6ba64246f2c200214804dcf582b6ceecda077674422021-05-27 7:22:3663 days 15 hrs ago0x1f1cf8e2b2dc666c28a1668bfa97b40511923512 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.00120721
0xecd7f9962bdfc082e44a585f2a7d25d3c73e35c232598100d892f00c35c02bec77674292021-05-27 7:21:5763 days 15 hrs ago0x1f1cf8e2b2dc666c28a1668bfa97b40511923512 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001207445
0x5b54e31c965dc6579ee0789caea5a853beefdeaeefa7fb85954d5da65dabf01277674052021-05-27 7:20:4563 days 15 hrs ago0x1f1cf8e2b2dc666c28a1668bfa97b40511923512 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.00120744
0xe158d5856c6807eebd71c4fe1730b89e20f7e91024877c96f70f213ef2d706f777672772021-05-27 7:14:2163 days 15 hrs ago0xdceaac08f09915108d9401bff45c0103a71b1fcd IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.00118644
0xd039f0280835e960827aba086af300b74891fbcdd3e1f3021ae40416355a322977672002021-05-27 7:10:2463 days 15 hrs ago0x1f1cf8e2b2dc666c28a1668bfa97b40511923512 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001207445
0x24f3c24414cd920a1a436754b317a84e57cc12dfbe2c6964ad798e3f0eb823de77671812021-05-27 7:09:2263 days 15 hrs ago0x1f1cf8e2b2dc666c28a1668bfa97b40511923512 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.00120744
0xfba103b0ebb9bebf4049d7e4ea83af70da2e8eed27cd73452d2e3ee7de1df4f477667592021-05-27 6:47:5463 days 15 hrs ago0x1f1cf8e2b2dc666c28a1668bfa97b40511923512 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001207325
0x52703c4be5368929876d24e481e1b1ee5650061350786fa0311e87ca2dfa76b477667242021-05-27 6:46:0963 days 15 hrs ago0x1f1cf8e2b2dc666c28a1668bfa97b40511923512 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.001207325
0xee066729737d2bd9590f61e9614de9168417a38b699638517f34411573d0f75d77666762021-05-27 6:43:4563 days 15 hrs ago0xce0aef097c8f76f96a4a64d8dab6f381e9c327b0 IN  0x9b0128d10c300fe01a40e09eefe8d401d9db10b10 BNB0.00118644
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
SwampMinter

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 14 : SwampMinter.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import './interface/ISCVNFT.sol';
import './interface/ISwampFarm.sol';
import './Minter.sol';

/**
 * The contract mints a random SCV NFT.
 * Users need to pay with an ERC20 `token` with certain `amount`
 * Random number generated from block.timestamp will be used to
 * choose a NFT spec
 */
contract SwampMinter is Minter {
    ISwampFarm public swampFarm;

    constructor(
        address swampFarm_,
        uint256 requiredTokenAmount_,
        address cpReward_
    ) Minter(requiredTokenAmount_, cpReward_) {
        swampFarm = ISwampFarm(swampFarm_);
    }

    /**
     * @dev Return the amount of ACS which sender holds in the vault
     */
    function amountInVault(address addr)
        public
        view
        override
        returns (uint256)
    {
        return swampFarm.stakedWantTokens(2, addr);
    }

    /**
     * @dev Set a new token to check balance
     */
    function setSwampFarm(address addr) public virtual {
        require(
            hasRole(OPERATOR_ROLE, _msgSender()),
            'must have operator role to change swapm farm address'
        );
        swampFarm = ISwampFarm(addr);
    }
}

File 2 of 14 : ISCVNFT.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';

interface ISCVNFT is IERC721 {
    function mint(address to, uint256 specId) external;
}

File 3 of 14 : ISwampFarm.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

interface ISwampFarm {
    function stakedWantTokens(uint256 _pid, address _user)
        external
        view
        returns (uint256);
}

File 4 of 14 : Minter.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import '@openzeppelin/contracts/access/AccessControl.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol';
import '@openzeppelin/contracts/security/Pausable.sol';

import './interface/ISCVNFT.sol';

/**
 * The contract mints a random SCV NFT.
 * Users need to pay with an ERC20 `token` with certain `amount`
 * Random number generated from block.timestamp will be used to
 * choose a NFT spec
 */
abstract contract Minter is Context, AccessControl, Pausable {
    using SafeERC20 for IERC20;

    // Roles
    bytes32 public constant PAUSER_ROLE = keccak256('PAUSER_ROLE');
    bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE');

    uint256 public requiredTokenAmount;
    address public payBy;
    uint256 public price;
    address public nftToken;

    // for transferring the sales of NFTs
    address public scvReward;
    // how to split, base = 10
    uint32 public cpShare;
    address public cpReward;
    uint256 public baseSpecId;

    constructor(uint256 requiredTokenAmount_, address cpReward_) {
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
        _setupRole(OPERATOR_ROLE, _msgSender());
        _setupRole(PAUSER_ROLE, _msgSender());

        requiredTokenAmount = requiredTokenAmount_;

        // buy with token, default = BUSD
        payBy = 0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56;
        // 10 BUSD = 10 * 1e18
        price = 10 * 1e18;
        // the NFT to be minted
        nftToken = 0xFe3EeA9f826E56cA5702aaD50659D801E4Ea9320;
        // spec ID to start with
        baseSpecId = 14;

        cpShare = 3;
        cpReward = cpReward_;
        scvReward = 0x079a889eB69013d451EcF45377258948116e2b3e;
    }

    /**
     * @dev Return the amount of ACS which sender holds in the vault
     */
    function amountInVault(address addr) public view virtual returns (uint256);

    /**
     * @dev A very loose randomness for just bringing the users some
     * unbalanced supply of different types
     */
    function getRandomSpecId() private view returns (uint256) {
        bytes memory b = abi.encodePacked(block.timestamp, block.difficulty);
        uint256 seed = uint256(keccak256(b)) % 100;
        if (seed >= 95) {
            // 5%
            return 0;
        } else if (seed >= 80) {
            // 15%
            return 1;
        } else if (seed >= 50) {
            // 30%
            return 2;
        } else {
            // 50%
            return 3;
        }
    }

    /**
     * @dev Creates a new token for `msg.sender`. Its token ID will be automatically
     * assigned (and available on the emitted {IERC721-Transfer} event), and the token
     * URI autogenerated based on the base URI passed at construction.
     */
    function mint() public virtual whenNotPaused {
        require(
            amountInVault(_msgSender()) >= requiredTokenAmount,
            'not enough tokens'
        );

        IERC20 erc20 = IERC20(payBy);
        // transfer to counterparty
        uint256 amount0 = (price * cpShare) / 10;
        erc20.safeTransferFrom(_msgSender(), cpReward, amount0);
        // transfer the rest to SCV
        uint256 amount1 = price - amount0;
        erc20.safeTransferFrom(_msgSender(), scvReward, amount1);
        // calc the specId from 0~3 and add to baseSpecId
        uint256 specId = baseSpecId + getRandomSpecId();
        ISCVNFT(nftToken).mint(_msgSender(), specId);
    }

    /**
     * @dev Set a new required `amount` to accquire the NFT
     */
    function setRequiredTokenAmount(uint256 amount) public virtual {
        require(
            hasRole(OPERATOR_ROLE, _msgSender()),
            'must have operator role to change required amount'
        );
        requiredTokenAmount = amount;
    }

    /**
     * @dev Set a new required `amount` to accquire the NFT
     */
    function setBaseSpecId(uint256 baseSpecId_) public virtual {
        require(
            hasRole(OPERATOR_ROLE, _msgSender()),
            'must have operator role to change base spec Id'
        );
        baseSpecId = baseSpecId_;
    }

    /**
     * @dev Set a new required `amount` to accquire the NFT
     */
    function setPayByToken(address token) public virtual {
        require(
            hasRole(OPERATOR_ROLE, _msgSender()),
            'must have operator role to change amount'
        );
        payBy = token;
    }

    /**
     * @dev Set a new required `amount` to accquire the NFT
     */
    function setPrice(uint256 price_) public virtual {
        require(
            hasRole(OPERATOR_ROLE, _msgSender()),
            'must have operator role to change amount'
        );
        price = price_;
    }

    /**
     * @dev Set a new share for counterparty
     */
    function setCPShare(uint32 cpShare_) public virtual {
        require(
            hasRole(OPERATOR_ROLE, _msgSender()),
            'must have operator role to change cp share'
        );
        require(cpShare_ < 10, 'the number is 10 based');
        cpShare = cpShare_;
    }

    /**
     * @dev Set a new address for sharing with CP
     */
    function setCPReward(address cpReward_) public virtual {
        require(
            hasRole(OPERATOR_ROLE, _msgSender()),
            'must have operator role to change cp reward address'
        );
        cpReward = cpReward_;
    }

    /**
     * @dev Set a new address for SCV's share
     */
    function setSCVReward(address scvReward_) public virtual {
        require(
            hasRole(OPERATOR_ROLE, _msgSender()),
            'must have operator role to change cp reward address'
        );
        scvReward = scvReward_;
    }

    /**
     * @dev Set a new `nft` token address to mint the NFT
     */
    function setNFTToken(address nft) public virtual {
        require(
            hasRole(OPERATOR_ROLE, _msgSender()),
            'must have operator role to change nft token'
        );
        nftToken = nft;
    }

    function pause() public virtual {
        require(
            hasRole(PAUSER_ROLE, _msgSender()),
            'must have pauser role to pause'
        );
        _pause();
    }

    function unpause() public virtual {
        require(
            hasRole(PAUSER_ROLE, _msgSender()),
            'must have pauser role to unpause'
        );
        _unpause();
    }
}

File 5 of 14 : IERC721.sol
// SPDX-License-Identifier: MIT

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`, 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 be 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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * 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 Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

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

File 6 of 14 : IERC165.sol
// SPDX-License-Identifier: MIT

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 7 of 14 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    function hasRole(bytes32 role, address account) external view returns (bool);
    function getRoleAdmin(bytes32 role) external view returns (bytes32);
    function grantRole(bytes32 role, address account) external;
    function revokeRole(bytes32 role, address account) external;
    function renounceRole(bytes32 role, address account) external;
}

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping (address => bool) members;
        bytes32 adminRole;
    }

    mapping (bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId
            || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{20}) is missing role (0x[0-9a-f]{32})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if(!hasRole(role, account)) {
            revert(string(abi.encodePacked(
                "AccessControl: account ",
                Strings.toHexString(uint160(account), 20),
                " is missing role ",
                Strings.toHexString(uint256(role), 32)
            )));
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        emit RoleAdminChanged(role, getRoleAdmin(role), adminRole);
        _roles[role].adminRole = adminRole;
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 8 of 14 : Context.sol
// SPDX-License-Identifier: MIT

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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 9 of 14 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @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 `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);

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

File 10 of 14 : SafeERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.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'
        // solhint-disable-next-line max-line-length
        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));
        }
    }

    /**
     * @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
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 11 of 14 : Pausable.sol
// SPDX-License-Identifier: MIT

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 Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

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

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        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 12 of 14 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant alphabet = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = alphabet[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

}

File 13 of 14 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 14 of 14 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

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

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

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

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

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @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) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"swampFarm_","type":"address"},{"internalType":"uint256","name":"requiredTokenAmount_","type":"uint256"},{"internalType":"address","name":"cpReward_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PAUSER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"amountInVault","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseSpecId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cpReward","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cpShare","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nftToken","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":"payBy","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requiredTokenAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"scvReward","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"baseSpecId_","type":"uint256"}],"name":"setBaseSpecId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"cpReward_","type":"address"}],"name":"setCPReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"cpShare_","type":"uint32"}],"name":"setCPShare","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"nft","type":"address"}],"name":"setNFTToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"setPayByToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price_","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setRequiredTokenAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"scvReward_","type":"address"}],"name":"setSCVReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setSwampFarm","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swampFarm","outputs":[{"internalType":"contract ISwampFarm","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162001dd338038062001dd3833981016040819052620000349162000227565b6001805460ff1916905581816200004d6000336200015a565b620000797f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929336200015a565b620000a57f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a336200015a565b6002919091556003805473e9e7cea3dedca5984780bafc599bd69add087d566001600160a01b031991821617909155678ac7230489e800006004556005805473fe3eea9f826e56ca5702aad50659d801e4ea9320908316179055600e600855600680546007805484166001600160a01b039586161790556001600160c01b0319167403079a889eb69013d451ecf45377258948116e2b3e17905560098054909116949091169390931790925550620002679050565b6200016682826200016a565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000166576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620001c63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b80516001600160a01b03811681146200022257600080fd5b919050565b6000806000606084860312156200023c578283fd5b62000247846200020a565b9250602084015191506200025e604085016200020a565b90509250925092565b611b5c80620002776000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c806382c939311161010f578063c43a5de5116100a2578063d547741f11610071578063d547741f14610441578063dbb1319d14610454578063e63ab1e914610467578063f5b541a61461048e57600080fd5b8063c43a5de5146103dc578063c7f06c30146103ef578063d06fcba814610402578063d22a4ed51461041557600080fd5b8063946fff17116100de578063946fff17146103a5578063a035b1fe146103b8578063a217fddf146103c1578063b755c368146103c957600080fd5b806382c93931146103405780638456cb591461035357806391b7f5ed1461035b57806391d148541461036e57600080fd5b806331132ba71161018757806338b7f1d31161015657806338b7f1d3146103075780633f4ba83a1461031a5780635c975abb1461032257806365174cb21461032d57600080fd5b806331132ba7146102ad578063322061fe146102b6578063327c5ebb146102e157806336568abe146102f457600080fd5b8063248a9ca3116101c3578063248a9ca31461024d57806329d428ca1461027e5780632e8ff714146102875780632f2ff15d1461029a57600080fd5b806301ffc9a7146101f557806306bb8b531461021d57806310e71a02146102325780631249c58b14610245575b600080fd5b61020861020336600461190d565b6104b5565b60405190151581526020015b60405180910390f35b61023061022b3660046118ca565b61051e565b005b610230610240366004611890565b6105c4565b610230610682565b61027061025b3660046118ca565b60009081526020819052604090206001015490565b604051908152602001610214565b61027060025481565b6102306102953660046118ca565b610847565b6102306102a83660046118e2565b6108e8565b61027060085481565b6006546102c9906001600160a01b031681565b6040516001600160a01b039091168152602001610214565b6102306102ef366004611890565b610913565b6102306103023660046118e2565b6109d1565b610230610315366004611890565b610a5d565b610230610b1b565b60015460ff16610208565b61023061033b36600461194d565b610b9b565b6009546102c9906001600160a01b031681565b610230610ccb565b6102306103693660046118ca565b610d49565b61020861037c3660046118e2565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6003546102c9906001600160a01b031681565b61027060045481565b610270600081565b6102306103d7366004611890565b610dd5565b6102706103ea366004611890565b610e93565b6007546102c9906001600160a01b031681565b6005546102c9906001600160a01b031681565b60065461042c90600160a01b900463ffffffff1681565b60405163ffffffff9091168152602001610214565b61023061044f3660046118e2565b610f31565b610230610462366004611890565b610f57565b6102707f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a81565b6102707f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b60006001600160e01b031982167f7965db0b00000000000000000000000000000000000000000000000000000000148061051857507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6105487f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9293361037c565b6105bf5760405162461bcd60e51b815260206004820152603160248201527f6d7573742068617665206f70657261746f7220726f6c6520746f206368616e6760448201527f6520726571756972656420616d6f756e7400000000000000000000000000000060648201526084015b60405180910390fd5b600255565b6105ee7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9293361037c565b6106605760405162461bcd60e51b815260206004820152602b60248201527f6d7573742068617665206f70657261746f7220726f6c6520746f206368616e6760448201527f65206e667420746f6b656e00000000000000000000000000000000000000000060648201526084016105b6565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b60015460ff16156106d55760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016105b6565b6002546106e133610e93565b101561072f5760405162461bcd60e51b815260206004820152601160248201527f6e6f7420656e6f75676820746f6b656e7300000000000000000000000000000060448201526064016105b6565b6003546006546004546001600160a01b0390921691600091600a9161076191600160a01b900463ffffffff1690611a6d565b61076b9190611a59565b9050610788336007546001600160a01b0385811692911684611000565b6000816004546107989190611a8c565b90506107b5336006546001600160a01b0386811692911684611000565b60006107bf61108e565b6008546107cc9190611a41565b6005549091506001600160a01b03166340c10f19336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b15801561082957600080fd5b505af115801561083d573d6000803e3d6000fd5b5050505050505050565b6108717f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9293361037c565b6108e35760405162461bcd60e51b815260206004820152602e60248201527f6d7573742068617665206f70657261746f7220726f6c6520746f206368616e6760448201527f652062617365207370656320496400000000000000000000000000000000000060648201526084016105b6565b600855565b6000828152602081905260409020600101546109048133611115565b61090e8383611193565b505050565b61093d7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9293361037c565b6109af5760405162461bcd60e51b815260206004820152603460248201527f6d7573742068617665206f70657261746f7220726f6c6520746f206368616e6760448201527f6520737761706d206661726d206164647265737300000000000000000000000060648201526084016105b6565b600980546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381163314610a4f5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c66000000000000000000000000000000000060648201526084016105b6565b610a598282611231565b5050565b610a877f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9293361037c565b610af95760405162461bcd60e51b815260206004820152603360248201527f6d7573742068617665206f70657261746f7220726f6c6520746f206368616e6760448201527f652063702072657761726420616464726573730000000000000000000000000060648201526084016105b6565b600680546001600160a01b0319166001600160a01b0392909216919091179055565b610b457f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361037c565b610b915760405162461bcd60e51b815260206004820181905260248201527f6d75737420686176652070617573657220726f6c6520746f20756e706175736560448201526064016105b6565b610b996112b0565b565b610bc57f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9293361037c565b610c375760405162461bcd60e51b815260206004820152602a60248201527f6d7573742068617665206f70657261746f7220726f6c6520746f206368616e6760448201527f652063702073686172650000000000000000000000000000000000000000000060648201526084016105b6565b600a8163ffffffff1610610c8d5760405162461bcd60e51b815260206004820152601660248201527f746865206e756d6265722069732031302062617365640000000000000000000060448201526064016105b6565b6006805463ffffffff909216600160a01b027fffffffffffffffff00000000ffffffffffffffffffffffffffffffffffffffff909216919091179055565b610cf57f65d7a28e3265b37a6474929f336521b332c1681b933f6cb9f3376673440d862a3361037c565b610d415760405162461bcd60e51b815260206004820152601e60248201527f6d75737420686176652070617573657220726f6c6520746f207061757365000060448201526064016105b6565b610b9961134c565b610d737f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9293361037c565b610dd05760405162461bcd60e51b815260206004820152602860248201527f6d7573742068617665206f70657261746f7220726f6c6520746f206368616e676044820152671948185b5bdd5b9d60c21b60648201526084016105b6565b600455565b610dff7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9293361037c565b610e715760405162461bcd60e51b815260206004820152603360248201527f6d7573742068617665206f70657261746f7220726f6c6520746f206368616e6760448201527f652063702072657761726420616464726573730000000000000000000000000060648201526084016105b6565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6009546040517f7b84daec000000000000000000000000000000000000000000000000000000008152600260048201526001600160a01b0383811660248301526000921690637b84daec9060440160206040518083038186803b158015610ef957600080fd5b505afa158015610f0d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105189190611935565b600082815260208190526040902060010154610f4d8133611115565b61090e8383611231565b610f817f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b9293361037c565b610fde5760405162461bcd60e51b815260206004820152602860248201527f6d7573742068617665206f70657261746f7220726f6c6520746f206368616e676044820152671948185b5bdd5b9d60c21b60648201526084016105b6565b600380546001600160a01b0319166001600160a01b0392909216919091179055565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790526110889085906113d2565b50505050565b60008042446040516020016110ad929190918252602082015260400190565b604051602081830303815290604052905060006064828051906020012060001c6110d79190611ae6565b9050605f81106110ea5760009250505090565b605081106110fb5760019250505090565b6032811061110c5760029250505090565b60039250505090565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a5957611151816001600160a01b031660146114b7565b61115c8360206114b7565b60405160200161116d92919061198d565b60408051601f198184030181529082905262461bcd60e51b82526105b691600401611a0e565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16610a59576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556111ed3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1615610a59576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60015460ff166113025760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016105b6565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60015460ff161561139f5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016105b6565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2583361132f565b6000611427826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166116e59092919063ffffffff16565b80519091501561090e578080602001905181019061144591906118aa565b61090e5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f7420737563636565640000000000000000000000000000000000000000000060648201526084016105b6565b606060006114c6836002611a6d565b6114d1906002611a41565b67ffffffffffffffff8111156114f757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611521576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061156657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106115bf57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006115e3846002611a6d565b6115ee906001611a41565b90505b600181111561168f577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061163d57634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061166157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361168881611acf565b90506115f1565b5083156116de5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016105b6565b9392505050565b60606116f484846000856116fc565b949350505050565b6060824710156117745760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c000000000000000000000000000000000000000000000000000060648201526084016105b6565b843b6117c25760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105b6565b600080866001600160a01b031685876040516117de9190611971565b60006040518083038185875af1925050503d806000811461181b576040519150601f19603f3d011682016040523d82523d6000602084013e611820565b606091505b509150915061183082828661183b565b979650505050505050565b6060831561184a5750816116de565b82511561185a5782518084602001fd5b8160405162461bcd60e51b81526004016105b69190611a0e565b80356001600160a01b038116811461188b57600080fd5b919050565b6000602082840312156118a1578081fd5b6116de82611874565b6000602082840312156118bb578081fd5b815180151581146116de578182fd5b6000602082840312156118db578081fd5b5035919050565b600080604083850312156118f4578081fd5b8235915061190460208401611874565b90509250929050565b60006020828403121561191e578081fd5b81356001600160e01b0319811681146116de578182fd5b600060208284031215611946578081fd5b5051919050565b60006020828403121561195e578081fd5b813563ffffffff811681146116de578182fd5b60008251611983818460208701611aa3565b9190910192915050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516119c5816017850160208801611aa3565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351611a02816028840160208801611aa3565b01602801949350505050565b6020815260008251806020840152611a2d816040850160208701611aa3565b601f01601f19169190910160400192915050565b60008219821115611a5457611a54611afa565b500190565b600082611a6857611a68611b10565b500490565b6000816000190483118215151615611a8757611a87611afa565b500290565b600082821015611a9e57611a9e611afa565b500390565b60005b83811015611abe578181015183820152602001611aa6565b838111156110885750506000910152565b600081611ade57611ade611afa565b506000190190565b600082611af557611af5611b10565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fdfea264697066735822122042a708916456f1a642ffbbc5bf7e36a1e2fd7cec152b47877797e5d72be204ee64736f6c6343000804003300000000000000000000000033adbf5f1ec364a4ea3a5ca8f310b597b8afdee30000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000004974440001d5ae67cd099da2b71fa509b74e0829

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

00000000000000000000000033adbf5f1ec364a4ea3a5ca8f310b597b8afdee30000000000000000000000000000000000000000000000001bc16d674ec800000000000000000000000000004974440001d5ae67cd099da2b71fa509b74e0829

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000033adbf5f1ec364a4ea3a5ca8f310b597b8afdee3
Arg [1] : 0000000000000000000000000000000000000000000000001bc16d674ec80000
Arg [2] : 0000000000000000000000004974440001d5ae67cd099da2b71fa509b74e0829


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.