ETH Price: $3,361.35 (-0.64%)
Gas: 1 Gwei

Contract

0xFA21807EDE5486c83d665812525ff44C5B72F3ED
 

Overview

ETH Balance

7.48130768599335698 ETH

Eth Value

$25,147.28 (@ $3,361.35/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Unstake197755052024-05-01 13:13:4759 days ago1714569227IN
0xFA21807E...C5B72F3ED
0 ETH0.0013506910.60149262
Claim Reward197128782024-04-22 18:58:4768 days ago1713812327IN
0xFA21807E...C5B72F3ED
0 ETH0.0004521410.71958098
Unstake196887282024-04-19 9:56:1171 days ago1713520571IN
0xFA21807E...C5B72F3ED
0 ETH0.001350411.41227246
Claim Reward196887162024-04-19 9:53:3571 days ago1713520415IN
0xFA21807E...C5B72F3ED
0 ETH0.000412599.78204139
Unstake193697702024-03-05 15:10:11116 days ago1709651411IN
0xFA21807E...C5B72F3ED
0 ETH0.01485576116.60178794
Unstake193697032024-03-05 14:56:47116 days ago1709650607IN
0xFA21807E...C5B72F3ED
0 ETH0.01420119120.01449424
Claim Reward193696822024-03-05 14:52:35116 days ago1709650355IN
0xFA21807E...C5B72F3ED
0 ETH0.00481385114.12925388
Unstake188708622023-12-26 15:47:47186 days ago1703605667IN
0xFA21807E...C5B72F3ED
0 ETH0.0028102722.05763793
Unstake188446252023-12-22 23:23:11190 days ago1703287391IN
0xFA21807E...C5B72F3ED
0 ETH0.0035482225.79981106
Unstake188446232023-12-22 23:22:47190 days ago1703287367IN
0xFA21807E...C5B72F3ED
0 ETH0.0032039923.29688206
Unstake187465082023-12-09 5:11:47204 days ago1702098707IN
0xFA21807E...C5B72F3ED
0 ETH0.0030212125.53230944
Unstake185669772023-11-14 1:52:23229 days ago1699926743IN
0xFA21807E...C5B72F3ED
0 ETH0.003373928.51289408
Unstake185669762023-11-14 1:52:11229 days ago1699926731IN
0xFA21807E...C5B72F3ED
0 ETH0.0032441325.36125899
Claim Reward185669762023-11-14 1:52:11229 days ago1699926731IN
0xFA21807E...C5B72F3ED
0 ETH0.0010697125.36125899
Unstake185359612023-11-09 17:44:23233 days ago1699551863IN
0xFA21807E...C5B72F3ED
0 ETH0.0073052861.7370308
Unstake183141622023-10-09 16:39:59264 days ago1696869599IN
0xFA21807E...C5B72F3ED
0 ETH0.0021262717.96916883
Unstake183141612023-10-09 16:39:47264 days ago1696869587IN
0xFA21807E...C5B72F3ED
0 ETH0.0028278418.35000678
Unstake181402972023-09-15 8:01:11288 days ago1694764871IN
0xFA21807E...C5B72F3ED
0 ETH0.0015297512.00691979
Unstake180121862023-08-28 9:15:11306 days ago1693214111IN
0xFA21807E...C5B72F3ED
0 ETH0.0020848217.61890783
Unstake180121852023-08-28 9:14:59306 days ago1693214099IN
0xFA21807E...C5B72F3ED
0 ETH0.0022651717.70647628
Unstake180121842023-08-28 9:14:47306 days ago1693214087IN
0xFA21807E...C5B72F3ED
0 ETH0.0022688717.73541011
Unstake180121832023-08-28 9:14:35306 days ago1693214075IN
0xFA21807E...C5B72F3ED
0 ETH0.0022844217.85699477
Unstake180121822023-08-28 9:14:23306 days ago1693214063IN
0xFA21807E...C5B72F3ED
0 ETH0.0021816517.05363802
Unstake179100762023-08-14 2:21:59321 days ago1691979719IN
0xFA21807E...C5B72F3ED
0 ETH0.0016638313.05930415
Stake177538562023-07-23 5:53:47343 days ago1690091627IN
0xFA21807E...C5B72F3ED
0 ETH0.0026415515.1827699
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To Value
197755052024-05-01 13:13:4759 days ago1714569227
0xFA21807E...C5B72F3ED
0.00832715 ETH
197128782024-04-22 18:58:4768 days ago1713812327
0xFA21807E...C5B72F3ED
0.21094837 ETH
196887162024-04-19 9:53:3571 days ago1713520415
0xFA21807E...C5B72F3ED
0.01567749 ETH
193697702024-03-05 15:10:11116 days ago1709651411
0xFA21807E...C5B72F3ED
0.21094837 ETH
193696822024-03-05 14:52:35116 days ago1709650355
0xFA21807E...C5B72F3ED
0.21094837 ETH
188708622023-12-26 15:47:47186 days ago1703605667
0xFA21807E...C5B72F3ED
0.18789339 ETH
185669762023-11-14 1:52:11229 days ago1699926731
0xFA21807E...C5B72F3ED
0.42189674 ETH
183141612023-10-09 16:39:47264 days ago1696869587
0xFA21807E...C5B72F3ED
0.51521274 ETH
181402972023-09-15 8:01:11288 days ago1694764871
0xFA21807E...C5B72F3ED
0.00832715 ETH
179100762023-08-14 2:21:59321 days ago1691979719
0xFA21807E...C5B72F3ED
0.01567749 ETH
175832942023-06-29 6:52:59366 days ago1688021579
0xFA21807E...C5B72F3ED
0.01567749 ETH
170054552023-04-08 18:31:35448 days ago1680978695
0xFA21807E...C5B72F3ED
0.17685038 ETH
168121402023-03-12 13:07:59475 days ago1678626479
0xFA21807E...C5B72F3ED
0.01567749 ETH
167846522023-03-08 16:13:11479 days ago1678291991
0xFA21807E...C5B72F3ED
0.01567749 ETH
165174512023-01-30 5:08:23517 days ago1675055303
0xFA21807E...C5B72F3ED
0.04466276 ETH
164959722023-01-27 5:09:11520 days ago1674796151
0xFA21807E...C5B72F3ED
0.1219605 ETH
164524162023-01-21 3:12:59526 days ago1674270779
0xFA21807E...C5B72F3ED
0.1219605 ETH
164049712023-01-14 12:13:35532 days ago1673698415
0xFA21807E...C5B72F3ED
0.20171917 ETH
163475362023-01-06 11:46:47540 days ago1673005607
0xFA21807E...C5B72F3ED
0.01567749 ETH
160649692022-11-28 0:42:59580 days ago1669596179
0xFA21807E...C5B72F3ED
0.25760637 ETH
160283602022-11-22 21:55:35585 days ago1669154135
0xFA21807E...C5B72F3ED
0.0166543 ETH
158668752022-10-31 8:34:23607 days ago1667205263
0xFA21807E...C5B72F3ED
0.17865106 ETH
155353072022-09-14 22:05:20654 days ago1663193120
0xFA21807E...C5B72F3ED
0.25760637 ETH
154509202022-09-01 5:00:58668 days ago1662008458
0xFA21807E...C5B72F3ED
0.04466276 ETH
154326192022-08-29 6:46:04670 days ago1661755564
0xFA21807E...C5B72F3ED
0.04466276 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EulerBeatsPairStaking

Compiler Version
v0.8.3+commit.8d00100c

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 15 : EulerBeatsPairStaking.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.3;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";

import "./staking/mixins/BalanceTrackingMixin.sol";
import "./staking/mixins/RewardTrackingMixin.sol";
import "./staking/mixins/RestrictedPairsMixin.sol";
import "./staking/ERC1155Staker.sol";

/**
 * @dev Staking contract for ERC1155 tokens which tracks rewards in ether.  All ether sent to this contract will be distributed
 * evenly across all stakers.
 * This contract only accepts whitelisted pairs of tokens to be staked.
 */
contract EulerBeatsPairStaking is
    ERC1155Staker,
    BalanceTrackingMixin,
    RewardTrackingMixin,
    RestrictedPairsMixin,
    ReentrancyGuard,
    Ownable
{
    bool public emergency;
    uint256 public maxPairs;

    event RewardAdded(uint256 amount);
    event RewardClaimed(address indexed account, uint256 amount);

    // on stake/unstake
    event PairStaked(uint256 indexed pairId, address indexed account, uint256 amount);
    event PairUnstaked(uint256 indexed pairId, address indexed account, uint256 amount);

    event EmergencyUnstake(uint256 pairId, address indexed account, uint256 amount);

    /**
     * @dev The token contracts to allow the pairs from.  These address can only be set in the constructor, so make
     * sure you have it right!
     */
    constructor(address tokenAddressA, address tokenAddressB) RestrictedPairsMixin(tokenAddressA, tokenAddressB) {}

    /**
     * @dev Claim the reward for the caller.
     */
    function claimReward() external nonReentrant {
        claimRewardInternal();
    }

    /**
     * @dev Stake amount of tokens for the given pair.  Prior to staking, this will send and pending reward to the caller.
     */
    function stake(uint256 pairId, uint256 amount) external onlyEnabledPair(pairId) nonReentrant {
        require(totalShares + amount <= maxPairs, "Max Pairs Exceeded");
        require(!emergency, "Not allowed");

        // claim any pending reward
        claimRewardInternal();

        // transfer tokens from account to staking contract
        depositPair(pairId, amount);

        // update reward balance
        _addShares(msg.sender, amount);
    }

    /**
     * @dev Unstake one or more tokens.  Prior to unstaking, this will send all pending rewards to the caller.
     */
    function unstake(uint256 pairId, uint256 amount) external nonReentrant {
        // claim any pending reward
        claimRewardInternal();

        // transfer tokens from staking contract to account
        withdrawPair(pairId, amount);

        // update reward balance
        _removeShares(msg.sender, amount);
    }

    /**
     * @dev Unstake the given pair and forfeit any current pending reward.  This is only for emergency use
     * and will mess up this account's ability to unstake any other pairs.
     * If used, the caller should unstake ALL pairs (each pair id one-by-one) using this function.
     */
    function emergencyUnstake(uint256 pairId, uint256 amount) external nonReentrant {
        require(emergency, "Not allowed");
        require(amount > 0, "Invalid amount");

        // reset this account back to 0 rewards
        _resetRewardAccount(msg.sender);

        // trasfers the tokens back to the account
        withdrawPair(pairId, amount);

        emit EmergencyUnstake(pairId, msg.sender, amount);
    }

    /**
     * @dev Add rewards that are immediately split up between stakers
     */
    function addReward() external payable {
        require(msg.value > 0, "No ETH sent");
        require(totalShares > 0, "No stakers");
        _addReward(msg.value);
        emit RewardAdded(msg.value);
    }

    //////////////////////////////////////////////////
    //////////////////////////////////////////////////
    //////////////////////////////////////////////////

    ///////////////
    // Hooks     //
    ///////////////

    function _beforeDeposit(
        address account,
        address contractAddress,
        uint256 tokenId,
        uint256 amount
    ) internal virtual override {
        // update deposit balance for the given account
        _depositIntoAccount(account, contractAddress, tokenId, amount);
    }

    function _beforeWithdraw(
        address account,
        address contractAddress,
        uint256 tokenId,
        uint256 amount
    ) internal virtual override {
        // update deposit balance for the given account.  this will revert if someone
        // is trying to withdraw more than they have deposited.
        _withdrawFromAccount(account, contractAddress, tokenId, amount);
    }

    //////////////////////////////////////////////////
    //////////////////////////////////////////////////
    //////////////////////////////////////////////////

    ///////////////
    // Getters   //
    ///////////////

    /**
     * @dev Return the current number of staked pairs.
     */
    function numStakedPairs() external view returns (uint256) {
        return totalShares;
    }

    //////////////////////////////////////////////////
    //////////////////////////////////////////////////
    //////////////////////////////////////////////////

    ///////////////
    // Internal  //
    ///////////////

    /**
     * @dev Send any pending reward to msg.sender and update their debt so they
     * no longer have any pending reward.
     */
    function claimRewardInternal() internal {
        uint256 currentReward = accountPendingReward(msg.sender);
        if (currentReward > 0) {
            _updateRewardDebtToCurrent(msg.sender);

            uint256 amount;
            if (currentReward > address(this).balance) {
                // rounding errors
                amount = address(this).balance;
            } else {
                amount = currentReward;
            }
            Address.sendValue(payable(msg.sender), amount);
            emit RewardClaimed(msg.sender, amount);
        }
    }

    function depositPair(uint256 pairId, uint256 amount) internal {
        PairInfo memory pair = pairs[pairId];
        _depositSingle(tokenA, pair.tokenIdA, amount);
        _depositSingle(tokenB, pair.tokenIdB, amount);
        emit PairStaked(pairId, msg.sender, amount);
    }

    function withdrawPair(uint256 pairId, uint256 amount) internal {
        PairInfo memory pair = pairs[pairId];
        _withdrawSingle(tokenA, pair.tokenIdA, amount);
        _withdrawSingle(tokenB, pair.tokenIdB, amount);
        emit PairUnstaked(pairId, msg.sender, amount);
    }

    //////////////////////////////////////////////////
    //////////////////////////////////////////////////
    //////////////////////////////////////////////////

    ///////////////
    // Admin     //
    ///////////////

    /**
     * @dev Add new pairs that can be staked.  Pairs can never be removed after this call, only disabled.
     */
    function addPairs(
        uint256[] memory tokenIdA,
        uint256[] memory tokenIdB,
        bool[] memory enabled
    ) external onlyOwner {
        _addPairs(tokenIdA, tokenIdB, enabled);
    }

    /**
     * @dev Toggle the ability to stake in the given pairIds.  Stakers can always withdraw, regardless of
     * this flag.
     */
    function enablePairs(uint256[] memory pairIds, bool[] memory enabled) external onlyOwner {
        _enablePairs(pairIds, enabled);
    }

    /**
     * @dev Set the maximum number of pairs that can be staked at any point in time.
     */
    function setMaxPairs(uint256 amount) external onlyOwner {
        maxPairs = amount;
    }

    /**

     * @dev Withdraw any unclaimed eth in the contract.  Can only be called if there are no stakers.
     */
    function withdrawUnclaimed() external onlyOwner {
        require(totalShares == 0, "Stakers");
        // send any unclaimed eth to the owner
        if (address(this).balance > 0) {
            Address.sendValue(payable(msg.sender), address(this).balance);
        }
    }

    /**
     * @dev Set the emergency flag
     */
    function setEmergency(bool value) external onlyOwner {
        emergency = value;
    }

    //////////////////////////////////////////////////
    //////////////////////////////////////////////////
    //////////////////////////////////////////////////
}

File 2 of 15 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        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;
    }
}

