Contract 0x03625c4156a010065d135a18123a9e25ff5aed12

 
Txn Hash
Block
From
To
Value [Txn Fee]
0xd2d94258ebbfe460682f45628f21707d0250531dfac52c079a86f3b8173a784481651932021-06-10 3:52:529 days 6 hrs ago0xfd84676327640c8614ec64e65f24b46c8d62dc1a IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000397755
0xdcd90f80bdd7b420e63c55baf49972ce7b079c3b99aad839a7b8418a16141ec281651862021-06-10 3:52:319 days 6 hrs ago0xfd84676327640c8614ec64e65f24b46c8d62dc1a IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000186465
0x1ba2380f206e3ec063b7b9cc8e92b7934651da372a48eaf97c6de8fe8f2f844d81304052021-06-08 22:47:5510 days 11 hrs ago0xa7e427d0a039d880826107a4833afb8716dd9656 IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000397755
0x094167ff255d3faf17f87d5191cf4ddf2af159a6455e7bbdee5e1fe427bbf71581083502021-06-08 4:23:0811 days 5 hrs ago0x55c20f1d8e2decfa80dcbbe73ce4c12e101bbd7d IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.00011111
0x30245beece827c3d174a1a3d6496131af3dc9953ed48abdf12e8b375d2efe38d80771062021-06-07 2:18:1212 days 7 hrs ago0x9425a6ce85595ce8dc694efcd23ec3619d710c04 IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000397755
0xfcf999296ab4219a980b159e3ef322f9a406fc69bba3428db8dfff6205ada0fb80618642021-06-06 13:35:0512 days 20 hrs ago0x8ce34a2acff00841b8f18f92eb2883d941c1c00a IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000477306
0xde1bfa3f5a50986ca9d47d984d560792fb52b49ed688c34021a16e3cfa54984c80588572021-06-06 11:04:4012 days 23 hrs ago0x6184c679d5b4e3963e406d19ad872c037caae8cf IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000397755
0xe74246b274c99e900494b34eeb4ae1cf9fb56c4d7d796c3ce0cd911c934cfb5e80588372021-06-06 11:03:4012 days 23 hrs ago0x6184c679d5b4e3963e406d19ad872c037caae8cf IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000186465
0xba7b178fbda9d873b5fa4bdba209ce5c9e46d14b16031a3d68669de0431385ef80568322021-06-06 9:22:2413 days 53 mins ago0xbdde3ae7a92b72af3de8ca25acee053399139d96 IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000397755
0xcf758d6ef6be6bf7974ab0be758a370c217bfa10cf27d89e333e14e69a2090dc79865332021-06-03 22:39:0815 days 11 hrs ago0x26ee863f22557484c06875fded42fa8f745c0f6b IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000223758
0x612cc4bcb6e2629d90828082ff189c7c7845ac261b44d0e91d7062a0e45a7d3479768132021-06-03 14:31:5915 days 19 hrs ago0xbe11cc3d640a79db9e926b018142f557b07f4feb IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.00011111
0x77c7873327264e22b5af950fba9d2927620128fac3d0964a42d42f72a5128c8f79768052021-06-03 14:31:3515 days 19 hrs ago0xbe11cc3d640a79db9e926b018142f557b07f4feb IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.00011111
0xf298e7204d28d8386f23e28ee479c298416c4c5e79ed265c4c1d1157fe42dec679767982021-06-03 14:31:1415 days 19 hrs ago0xbe11cc3d640a79db9e926b018142f557b07f4feb IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.00011111
0xcfb7de7b8220161f58c62bd18c4a49d04b3e44cfa7d7be2beab3c53e1b33d93879577852021-06-02 22:36:4716 days 11 hrs ago0xa3ded21f9ead2778b3e53c4752ba4175098daac5 IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.00011111
0x17f3b7a2da8b3695c4f782f9f7f23ac173a3e70bd51f25ed23dd5b0aab14174779267102021-06-01 20:38:0817 days 13 hrs ago0x24d0b58726aaea5e35cc08971a7bfce31fb13c09 IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000397755
0x7de6493d98af2457cb3eee727587b9d83e75633ed9d903fd67c1abf6c4da5e7679069162021-06-01 4:04:3318 days 6 hrs ago0xdb7fb06c04bf272500eaa68cfe9b50eaa85848a3 IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000397755
0xd3ac3f8fa3c10828a639f92a91c176b5a2e5984277607d409be90f0cccc9511778952432021-05-31 18:18:5218 days 15 hrs ago0x4f9820632b3606cd22d3bb4c4096c12211e08d24 IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000397755
0xb5677a1a88c532b7a056f464de600dd11c078c70481485eddf698afe2d44a3f478769162021-05-31 2:58:0019 days 7 hrs ago0x844eb02130e1849bf94e15ef08cdf070fbf1302b IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000397755
0xaae26172595e695159942565a4d92e19ef774b2611f01543bec5d3f9bce30b6778666882021-05-30 18:24:3119 days 15 hrs ago0x77f540fa374a276cb689ff678a5fd2d5ee55062a IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000477306
0x1d38d7132505599bae31415a157d3d512bc51ba5e7249521af17c03a5926a22b78342862021-05-29 15:20:2920 days 18 hrs ago0xa032c8443cd8c7dd08fe85894b5e24699f460774 IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000397755
0xe31d4b655272957de4d195e1a01c3a48ca1a978cfa213dd188e3825fa16ba7eb77872312021-05-27 23:59:1122 days 10 hrs ago0xa773f1729c4982d9189e82c65894b2f7ab87f967 IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000397755
0xde711da12121b3909eebf917daf2cc37a9890b9d855cdf6c3f8300387a1372dc77251212021-05-25 19:48:2724 days 14 hrs ago0xc6cd56e49ba110d23180fe82b5c0af5ea9145e7a IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000477306
0x8e0a941be429e157399ab39b779cbb851b4667d919ea6b1b51ba1c7aaabb286f77009732021-05-24 23:36:3125 days 10 hrs ago0x1ef89acb3b1fe491216e0916c29b5771e7d8dcba IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000186465
0xca0868556bbbae2ef24ae062ba1c0227d732bfbb7eb5c47c6ff74ccd4221018376862982021-05-24 11:21:0025 days 22 hrs ago0xb00cd88e137953d523620b2ee2d26acc0addefc9 IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000397755
0x0480e51ded63f669ee18c256db955ba808761314ce9526177b484f5508435eb776735182021-05-24 0:36:5826 days 9 hrs ago0x8f8ec040b7afaf240de07f1c7929b97eb54db3dd IN  0x03625c4156a010065d135a18123a9e25ff5aed120 BNB0.000397755
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xef5d8b7d88c12e570124f75d4f7a271294f007fdad6fc9b5f2a3d0bdad00c57c54713132021-03-07 11:58:36103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 Alpaca: ALPA Token0 BNB
0xef5d8b7d88c12e570124f75d4f7a271294f007fdad6fc9b5f2a3d0bdad00c57c54713132021-03-07 11:58:36103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 Alpaca: ALPA Token0 BNB
0xef5d8b7d88c12e570124f75d4f7a271294f007fdad6fc9b5f2a3d0bdad00c57c54713132021-03-07 11:58:36103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 0x0ae96a3369c66866d5de712a9187dc7f5de851560 BNB
0xef5d8b7d88c12e570124f75d4f7a271294f007fdad6fc9b5f2a3d0bdad00c57c54713132021-03-07 11:58:36103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 PancakeSwap: ALPA0 BNB
0xac88cb90287e6676ec4970f316e1525f020923cb49066fe60c33cd38be033c3754713042021-03-07 11:58:09103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 Alpaca: ALPA Token0 BNB
0xac88cb90287e6676ec4970f316e1525f020923cb49066fe60c33cd38be033c3754713042021-03-07 11:58:09103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 Alpaca: ALPA Token0 BNB
0xac88cb90287e6676ec4970f316e1525f020923cb49066fe60c33cd38be033c3754713042021-03-07 11:58:09103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 0x0ae96a3369c66866d5de712a9187dc7f5de851560 BNB
0xac88cb90287e6676ec4970f316e1525f020923cb49066fe60c33cd38be033c3754713042021-03-07 11:58:09103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 PancakeSwap: ALPA0 BNB
0x2576d3b2218086eb72164f0bf7ab497aa4427e652575499ed2be13c3be18a72354712912021-03-07 11:57:30103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 Alpaca: ALPA Token0 BNB
0x2576d3b2218086eb72164f0bf7ab497aa4427e652575499ed2be13c3be18a72354712912021-03-07 11:57:30103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 Alpaca: ALPA Token0 BNB
0x2576d3b2218086eb72164f0bf7ab497aa4427e652575499ed2be13c3be18a72354712912021-03-07 11:57:30103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 0x0ae96a3369c66866d5de712a9187dc7f5de851560 BNB
0x2576d3b2218086eb72164f0bf7ab497aa4427e652575499ed2be13c3be18a72354712912021-03-07 11:57:30103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 PancakeSwap: ALPA0 BNB
0x4ed2c624f7f6fb35d57c2c77d16931dffc4a23278c3316b589986808e9eaa85b54712272021-03-07 11:54:18103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 0x060dd632f7dd45cb97a86376863d623d6756e8480 BNB
0xd65830968ebeb3ead4de4a0e7bbf2011e19dd2667bf66326ece41147fa14d3f754712232021-03-07 11:54:06103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 PancakeSwap: ALPA0 BNB
0xd65830968ebeb3ead4de4a0e7bbf2011e19dd2667bf66326ece41147fa14d3f754712232021-03-07 11:54:06103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 Alpaca: ALPA Token0 BNB
0xd65830968ebeb3ead4de4a0e7bbf2011e19dd2667bf66326ece41147fa14d3f754712232021-03-07 11:54:06103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 Alpaca: ALPA Token0 BNB
0xd65830968ebeb3ead4de4a0e7bbf2011e19dd2667bf66326ece41147fa14d3f754712232021-03-07 11:54:06103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 0x0ae96a3369c66866d5de712a9187dc7f5de851560 BNB
0xd65830968ebeb3ead4de4a0e7bbf2011e19dd2667bf66326ece41147fa14d3f754712232021-03-07 11:54:06103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 PancakeSwap: ALPA0 BNB
0xd8413ca40db70918038d3c0ed6a918a4a6b14e4d2743a37ac19c578df9ed66c254711882021-03-07 11:52:21103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 0x060dd632f7dd45cb97a86376863d623d6756e8480 BNB
0xd8413ca40db70918038d3c0ed6a918a4a6b14e4d2743a37ac19c578df9ed66c254711882021-03-07 11:52:21103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 0x060dd632f7dd45cb97a86376863d623d6756e8480 BNB
0xd8413ca40db70918038d3c0ed6a918a4a6b14e4d2743a37ac19c578df9ed66c254711882021-03-07 11:52:21103 days 22 hrs ago 0x060dd632f7dd45cb97a86376863d623d6756e848 0x03625c4156a010065d135a18123a9e25ff5aed120 BNB
0xf139480ec980df582b65ac0d2986e363528968298442e34350c54b9a4e655a6154711132021-03-07 11:48:36103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 0x060dd632f7dd45cb97a86376863d623d6756e8480 BNB
0x806c030e17df031a64ae5ae3ca6d044cda368d4514454a48d9e34cd2f7e72a1b54710672021-03-07 11:46:18103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 0x060dd632f7dd45cb97a86376863d623d6756e8480 BNB
0x806c030e17df031a64ae5ae3ca6d044cda368d4514454a48d9e34cd2f7e72a1b54710672021-03-07 11:46:18103 days 22 hrs ago 0x03625c4156a010065d135a18123a9e25ff5aed12 0x060dd632f7dd45cb97a86376863d623d6756e8480 BNB
0x806c030e17df031a64ae5ae3ca6d044cda368d4514454a48d9e34cd2f7e72a1b54710672021-03-07 11:46:18103 days 22 hrs ago 0x060dd632f7dd45cb97a86376863d623d6756e848 0x03625c4156a010065d135a18123a9e25ff5aed120 BNB
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AlpacaFarm