File 3 of 15 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

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

    uint256 private _status;

    constructor () {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and 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;
    }
}

File 4 of 15 : IERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must 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;
}

File 5 of 15 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../../utils/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);
}

File 6 of 15 : ERC1155Holder.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./ERC1155Receiver.sol";

/**
 * @dev _Available since v3.1._
 */
contract ERC1155Holder is ERC1155Receiver {
    function onERC1155Received(address, address, uint256, uint256, bytes memory) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(address, address, uint256[] memory, uint256[] memory, bytes memory) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
}

File 7 of 15 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC1155Receiver.sol";
import "../../../utils/introspection/ERC165.sol";

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC1155Receiver).interfaceId
            || super.supportsInterface(interfaceId);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 9 of 15 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

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

File 10 of 15 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 11 of 15 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 12 of 15 : ERC1155Staker.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.3;

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

/**
 * @dev Base contract that support ERC1155 token staking.  Any token is allowed to be be staked/unstaked in this base implementation.
 * Concrete implementations should either do validation checks prior to calling deposit/withdraw, or use the provided hooks
 * to do the checks.
 */
abstract contract ERC1155Staker is ERC1155Holder {
    // hooks

    /**
     * @dev Called prior to transfering given token id from account to this contract.  This is good spot to do
     * any checks and revert if the given account should be able to deposit the specified token.
     * Ths hook is ALWAYS called prior to a deposit -- both the single and batch variants.
     */
    function _beforeDeposit(
        address account,
        address contractAddress,
        uint256 tokenId,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Called prior to transfering given token from this contract to the account.  This is good spot to do
     * any checks and revert if the given account should be able to withdraw the specified token.
     * Ths hook is ALWAYS called prior to a withdraw -- both the single and batch variants.
     */
    function _beforeWithdraw(
        address account,
        address contractAddress,
        uint256 tokenId,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Deposit one or more instance of a single token.
     */
    function _depositSingle(
        address contractAddress,
        uint256 tokenId,
        uint256 amount
    ) internal virtual {
        require(amount > 0, "Invalid amount");
        _beforeDeposit(msg.sender, contractAddress, tokenId, amount);
        IERC1155(contractAddress).safeTransferFrom(msg.sender, address(this), tokenId, amount, "");
    }

    /**
     * @dev Deposit one or more instances of the spececified tokens.
     * As a convience for the caller, this returns the total number instances of tokens depositied (the sum of amounts).
     */
    function _deposit(
        address contractAddress,
        uint256[] memory tokenIds,
        uint256[] memory amounts
    ) internal virtual returns (uint256 totalTokensDeposited) {
        totalTokensDeposited = 0;
        for (uint256 i = 0; i < tokenIds.length; i++) {
            require(amounts[i] > 0, "Invalid amount");
            _beforeDeposit(msg.sender, contractAddress, tokenIds[i], amounts[i]);
            totalTokensDeposited += amounts[i];
        }

        IERC1155(contractAddress).safeBatchTransferFrom(msg.sender, address(this), tokenIds, amounts, "");
    }

    /**
     * @dev Withdraw one or more instance of a single token.
     * As a convience for the caller, this returns the total number instances of tokens depositied (the sum of amounts).
     */
    function _withdrawSingle(
        address contractAddress,
        uint256 tokenId,
        uint256 amount
    ) internal virtual {
        require(amount > 0, "Invalid amount");
        _beforeWithdraw(msg.sender, contractAddress, tokenId, amount);
        IERC1155(contractAddress).safeTransferFrom(address(this), msg.sender, tokenId, amount, "");
    }

    /**
     * @dev Withdraw one or more instances of the spececified tokens.
     */
    function _withdraw(
        address contractAddress,
        uint256[] memory tokenIds,
        uint256[] memory amounts
    ) internal virtual returns (uint256 totalTokensWithdrawn) {
        totalTokensWithdrawn = 0;
        for (uint256 i = 0; i < tokenIds.length; i++) {
            require(amounts[i] > 0, "Invalid amount");
            _beforeWithdraw(msg.sender, contractAddress, tokenIds[i], amounts[i]);
            totalTokensWithdrawn += amounts[i];
        }

        IERC1155(contractAddress).safeBatchTransferFrom(address(this), msg.sender, tokenIds, amounts, "");
    }
}

File 13 of 15 : BalanceTrackingMixin.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.3;

/**
 * @dev Tracks amounts deposited and or withdrawn, on a per contract:token basis.  Does not allow an account to
 * withdraw more than it has deposited, and provides balance functions inspired by ERC1155.
 */
abstract contract BalanceTrackingMixin {
    struct DepositBalance {
        // balance of deposits, contract address => (token id => balance)
        mapping(address => mapping(uint256 => uint256)) balances;
    }

    mapping(address => DepositBalance) private accountBalances;

    function _depositIntoAccount(
        address account,
        address contractAddress,
        uint256 tokenId,
        uint256 amount
    ) internal {
        uint256 newBalance = accountBalances[account].balances[contractAddress][tokenId] + amount;
        accountBalances[account].balances[contractAddress][tokenId] = newBalance;
    }

    function _depositIntoAccount(
        address account,
        address contractAddress,
        uint256[] memory tokenIds,
        uint256[] memory amounts
    ) internal {
        require(tokenIds.length == amounts.length, "Length mismatch");

        for (uint256 i = 0; i < amounts.length; i++) {
            _depositIntoAccount(account, contractAddress, tokenIds[i], amounts[i]);
        }
    }

    function _withdrawFromAccount(
        address account,
        address contractAddress,
        uint256 tokenId,
        uint256 amount
    ) internal {
        require(accountBalances[account].balances[contractAddress][tokenId] >= amount, "Insufficient balance");
        uint256 newBalance = accountBalances[account].balances[contractAddress][tokenId] - amount;
        accountBalances[account].balances[contractAddress][tokenId] = newBalance;
    }

    function _withdrawFromAccount(
        address account,
        address contractAddress,
        uint256[] memory tokenIds,
        uint256[] memory amounts
    ) internal {
        require(tokenIds.length == amounts.length, "Length mismatch");

        for (uint256 i = 0; i < amounts.length; i++) {
            _withdrawFromAccount(account, contractAddress, tokenIds[i], amounts[i]);
        }
    }

    function balanceOf(
        address account,
        address contractAddress,
        uint256 tokenId
    ) public view returns (uint256 balance) {
        require(account != address(0), "Zero address");
        return accountBalances[account].balances[contractAddress][tokenId];
    }

    function balanceOfBatch(
        address account,
        address[] memory contractAddresses,
        uint256[] memory tokenIds
    ) public view returns (uint256[] memory batchBalances) {
        require(contractAddresses.length == tokenIds.length, "Length mismatch");

        batchBalances = new uint256[](tokenIds.length);

        for (uint256 i = 0; i < tokenIds.length; ++i) {
            batchBalances[i] = balanceOf(account, contractAddresses[i], tokenIds[i]);
        }
    }
}

File 14 of 15 : RestrictedPairsMixin.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.3;

/**
 * @dev Mixin to restrict staking to specific contract and tokens.  This intended for contracts where all
 * tokens eligible to stake are known ahead of time.
 */
abstract contract RestrictedPairsMixin {
    struct PairInfo {
        uint256 tokenIdA;
        uint256 tokenIdB;
        bool enabled;
    }

    address public tokenA;
    address public tokenB;

    uint256 public nextPairId;

    // pairId => pair
    mapping(uint256 => PairInfo) public pairs;

    constructor(address tokenAddressA, address tokenAddressB) {
        tokenA = tokenAddressA;
        tokenB = tokenAddressB;
    }

    modifier onlyEnabledPair(uint256 pairId) {
        require(isPairEnabled(pairId), "Not enabled");
        _;
    }

    function isPairEnabled(uint256 pairId) public view returns (bool) {
        return pairs[pairId].enabled;
    }

    function _enablePairs(uint256[] memory pairIds, bool[] memory enabled) internal {
        require(pairIds.length == enabled.length, "Array lengths");

        for (uint256 i = 0; i < pairIds.length; i++) {
            pairs[pairIds[i]].enabled = enabled[i];
        }
    }

    function _addPairs(
        uint256[] memory tokenIdsA,
        uint256[] memory tokenIdsB,
        bool[] memory enabled
    ) internal {
        require(tokenIdsA.length == tokenIdsB.length && tokenIdsB.length == enabled.length, "Array lengths");
        for (uint256 i = 0; i < tokenIdsA.length; i++) {
            pairs[nextPairId] = PairInfo({tokenIdA: tokenIdsA[i], tokenIdB: tokenIdsB[i], enabled: enabled[i]});
            nextPairId = nextPairId + 1;
        }
    }

    function getAllPairs() external view returns (PairInfo[] memory results) {
        results = new PairInfo[](nextPairId);

        for (uint256 i = 0; i < nextPairId; i++) {
            results[i] = pairs[i];
        }
    }
}

File 15 of 15 : RewardTrackingMixin.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.3;

/**
 * @dev Adds fractional reward tracking.  Each share is equally weighted.  This is generic in that
 * it can track anything -- it's not tied to a staked token or ether as the reward (rewards can be ether, ERC20, ...),
 * and this book-keeping should be done outside this contract.
 */
abstract contract RewardTrackingMixin {
    struct AccountInfo {
        uint256 shares;
        uint256 rewardDebt;
    }

    // total number of shares deposited
    uint256 public totalShares;

    // always increasing value
    uint256 private accumulatedRewardPerShare;

    mapping(address => AccountInfo) private accountRewards;

    function _addReward(uint256 amount) internal {
        if (totalShares == 0 || amount == 0) {
            return;
        }

        uint256 rewardPerShare = amount / totalShares;
        accumulatedRewardPerShare += rewardPerShare;
    }

    /**
     * @dev Updates the amount of shares for a user.  Callers must keep track of the share count
     * for a particular user to reduce storage required.
     */
    function _addShares(address account, uint256 amount) internal {
        totalShares += amount;

        accountRewards[account].shares += amount;
        _updateRewardDebtToCurrent(account);
    }

    function _removeShares(address account, uint256 amount) internal {
        require(amount <= accountRewards[account].shares, "Invalid account amount");
        require(amount <= totalShares, "Invalid global amount");

        totalShares -= amount;

        accountRewards[account].shares -= amount;
        _updateRewardDebtToCurrent(account);
    }

    /**
     * @dev Resets the given account to the initial state.  This should be used with caution!
     */
    function _resetRewardAccount(address account) internal {
        uint256 currentShares = accountRewards[account].shares;
        if (currentShares > 0) {
            totalShares -= currentShares;
            accountRewards[account].shares = 0;
            accountRewards[account].rewardDebt = 0;
        }
    }

    function _updateRewardDebtToCurrent(address account) internal {
        accountRewards[account].rewardDebt = accountRewards[account].shares * accumulatedRewardPerShare;
    }

    function accountPendingReward(address account) public view returns (uint256 pendingReward) {
        return accountRewards[account].shares * accumulatedRewardPerShare - accountRewards[account].rewardDebt;
    }

    function accountRewardShares(address account) public view returns (uint256 rewardShares) {
        return accountRewards[account].shares;
    }
}

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"tokenAddressA","type":"address"},{"internalType":"address","name":"tokenAddressB","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"pairId","type":"uint256"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"EmergencyUnstake","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":"uint256","name":"pairId","type":"uint256"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PairStaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"pairId","type":"uint256"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PairUnstaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"RewardClaimed","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"accountPendingReward","outputs":[{"internalType":"uint256","name":"pendingReward","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"accountRewardShares","outputs":[{"internalType":"uint256","name":"rewardShares","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIdA","type":"uint256[]"},{"internalType":"uint256[]","name":"tokenIdB","type":"uint256[]"},{"internalType":"bool[]","name":"enabled","type":"bool[]"}],"name":"addPairs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"addReward","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address[]","name":"contractAddresses","type":"address[]"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"batchBalances","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergency","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pairId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"emergencyUnstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"pairIds","type":"uint256[]"},{"internalType":"bool[]","name":"enabled","type":"bool[]"}],"name":"enablePairs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getAllPairs","outputs":[{"components":[{"internalType":"uint256","name":"tokenIdA","type":"uint256"},{"internalType":"uint256","name":"tokenIdB","type":"uint256"},{"internalType":"bool","name":"enabled","type":"bool"}],"internalType":"struct RestrictedPairsMixin.PairInfo[]","name":"results","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"pairId","type":"uint256"}],"name":"isPairEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxPairs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextPairId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"numStakedPairs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"","type":"address"},{"internalType":"uint256","name":"","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":"uint256","name":"","type":"uint256"}],"name":"pairs","outputs":[{"internalType":"uint256","name":"tokenIdA","type":"uint256"},{"internalType":"uint256","name":"tokenIdB","type":"uint256"},{"internalType":"bool","name":"enabled","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setEmergency","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setMaxPairs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pairId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenA","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenB","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"pairId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawUnclaimed","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162002188380380620021888339810160408190526200003491620000e6565b600480546001600160a01b038085166001600160a01b031992831617909255600580549284169290911691909117905560016008556000620000733390565b600980546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35050506200011d565b80516001600160a01b0381168114620000e157600080fd5b919050565b60008060408385031215620000f9578182fd5b6200010483620000c9565b91506200011460208401620000c9565b90509250929050565b61205b806200012d6000396000f3fe6080604052600436106101cd5760003560e01c80638da5cb5b116100f7578063bc197c8111610095578063e93119d911610064578063e93119d914610583578063f23a6e61146105a3578063f2fde38b146105cf578063f800ece9146105ef576101cd565b8063bc197c81146104f5578063caa6fea41461053a578063e1c68d961461055b578063e59a58ee1461057b576101cd565b80639e2c8a5b116100d15780639e2c8a5b1461044e578063a48b0b691461046e578063b88a802f14610484578063b91ac78814610499576101cd565b80638da5cb5b146103ee5780638fb8bd851461040c57806395d002e614610421576101cd565b806333fc56d91161016f578063715018a61161013e578063715018a6146103795780637b0472f01461038e5780637b805890146103ae57806382522fa4146103ce576101cd565b806333fc56d91461030e5780633a98ef391461032357806342b58a82146103395780635f64b55b14610359576101cd565b80630973da45116101ab5780630973da451461024d5780630fc63d10146102835780631932d9b7146102bb5780632ecc83cc146102db576101cd565b806301ffc9a7146101d25780630501d556146102075780630905e57914610229575b600080fd5b3480156101de57600080fd5b506101f26101ed366004611d4f565b610611565b60405190151581526020015b60405180910390f35b34801561021357600080fd5b50610227610222366004611d35565b61064a565b005b34801561023557600080fd5b5061023f600a5481565b6040519081526020016101fe565b34801561025957600080fd5b5061023f610268366004611a22565b6001600160a01b031660009081526003602052604090205490565b34801561028f57600080fd5b506004546102a3906001600160a01b031681565b6040516001600160a01b0390911681526020016101fe565b3480156102c757600080fd5b5061023f6102d6366004611a22565b61069b565b3480156102e757600080fd5b506101f26102f6366004611d77565b60009081526007602052604090206002015460ff1690565b34801561031a57600080fd5b506102276106d2565b34801561032f57600080fd5b5061023f60015481565b34801561034557600080fd5b50610227610354366004611d8f565b610748565b34801561036557600080fd5b506005546102a3906001600160a01b031681565b34801561038557600080fd5b5061022761082e565b34801561039a57600080fd5b506102276103a9366004611d8f565b6108a2565b3480156103ba57600080fd5b506102276103c9366004611cbb565b6109dd565b3480156103da57600080fd5b506102276103e9366004611d77565b610a17565b3480156103fa57600080fd5b506009546001600160a01b03166102a3565b34801561041857600080fd5b5060015461023f565b34801561042d57600080fd5b5061044161043c366004611b87565b610a46565b6040516101fe9190611e43565b34801561045a57600080fd5b50610227610469366004611d8f565b610b87565b34801561047a57600080fd5b5061023f60065481565b34801561049057600080fd5b50610227610bd4565b3480156104a557600080fd5b506104d86104b4366004611d77565b60076020526000908152604090208054600182015460029092015490919060ff1683565b6040805193845260208401929092521515908201526060016101fe565b34801561050157600080fd5b50610521610510366004611a43565b63bc197c8160e01b95945050505050565b6040516001600160e01b031990911681526020016101fe565b34801561054657600080fd5b506009546101f290600160a01b900460ff1681565b34801561056757600080fd5b50610227610576366004611c5a565b610c0b565b610227610c43565b34801561058f57600080fd5b5061023f61059e366004611ae9565b610cfe565b3480156105af57600080fd5b506105216105be366004611b24565b63f23a6e6160e01b95945050505050565b3480156105db57600080fd5b506102276105ea366004611a22565b610d76565b3480156105fb57600080fd5b50610604610e61565b6040516101fe9190611de8565b60006001600160e01b03198216630271189760e51b148061064257506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6009546001600160a01b0316331461067d5760405162461bcd60e51b815260040161067490611eaf565b60405180910390fd5b60098054911515600160a01b0260ff60a01b19909216919091179055565b6001600160a01b03811660009081526003602052604081206001810154600254915490916106c891611fa8565b6106429190611fc7565b6009546001600160a01b031633146106fc5760405162461bcd60e51b815260040161067490611eaf565b600154156107365760405162461bcd60e51b81526020600482015260076024820152665374616b65727360c81b6044820152606401610674565b4715610746576107463347610f71565b565b6002600854141561076b5760405162461bcd60e51b815260040161067490611ee4565b6002600855600954600160a01b900460ff166107b75760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b6044820152606401610674565b600081116107d75760405162461bcd60e51b815260040161067490611e87565b6107e03361108a565b6107ea82826110e1565b604080518381526020810183905233917f140b7e335137737e0762ce820c8352db1561ac11793d81433a11a600876d0526910160405180910390a250506001600855565b6009546001600160a01b031633146108585760405162461bcd60e51b815260040161067490611eaf565b6009546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600980546001600160a01b0319169055565b600082815260076020526040902060020154829060ff166108f35760405162461bcd60e51b815260206004820152600b60248201526a139bdd08195b98589b195960aa1b6044820152606401610674565b600260085414156109165760405162461bcd60e51b815260040161067490611ee4565b6002600855600a5460015461092c908490611f70565b111561096f5760405162461bcd60e51b815260206004820152601260248201527113585e0814185a5c9cc8115e18d95959195960721b6044820152606401610674565b600954600160a01b900460ff16156109b75760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b6044820152606401610674565b6109bf611190565b6109c98383611204565b6109d333836112aa565b5050600160085550565b6009546001600160a01b03163314610a075760405162461bcd60e51b815260040161067490611eaf565b610a128383836112f8565b505050565b6009546001600160a01b03163314610a415760405162461bcd60e51b815260040161067490611eaf565b600a55565b60608151835114610a8b5760405162461bcd60e51b815260206004820152600f60248201526e098cadccee8d040dad2e6dac2e8c6d608b1b6044820152606401610674565b815167ffffffffffffffff811115610ab357634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610adc578160200160208202803683370190505b50905060005b8251811015610b7f57610b4485858381518110610b0f57634e487b7160e01b600052603260045260246000fd5b6020026020010151858481518110610b3757634e487b7160e01b600052603260045260246000fd5b6020026020010151610cfe565b828281518110610b6457634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610b7881611fde565b9050610ae2565b509392505050565b60026008541415610baa5760405162461bcd60e51b815260040161067490611ee4565b6002600855610bb7611190565b610bc182826110e1565b610bcb3382611449565b50506001600855565b60026008541415610bf75760405162461bcd60e51b815260040161067490611ee4565b6002600855610c04611190565b6001600855565b6009546001600160a01b03163314610c355760405162461bcd60e51b815260040161067490611eaf565b610c3f8282611533565b5050565b60003411610c815760405162461bcd60e51b815260206004820152600b60248201526a139bc8115512081cd95b9d60aa1b6044820152606401610674565b600060015411610cc05760405162461bcd60e51b815260206004820152600a6024820152694e6f207374616b65727360b01b6044820152606401610674565b610cc93461160f565b6040513481527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a1565b60006001600160a01b038416610d455760405162461bcd60e51b815260206004820152600c60248201526b5a65726f206164647265737360a01b6044820152606401610674565b506001600160a01b039283166000908152602081815260408083209490951682529283528381209181529152205490565b6009546001600160a01b03163314610da05760405162461bcd60e51b815260040161067490611eaf565b6001600160a01b038116610e055760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610674565b6009546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600980546001600160a01b0319166001600160a01b0392909216919091179055565b606060065467ffffffffffffffff811115610e8c57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610ee357816020015b610ed0604051806060016040528060008152602001600081526020016000151581525090565b815260200190600190039081610eaa5790505b50905060005b600654811015610f6d576000818152600760209081526040918290208251606081018452815481526001820154928101929092526002015460ff161515918101919091528251839083908110610f4f57634e487b7160e01b600052603260045260246000fd5b60200260200101819052508080610f6590611fde565b915050610ee9565b5090565b80471015610fc15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610674565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461100e576040519150601f19603f3d011682016040523d82523d6000602084013e611013565b606091505b5050905080610a125760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610674565b6001600160a01b0381166000908152600360205260409020548015610c3f5780600160008282546110bb9190611fc7565b9091555050506001600160a01b0316600090815260036020526040812081815560010155565b6000828152600760209081526040918290208251606081018452815480825260018301549382019390935260029091015460ff16151592810192909252600454611137916001600160a01b039091169084611653565b6005546020820151611153916001600160a01b03169084611653565b604051828152339084907f3829c65d457d6b8b247bc1a26330de5c957ab91868c063d0c9a0bd7a995ddbfe906020015b60405180910390a3505050565b600061119b3361069b565b90508015611201576111ac336116e8565b6000478211156111bd5750476111c0565b50805b6111ca3382610f71565b60405181815233907f106f923f993c2149d49b4255ff723acafa1f2d94393f561d3eda32ae348f72419060200160405180910390a2505b50565b6000828152600760209081526040918290208251606081018452815480825260018301549382019390935260029091015460ff1615159281019290925260045461125a916001600160a01b03909116908461172d565b6005546020820151611276916001600160a01b0316908461172d565b604051828152339084907f6dbe2a8dfa7889919cb4e4b31f0ed2e699b5c0b451c1305a616be14105fc6f6e90602001611183565b80600160008282546112bc9190611f70565b90915550506001600160a01b038216600090815260036020526040812080548392906112e9908490611f70565b90915550610c3f9050826116e8565b8151835114801561130a575080518251145b6113465760405162461bcd60e51b815260206004820152600d60248201526c4172726179206c656e6774687360981b6044820152606401610674565b60005b835181101561144357604051806060016040528085838151811061137d57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020018483815181106113aa57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020018383815181106113d757634e487b7160e01b600052603260045260246000fd5b60209081029190910181015115159091526006805460009081526007835260409081902084518155928401516001808501919091559301516002909201805460ff1916921515929092179091555461142e91611f70565b6006558061143b81611fde565b915050611349565b50505050565b6001600160a01b0382166000908152600360205260409020548111156114aa5760405162461bcd60e51b8152602060048201526016602482015275125b9d985b1a59081858d8dbdd5b9d08185b5bdd5b9d60521b6044820152606401610674565b6001548111156114f45760405162461bcd60e51b8152602060048201526015602482015274125b9d985b1a590819db1bd8985b08185b5bdd5b9d605a1b6044820152606401610674565b80600160008282546115069190611fc7565b90915550506001600160a01b038216600090815260036020526040812080548392906112e9908490611fc7565b80518251146115745760405162461bcd60e51b815260206004820152600d60248201526c4172726179206c656e6774687360981b6044820152606401610674565b60005b8251811015610a12578181815181106115a057634e487b7160e01b600052603260045260246000fd5b6020026020010151600760008584815181106115cc57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060020160006101000a81548160ff021916908315150217905550808061160790611fde565b915050611577565b600154158061161c575080155b1561162657611201565b6000600154826116369190611f88565b9050806002600082825461164a9190611f70565b90915550505050565b600081116116735760405162461bcd60e51b815260040161067490611e87565b61167f3384848461178b565b604051637921219560e11b81526001600160a01b0384169063f242432a906116b1903090339087908790600401611db0565b600060405180830381600087803b1580156116cb57600080fd5b505af11580156116df573d6000803e3d6000fd5b50505050505050565b6002546001600160a01b03821660009081526003602052604090205461170e9190611fa8565b6001600160a01b03909116600090815260036020526040902060010155565b6000811161174d5760405162461bcd60e51b815260040161067490611e87565b61175933848484611797565b604051637921219560e11b81526001600160a01b0384169063f242432a906116b1903390309087908790600401611db0565b611443848484846117a3565b61144384848484611884565b6001600160a01b038085166000908152602081815260408083209387168352928152828220858352905220548111156118155760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606401610674565b6001600160a01b03808516600090815260208181526040808320938716835292815282822085835290529081205461184e908390611fc7565b6001600160a01b039586166000908152602081815260408083209790981682529586528681209481529390945250509190912055565b6001600160a01b03808516600090815260208181526040808320938716835292815282822085835290529081205461184e908390611f70565b80356001600160a01b038116811461064557600080fd5b600082601f8301126118e4578081fd5b813560206118f96118f483611f4c565b611f1b565b80838252828201915082860187848660051b8901011115611918578586fd5b855b8581101561193d5761192b826119a7565b8452928401929084019060010161191a565b5090979650505050505050565b600082601f83011261195a578081fd5b8135602061196a6118f483611f4c565b80838252828201915082860187848660051b8901011115611989578586fd5b855b8581101561193d5781358452928401929084019060010161198b565b8035801515811461064557600080fd5b600082601f8301126119c7578081fd5b813567ffffffffffffffff8111156119e1576119e161200f565b6119f4601f8201601f1916602001611f1b565b818152846020838601011115611a08578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215611a33578081fd5b611a3c826118bd565b9392505050565b600080600080600060a08688031215611a5a578081fd5b611a63866118bd565b9450611a71602087016118bd565b9350604086013567ffffffffffffffff80821115611a8d578283fd5b611a9989838a0161194a565b94506060880135915080821115611aae578283fd5b611aba89838a0161194a565b93506080880135915080821115611acf578283fd5b50611adc888289016119b7565b9150509295509295909350565b600080600060608486031215611afd578283fd5b611b06846118bd565b9250611b14602085016118bd565b9150604084013590509250925092565b600080600080600060a08688031215611b3b578081fd5b611b44866118bd565b9450611b52602087016118bd565b93506040860135925060608601359150608086013567ffffffffffffffff811115611b7b578182fd5b611adc888289016119b7565b600080600060608486031215611b9b578283fd5b611ba4846118bd565b925060208085013567ffffffffffffffff80821115611bc1578485fd5b818701915087601f830112611bd4578485fd5b8135611be26118f482611f4c565b8082825285820191508585018b878560051b8801011115611c01578889fd5b8895505b83861015611c2a57611c16816118bd565b835260019590950194918601918601611c05565b50965050506040870135925080831115611c42578384fd5b5050611c508682870161194a565b9150509250925092565b60008060408385031215611c6c578182fd5b823567ffffffffffffffff80821115611c83578384fd5b611c8f8683870161194a565b93506020850135915080821115611ca4578283fd5b50611cb1858286016118d4565b9150509250929050565b600080600060608486031215611ccf578283fd5b833567ffffffffffffffff80821115611ce6578485fd5b611cf28783880161194a565b94506020860135915080821115611d07578384fd5b611d138783880161194a565b93506040860135915080821115611d28578283fd5b50611c50868287016118d4565b600060208284031215611d46578081fd5b611a3c826119a7565b600060208284031215611d60578081fd5b81356001600160e01b031981168114611a3c578182fd5b600060208284031215611d88578081fd5b5035919050565b60008060408385031215611da1578182fd5b50508035926020909101359150565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b602080825282518282018190526000919060409081850190868401855b82811015611e3657815180518552868101518786015285015115158585015260609093019290850190600101611e05565b5091979650505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611e7b57835183529284019291840191600101611e5f565b50909695505050505050565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b604051601f8201601f1916810167ffffffffffffffff81118282101715611f4457611f4461200f565b604052919050565b600067ffffffffffffffff821115611f6657611f6661200f565b5060051b60200190565b60008219821115611f8357611f83611ff9565b500190565b600082611fa357634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611fc257611fc2611ff9565b500290565b600082821015611fd957611fd9611ff9565b500390565b6000600019821415611ff257611ff2611ff9565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212205a0cbabb2e449012aae2c0fc8b8de656d4ec63341bb79b5cc018500fa30c2d5364736f6c634300080300330000000000000000000000008754f54074400ce745a7ceddc928fb1b7e985ed6000000000000000000000000a98771a46dcb34b34cdad5355718f8a97c8e603e

Deployed Bytecode

0x6080604052600436106101cd5760003560e01c80638da5cb5b116100f7578063bc197c8111610095578063e93119d911610064578063e93119d914610583578063f23a6e61146105a3578063f2fde38b146105cf578063f800ece9146105ef576101cd565b8063bc197c81146104f5578063caa6fea41461053a578063e1c68d961461055b578063e59a58ee1461057b576101cd565b80639e2c8a5b116100d15780639e2c8a5b1461044e578063a48b0b691461046e578063b88a802f14610484578063b91ac78814610499576101cd565b80638da5cb5b146103ee5780638fb8bd851461040c57806395d002e614610421576101cd565b806333fc56d91161016f578063715018a61161013e578063715018a6146103795780637b0472f01461038e5780637b805890146103ae57806382522fa4146103ce576101cd565b806333fc56d91461030e5780633a98ef391461032357806342b58a82146103395780635f64b55b14610359576101cd565b80630973da45116101ab5780630973da451461024d5780630fc63d10146102835780631932d9b7146102bb5780632ecc83cc146102db576101cd565b806301ffc9a7146101d25780630501d556146102075780630905e57914610229575b600080fd5b3480156101de57600080fd5b506101f26101ed366004611d4f565b610611565b60405190151581526020015b60405180910390f35b34801561021357600080fd5b50610227610222366004611d35565b61064a565b005b34801561023557600080fd5b5061023f600a5481565b6040519081526020016101fe565b34801561025957600080fd5b5061023f610268366004611a22565b6001600160a01b031660009081526003602052604090205490565b34801561028f57600080fd5b506004546102a3906001600160a01b031681565b6040516001600160a01b0390911681526020016101fe565b3480156102c757600080fd5b5061023f6102d6366004611a22565b61069b565b3480156102e757600080fd5b506101f26102f6366004611d77565b60009081526007602052604090206002015460ff1690565b34801561031a57600080fd5b506102276106d2565b34801561032f57600080fd5b5061023f60015481565b34801561034557600080fd5b50610227610354366004611d8f565b610748565b34801561036557600080fd5b506005546102a3906001600160a01b031681565b34801561038557600080fd5b5061022761082e565b34801561039a57600080fd5b506102276103a9366004611d8f565b6108a2565b3480156103ba57600080fd5b506102276103c9366004611cbb565b6109dd565b3480156103da57600080fd5b506102276103e9366004611d77565b610a17565b3480156103fa57600080fd5b506009546001600160a01b03166102a3565b34801561041857600080fd5b5060015461023f565b34801561042d57600080fd5b5061044161043c366004611b87565b610a46565b6040516101fe9190611e43565b34801561045a57600080fd5b50610227610469366004611d8f565b610b87565b34801561047a57600080fd5b5061023f60065481565b34801561049057600080fd5b50610227610bd4565b3480156104a557600080fd5b506104d86104b4366004611d77565b60076020526000908152604090208054600182015460029092015490919060ff1683565b6040805193845260208401929092521515908201526060016101fe565b34801561050157600080fd5b50610521610510366004611a43565b63bc197c8160e01b95945050505050565b6040516001600160e01b031990911681526020016101fe565b34801561054657600080fd5b506009546101f290600160a01b900460ff1681565b34801561056757600080fd5b50610227610576366004611c5a565b610c0b565b610227610c43565b34801561058f57600080fd5b5061023f61059e366004611ae9565b610cfe565b3480156105af57600080fd5b506105216105be366004611b24565b63f23a6e6160e01b95945050505050565b3480156105db57600080fd5b506102276105ea366004611a22565b610d76565b3480156105fb57600080fd5b50610604610e61565b6040516101fe9190611de8565b60006001600160e01b03198216630271189760e51b148061064257506301ffc9a760e01b6001600160e01b03198316145b90505b919050565b6009546001600160a01b0316331461067d5760405162461bcd60e51b815260040161067490611eaf565b60405180910390fd5b60098054911515600160a01b0260ff60a01b19909216919091179055565b6001600160a01b03811660009081526003602052604081206001810154600254915490916106c891611fa8565b6106429190611fc7565b6009546001600160a01b031633146106fc5760405162461bcd60e51b815260040161067490611eaf565b600154156107365760405162461bcd60e51b81526020600482015260076024820152665374616b65727360c81b6044820152606401610674565b4715610746576107463347610f71565b565b6002600854141561076b5760405162461bcd60e51b815260040161067490611ee4565b6002600855600954600160a01b900460ff166107b75760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b6044820152606401610674565b600081116107d75760405162461bcd60e51b815260040161067490611e87565b6107e03361108a565b6107ea82826110e1565b604080518381526020810183905233917f140b7e335137737e0762ce820c8352db1561ac11793d81433a11a600876d0526910160405180910390a250506001600855565b6009546001600160a01b031633146108585760405162461bcd60e51b815260040161067490611eaf565b6009546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600980546001600160a01b0319169055565b600082815260076020526040902060020154829060ff166108f35760405162461bcd60e51b815260206004820152600b60248201526a139bdd08195b98589b195960aa1b6044820152606401610674565b600260085414156109165760405162461bcd60e51b815260040161067490611ee4565b6002600855600a5460015461092c908490611f70565b111561096f5760405162461bcd60e51b815260206004820152601260248201527113585e0814185a5c9cc8115e18d95959195960721b6044820152606401610674565b600954600160a01b900460ff16156109b75760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b6044820152606401610674565b6109bf611190565b6109c98383611204565b6109d333836112aa565b5050600160085550565b6009546001600160a01b03163314610a075760405162461bcd60e51b815260040161067490611eaf565b610a128383836112f8565b505050565b6009546001600160a01b03163314610a415760405162461bcd60e51b815260040161067490611eaf565b600a55565b60608151835114610a8b5760405162461bcd60e51b815260206004820152600f60248201526e098cadccee8d040dad2e6dac2e8c6d608b1b6044820152606401610674565b815167ffffffffffffffff811115610ab357634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610adc578160200160208202803683370190505b50905060005b8251811015610b7f57610b4485858381518110610b0f57634e487b7160e01b600052603260045260246000fd5b6020026020010151858481518110610b3757634e487b7160e01b600052603260045260246000fd5b6020026020010151610cfe565b828281518110610b6457634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610b7881611fde565b9050610ae2565b509392505050565b60026008541415610baa5760405162461bcd60e51b815260040161067490611ee4565b6002600855610bb7611190565b610bc182826110e1565b610bcb3382611449565b50506001600855565b60026008541415610bf75760405162461bcd60e51b815260040161067490611ee4565b6002600855610c04611190565b6001600855565b6009546001600160a01b03163314610c355760405162461bcd60e51b815260040161067490611eaf565b610c3f8282611533565b5050565b60003411610c815760405162461bcd60e51b815260206004820152600b60248201526a139bc8115512081cd95b9d60aa1b6044820152606401610674565b600060015411610cc05760405162461bcd60e51b815260206004820152600a6024820152694e6f207374616b65727360b01b6044820152606401610674565b610cc93461160f565b6040513481527fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d9060200160405180910390a1565b60006001600160a01b038416610d455760405162461bcd60e51b815260206004820152600c60248201526b5a65726f206164647265737360a01b6044820152606401610674565b506001600160a01b039283166000908152602081815260408083209490951682529283528381209181529152205490565b6009546001600160a01b03163314610da05760405162461bcd60e51b815260040161067490611eaf565b6001600160a01b038116610e055760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610674565b6009546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600980546001600160a01b0319166001600160a01b0392909216919091179055565b606060065467ffffffffffffffff811115610e8c57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610ee357816020015b610ed0604051806060016040528060008152602001600081526020016000151581525090565b815260200190600190039081610eaa5790505b50905060005b600654811015610f6d576000818152600760209081526040918290208251606081018452815481526001820154928101929092526002015460ff161515918101919091528251839083908110610f4f57634e487b7160e01b600052603260045260246000fd5b60200260200101819052508080610f6590611fde565b915050610ee9565b5090565b80471015610fc15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610674565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461100e576040519150601f19603f3d011682016040523d82523d6000602084013e611013565b606091505b5050905080610a125760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610674565b6001600160a01b0381166000908152600360205260409020548015610c3f5780600160008282546110bb9190611fc7565b9091555050506001600160a01b0316600090815260036020526040812081815560010155565b6000828152600760209081526040918290208251606081018452815480825260018301549382019390935260029091015460ff16151592810192909252600454611137916001600160a01b039091169084611653565b6005546020820151611153916001600160a01b03169084611653565b604051828152339084907f3829c65d457d6b8b247bc1a26330de5c957ab91868c063d0c9a0bd7a995ddbfe906020015b60405180910390a3505050565b600061119b3361069b565b90508015611201576111ac336116e8565b6000478211156111bd5750476111c0565b50805b6111ca3382610f71565b60405181815233907f106f923f993c2149d49b4255ff723acafa1f2d94393f561d3eda32ae348f72419060200160405180910390a2505b50565b6000828152600760209081526040918290208251606081018452815480825260018301549382019390935260029091015460ff1615159281019290925260045461125a916001600160a01b03909116908461172d565b6005546020820151611276916001600160a01b0316908461172d565b604051828152339084907f6dbe2a8dfa7889919cb4e4b31f0ed2e699b5c0b451c1305a616be14105fc6f6e90602001611183565b80600160008282546112bc9190611f70565b90915550506001600160a01b038216600090815260036020526040812080548392906112e9908490611f70565b90915550610c3f9050826116e8565b8151835114801561130a575080518251145b6113465760405162461bcd60e51b815260206004820152600d60248201526c4172726179206c656e6774687360981b6044820152606401610674565b60005b835181101561144357604051806060016040528085838151811061137d57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020018483815181106113aa57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020018383815181106113d757634e487b7160e01b600052603260045260246000fd5b60209081029190910181015115159091526006805460009081526007835260409081902084518155928401516001808501919091559301516002909201805460ff1916921515929092179091555461142e91611f70565b6006558061143b81611fde565b915050611349565b50505050565b6001600160a01b0382166000908152600360205260409020548111156114aa5760405162461bcd60e51b8152602060048201526016602482015275125b9d985b1a59081858d8dbdd5b9d08185b5bdd5b9d60521b6044820152606401610674565b6001548111156114f45760405162461bcd60e51b8152602060048201526015602482015274125b9d985b1a590819db1bd8985b08185b5bdd5b9d605a1b6044820152606401610674565b80600160008282546115069190611fc7565b90915550506001600160a01b038216600090815260036020526040812080548392906112e9908490611fc7565b80518251146115745760405162461bcd60e51b815260206004820152600d60248201526c4172726179206c656e6774687360981b6044820152606401610674565b60005b8251811015610a12578181815181106115a057634e487b7160e01b600052603260045260246000fd5b6020026020010151600760008584815181106115cc57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060020160006101000a81548160ff021916908315150217905550808061160790611fde565b915050611577565b600154158061161c575080155b1561162657611201565b6000600154826116369190611f88565b9050806002600082825461164a9190611f70565b90915550505050565b600081116116735760405162461bcd60e51b815260040161067490611e87565b61167f3384848461178b565b604051637921219560e11b81526001600160a01b0384169063f242432a906116b1903090339087908790600401611db0565b600060405180830381600087803b1580156116cb57600080fd5b505af11580156116df573d6000803e3d6000fd5b50505050505050565b6002546001600160a01b03821660009081526003602052604090205461170e9190611fa8565b6001600160a01b03909116600090815260036020526040902060010155565b6000811161174d5760405162461bcd60e51b815260040161067490611e87565b61175933848484611797565b604051637921219560e11b81526001600160a01b0384169063f242432a906116b1903390309087908790600401611db0565b611443848484846117a3565b61144384848484611884565b6001600160a01b038085166000908152602081815260408083209387168352928152828220858352905220548111156118155760405162461bcd60e51b8152602060048201526014602482015273496e73756666696369656e742062616c616e636560601b6044820152606401610674565b6001600160a01b03808516600090815260208181526040808320938716835292815282822085835290529081205461184e908390611fc7565b6001600160a01b039586166000908152602081815260408083209790981682529586528681209481529390945250509190912055565b6001600160a01b03808516600090815260208181526040808320938716835292815282822085835290529081205461184e908390611f70565b80356001600160a01b038116811461064557600080fd5b600082601f8301126118e4578081fd5b813560206118f96118f483611f4c565b611f1b565b80838252828201915082860187848660051b8901011115611918578586fd5b855b8581101561193d5761192b826119a7565b8452928401929084019060010161191a565b5090979650505050505050565b600082601f83011261195a578081fd5b8135602061196a6118f483611f4c565b80838252828201915082860187848660051b8901011115611989578586fd5b855b8581101561193d5781358452928401929084019060010161198b565b8035801515811461064557600080fd5b600082601f8301126119c7578081fd5b813567ffffffffffffffff8111156119e1576119e161200f565b6119f4601f8201601f1916602001611f1b565b818152846020838601011115611a08578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215611a33578081fd5b611a3c826118bd565b9392505050565b600080600080600060a08688031215611a5a578081fd5b611a63866118bd565b9450611a71602087016118bd565b9350604086013567ffffffffffffffff80821115611a8d578283fd5b611a9989838a0161194a565b94506060880135915080821115611aae578283fd5b611aba89838a0161194a565b93506080880135915080821115611acf578283fd5b50611adc888289016119b7565b9150509295509295909350565b600080600060608486031215611afd578283fd5b611b06846118bd565b9250611b14602085016118bd565b9150604084013590509250925092565b600080600080600060a08688031215611b3b578081fd5b611b44866118bd565b9450611b52602087016118bd565b93506040860135925060608601359150608086013567ffffffffffffffff811115611b7b578182fd5b611adc888289016119b7565b600080600060608486031215611b9b578283fd5b611ba4846118bd565b925060208085013567ffffffffffffffff80821115611bc1578485fd5b818701915087601f830112611bd4578485fd5b8135611be26118f482611f4c565b8082825285820191508585018b878560051b8801011115611c01578889fd5b8895505b83861015611c2a57611c16816118bd565b835260019590950194918601918601611c05565b50965050506040870135925080831115611c42578384fd5b5050611c508682870161194a565b9150509250925092565b60008060408385031215611c6c578182fd5b823567ffffffffffffffff80821115611c83578384fd5b611c8f8683870161194a565b93506020850135915080821115611ca4578283fd5b50611cb1858286016118d4565b9150509250929050565b600080600060608486031215611ccf578283fd5b833567ffffffffffffffff80821115611ce6578485fd5b611cf28783880161194a565b94506020860135915080821115611d07578384fd5b611d138783880161194a565b93506040860135915080821115611d28578283fd5b50611c50868287016118d4565b600060208284031215611d46578081fd5b611a3c826119a7565b600060208284031215611d60578081fd5b81356001600160e01b031981168114611a3c578182fd5b600060208284031215611d88578081fd5b5035919050565b60008060408385031215611da1578182fd5b50508035926020909101359150565b6001600160a01b0394851681529290931660208301526040820152606081019190915260a06080820181905260009082015260c00190565b602080825282518282018190526000919060409081850190868401855b82811015611e3657815180518552868101518786015285015115158585015260609093019290850190600101611e05565b5091979650505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611e7b57835183529284019291840191600101611e5f565b50909695505050505050565b6020808252600e908201526d125b9d985b1a5908185b5bdd5b9d60921b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b604051601f8201601f1916810167ffffffffffffffff81118282101715611f4457611f4461200f565b604052919050565b600067ffffffffffffffff821115611f6657611f6661200f565b5060051b60200190565b60008219821115611f8357611f83611ff9565b500190565b600082611fa357634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611fc257611fc2611ff9565b500290565b600082821015611fd957611fd9611ff9565b500390565b6000600019821415611ff257611ff2611ff9565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212205a0cbabb2e449012aae2c0fc8b8de656d4ec63341bb79b5cc018500fa30c2d5364736f6c63430008030033

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

0000000000000000000000008754f54074400ce745a7ceddc928fb1b7e985ed6000000000000000000000000a98771a46dcb34b34cdad5355718f8a97c8e603e

-----Decoded View---------------
Arg [0] : tokenAddressA (address): 0x8754F54074400CE745a7CEddC928FB1b7E985eD6
Arg [1] : tokenAddressB (address): 0xa98771a46Dcb34B34cDAD5355718F8a97C8E603e

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000008754f54074400ce745a7ceddc928fb1b7e985ed6
Arg [1] : 000000000000000000000000a98771a46dcb34b34cdad5355718f8a97c8e603e


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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