Compiler Version
v0.6.12+commit.27d51765

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at BscScan.com on 2021-02-26
*/

// Dependency file: @openzeppelin/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT

// pragma solidity >=0.6.0 <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);
}


// Dependency file: @openzeppelin/contracts/introspection/IERC165.sol


// pragma solidity >=0.6.0 <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);
}


// Dependency file: @openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol


// pragma solidity >=0.6.0 <0.8.0;

// import "@openzeppelin/contracts/introspection/IERC165.sol";

/**
 * _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {

    /**
        @dev Handles the receipt of a single ERC1155 token type. This function is
        called at the end of a `safeTransferFrom` after the balance has been updated.
        To accept the transfer, this must return
        `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
        (i.e. 0xf23a6e61, or its own function selector).
        @param operator The address which initiated the transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param id The ID of the token being transferred
        @param value The amount of tokens being transferred
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
    */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    )
        external
        returns(bytes4);

    /**
        @dev Handles the receipt of a multiple ERC1155 token types. This function
        is called at the end of a `safeBatchTransferFrom` after the balances have
        been updated. To accept the transfer(s), this must return
        `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
        (i.e. 0xbc197c81, or its own function selector).
        @param operator The address which initiated the batch transfer (i.e. msg.sender)
        @param from The address which previously owned the token
        @param ids An array containing ids of each token being transferred (order and length must match values array)
        @param values An array containing amounts of each token being transferred (order and length must match ids array)
        @param data Additional data with no specified format
        @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
    */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    )
        external
        returns(bytes4);
}


// Dependency file: @openzeppelin/contracts/introspection/ERC165.sol


// pragma solidity >=0.6.0 <0.8.0;

// import "@openzeppelin/contracts/introspection/IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts may inherit from this and call {_registerInterface} to declare
 * their support of an interface.
 */
abstract contract ERC165 is IERC165 {
    /*
     * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
     */
    bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;

    /**
     * @dev Mapping of interface ids to whether or not it's supported.
     */
    mapping(bytes4 => bool) private _supportedInterfaces;

    constructor () internal {
        // Derived contracts need only register support for their own interfaces,
        // we register support for ERC165 itself here
        _registerInterface(_INTERFACE_ID_ERC165);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     *
     * Time complexity O(1), guaranteed to always use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return _supportedInterfaces[interfaceId];
    }

    /**
     * @dev Registers the contract as an implementer of the interface defined by
     * `interfaceId`. Support of the actual ERC165 interface is automatic and
     * registering its interface id is not required.
     *
     * See {IERC165-supportsInterface}.
     *
     * Requirements:
     *
     * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
     */
    function _registerInterface(bytes4 interfaceId) internal virtual {
        require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
        _supportedInterfaces[interfaceId] = true;
    }
}


// Dependency file: @openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol


// pragma solidity >=0.6.0 <0.8.0;

// import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol";
// import "@openzeppelin/contracts/introspection/ERC165.sol";

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    constructor() internal {
        _registerInterface(
            ERC1155Receiver(address(0)).onERC1155Received.selector ^
            ERC1155Receiver(address(0)).onERC1155BatchReceived.selector
        );
    }
}


// Dependency file: @openzeppelin/contracts/math/SafeMath.sol


// pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) return (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");
        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) return 0;
        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");
        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "SafeMath: modulo by zero");
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}


// Dependency file: @openzeppelin/contracts/utils/Address.sol


// pragma solidity >=0.6.2 <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);
            }
        }
    }
}


// Dependency file: @openzeppelin/contracts/token/ERC20/SafeERC20.sol


// pragma solidity >=0.6.0 <0.8.0;

// import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
// import "@openzeppelin/contracts/math/SafeMath.sol";
// import "@openzeppelin/contracts/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 SafeMath for uint256;
    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).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _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");
        }
    }
}


// Dependency file: @openzeppelin/contracts/utils/EnumerableMap.sol


// pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Library for managing an enumerable variant of Solidity's
 * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
 * type.
 *
 * Maps have the following properties:
 *
 * - Entries are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Entries are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableMap for EnumerableMap.UintToAddressMap;
 *
 *     // Declare a set state variable
 *     EnumerableMap.UintToAddressMap private myMap;
 * }
 * ```
 *
 * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are
 * supported.
 */
library EnumerableMap {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Map type with
    // bytes32 keys and values.
    // The Map implementation uses private functions, and user-facing
    // implementations (such as Uint256ToAddressMap) are just wrappers around
    // the underlying Map.
    // This means that we can only create new EnumerableMaps for types that fit
    // in bytes32.

    struct MapEntry {
        bytes32 _key;
        bytes32 _value;
    }

    struct Map {
        // Storage of map keys and values
        MapEntry[] _entries;

        // Position of the entry defined by a key in the `entries` array, plus 1
        // because index 0 means a key is not in the map.
        mapping (bytes32 => uint256) _indexes;
    }

    /**
     * @dev Adds a key-value pair to a map, or updates the value for an existing
     * key. O(1).
     *
     * Returns true if the key was added to the map, that is if it was not
     * already present.
     */
    function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) {
        // We read and store the key's index to prevent multiple reads from the same storage slot
        uint256 keyIndex = map._indexes[key];

        if (keyIndex == 0) { // Equivalent to !contains(map, key)
            map._entries.push(MapEntry({ _key: key, _value: value }));
            // The entry is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            map._indexes[key] = map._entries.length;
            return true;
        } else {
            map._entries[keyIndex - 1]._value = value;
            return false;
        }
    }

    /**
     * @dev Removes a key-value pair from a map. O(1).
     *
     * Returns true if the key was removed from the map, that is if it was present.
     */
    function _remove(Map storage map, bytes32 key) private returns (bool) {
        // We read and store the key's index to prevent multiple reads from the same storage slot
        uint256 keyIndex = map._indexes[key];

        if (keyIndex != 0) { // Equivalent to contains(map, key)
            // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one
            // in the array, and then remove the last entry (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = keyIndex - 1;
            uint256 lastIndex = map._entries.length - 1;

            // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs
            // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.

            MapEntry storage lastEntry = map._entries[lastIndex];

            // Move the last entry to the index where the entry to delete is
            map._entries[toDeleteIndex] = lastEntry;
            // Update the index for the moved entry
            map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based

            // Delete the slot where the moved entry was stored
            map._entries.pop();

            // Delete the index for the deleted slot
            delete map._indexes[key];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the key is in the map. O(1).
     */
    function _contains(Map storage map, bytes32 key) private view returns (bool) {
        return map._indexes[key] != 0;
    }

    /**
     * @dev Returns the number of key-value pairs in the map. O(1).
     */
    function _length(Map storage map) private view returns (uint256) {
        return map._entries.length;
    }

   /**
    * @dev Returns the key-value pair stored at position `index` in the map. O(1).
    *
    * Note that there are no guarantees on the ordering of entries inside the
    * array, and it may change when more entries are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) {
        require(map._entries.length > index, "EnumerableMap: index out of bounds");

        MapEntry storage entry = map._entries[index];
        return (entry._key, entry._value);
    }

    /**
     * @dev Tries to returns the value associated with `key`.  O(1).
     * Does not revert if `key` is not in the map.
     */
    function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {
        uint256 keyIndex = map._indexes[key];
        if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)
        return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based
    }

    /**
     * @dev Returns the value associated with `key`.  O(1).
     *
     * Requirements:
     *
     * - `key` must be in the map.
     */
    function _get(Map storage map, bytes32 key) private view returns (bytes32) {
        uint256 keyIndex = map._indexes[key];
        require(keyIndex != 0, "EnumerableMap: nonexistent key"); // Equivalent to contains(map, key)
        return map._entries[keyIndex - 1]._value; // All indexes are 1-based
    }

    /**
     * @dev Same as {_get}, with a custom error message when `key` is not in the map.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {_tryGet}.
     */
    function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {
        uint256 keyIndex = map._indexes[key];
        require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)
        return map._entries[keyIndex - 1]._value; // All indexes are 1-based
    }

    // UintToAddressMap

    struct UintToAddressMap {
        Map _inner;
    }

    /**
     * @dev Adds a key-value pair to a map, or updates the value for an existing
     * key. O(1).
     *
     * Returns true if the key was added to the map, that is if it was not
     * already present.
     */
    function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {
        return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the key was removed from the map, that is if it was present.
     */
    function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {
        return _remove(map._inner, bytes32(key));
    }

    /**
     * @dev Returns true if the key is in the map. O(1).
     */
    function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {
        return _contains(map._inner, bytes32(key));
    }

    /**
     * @dev Returns the number of elements in the map. O(1).
     */
    function length(UintToAddressMap storage map) internal view returns (uint256) {
        return _length(map._inner);
    }

   /**
    * @dev Returns the element stored at position `index` in the set. O(1).
    * Note that there are no guarantees on the ordering of values inside the
    * array, and it may change when more values are added or removed.
    *
    * Requirements:
    *
    * - `index` must be strictly less than {length}.
    */
    function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {
        (bytes32 key, bytes32 value) = _at(map._inner, index);
        return (uint256(key), address(uint160(uint256(value))));
    }

    /**
     * @dev Tries to returns the value associated with `key`.  O(1).
     * Does not revert if `key` is not in the map.
     *
     * _Available since v3.4._
     */
    function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {
        (bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));
        return (success, address(uint160(uint256(value))));
    }

    /**
     * @dev Returns the value associated with `key`.  O(1).
     *
     * Requirements:
     *
     * - `key` must be in the map.
     */
    function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {
        return address(uint160(uint256(_get(map._inner, bytes32(key)))));
    }

    /**
     * @dev Same as {get}, with a custom error message when `key` is not in the map.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryGet}.
     */
    function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {
        return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));
    }
}


// Dependency file: @openzeppelin/contracts/utils/ReentrancyGuard.sol


// pragma solidity >=0.6.0 <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 () internal {
        _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 make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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


// Dependency file: @openzeppelin/contracts/math/Math.sol


// pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}


// Dependency file: @openzeppelin/contracts/utils/Context.sol


// pragma solidity >=0.6.0 <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 GSN 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 payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}


// Dependency file: @openzeppelin/contracts/access/Ownable.sol


// pragma solidity >=0.6.0 <0.8.0;

// import "@openzeppelin/contracts/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 () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}


// Dependency file: contracts/interfaces/IAlpaToken.sol


// pragma solidity 0.6.12;

// import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IAlpaToken is IERC20 {
    function mint(address _to, uint256 _amount) external;

    function burn(address _account, uint256 _amount) external;
}


// Dependency file: contracts/interfaces/IAlpaSupplier.sol


// pragma solidity 0.6.12;

interface IAlpaSupplier {
    /**
     * @dev mint and distribute ALPA to caller
     * NOTE: caller must be approved consumer
     */
    function distribute(uint256 _since) external returns (uint256);

    /**
     * @dev mint and distribute exact amount of ALPA to caller
     * NOTE: caller must be approved consumer
     */
    function distributeExact(uint256 _amount) external returns (uint256);

    /**
     * @dev returns number of ALPA _consumer is expected to recieved at current block
     * NOTE: caller must be approved consumer
     */
    function preview(address _consumer, uint256 _since)
        external
        view
        returns (uint256);

    /**
     * @dev burn alpa
     * NOTE: caller must be approved consumer
     */
    function burn(address _account, uint256 _amount) external;
}


// Dependency file: @openzeppelin/contracts/token/ERC1155/IERC1155.sol


// pragma solidity >=0.6.2 <0.8.0;

// import "@openzeppelin/contracts/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 be 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;
}


// Dependency file: contracts/interfaces/ICryptoAlpaca.sol


// pragma solidity =0.6.12;

// import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";

interface ICryptoAlpaca is IERC1155 {
    function getAlpaca(uint256 _id)
        external
        view
        returns (
            uint256 id,
            bool isReady,
            uint256 cooldownEndBlock,
            uint256 birthTime,
            uint256 matronId,
            uint256 sireId,
            uint256 hatchingCost,
            uint256 hatchingCostMultiplier,
            uint256 hatchCostMultiplierEndBlock,
            uint256 generation,
            uint256 gene,
            uint256 energy,
            uint256 state
        );

    function hasPermissionToBreedAsSire(address _addr, uint256 _id)
        external
        view
        returns (bool);

    function grantPermissionToBreed(address _addr, uint256 _sireId) external;

    function clearPermissionToBreed(uint256 _alpacaId) external;

    function hatch(uint256 _matronId, uint256 _sireId)
        external
        payable
        returns (uint256);

    function crack(uint256 _id) external;
}


// Dependency file: contracts/interfaces/ICryptoAlpacaEnergyListener.sol


// pragma solidity 0.6.12;

// import "@openzeppelin/contracts/introspection/IERC165.sol";

interface ICryptoAlpacaEnergyListener is IERC165 {
    /**
        @dev Handles the Alpaca energy change callback.
        @param id The id of the Alpaca which the energy changed
        @param oldEnergy The ID of the token being transferred
        @param newEnergy The amount of tokens being transferred
    */
    function onCryptoAlpacaEnergyChanged(
        uint256 id,
        uint256 oldEnergy,
        uint256 newEnergy
    ) external;
}


// Dependency file: contracts/interfaces/CryptoAlpacaEnergyListener.sol


// pragma solidity 0.6.12;

// import "@openzeppelin/contracts/introspection/ERC165.sol";
// import "contracts/interfaces/ICryptoAlpacaEnergyListener.sol";

abstract contract CryptoAlpacaEnergyListener is
    ERC165,
    ICryptoAlpacaEnergyListener
{
    constructor() public {
        _registerInterface(
            CryptoAlpacaEnergyListener(0).onCryptoAlpacaEnergyChanged.selector
        );
    }
}


// Root file: contracts/AlpacaFarm/AlpacaFarm.sol


pragma solidity 0.6.12;

// import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
// import "@openzeppelin/contracts/token/ERC1155/ERC1155Receiver.sol";
// import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
// import "@openzeppelin/contracts/utils/EnumerableMap.sol";
// import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
// import "@openzeppelin/contracts/math/SafeMath.sol";
// import "@openzeppelin/contracts/math/Math.sol";
// import "@openzeppelin/contracts/access/Ownable.sol";

// import "contracts/interfaces/IAlpaToken.sol";
// import "contracts/interfaces/IAlpaSupplier.sol";
// import "contracts/interfaces/ICryptoAlpaca.sol";
// import "contracts/interfaces/CryptoAlpacaEnergyListener.sol";

// Alpaca Farm manages your LP and takes good care of you alpaca!
contract AlpacaFarm is
    Ownable,
    ReentrancyGuard,
    ERC1155Receiver,
    CryptoAlpacaEnergyListener
{
    using SafeMath for uint256;
    using Math for uint256;
    using SafeERC20 for IERC20;
    using EnumerableMap for EnumerableMap.UintToAddressMap;

    /* ========== EVENTS ========== */

    event Deposit(address indexed user, uint256 amount);

    event Withdraw(address indexed user, uint256 amount);

    event EmergencyWithdraw(address indexed user, uint256 amount);

    /* ========== STRUCT ========== */

    // Info of each user.
    struct UserInfo {
        // How many LP tokens the user has provided.
        uint256 amount;
        // Reward debt. What has been paid so far
        uint256 rewardDebt;
        // alpaca user transfered to AlpacaFarm to manage the LP assets
        uint256 alpacaID;
        // alpaca's energy
        uint256 alpacaEnergy;
    }

    // Info of each pool.
    struct PoolInfo {
        // Address of LP token contract.
        IERC20 lpToken;
        // Last block number that ALPAs distribution occurs.
        uint256 lastRewardBlock;
        // Accumulated ALPAs per share. Share is determined by LP deposit and total alpaca's energy
        uint256 accAlpaPerShare;
        // Accumulated Share
        uint256 accShare;
    }

    /* ========== STATES ========== */

    // The ALPA ERC20 token
    IAlpaToken public alpa;

    // Crypto alpaca contract
    ICryptoAlpaca public cryptoAlpaca;

    // Alpa Supplier
    IAlpaSupplier public supplier;

    // Energy if user does not have any alpaca transfered to AlpacaFarm to manage the LP assets
    uint256 public constant EMPTY_ALPACA_ENERGY = 1;

    // farm pool info
    PoolInfo public poolInfo;

    // Info of each user that stakes LP tokens.
    mapping(address => UserInfo) public userInfo;

    // map that keep tracks of the alpaca's original owner so contract knows where to send back when
    // users swapped or retrieved their alpacas
    EnumerableMap.UintToAddressMap private alpacaOriginalOwner;

    uint256 public constant SAFE_MULTIPLIER = 1e16;

    /* ========== CONSTRUCTOR ========== */

    constructor(
        IAlpaToken _alpa,
        ICryptoAlpaca _cryptoAlpaca,
        IAlpaSupplier _supplier,
        IERC20 lpToken,
        uint256 _startBlock
    ) public {
        alpa = _alpa;
        cryptoAlpaca = _cryptoAlpaca;
        supplier = _supplier;
        poolInfo = PoolInfo({
            lpToken: lpToken,
            lastRewardBlock: block.number.max(_startBlock),
            accAlpaPerShare: 0,
            accShare: 0
        });
    }

    /* ========== PUBLIC ========== */

    /**
     * @dev View `_user` pending ALPAs
     */
    function pendingAlpa(address _user) external view returns (uint256) {
        UserInfo storage user = userInfo[_user];

        uint256 accAlpaPerShare = poolInfo.accAlpaPerShare;
        uint256 lpSupply = poolInfo.lpToken.balanceOf(address(this));

        if (block.number > poolInfo.lastRewardBlock && lpSupply != 0) {
            uint256 total = supplier.preview(
                address(this),
                poolInfo.lastRewardBlock
            );

            accAlpaPerShare = accAlpaPerShare.add(
                total.mul(SAFE_MULTIPLIER).div(poolInfo.accShare)
            );
        }
        return
            user
                .amount
                .mul(_safeUserAlpacaEnergy(user))
                .mul(accAlpaPerShare)
                .div(SAFE_MULTIPLIER)
                .sub(user.rewardDebt);
    }

    /**
     * @dev Update reward variables of the given pool to be up-to-date.
     */
    function updatePool() public {
        if (block.number <= poolInfo.lastRewardBlock) {
            return;
        }

        uint256 lpSupply = poolInfo.lpToken.balanceOf(address(this));
        if (lpSupply == 0) {
            poolInfo.lastRewardBlock = block.number;
            return;
        }

        uint256 reward = supplier.distribute(poolInfo.lastRewardBlock);
        poolInfo.accAlpaPerShare = poolInfo.accAlpaPerShare.add(
            reward.mul(SAFE_MULTIPLIER).div(poolInfo.accShare)
        );

        poolInfo.lastRewardBlock = block.number;
    }

    /**
     * @dev Retrieve caller's Alpaca.
     */
    function retrieve() public nonReentrant {
        address sender = _msgSender();

        UserInfo storage user = userInfo[sender];
        require(user.alpacaID != 0, "AlpacaFarm: you do not have any alpaca");

        if (user.amount > 0) {
            updatePool();
            uint256 pending = user
                .amount
                .mul(user.alpacaEnergy)
                .mul(poolInfo.accAlpaPerShare)
                .div(SAFE_MULTIPLIER)
                .sub(user.rewardDebt);
            if (pending > 0) {
                _safeAlpaTransfer(msg.sender, pending);
            }

            user.rewardDebt = user
                .amount
                .mul(EMPTY_ALPACA_ENERGY)
                .mul(poolInfo.accAlpaPerShare)
                .div(SAFE_MULTIPLIER);

            poolInfo.accShare = poolInfo.accShare.sub(
                (user.alpacaEnergy.sub(1)).mul(user.amount)
            );
        }

        uint256 prevAlpacaID = user.alpacaID;
        user.alpacaID = 0;
        user.alpacaEnergy = 0;

        // Remove alpaca id to original user mapping
        alpacaOriginalOwner.remove(prevAlpacaID);

        cryptoAlpaca.safeTransferFrom(
            address(this),
            msg.sender,
            prevAlpacaID,
            1,
            ""
        );
    }

    /**
     * @dev Deposit LP tokens to AlpacaFarm for ALPA allocation.
     */
    function deposit(uint256 _amount) public nonReentrant {
        updatePool();

        UserInfo storage user = userInfo[msg.sender];
        if (user.amount > 0) {
            uint256 pending = user
                .amount
                .mul(_safeUserAlpacaEnergy(user))
                .mul(poolInfo.accAlpaPerShare)
                .div(SAFE_MULTIPLIER)
                .sub(user.rewardDebt);
            if (pending > 0) {
                _safeAlpaTransfer(msg.sender, pending);
            }
        }

        if (_amount > 0) {
            poolInfo.lpToken.safeTransferFrom(
                address(msg.sender),
                address(this),
                _amount
            );
            user.amount = user.amount.add(_amount);
            poolInfo.accShare = poolInfo.accShare.add(
                _safeUserAlpacaEnergy(user).mul(_amount)
            );
        }

        user.rewardDebt = user
            .amount
            .mul(_safeUserAlpacaEnergy(user))
            .mul(poolInfo.accAlpaPerShare)
            .div(SAFE_MULTIPLIER);
        emit Deposit(msg.sender, _amount);
    }

    /**
     * @dev Withdraw LP tokens from AlpacaFarm.
     */
    function withdraw(uint256 _amount) public nonReentrant {
        UserInfo storage user = userInfo[msg.sender];
        require(user.amount >= _amount, "AlpacaFarm: invalid amount");

        updatePool();
        uint256 pending = user
            .amount
            .mul(_safeUserAlpacaEnergy(user))
            .mul(poolInfo.accAlpaPerShare)
            .div(SAFE_MULTIPLIER)
            .sub(user.rewardDebt);

        if (pending > 0) {
            _safeAlpaTransfer(msg.sender, pending);
        }
        if (_amount > 0) {
            user.amount = user.amount.sub(_amount);
            poolInfo.lpToken.safeTransfer(address(msg.sender), _amount);
            poolInfo.accShare = poolInfo.accShare.sub(
                _safeUserAlpacaEnergy(user).mul(_amount)
            );
        }

        user.rewardDebt = user
            .amount
            .mul(_safeUserAlpacaEnergy(user))
            .mul(poolInfo.accAlpaPerShare)
            .div(SAFE_MULTIPLIER);
        emit Withdraw(msg.sender, _amount);
    }

    // Withdraw without caring about rewards.
    // EMERGENCY ONLY.
    function emergencyWithdraw() public {
        UserInfo storage user = userInfo[msg.sender];
        require(user.amount > 0, "AlpacaFarm: insufficient balance");

        uint256 amount = user.amount;
        user.amount = 0;
        user.rewardDebt = 0;
        poolInfo.lpToken.safeTransfer(address(msg.sender), amount);
        emit EmergencyWithdraw(msg.sender, amount);
    }

    /* ========== PRIVATE ========== */

    function _safeUserAlpacaEnergy(UserInfo storage info)
        private
        view
        returns (uint256)
    {
        if (info.alpacaEnergy == 0) {
            return EMPTY_ALPACA_ENERGY;
        }
        return info.alpacaEnergy;
    }

    // Safe alpa transfer function, just in case if rounding error causes pool to not have enough ALPAs.
    function _safeAlpaTransfer(address _to, uint256 _amount) private {
        uint256 alpaBal = alpa.balanceOf(address(this));
        if (_amount > alpaBal) {
            alpa.transfer(_to, alpaBal);
        } else {
            alpa.transfer(_to, _amount);
        }
    }

    /* ========== ERC1155Receiver ========== */

    /**
     * @dev onERC1155Received implementation per IERC1155Receiver spec
     */
    function onERC1155Received(
        address,
        address _from,
        uint256 _id,
        uint256,
        bytes calldata
    ) external override nonReentrant returns (bytes4) {
        require(
            msg.sender == address(cryptoAlpaca),
            "AlpacaFarm: received alpaca from unauthenticated contract"
        );

        require(_id != 0, "AlpacaFarm: invalid alpaca");

        UserInfo storage user = userInfo[_from];

        // Fetch alpaca energy
        (, , , , , , , , , , , uint256 energy, ) = cryptoAlpaca.getAlpaca(_id);
        require(energy > 0, "AlpacaFarm: invalid alpaca energy");

        if (user.amount > 0) {
            updatePool();

            uint256 pending = user
                .amount
                .mul(_safeUserAlpacaEnergy(user))
                .mul(poolInfo.accAlpaPerShare)
                .div(SAFE_MULTIPLIER)
                .sub(user.rewardDebt);
            if (pending > 0) {
                _safeAlpaTransfer(_from, pending);
            }
            // Update user reward debt with new energy
            user.rewardDebt = user
                .amount
                .mul(energy)
                .mul(poolInfo.accAlpaPerShare)
                .div(SAFE_MULTIPLIER);

            poolInfo.accShare = poolInfo
                .accShare
                .add(energy.mul(user.amount))
                .sub(_safeUserAlpacaEnergy(user).mul(user.amount)); // 减去原来的
        }

        // update user global
        uint256 prevAlpacaID = user.alpacaID;
        user.alpacaID = _id;
        user.alpacaEnergy = energy;

        // keep track of alpaca owner
        alpacaOriginalOwner.set(_id, _from);

        // Give original owner the right to breed
        cryptoAlpaca.grantPermissionToBreed(_from, _id);

        if (prevAlpacaID != 0) {
            // Transfer alpaca back to owner
            cryptoAlpaca.safeTransferFrom(
                address(this),
                _from,
                prevAlpacaID,
                1,
                ""
            );
        }

        return
            bytes4(
                keccak256(
                    "onERC1155Received(address,address,uint256,uint256,bytes)"
                )
            );
    }

    /**
     * @dev onERC1155BatchReceived implementation per IERC1155Receiver spec
     * User should not send using batch.
     */
    function onERC1155BatchReceived(
        address,
        address,
        uint256[] memory,
        uint256[] memory,
        bytes memory
    ) external override returns (bytes4) {
        require(
            false,
            "AlpacaFarm: only supports transfer single alpaca at a time (e.g safeTransferFrom)"
        );
    }

    /* ========== ICryptoAlpacaEnergyListener ========== */

    /**
        @dev Handles the Alpaca energy change callback.
        @param _id The id of the Alpaca which the energy changed
        @param _newEnergy The new alpaca energy it changed to
    */
    function onCryptoAlpacaEnergyChanged(
        uint256 _id,
        uint256,
        uint256 _newEnergy
    ) external override {
        require(
            msg.sender == address(cryptoAlpaca),
            "AlpacaFarm: received alpaca from unauthenticated contract"
        );

        require(
            alpacaOriginalOwner.contains(_id),
            "AlpacaFarm: original owner not found"
        );

        address originalOwner = alpacaOriginalOwner.get(_id);
        UserInfo storage user = userInfo[originalOwner];

        if (user.amount > 0) {
            updatePool();

            uint256 pending = user
                .amount
                .mul(_safeUserAlpacaEnergy(user))
                .mul(poolInfo.accAlpaPerShare)
                .div(SAFE_MULTIPLIER)
                .sub(user.rewardDebt);

            if (pending > 0) {
                _safeAlpaTransfer(originalOwner, pending);
            }

            // Update user reward debt with new energy
            user.rewardDebt = user
                .amount
                .mul(_newEnergy)
                .mul(poolInfo.accAlpaPerShare)
                .div(SAFE_MULTIPLIER);

            poolInfo.accShare = poolInfo
                .accShare
                .add(_newEnergy.mul(user.amount))
                .sub(_safeUserAlpacaEnergy(user).mul(user.amount));
        }

        // update alpaca energy
        user.alpacaEnergy = _newEnergy;
    }
}

Contract ABI

[{"inputs":[{"internalType":"contract IAlpaToken","name":"_alpa","type":"address"},{"internalType":"contract ICryptoAlpaca","name":"_cryptoAlpaca","type":"address"},{"internalType":"contract IAlpaSupplier","name":"_supplier","type":"address"},{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"_startBlock","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyWithdraw","type":"event"},{"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":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"EMPTY_ALPACA_ENERGY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SAFE_MULTIPLIER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"alpa","outputs":[{"internalType":"contract IAlpaToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cryptoAlpaca","outputs":[{"internalType":"contract ICryptoAlpaca","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_newEnergy","type":"uint256"}],"name":"onCryptoAlpacaEnergyChanged","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"}],"name":"pendingAlpa","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolInfo","outputs":[{"internalType":"contract IERC20","name":"lpToken","type":"address"},{"internalType":"uint256","name":"lastRewardBlock","type":"uint256"},{"internalType":"uint256","name":"accAlpaPerShare","type":"uint256"},{"internalType":"uint256","name":"accShare","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"retrieve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"supplier","outputs":[{"internalType":"contract IAlpaSupplier","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updatePool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"rewardDebt","type":"uint256"},{"internalType":"uint256","name":"alpacaID","type":"uint256"},{"internalType":"uint256","name":"alpacaEnergy","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50604051620022e5380380620022e5833981810160405260a08110156200003757600080fd5b50805160208201516040830151606084015160809094015192939192909190600062000062620001a4565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060018055620000c26301ffc9a760e01b620001a8565b620000d4630271189760e51b620001a8565b620000e66316a1938760e21b620001a8565b600380546001600160a01b038088166001600160a01b03199283161790925560048054878416908316179055600580548684169216919091179055604080516080810190915290831681526020808201906200014f9043908590620015f76200022d821b17901c565b8152600060208083018290526040928301919091528251600680546001600160a01b0319166001600160a01b039092169190911790558201516007558101516008556060015160095550620002489350505050565b3390565b6001600160e01b0319808216141562000208576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152600260205260409020805460ff19166001179055565b6000818310156200023f578162000241565b825b9392505050565b61208d80620002586000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c8063715018a6116100ad578063db2e21bc11610071578063db2e21bc146104bf578063dc7e0ce8146104c7578063e3161ddd146104cf578063f23a6e61146104d7578063f2fde38b1461056a5761012c565b8063715018a61461028e5780638da5cb5b14610296578063b6b55f251461029e578063bc197c81146102bb578063c4b0e31e146104995761012c565b80632e64cec1116100f45780632e64cec11461021557806336da44681461021d57806359d6dd9d146102255780635a2f3d091461022d5780635a864e1c146102655761012c565b806301ffc9a71461013157806317f414181461016c5780631959a0021461018657806320689541146101d25780632e1a7d4d146101f6575b600080fd5b6101586004803603602081101561014757600080fd5b50356001600160e01b031916610590565b604080519115158252519081900360200190f35b6101746105b3565b60408051918252519081900360200190f35b6101ac6004803603602081101561019c57600080fd5b50356001600160a01b03166105b8565b604080519485526020850193909352838301919091526060830152519081900360800190f35b6101da6105df565b604080516001600160a01b039092168252519081900360200190f35b6102136004803603602081101561020c57600080fd5b50356105ee565b005b6102136107b0565b6101da6109b3565b6101da6109c2565b6102356109d1565b604080516001600160a01b0390951685526020850193909352838301919091526060830152519081900360800190f35b6102136004803603606081101561027b57600080fd5b50803590602081013590604001356109ec565b610213610b53565b6101da610c11565b610213600480360360208110156102b457600080fd5b5035610c20565b61047c600480360360a08110156102d157600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561030457600080fd5b82018360208201111561031657600080fd5b803590602001918460208302840111600160201b8311171561033757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561038657600080fd5b82018360208201111561039857600080fd5b803590602001918460208302840111600160201b831117156103b957600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b81111561040857600080fd5b82018360208201111561041a57600080fd5b803590602001918460018302840111600160201b8311171561043b57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610d72945050505050565b604080516001600160e01b03199092168252519081900360200190f35b610174600480360360208110156104af57600080fd5b50356001600160a01b0316610dab565b610213610f31565b610174610ff0565b610213610ffb565b61047c600480360360a08110156104ed57600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a081016080820135600160201b81111561052c57600080fd5b82018360208201111561053e57600080fd5b803590602001918460018302840111600160201b8311171561055f57600080fd5b509092509050611141565b6102136004803603602081101561058057600080fd5b50356001600160a01b03166114e3565b6001600160e01b0319811660009081526002602052604090205460ff165b919050565b600181565b600a6020526000908152604090208054600182015460028301546003909301549192909184565b6004546001600160a01b031681565b60026001541415610634576040805162461bcd60e51b815260206004820152601f6024820152600080516020611ed2833981519152604482015290519081900360640190fd5b6002600155336000908152600a60205260409020805482111561069e576040805162461bcd60e51b815260206004820152601a60248201527f416c706163614661726d3a20696e76616c696420616d6f756e74000000000000604482015290519081900360640190fd5b6106a6610ffb565b60006106ea82600101546106e4662386f26fc100006106de6006600201546106d86106d089611612565b895490611631565b90611631565b9061168a565b906116f1565b905080156106fc576106fc338261174e565b821561074457815461070e90846116f1565b8255600654610727906001600160a01b031633856118df565b610740610737846106d885611612565b600954906116f1565b6009555b61076c662386f26fc100006106de6006600201546106d861076487611612565b875490611631565b600183015560408051848152905133917f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a9424364919081900360200190a250506001805550565b600260015414156107f6576040805162461bcd60e51b815260206004820152601f6024820152600080516020611ed2833981519152604482015290519081900360640190fd5b60026001556000610805611931565b6001600160a01b0381166000908152600a602052604090206002810154919250906108615760405162461bcd60e51b8152600401808060200182810382526026815260200180611f186026913960400191505060405180910390fd5b80541561090457610870610ffb565b60006108a982600101546106e4662386f26fc100006106de6006600201546106d88860030154896000015461163190919063ffffffff16565b905080156108bb576108bb338261174e565b60085482546108dd91662386f26fc10000916106de91906106d8906001611631565b600180840191909155825460038401546108ff9261073792916106d8916116f1565b600955505b6002810180546000918290556003830191909155610923600b82611935565b506004805460408051637921219560e11b81523093810193909352336024840152604483018490526001606484015260a06084840152600060a4840181905290516001600160a01b039092169263f242432a9260e4808301939282900301818387803b15801561099257600080fd5b505af11580156109a6573d6000803e3d6000fd5b5050600180555050505050565b6005546001600160a01b031681565b6003546001600160a01b031681565b6006546007546008546009546001600160a01b039093169284565b6004546001600160a01b03163314610a355760405162461bcd60e51b8152600401808060200182810382526039815260200180611fce6039913960400191505060405180910390fd5b610a40600b84611941565b610a7b5760405162461bcd60e51b8152600401808060200182810382526024815260200180611f3e6024913960400191505060405180910390fd5b6000610a88600b8561194d565b6001600160a01b0381166000908152600a6020526040902080549192509015610b4757610ab3610ffb565b6000610add82600101546106e4662386f26fc100006106de6006600201546106d86106d089611612565b90508015610aef57610aef838261174e565b6008548254610b1091662386f26fc10000916106de91906106d89089611631565b60018301558154610b4290610b28906106d885611612565b83546106e490610b39908890611631565b60095490611959565b600955505b60030191909155505050565b610b5b611931565b6001600160a01b0316610b6c610c11565b6001600160a01b031614610bc7576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60026001541415610c66576040805162461bcd60e51b815260206004820152601f6024820152600080516020611ed2833981519152604482015290519081900360640190fd5b6002600155610c73610ffb565b336000908152600a60205260409020805415610cc7576000610cb382600101546106e4662386f26fc100006106de6006600201546106d86106d089611612565b90508015610cc557610cc5338261174e565b505b8115610d0757600654610ce5906001600160a01b03163330856119b3565b8054610cf19083611959565b8155610d03610b39836106d884611612565b6009555b610d2f662386f26fc100006106de6006600201546106d8610d2786611612565b865490611631565b600182015560408051838152905133917fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c919081900360200190a2505060018055565b600060405162461bcd60e51b81526004018080602001828103825260518152602001806120076051913960600191505060405180910390fd5b6001600160a01b038082166000908152600a6020908152604080832060085460065483516370a0823160e01b81523060048201529351959692959194879491909316926370a0823192602480840193829003018186803b158015610e0e57600080fd5b505afa158015610e22573d6000803e3d6000fd5b505050506040513d6020811015610e3857600080fd5b505160075490915043118015610e4d57508015155b15610efd57600554600754604080516313ce19e360e01b81523060048201526024810192909252516000926001600160a01b0316916313ce19e3916044808301926020929190829003018186803b158015610ea757600080fd5b505afa158015610ebb573d6000803e3d6000fd5b505050506040513d6020811015610ed157600080fd5b5051600954909150610ef990610ef2906106de84662386f26fc10000611631565b8490611959565b9250505b610f2883600101546106e4662386f26fc100006106de866106d8610f208a611612565b8a5490611631565b95945050505050565b336000908152600a602052604090208054610f93576040805162461bcd60e51b815260206004820181905260248201527f416c706163614661726d3a20696e73756666696369656e742062616c616e6365604482015290519081900360640190fd5b805460008083556001830155600654610fb6906001600160a01b031633836118df565b60408051828152905133917f5fafa99d0643513820be26656b45130b01e1c03062e1266bf36f88cbd3bd9695919081900360200190a25050565b662386f26fc1000081565b60075443116110095761113f565b600654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561105457600080fd5b505afa158015611068573d6000803e3d6000fd5b505050506040513d602081101561107e57600080fd5b505190508061109157504360075561113f565b600554600754604080516391c05b0b60e01b81526004810192909252516000926001600160a01b0316916391c05b0b91602480830192602092919082900301818787803b1580156110e157600080fd5b505af11580156110f5573d6000803e3d6000fd5b505050506040513d602081101561110b57600080fd5b50516009549091506111359061112c906106de84662386f26fc10000611631565b60085490611959565b6008555050436007555b565b600060026001541415611189576040805162461bcd60e51b815260206004820152601f6024820152600080516020611ed2833981519152604482015290519081900360640190fd5b60026001556004546001600160a01b031633146111d75760405162461bcd60e51b8152600401808060200182810382526039815260200180611fce6039913960400191505060405180910390fd5b84611229576040805162461bcd60e51b815260206004820152601a60248201527f416c706163614661726d3a20696e76616c696420616c70616361000000000000604482015290519081900360640190fd5b6001600160a01b038087166000908152600a6020526040808220600480548351633719f98b60e11b81529182018b9052925191949290921691636e33f316916024808301926101a0929190829003018186803b15801561128857600080fd5b505afa15801561129c573d6000803e3d6000fd5b505050506040513d6101a08110156112b357600080fd5b5061016001519050806112f75760405162461bcd60e51b8152600401808060200182810382526021815260200180611f626021913960400191505060405180910390fd5b81541561139157611306610ffb565b600061133083600101546106e4662386f26fc100006106de6006600201546106d8610f208a611612565b9050801561134257611342898261174e565b600854835461136391662386f26fc10000916106de91906106d89087611631565b6001840155825461138c9061137b906106d886611612565b84546106e490610b39908690611631565b600955505b60028201805490889055600383018290556113ae600b898b611a13565b5060048054604080516306c7da7560e11b81526001600160a01b038d811694820194909452602481018c905290519290911691630d8fb4ea9160448082019260009290919082900301818387803b15801561140857600080fd5b505af115801561141c573d6000803e3d6000fd5b50505050806000146114b0576004805460408051637921219560e11b815230938101939093526001600160a01b038c81166024850152604484018590526001606485015260a06084850152600060a48501819052915192169263f242432a9260e4808301939282900301818387803b15801561149757600080fd5b505af11580156114ab573d6000803e3d6000fd5b505050505b505060018055507ff23a6e612e1ff4830e658fe43f4e3cb4a5f8170bd5d9e69fb5d7a7fa9e4fdf97979650505050505050565b6114eb611931565b6001600160a01b03166114fc610c11565b6001600160a01b031614611557576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811661159c5760405162461bcd60e51b8152600401808060200182810382526026815260200180611ef26026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000818310156116075781611609565b825b90505b92915050565b6000816003015460001415611629575060016105ae565b506003015490565b6000826116405750600061160c565b8282028284828161164d57fe5b04146116095760405162461bcd60e51b8152600401808060200182810382526021815260200180611f836021913960400191505060405180910390fd5b60008082116116e0576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816116e957fe5b049392505050565b600082821115611748576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600354604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561179957600080fd5b505afa1580156117ad573d6000803e3d6000fd5b505050506040513d60208110156117c357600080fd5b5051905080821115611857576003546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561182557600080fd5b505af1158015611839573d6000803e3d6000fd5b505050506040513d602081101561184f57600080fd5b506118da9050565b6003546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b1580156118ad57600080fd5b505af11580156118c1573d6000803e3d6000fd5b505050506040513d60208110156118d757600080fd5b50505b505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526118da908490611a33565b3390565b60006116098383611ae4565b60006116098383611bc2565b60006116098383611bda565b600082820183811015611609576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611a0d908590611a33565b50505050565b6000611a2984846001600160a01b038516611c6a565b90505b9392505050565b6060611a88826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611d019092919063ffffffff16565b8051909150156118da57808060200190516020811015611aa757600080fd5b50516118da5760405162461bcd60e51b815260040180806020018281038252602a815260200180611fa4602a913960400191505060405180910390fd5b60008181526001830160205260408120548015611bb85783546000198083019190810190600090879083908110611b1757fe5b9060005260206000209060020201905080876000018481548110611b3757fe5b600091825260208083208454600290930201918255600193840154918401919091558354825289830190526040902090840190558654879080611b7657fe5b600082815260208082206002600019909401938402018281556001908101839055929093558881528982019092526040822091909155945061160c9350505050565b600091505061160c565b60009081526001919091016020526040902054151590565b600081815260018301602052604081205480611c3d576040805162461bcd60e51b815260206004820152601e60248201527f456e756d657261626c654d61703a206e6f6e6578697374656e74206b65790000604482015290519081900360640190fd5b836000016001820381548110611c4f57fe5b90600052602060002090600202016001015491505092915050565b600082815260018401602052604081205480611ccf575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055611a2c565b82856000016001830381548110611ce257fe5b9060005260206000209060020201600101819055506000915050611a2c565b6060611a29848460008585611d1585611e27565b611d66576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310611da55780518252601f199092019160209182019101611d86565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611e07576040519150601f19603f3d011682016040523d82523d6000602084013e611e0c565b606091505b5091509150611e1c828286611e2d565b979650505050505050565b3b151590565b60608315611e3c575081611a2c565b825115611e4c5782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611e96578181015183820152602001611e7e565b50505050905090810190601f168015611ec35780820380516001836020036101000a031916815260200191505b509250505060405180910390fdfe5265656e7472616e637947756172643a207265656e7472616e742063616c6c004f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416c706163614661726d3a20796f7520646f206e6f74206861766520616e7920616c70616361416c706163614661726d3a206f726967696e616c206f776e6572206e6f7420666f756e64416c706163614661726d3a20696e76616c696420616c7061636120656e65726779536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564416c706163614661726d3a20726563656976656420616c706163612066726f6d20756e61757468656e7469636174656420636f6e7472616374416c706163614661726d3a206f6e6c7920737570706f727473207472616e736665722073696e676c6520616c7061636120617420612074696d652028652e6720736166655472616e7366657246726f6d29a2646970667358221220199117d2e074c3f9641223bc1c50a86aac5a47587e59171a0a07a3ceb372bd2264736f6c634300060c0033000000000000000000000000c5e6689c9c8b02be7c49912ef19e79cf24977f03000000000000000000000000060dd632f7dd45cb97a86376863d623d6756e8480000000000000000000000000ae96a3369c66866d5de712a9187dc7f5de85156000000000000000000000000837cd42282801e340f1f17aadf3166fee99fb07c00000000000000000000000000000000000000000000000000000000004f660b

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

000000000000000000000000c5e6689c9c8b02be7c49912ef19e79cf24977f03000000000000000000000000060dd632f7dd45cb97a86376863d623d6756e8480000000000000000000000000ae96a3369c66866d5de712a9187dc7f5de85156000000000000000000000000837cd42282801e340f1f17aadf3166fee99fb07c00000000000000000000000000000000000000000000000000000000004f660b

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000c5e6689c9c8b02be7c49912ef19e79cf24977f03
Arg [1] : 000000000000000000000000060dd632f7dd45cb97a86376863d623d6756e848
Arg [2] : 0000000000000000000000000ae96a3369c66866d5de712a9187dc7f5de85156
Arg [3] : 000000000000000000000000837cd42282801e340f1f17aadf3166fee99fb07c
Arg [4] : 00000000000000000000000000000000000000000000000000000000004f660b


Deployed ByteCode Sourcemap

53659:13934:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7358:150;;;;;;;;;;;;;;;;-1:-1:-1;7358:150:0;-1:-1:-1;;;;;;7358:150:0;;:::i;:::-;;;;;;;;;;;;;;;;;;55336:47;;;:::i;:::-;;;;;;;;;;;;;;;;55497:44;;;;;;;;;;;;;;;;-1:-1:-1;55497:44:0;-1:-1:-1;;;;;55497:44:0;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;55137:33;;;:::i;:::-;;;;-1:-1:-1;;;;;55137:33:0;;;;;;;;;;;;;;60690:1047;;;;;;;;;;;;;;;;-1:-1:-1;60690:1047:0;;:::i;:::-;;58049:1337;;;:::i;55201:29::-;;;:::i;55075:22::-;;;:::i;55415:24::-;;;:::i;:::-;;;;-1:-1:-1;;;;;55415:24:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66113:1477;;;;;;;;;;;;;;;;-1:-1:-1;66113:1477:0;;;;;;;;;;;;:::i;44650:148::-;;;:::i;43999:87::-;;;:::i;59478:1137::-;;;;;;;;;;;;;;;;-1:-1:-1;59478:1137:0;;:::i;65497:342::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;65497:342:0;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;65497:342:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;65497:342:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;65497:342:0;;;;;;;;-1:-1:-1;65497:342:0;;-1:-1:-1;;;;;65497:342:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;65497:342:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;65497:342:0;;;;;;;;-1:-1:-1;65497:342:0;;-1:-1:-1;;;;;65497:342:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;65497:342:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;65497:342:0;;-1:-1:-1;65497:342:0;;-1:-1:-1;;;;;65497:342:0:i;:::-;;;;-1:-1:-1;;;;;;65497:342:0;;;;;;;;;;;;;;56453:848;;;;;;;;;;;;;;;;-1:-1:-1;56453:848:0;-1:-1:-1;;;;;56453:848:0;;:::i;61816:389::-;;;:::i;55768:46::-;;;:::i;57400:584::-;;;:::i;63048:2304::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;63048:2304:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;63048:2304:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;63048:2304:0;;;;;;;;;;-1:-1:-1;63048:2304:0;;-1:-1:-1;63048:2304:0;-1:-1:-1;63048:2304:0;:::i;44953:244::-;;;;;;;;;;;;;;;;-1:-1:-1;44953:244:0;-1:-1:-1;;;;;44953:244:0;;:::i;7358:150::-;-1:-1:-1;;;;;;7467:33:0;;7443:4;7467:33;;;:20;:33;;;;;;;;7358:150;;;;:::o;55336:47::-;55382:1;55336:47;:::o;55497:44::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;55137:33::-;;;-1:-1:-1;;;;;55137:33:0;;:::o;60690:1047::-;39984:1;40590:7;;:19;;40582:63;;;;;-1:-1:-1;;;40582:63:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;40582:63:0;;;;;;;;;;;;;;;39984:1;40723:7;:18;60789:10:::1;60756:21;60780:20:::0;;;:8:::1;:20;::::0;;;;60819:11;;:22;-1:-1:-1;60819:22:0::1;60811:61;;;::::0;;-1:-1:-1;;;60811:61:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;60885:12;:10;:12::i;:::-;60908:15;60926:186;61096:4;:15;;;60926:151;55810:4;60926:116;61017:8;:24;;;60926:72;60970:27;60992:4;60970:21;:27::i;:::-;60926:25:::0;;;:43:::1;:72::i;:::-;:90:::0;::::1;:116::i;:::-;:134:::0;::::1;:151::i;:::-;:169:::0;::::1;:186::i;:::-;60908:204:::0;-1:-1:-1;61129:11:0;;61125:82:::1;;61157:38;61175:10;61187:7;61157:17;:38::i;:::-;61221:11:::0;;61217:286:::1;;61263:11:::0;;:24:::1;::::0;61279:7;61263:15:::1;:24::i;:::-;61249:38:::0;;61302:8:::1;:16:::0;:59:::1;::::0;-1:-1:-1;;;;;61302:16:0::1;61340:10;61353:7:::0;61302:29:::1;:59::i;:::-;61396:95;61436:40;61468:7;61436:27;61458:4;61436:21;:27::i;:40::-;61396:17:::0;;;:21:::1;:95::i;:::-;61376:17:::0;:115;61217:286:::1;61533:151;55810:4;61533:116;61624:8;:24;;;61533:72;61577:27;61599:4;61577:21;:27::i;:::-;61533:25:::0;;;:43:::1;:72::i;:151::-;61515:15;::::0;::::1;:169:::0;61700:29:::1;::::0;;;;;;;61709:10:::1;::::0;61700:29:::1;::::0;;;;;::::1;::::0;;::::1;-1:-1:-1::0;;39940:1:0;40902:22;;-1:-1:-1;60690:1047:0:o;58049:1337::-;39984:1;40590:7;;:19;;40582:63;;;;;-1:-1:-1;;;40582:63:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;40582:63:0;;;;;;;;;;;;;;;39984:1;40723:7;:18;58100:14:::1;58117:12;:10;:12::i;:::-;-1:-1:-1::0;;;;;58166:16:0;::::1;58142:21;58166:16:::0;;;:8:::1;:16;::::0;;;;58201:13:::1;::::0;::::1;::::0;58100:29;;-1:-1:-1;58166:16:0;58193:69:::1;;;;-1:-1:-1::0;;;58193:69:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;58279:11:::0;;:15;58275:722:::1;;58311:12;:10;:12::i;:::-;58338:15;58356:196;58536:4;:15;;;58356:157;55810:4;58356:118;58449:8;:24;;;58356:70;58408:4;:17;;;58356:4;:29;;;:51;;:70;;;;:::i;:196::-;58338:214:::0;-1:-1:-1;58571:11:0;;58567:90:::1;;58603:38;58621:10;58633:7;58603:17;:38::i;:::-;58786:24:::0;;58691:29;;:159:::1;::::0;55810:4:::1;::::0;58691:120:::1;::::0;58786:24;58691:72:::1;::::0;55382:1:::1;58691:51;:72::i;:159::-;58673:15;::::0;;::::1;:177:::0;;;;58958:11;;58928:17:::1;::::0;::::1;::::0;58887:98:::1;::::0;58927:43:::1;::::0;58958:11;58928:24:::1;::::0;:21:::1;:24::i;58887:98::-;58867:17:::0;:118;-1:-1:-1;58275:722:0::1;59032:13;::::0;::::1;::::0;;59009:20:::1;59056:17:::0;;;;59084::::1;::::0;::::1;:21:::0;;;;59172:40:::1;:19;59032:13:::0;59172:26:::1;:40::i;:::-;-1:-1:-1::0;59225:12:0::1;::::0;;:153:::1;::::0;;-1:-1:-1;;;59225:153:0;;59277:4:::1;59225:153:::0;;::::1;::::0;;;;59297:10:::1;59225:153:::0;;;;;;;;;;:12;:153;;;;;;;;;:12:::1;:153:::0;;;;;;;;-1:-1:-1;;;;;59225:12:0;;::::1;::::0;:29:::1;::::0;:153;;;;;:12;:153;;;;;:12;;:153;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;39940:1:0;40902:22;;-1:-1:-1;;;;;58049:1337:0:o;55201:29::-;;;-1:-1:-1;;;;;55201:29:0;;:::o;55075:22::-;;;-1:-1:-1;;;;;55075:22:0;;:::o;55415:24::-;;;;;;;;;-1:-1:-1;;;;;55415:24:0;;;;;:::o;66113:1477::-;66299:12;;-1:-1:-1;;;;;66299:12:0;66277:10;:35;66255:142;;;;-1:-1:-1;;;66255:142:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66432:33;:19;66461:3;66432:28;:33::i;:::-;66410:119;;;;-1:-1:-1;;;66410:119:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66542:21;66566:28;:19;66590:3;66566:23;:28::i;:::-;-1:-1:-1;;;;;66629:23:0;;66605:21;66629:23;;;:8;:23;;;;;66669:11;;66542:52;;-1:-1:-1;66629:23:0;66669:15;66665:842;;66701:12;:10;:12::i;:::-;66730:15;66748:206;66938:4;:15;;;66748:167;55810:4;66748:128;66851:8;:24;;;66748:80;66800:27;66822:4;66800:21;:27::i;66748:206::-;66730:224;-1:-1:-1;66975:11:0;;66971:93;;67007:41;67025:13;67040:7;67007:17;:41::i;:::-;67240:24;;67154:29;;:150;;55810:4;;67154:111;;67240:24;67154:63;;67206:10;67154:51;:63::i;:150::-;67136:15;;;:168;67482:11;;67341:154;;67450:44;;:27;67136:4;67450:21;:27::i;:44::-;67414:11;;67341:86;;67399:27;;:10;;:14;:27::i;:::-;67341:35;;;:57;:86::i;:154::-;67321:17;:174;-1:-1:-1;66665:842:0;67552:17;;:30;;;;-1:-1:-1;;;66113:1477:0:o;44650:148::-;44230:12;:10;:12::i;:::-;-1:-1:-1;;;;;44219:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;44219:23:0;;44211:68;;;;;-1:-1:-1;;;44211:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;44757:1:::1;44741:6:::0;;44720:40:::1;::::0;-1:-1:-1;;;;;44741:6:0;;::::1;::::0;44720:40:::1;::::0;44757:1;;44720:40:::1;44788:1;44771:19:::0;;-1:-1:-1;;;;;;44771:19:0::1;::::0;;44650:148::o;43999:87::-;44045:7;44072:6;-1:-1:-1;;;;;44072:6:0;43999:87;:::o;59478:1137::-;39984:1;40590:7;;:19;;40582:63;;;;;-1:-1:-1;;;40582:63:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;40582:63:0;;;;;;;;;;;;;;;39984:1;40723:7;:18;59543:12:::1;:10;:12::i;:::-;59601:10;59568:21;59592:20:::0;;;:8:::1;:20;::::0;;;;59627:11;;:15;59623:376:::1;;59659:15;59677:206;59867:4;:15;;;59677:167;55810:4;59677:128;59780:8;:24;;;59677:80;59729:27;59751:4;59729:21;:27::i;59677:206::-;59659:224:::0;-1:-1:-1;59902:11:0;;59898:90:::1;;59934:38;59952:10;59964:7;59934:17;:38::i;:::-;59623:376;;60015:11:::0;;60011:371:::1;;60043:8;:16:::0;:144:::1;::::0;-1:-1:-1;;;;;60043:16:0::1;60103:10;60141:4;60165:7:::0;60043:33:::1;:144::i;:::-;60216:11:::0;;:24:::1;::::0;60232:7;60216:15:::1;:24::i;:::-;60202:38:::0;;60275:95:::1;60315:40;60347:7:::0;60315:27:::1;60202:4:::0;60315:21:::1;:27::i;60275:95::-;60255:17:::0;:115;60011:371:::1;60412:151;55810:4;60412:116;60503:8;:24;;;60412:72;60456:27;60478:4;60456:21;:27::i;:::-;60412:25:::0;;;:43:::1;:72::i;:151::-;60394:15;::::0;::::1;:169:::0;60579:28:::1;::::0;;;;;;;60587:10:::1;::::0;60579:28:::1;::::0;;;;;::::1;::::0;;::::1;-1:-1:-1::0;;39940:1:0;40902:22;;59478:1137::o;65497:342::-;65676:6;65695:136;;-1:-1:-1;;;65695:136:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;56453:848;-1:-1:-1;;;;;56556:15:0;;;56512:7;56556:15;;;:8;:15;;;;;;;;56610:24;;:8;56664:16;:41;;-1:-1:-1;;;56664:41:0;;56699:4;56664:41;;;;;;56512:7;;56556:15;;56610:24;;56512:7;;56664:16;;;;;:26;;:41;;;;;;;;;;:16;:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;56664:41:0;56737:24;;56664:41;;-1:-1:-1;56722:12:0;:39;:56;;;;-1:-1:-1;56765:13:0;;;56722:56;56718:348;;;56811:8;;56878:24;;56811:106;;;-1:-1:-1;;;56811:106:0;;56854:4;56811:106;;;;;;;;;;;;56795:13;;-1:-1:-1;;;;;56811:8:0;;:16;;:106;;;;;;;;;;;;;;:8;:106;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;56811:106:0;57021:17;;56811:106;;-1:-1:-1;56952:102:0;;56990:49;;:26;56811:106;55810:4;56990:9;:26::i;:49::-;56952:15;;:19;:102::i;:::-;56934:120;;56718:348;;57096:197;57277:4;:15;;;57096:158;55810:4;57096:119;57199:15;57096:80;57148:27;57170:4;57148:21;:27::i;:::-;57096:29;;;:51;:80::i;:197::-;57076:217;56453:848;-1:-1:-1;;;;;56453:848:0:o;61816:389::-;61896:10;61863:21;61887:20;;;:8;:20;;;;;61926:11;;61918:60;;;;;-1:-1:-1;;;61918:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;62008:11;;61991:14;62030:15;;;-1:-1:-1;62056:15:0;;:19;62086:8;:16;:58;;-1:-1:-1;;;;;62086:16:0;62124:10;62008:11;62086:29;:58::i;:::-;62160:37;;;;;;;;62178:10;;62160:37;;;;;;;;;;61816:389;;:::o;55768:46::-;55810:4;55768:46;:::o;57400:584::-;57460:24;;57444:12;:40;57440:79;;57501:7;;57440:79;57550:8;:16;:41;;;-1:-1:-1;;;57550:41:0;;57585:4;57550:41;;;;;;57531:16;;-1:-1:-1;;;;;57550:16:0;;:26;;:41;;;;;;;;;;;;;;:16;:41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;57550:41:0;;-1:-1:-1;57606:13:0;57602:106;;-1:-1:-1;57663:12:0;57636:24;:39;57690:7;;57602:106;57737:8;;57757:24;;57737:45;;;-1:-1:-1;;;57737:45:0;;;;;;;;;;57720:14;;-1:-1:-1;;;;;57737:8:0;;:19;;:45;;;;;;;;;;;;;;57720:14;57737:8;:45;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;57737:45:0;57895:17;;57737:45;;-1:-1:-1;57820:104:0;;57863:50;;:27;57737:45;55810:4;57863:10;:27::i;:50::-;57820:24;;;:28;:104::i;:::-;57793:24;:131;-1:-1:-1;;57964:12:0;57937:24;:39;57400:584;:::o;63048:2304::-;63229:6;39984:1;40590:7;;:19;;40582:63;;;;;-1:-1:-1;;;40582:63:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;40582:63:0;;;;;;;;;;;;;;;39984:1;40723:7;:18;63292:12:::1;::::0;-1:-1:-1;;;;;63292:12:0::1;63270:10;:35;63248:142;;;;-1:-1:-1::0;;;63248:142:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;63411:8:::0;63403:47:::1;;;::::0;;-1:-1:-1;;;63403:47:0;;::::1;;::::0;::::1;::::0;::::1;::::0;;;;::::1;::::0;;;;;;;;;;;;;::::1;;-1:-1:-1::0;;;;;63487:15:0;;::::1;63463:21;63487:15:::0;;;:8:::1;:15;::::0;;;;;63590:12:::1;::::0;;:27;;-1:-1:-1;;;63590:27:0;;;;::::1;::::0;;;;;63487:15;;63590:12;;;::::1;::::0;:22:::1;::::0;:27;;;;;::::1;::::0;;;;;;;;:12;:27;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;63590:27:0;;;;-1:-1:-1;63636:10:0;63628:56:::1;;;;-1:-1:-1::0;;;63628:56:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;63701:11:::0;;:15;63697:841:::1;;63733:12;:10;:12::i;:::-;63762:15;63780:206;63970:4;:15;;;63780:167;55810:4;63780:128;63883:8;:24;;;63780:80;63832:27;63854:4;63832:21;:27::i;63780:206::-;63762:224:::0;-1:-1:-1;64005:11:0;;64001:85:::1;;64037:33;64055:5;64062:7;64037:17;:33::i;:::-;64256:24:::0;;64174:29;;:146:::1;::::0;55810:4:::1;::::0;64174:107:::1;::::0;64256:24;64174:59:::1;::::0;64226:6;64174:51:::1;:59::i;:146::-;64156:15;::::0;::::1;:164:::0;64494:11;;64357:150:::1;::::0;64462:44:::1;::::0;:27:::1;64156:4:::0;64462:21:::1;:27::i;:44::-;64426:11:::0;;64357:82:::1;::::0;64415:23:::1;::::0;:6;;:10:::1;:23::i;64357:150::-;64337:17:::0;:170;-1:-1:-1;63697:841:0::1;64604:13;::::0;::::1;::::0;;64628:19;;;;64658:17:::1;::::0;::::1;:26:::0;;;64736:35:::1;:19;64644:3:::0;64765:5;64736:23:::1;:35::i;:::-;-1:-1:-1::0;64835:12:0::1;::::0;;:47:::1;::::0;;-1:-1:-1;;;64835:47:0;;-1:-1:-1;;;;;64835:47:0;;::::1;::::0;;::::1;::::0;;;;;;;;;;;;:12;;;::::1;::::0;:35:::1;::::0;:47;;;;;:12:::1;::::0;:47;;;;;;;;:12;;:47;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;64899:12;64915:1;64899:17;64895:268;;64979:12;::::0;;:172:::1;::::0;;-1:-1:-1;;;64979:172:0;;65035:4:::1;64979:172:::0;;::::1;::::0;;;;-1:-1:-1;;;;;64979:172:0;;::::1;::::0;;;;;;;;;;:12;:172;;;;;;;;;:12:::1;:172:::0;;;;;;;;:12;::::1;::::0;:29:::1;::::0;:172;;;;;:12;:172;;;;;:12;;:172;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;64895:268;-1:-1:-1::0;;39940:1:0;40902:22;;-1:-1:-1;65220:109:0::1;::::0;63048:2304;-1:-1:-1;;;;;;;63048:2304:0:o;44953:244::-;44230:12;:10;:12::i;:::-;-1:-1:-1;;;;;44219:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;44219:23:0;;44211:68;;;;;-1:-1:-1;;;44211:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;45042:22:0;::::1;45034:73;;;;-1:-1:-1::0;;;45034:73:0::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;45144:6;::::0;;45123:38:::1;::::0;-1:-1:-1;;;;;45123:38:0;;::::1;::::0;45144:6;::::1;::::0;45123:38:::1;::::0;::::1;45172:6;:17:::0;;-1:-1:-1;;;;;;45172:17:0::1;-1:-1:-1::0;;;;;45172:17:0;;;::::1;::::0;;;::::1;::::0;;44953:244::o;41206:107::-;41264:7;41296:1;41291;:6;;:14;;41304:1;41291:14;;;41300:1;41291:14;41284:21;;41206:107;;;;;:::o;62256:251::-;62359:7;62388:4;:17;;;62409:1;62388:22;62384:81;;;-1:-1:-1;55382:1:0;62427:26;;62384:81;-1:-1:-1;62482:17:0;;;;62256:251::o;12408:220::-;12466:7;12490:6;12486:20;;-1:-1:-1;12505:1:0;12498:8;;12486:20;12529:5;;;12533:1;12529;:5;:1;12553:5;;;;;:10;12545:56;;;;-1:-1:-1;;;12545:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13106:153;13164:7;13196:1;13192;:5;13184:44;;;;;-1:-1:-1;;;13184:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;13250:1;13246;:5;;;;;;;13106:153;-1:-1:-1;;;13106:153:0:o;11991:158::-;12049:7;12082:1;12077;:6;;12069:49;;;;;-1:-1:-1;;;12069:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;12136:5:0;;;11991:158::o;62621:278::-;62715:4;;:29;;;-1:-1:-1;;;62715:29:0;;62738:4;62715:29;;;;;;62697:15;;-1:-1:-1;;;;;62715:4:0;;:14;;:29;;;;;;;;;;;;;;:4;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;62715:29:0;;-1:-1:-1;62759:17:0;;;62755:137;;;62793:4;;:27;;;-1:-1:-1;;;62793:27:0;;-1:-1:-1;;;;;62793:27:0;;;;;;;;;;;;;;;:4;;;;;:13;;:27;;;;;;;;;;;;;;:4;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;62755:137:0;;-1:-1:-1;62755:137:0;;62853:4;;:27;;;-1:-1:-1;;;62853:27:0;;-1:-1:-1;;;;;62853:27:0;;;;;;;;;;;;;;;:4;;;;;:13;;:27;;;;;;;;;;;;;;:4;;:27;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;62755:137:0;62621:278;;;:::o;25098:177::-;25208:58;;;-1:-1:-1;;;;;25208:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;25208:58:0;-1:-1:-1;;;25208:58:0;;;25181:86;;25201:5;;25181:19;:86::i;42464:106::-;42552:10;42464:106;:::o;35785:142::-;35862:4;35886:33;35894:3;35914;35886:7;:33::i;36011:151::-;36095:4;36119:35;36129:3;36149;36119:9;:35::i;37539:171::-;37618:7;37669:30;37674:3;37694;37669:4;:30::i;11529:179::-;11587:7;11619:5;;;11643:6;;;;11635:46;;;;;-1:-1:-1;;;11635:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;25283:205;25411:68;;;-1:-1:-1;;;;;25411:68:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;25411:68:0;-1:-1:-1;;;25411:68:0;;;25384:96;;25404:5;;25384:19;:96::i;:::-;25283:205;;;;:::o;35434:185::-;35523:4;35547:64;35552:3;35572;-1:-1:-1;;;;;35586:23:0;;35547:4;:64::i;:::-;35540:71;;35434:185;;;;;;:::o;27403:761::-;27827:23;27853:69;27881:4;27853:69;;;;;;;;;;;;;;;;;27861:5;-1:-1:-1;;;;;27853:27:0;;;:69;;;;;:::i;:::-;27937:17;;27827:95;;-1:-1:-1;27937:21:0;27933:224;;28079:10;28068:30;;;;;;;;;;;;;;;-1:-1:-1;28068:30:0;28060:85;;;;-1:-1:-1;;;28060:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30976:1549;31040:4;31175:17;;;:12;;;:17;;;;;;31209:13;;31205:1313;;31641:19;;-1:-1:-1;;31594:12:0;;;;31641:23;;;;31570:21;;31641:3;;:23;;31938;;;;;;;;;;;;;;;;31909:52;;32086:9;32056:3;:12;;32069:13;32056:27;;;;;;;;;;;;;;;;:39;;:27;;;;;:39;;;;;;;;;;;;;;;32176:14;;32163:28;;:12;;;:28;;;;;32194:17;;;32163:48;;32320:18;;32163:3;;32320:18;;;;;;;;;;;;;;-1:-1:-1;;32320:18:0;;;;;;;;;;;;;;;;;;;;;32416:17;;;:12;;;:17;;;;;;32409:24;;;;32320:18;-1:-1:-1;32450:11:0;;-1:-1:-1;;;;32450:11:0;31205:1313;32501:5;32494:12;;;;;32609:125;32680:4;32704:17;;;:12;;;;;:17;;;;;;:22;;;32609:125::o;34190:311::-;34256:7;34295:17;;;:12;;;:17;;;;;;34331:13;34323:56;;;;;-1:-1:-1;;;34323:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;34433:3;:12;;34457:1;34446:8;:12;34433:26;;;;;;;;;;;;;;;;;;:33;;;34426:40;;;34190:311;;;;:::o;30109:692::-;30185:4;30320:17;;;:12;;;:17;;;;;;30354:13;30350:444;;-1:-1:-1;;30439:38:0;;;;;;;;;;;;;;;;;;30421:57;;;;;;;;:12;:57;;;;;;;;;;;;;;;;;;;;;;;;30636:19;;30616:17;;;:12;;;:17;;;;;;;:39;30670:11;;30350:444;30750:5;30714:3;:12;;30738:1;30727:8;:12;30714:26;;;;;;;;;;;;;;;;;;:33;;:41;;;;30777:5;30770:12;;;;;19908:195;20011:12;20043:52;20065:6;20073:4;20079:1;20082:12;20011;21212:18;21223:6;21212:10;:18::i;:::-;21204:60;;;;;-1:-1:-1;;;21204:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;21338:12;21352:23;21379:6;-1:-1:-1;;;;;21379:11:0;21399:5;21407:4;21379:33;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;21379:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;21337:75;;;;21430:52;21448:7;21457:10;21469:12;21430:17;:52::i;:::-;21423:59;20960:530;-1:-1:-1;;;;;;;20960:530:0:o;16987:422::-;17354:20;17393:8;;;16987:422::o;23500:742::-;23615:12;23644:7;23640:595;;;-1:-1:-1;23675:10:0;23668:17;;23640:595;23789:17;;:21;23785:439;;24052:10;24046:17;24113:15;24100:10;24096:2;24092:19;24085:44;24000:148;24195:12;24188:20;;-1:-1:-1;;;24188:20:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Swarm Source

ipfs://199117d2e074c3f9641223bc1c50a86aac5a47587e59171a0a07a3ceb372bd22
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.