{
  "address": "0x4D414c8007A57a7dA8cbfe41Cd4093b95FdF5274",
  "abi": [
    {
      "inputs": [
        {
          "internalType": "string",
          "name": "_name",
          "type": "string"
        },
        {
          "internalType": "contract DataPointsMulti",
          "name": "_dataPointsMulti",
          "type": "address"
        }
      ],
      "stateMutability": "nonpayable",
      "type": "constructor"
    },
    {
      "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": "tokenId",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "reward",
          "type": "uint256"
        }
      ],
      "name": "RewardsClaimed",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "depositor",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "newTotalRewardsPool",
          "type": "uint256"
        }
      ],
      "name": "RewardsDeposited",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "user",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "tokenId",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "startTime",
          "type": "uint256"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "duration",
          "type": "uint256"
        }
      ],
      "name": "Staked",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "owner",
          "type": "address"
        },
        {
          "indexed": false,
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        }
      ],
      "name": "UnclaimedRewardsWithdrawn",
      "type": "event"
    },
    {
      "inputs": [],
      "name": "claimAllRewards",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "dataPointsMulti",
      "outputs": [
        {
          "internalType": "contract DataPointsMulti",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "duration",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getContractData",
      "outputs": [
        {
          "internalType": "string",
          "name": "contractName",
          "type": "string"
        },
        {
          "internalType": "uint256",
          "name": "totalRewards",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "rewardsFullTimestamp",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "reservedRewards",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "remainingRewards",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "stakingDuration",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "stakingStartTime",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "feePercentage",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "feeRecipient",
          "type": "address"
        },
        {
          "internalType": "bool",
          "name": "isStakingPoolFilledOrExpiredBool",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        }
      ],
      "name": "getEligibleStakingAmounts",
      "outputs": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "tokenId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "amount",
              "type": "uint256"
            }
          ],
          "internalType": "struct DataStakingDynamicNative.EligibleStakeAmount[]",
          "name": "eligibleStakes",
          "type": "tuple[]"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getMinRewardPerToken",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getNumberOfStakers",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getRemainingRewards",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getStakingTokenIds",
      "outputs": [
        {
          "internalType": "uint256[]",
          "name": "",
          "type": "uint256[]"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        }
      ],
      "name": "getUserData",
      "outputs": [
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "tokenId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "amount",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "rewardPerToken",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "timestamp",
              "type": "uint256"
            }
          ],
          "internalType": "struct DataStakingDynamicNative.StakingTransaction[]",
          "name": "stakingTransactions",
          "type": "tuple[]"
        },
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "totalRewardsClaimed",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "timestamp",
              "type": "uint256"
            }
          ],
          "internalType": "struct DataStakingDynamicNative.ClaimTransaction",
          "name": "claimTransaction",
          "type": "tuple"
        },
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "amountStaked",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "rewardPerToken",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "maxStakeLimit",
              "type": "uint256"
            }
          ],
          "internalType": "struct DataStakingDynamicNative.StakeInfo[]",
          "name": "stakeInfosArray",
          "type": "tuple[]"
        },
        {
          "internalType": "uint256[]",
          "name": "stakedAmounts",
          "type": "uint256[]"
        },
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "tokenId",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "amount",
              "type": "uint256"
            }
          ],
          "internalType": "struct DataStakingDynamicNative.EligibleStakeAmount[]",
          "name": "eligibleStakes",
          "type": "tuple[]"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        }
      ],
      "name": "getUserStakingTransactionsCount",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "user",
          "type": "address"
        }
      ],
      "name": "hasUserClaimed",
      "outputs": [
        {
          "internalType": "bool",
          "name": "hasClaimed",
          "type": "bool"
        },
        {
          "components": [
            {
              "internalType": "uint256",
              "name": "totalRewardsClaimed",
              "type": "uint256"
            },
            {
              "internalType": "uint256",
              "name": "timestamp",
              "type": "uint256"
            }
          ],
          "internalType": "struct DataStakingDynamicNative.ClaimTransaction",
          "name": "lastClaimTransaction",
          "type": "tuple"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "isStakingPoolFilledOrExpired",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "name",
      "outputs": [
        {
          "internalType": "string",
          "name": "",
          "type": "string"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "rewardsPoolFullTimestamp",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "royaltyFeePercentage",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "royaltyRecipient",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "_royaltyFeePercentage",
          "type": "uint256"
        },
        {
          "internalType": "address",
          "name": "_royaltyRecipient",
          "type": "address"
        }
      ],
      "name": "setRoyaltyFeePercentageAndRecipient",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "tokenId",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "rewardPerToken",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "maxStakeLimit",
          "type": "uint256"
        }
      ],
      "name": "setStakingParameters",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "_duration",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "_startTime",
          "type": "uint256"
        }
      ],
      "name": "setStakingTimeframe",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "stakeAll",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "name": "stakeInfos",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "amountStaked",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "rewardPerToken",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "maxStakeLimit",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "stakingPeriodInitialized",
      "outputs": [
        {
          "internalType": "bool",
          "name": "",
          "type": "bool"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "name": "stakingTokenIds",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "startTime",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "totalReservedRewards",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "totalRewardsPool",
      "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": "address",
          "name": "",
          "type": "address"
        }
      ],
      "name": "userClaimTransactions",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "totalRewardsClaimed",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "timestamp",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "name": "userStakes",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        },
        {
          "internalType": "uint256",
          "name": "",
          "type": "uint256"
        }
      ],
      "name": "userStakingTransactions",
      "outputs": [
        {
          "internalType": "uint256",
          "name": "tokenId",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "amount",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "rewardPerToken",
          "type": "uint256"
        },
        {
          "internalType": "uint256",
          "name": "timestamp",
          "type": "uint256"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "withdrawUnclaimedRewards",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "stateMutability": "payable",
      "type": "receive"
    }
  ],
  "transactionHash": "0x36240529a0048cc8b2fb8a0868f2e6310c52da48cbe856665565e55109cf1b29",
  "receipt": {
    "to": null,
    "from": "0x84a74cC52048dd8421Df4a9EB139D91bb7744b4E",
    "contractAddress": "0x4D414c8007A57a7dA8cbfe41Cd4093b95FdF5274",
    "transactionIndex": 0,
    "gasUsed": "2617542",
    "logsBloom": "0x00000000000000000000000000000000000000000000100040800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000800000000000000000000000000000000400000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000100000000000000000001000000000000000000000000000000000000000000000000000000000000001000000000020000000000000000000000000000000000000000000000000000000000000000000",
    "blockHash": "0xb8625ae16ead5c199fa83016326d493c031f9270cee6e7a9208f68d8035e94d6",
    "transactionHash": "0x36240529a0048cc8b2fb8a0868f2e6310c52da48cbe856665565e55109cf1b29",
    "logs": [
      {
        "transactionIndex": 0,
        "blockNumber": 30878,
        "transactionHash": "0x36240529a0048cc8b2fb8a0868f2e6310c52da48cbe856665565e55109cf1b29",
        "address": "0x4D414c8007A57a7dA8cbfe41Cd4093b95FdF5274",
        "topics": [
          "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0",
          "0x0000000000000000000000000000000000000000000000000000000000000000",
          "0x00000000000000000000000084a74cc52048dd8421df4a9eb139d91bb7744b4e"
        ],
        "data": "0x",
        "logIndex": 0,
        "blockHash": "0xb8625ae16ead5c199fa83016326d493c031f9270cee6e7a9208f68d8035e94d6"
      }
    ],
    "blockNumber": 30878,
    "cumulativeGasUsed": "2617542",
    "status": 1,
    "byzantium": true
  },
  "args": [
    "Masa AI Pool",
    "0xe4CEba54Fc6442DD16b27ea55498cdDc9e3C2c55"
  ],
  "numDeployments": 1,
  "solcInputHash": "3e956c308bcbfe4c2f3d376546d0e4f2",
  "metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"contract DataPointsMulti\",\"name\":\"_dataPointsMulti\",\"type\":\"address\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"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\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"reward\",\"type\":\"uint256\"}],\"name\":\"RewardsClaimed\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"depositor\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"newTotalRewardsPool\",\"type\":\"uint256\"}],\"name\":\"RewardsDeposited\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"startTime\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"duration\",\"type\":\"uint256\"}],\"name\":\"Staked\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"UnclaimedRewardsWithdrawn\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"claimAllRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dataPointsMulti\",\"outputs\":[{\"internalType\":\"contract DataPointsMulti\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"duration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getContractData\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"contractName\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"totalRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardsFullTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"reservedRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"remainingRewards\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakingDuration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"stakingStartTime\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"feePercentage\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"feeRecipient\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isStakingPoolFilledOrExpiredBool\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getEligibleStakingAmounts\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct DataStakingDynamicNative.EligibleStakeAmount[]\",\"name\":\"eligibleStakes\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getMinRewardPerToken\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNumberOfStakers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getRemainingRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStakingTokenIds\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getUserData\",\"outputs\":[{\"components\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardPerToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"internalType\":\"struct DataStakingDynamicNative.StakingTransaction[]\",\"name\":\"stakingTransactions\",\"type\":\"tuple[]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"totalRewardsClaimed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"internalType\":\"struct DataStakingDynamicNative.ClaimTransaction\",\"name\":\"claimTransaction\",\"type\":\"tuple\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"amountStaked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardPerToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxStakeLimit\",\"type\":\"uint256\"}],\"internalType\":\"struct DataStakingDynamicNative.StakeInfo[]\",\"name\":\"stakeInfosArray\",\"type\":\"tuple[]\"},{\"internalType\":\"uint256[]\",\"name\":\"stakedAmounts\",\"type\":\"uint256[]\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"internalType\":\"struct DataStakingDynamicNative.EligibleStakeAmount[]\",\"name\":\"eligibleStakes\",\"type\":\"tuple[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"getUserStakingTransactionsCount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"user\",\"type\":\"address\"}],\"name\":\"hasUserClaimed\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"hasClaimed\",\"type\":\"bool\"},{\"components\":[{\"internalType\":\"uint256\",\"name\":\"totalRewardsClaimed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"internalType\":\"struct DataStakingDynamicNative.ClaimTransaction\",\"name\":\"lastClaimTransaction\",\"type\":\"tuple\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"isStakingPoolFilledOrExpired\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardsPoolFullTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"royaltyFeePercentage\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"royaltyRecipient\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_royaltyFeePercentage\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_royaltyRecipient\",\"type\":\"address\"}],\"name\":\"setRoyaltyFeePercentageAndRecipient\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardPerToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxStakeLimit\",\"type\":\"uint256\"}],\"name\":\"setStakingParameters\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_duration\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_startTime\",\"type\":\"uint256\"}],\"name\":\"setStakingTimeframe\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakeAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"stakeInfos\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amountStaked\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardPerToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"maxStakeLimit\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"stakingPeriodInitialized\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"stakingTokenIds\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"startTime\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalReservedRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalRewardsPool\",\"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\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"userClaimTransactions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"totalRewardsClaimed\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"userStakes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"userStakingTransactions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"rewardPerToken\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"timestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdrawUnclaimedRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"details\":\"This contract enables users to stake their non-transferable tokens, represented by DataPointsMulti.sol, and earn rewards based on the staked amount for a specific duration. Each token ID is associated with a unique reward rate, and rewards are distributed in the form of the native currency (e.g., ETH) after the staking period ends. Inherits from DataPointsMulti for token balance interactions. Rewards are managed directly with the native currency of the blockchain, allowing users to claim their earnings in ETH or the native currency of the network where the contract is deployed.\",\"kind\":\"dev\",\"methods\":{\"claimAllRewards()\":{\"details\":\"Allows users to claim rewards for all their staked tokens after their respective staking periods end.\"},\"constructor\":{\"details\":\"Constructor to initialize the DataStaking contract.\",\"params\":{\"_dataPointsMulti\":\"Address of the DataPointsMulti contract.\",\"_name\":\"Name of the Data Staking Pool.\"}},\"getEligibleStakingAmounts(address)\":{\"details\":\"Calculates the maximum amount a user can stake for each tokenId based on the current staking parameters. It takes into account the user's balance, the maxStakeLimit for each tokenId, and the remaining rewards in the pool. The function ensures that the user does not exceed the maximum staking capacity for any tokenId and that the total potential rewards do not surpass the available rewards in the pool. The function returns an array of structs, each containing a tokenId and the corresponding amount that the user is eligible to stake.\",\"params\":{\"user\":\"The address of the user for whom to calculate the available staking amounts.\"},\"returns\":{\"eligibleStakes\":\"An array of structs, each containing a tokenId and the corresponding eligible staking amount.\"}},\"getRemainingRewards()\":{\"details\":\"Returns the remaining amount of ETH in the contract.\",\"returns\":{\"_0\":\"The amount of ETH left for rewards.\"}},\"getUserStakingTransactionsCount(address)\":{\"details\":\"Checks if the staking pool is full based on the total reserved rewards or if the staking period has expired. The staking pool is considered full if the total reserved rewards equal the total rewards pool initially set. The staking period is considered expired if the current block timestamp is greater than or equal to the sum of the `startTime` and `duration`.\",\"returns\":{\"_0\":\"True if the staking pool is full based on the total reserved rewards or the staking period has expired, false otherwise.\"}},\"hasUserClaimed(address)\":{\"details\":\"Checks if the user has claimed rewards and returns the details of the last claim transaction.\",\"params\":{\"user\":\"The address of the user to check.\"},\"returns\":{\"hasClaimed\":\"A boolean indicating whether the user has claimed rewards.\",\"lastClaimTransaction\":\"The details of the last claim transaction if one exists.\"}},\"isStakingPoolFilledOrExpired()\":{\"details\":\"Checks if the staking pool is full based on the total reserved rewards or if the staking period has expired. The staking pool is considered full if the total reserved rewards equal the total rewards pool initially set. The staking period is considered expired if the current block timestamp is greater than or equal to the sum of the `startTime` and `duration`.\",\"returns\":{\"_0\":\"True if the staking pool is full based on the total reserved rewards or the staking period has expired, false otherwise.\"}},\"owner()\":{\"details\":\"Returns the address of the current owner.\"},\"renounceOwnership()\":{\"details\":\"Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner.\"},\"setRoyaltyFeePercentageAndRecipient(uint256,address)\":{\"details\":\"Sets the royalty fee and royalty recipient. Can only be called by the contract owner.\",\"params\":{\"_royaltyFeePercentage\":\"The new royalty fee percentage.\",\"_royaltyRecipient\":\"The new royalty recipient address.\"}},\"setStakingParameters(uint256,uint256,uint256)\":{\"details\":\"Sets the reward per token, duration, and max stake limit for a specific token ID.\",\"params\":{\"maxStakeLimit\":\"The maximum amount of tokens that can be staked for the token ID.\",\"rewardPerToken\":\"The reward per token to set for the token ID.\",\"tokenId\":\"The token ID for which to set the staking parameters.\"}},\"setStakingTimeframe(uint256,uint256)\":{\"details\":\"Sets the staking duration and start time for the contract.\",\"params\":{\"_duration\":\"The duration of the staking period in seconds.\",\"_startTime\":\"The start time for staking to begin.\"}},\"stakeAll()\":{\"details\":\"Allows users to stake all their tokens for which staking parameters have been set. This function iterates over the array of token IDs that have staking parameters defined. For each token ID, it checks the user's balance and stakes up to the maximum stake limit, or the user's balance, whichever is lower. It calculates the potential reward and ensures that staking does not exceed the total available reward pool. The function updates the user's staked amount and the total staked amount for each token ID. It emits a Staked event for each staking action performed.\"},\"transferOwnership(address)\":{\"details\":\"Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner.\"},\"withdrawUnclaimedRewards()\":{\"details\":\"Allows the contract owner to withdraw unclaimed rewards after the staking period has ended. This function is designed to recover funds that were not distributed because users did not claim their rewards. It can only be called by the owner of the contract and only after the staking period has concluded, as determined by the `startTime` and `duration` parameters. The amount withdrawn is the difference between the total rewards pool and the total reserved rewards, which represents the unclaimed rewards. It is crucial to ensure that all users have had a sufficient opportunity to claim their rewards before this function is called to maintain trust and integrity in the staking process.\"}},\"title\":\"DataStakingDynamicNative\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{\"withdrawUnclaimedRewards()\":{\"notice\":\"This function will revert if the staking period has not ended or if there are no unclaimed rewards.\"}},\"notice\":\"Ensure that the DataPointsMulti contract is deployed and its address is known before deploying this contract. The contract should be funded with enough native currency to cover the reward payouts.\",\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/DataStakingDynamicNative.sol\":\"DataStakingDynamicNative\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"details\":{\"constantOptimizer\":true,\"cse\":true,\"deduplicate\":true,\"inliner\":true,\"jumpdestRemover\":true,\"orderLiterals\":true,\"peephole\":true,\"simpleCounterForLoopUncheckedIncrement\":true,\"yul\":false},\"runs\":1},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/access/AccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/AccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IAccessControl.sol\\\";\\nimport \\\"../utils/Context.sol\\\";\\nimport \\\"../utils/Strings.sol\\\";\\nimport \\\"../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Contract module that allows children to implement role-based access\\n * control mechanisms. This is a lightweight version that doesn't allow enumerating role\\n * members except through off-chain means by accessing the contract event logs. Some\\n * applications may benefit from on-chain enumerability, for those cases see\\n * {AccessControlEnumerable}.\\n *\\n * Roles are referred to by their `bytes32` identifier. These should be exposed\\n * in the external API and be unique. The best way to achieve this is by\\n * using `public constant` hash digests:\\n *\\n * ```solidity\\n * bytes32 public constant MY_ROLE = keccak256(\\\"MY_ROLE\\\");\\n * ```\\n *\\n * Roles can be used to represent a set of permissions. To restrict access to a\\n * function call, use {hasRole}:\\n *\\n * ```solidity\\n * function foo() public {\\n *     require(hasRole(MY_ROLE, msg.sender));\\n *     ...\\n * }\\n * ```\\n *\\n * Roles can be granted and revoked dynamically via the {grantRole} and\\n * {revokeRole} functions. Each role has an associated admin role, and only\\n * accounts that have a role's admin role can call {grantRole} and {revokeRole}.\\n *\\n * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means\\n * that only accounts with this role will be able to grant or revoke other\\n * roles. More complex role relationships can be created by using\\n * {_setRoleAdmin}.\\n *\\n * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to\\n * grant and revoke this role. Extra precautions should be taken to secure\\n * accounts that have been granted it. We recommend using {AccessControlDefaultAdminRules}\\n * to enforce additional security measures for this role.\\n */\\nabstract contract AccessControl is Context, IAccessControl, ERC165 {\\n    struct RoleData {\\n        mapping(address => bool) members;\\n        bytes32 adminRole;\\n    }\\n\\n    mapping(bytes32 => RoleData) private _roles;\\n\\n    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;\\n\\n    /**\\n     * @dev Modifier that checks that an account has a specific role. Reverts\\n     * with a standardized message including the required role.\\n     *\\n     * The format of the revert reason is given by the following regular expression:\\n     *\\n     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n     *\\n     * _Available since v4.1._\\n     */\\n    modifier onlyRole(bytes32 role) {\\n        _checkRole(role);\\n        _;\\n    }\\n\\n    /**\\n     * @dev See {IERC165-supportsInterface}.\\n     */\\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);\\n    }\\n\\n    /**\\n     * @dev Returns `true` if `account` has been granted `role`.\\n     */\\n    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {\\n        return _roles[role].members[account];\\n    }\\n\\n    /**\\n     * @dev Revert with a standard message if `_msgSender()` is missing `role`.\\n     * Overriding this function changes the behavior of the {onlyRole} modifier.\\n     *\\n     * Format of the revert message is described in {_checkRole}.\\n     *\\n     * _Available since v4.6._\\n     */\\n    function _checkRole(bytes32 role) internal view virtual {\\n        _checkRole(role, _msgSender());\\n    }\\n\\n    /**\\n     * @dev Revert with a standard message if `account` is missing `role`.\\n     *\\n     * The format of the revert reason is given by the following regular expression:\\n     *\\n     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/\\n     */\\n    function _checkRole(bytes32 role, address account) internal view virtual {\\n        if (!hasRole(role, account)) {\\n            revert(\\n                string(\\n                    abi.encodePacked(\\n                        \\\"AccessControl: account \\\",\\n                        Strings.toHexString(account),\\n                        \\\" is missing role \\\",\\n                        Strings.toHexString(uint256(role), 32)\\n                    )\\n                )\\n            );\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\\n     * {revokeRole}.\\n     *\\n     * To change a role's admin, use {_setRoleAdmin}.\\n     */\\n    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {\\n        return _roles[role].adminRole;\\n    }\\n\\n    /**\\n     * @dev Grants `role` to `account`.\\n     *\\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\\n     * event.\\n     *\\n     * Requirements:\\n     *\\n     * - the caller must have ``role``'s admin role.\\n     *\\n     * May emit a {RoleGranted} event.\\n     */\\n    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n        _grantRole(role, account);\\n    }\\n\\n    /**\\n     * @dev Revokes `role` from `account`.\\n     *\\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n     *\\n     * Requirements:\\n     *\\n     * - the caller must have ``role``'s admin role.\\n     *\\n     * May emit a {RoleRevoked} event.\\n     */\\n    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {\\n        _revokeRole(role, account);\\n    }\\n\\n    /**\\n     * @dev Revokes `role` from the calling account.\\n     *\\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n     * purpose is to provide a mechanism for accounts to lose their privileges\\n     * if they are compromised (such as when a trusted device is misplaced).\\n     *\\n     * If the calling account had been revoked `role`, emits a {RoleRevoked}\\n     * event.\\n     *\\n     * Requirements:\\n     *\\n     * - the caller must be `account`.\\n     *\\n     * May emit a {RoleRevoked} event.\\n     */\\n    function renounceRole(bytes32 role, address account) public virtual override {\\n        require(account == _msgSender(), \\\"AccessControl: can only renounce roles for self\\\");\\n\\n        _revokeRole(role, account);\\n    }\\n\\n    /**\\n     * @dev Grants `role` to `account`.\\n     *\\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\\n     * event. Note that unlike {grantRole}, this function doesn't perform any\\n     * checks on the calling account.\\n     *\\n     * May emit a {RoleGranted} event.\\n     *\\n     * [WARNING]\\n     * ====\\n     * This function should only be called from the constructor when setting\\n     * up the initial roles for the system.\\n     *\\n     * Using this function in any other way is effectively circumventing the admin\\n     * system imposed by {AccessControl}.\\n     * ====\\n     *\\n     * NOTE: This function is deprecated in favor of {_grantRole}.\\n     */\\n    function _setupRole(bytes32 role, address account) internal virtual {\\n        _grantRole(role, account);\\n    }\\n\\n    /**\\n     * @dev Sets `adminRole` as ``role``'s admin role.\\n     *\\n     * Emits a {RoleAdminChanged} event.\\n     */\\n    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {\\n        bytes32 previousAdminRole = getRoleAdmin(role);\\n        _roles[role].adminRole = adminRole;\\n        emit RoleAdminChanged(role, previousAdminRole, adminRole);\\n    }\\n\\n    /**\\n     * @dev Grants `role` to `account`.\\n     *\\n     * Internal function without access restriction.\\n     *\\n     * May emit a {RoleGranted} event.\\n     */\\n    function _grantRole(bytes32 role, address account) internal virtual {\\n        if (!hasRole(role, account)) {\\n            _roles[role].members[account] = true;\\n            emit RoleGranted(role, account, _msgSender());\\n        }\\n    }\\n\\n    /**\\n     * @dev Revokes `role` from `account`.\\n     *\\n     * Internal function without access restriction.\\n     *\\n     * May emit a {RoleRevoked} event.\\n     */\\n    function _revokeRole(bytes32 role, address account) internal virtual {\\n        if (hasRole(role, account)) {\\n            _roles[role].members[account] = false;\\n            emit RoleRevoked(role, account, _msgSender());\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x0dd6e52cb394d7f5abe5dca2d4908a6be40417914720932de757de34a99ab87f\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/IAccessControl.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev External interface of AccessControl declared to support ERC165 detection.\\n */\\ninterface IAccessControl {\\n    /**\\n     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`\\n     *\\n     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite\\n     * {RoleAdminChanged} not being emitted signaling this.\\n     *\\n     * _Available since v3.1._\\n     */\\n    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);\\n\\n    /**\\n     * @dev Emitted when `account` is granted `role`.\\n     *\\n     * `sender` is the account that originated the contract call, an admin role\\n     * bearer except when using {AccessControl-_setupRole}.\\n     */\\n    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n    /**\\n     * @dev Emitted when `account` is revoked `role`.\\n     *\\n     * `sender` is the account that originated the contract call:\\n     *   - if using `revokeRole`, it is the admin role bearer\\n     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)\\n     */\\n    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);\\n\\n    /**\\n     * @dev Returns `true` if `account` has been granted `role`.\\n     */\\n    function hasRole(bytes32 role, address account) external view returns (bool);\\n\\n    /**\\n     * @dev Returns the admin role that controls `role`. See {grantRole} and\\n     * {revokeRole}.\\n     *\\n     * To change a role's admin, use {AccessControl-_setRoleAdmin}.\\n     */\\n    function getRoleAdmin(bytes32 role) external view returns (bytes32);\\n\\n    /**\\n     * @dev Grants `role` to `account`.\\n     *\\n     * If `account` had not been already granted `role`, emits a {RoleGranted}\\n     * event.\\n     *\\n     * Requirements:\\n     *\\n     * - the caller must have ``role``'s admin role.\\n     */\\n    function grantRole(bytes32 role, address account) external;\\n\\n    /**\\n     * @dev Revokes `role` from `account`.\\n     *\\n     * If `account` had been granted `role`, emits a {RoleRevoked} event.\\n     *\\n     * Requirements:\\n     *\\n     * - the caller must have ``role``'s admin role.\\n     */\\n    function revokeRole(bytes32 role, address account) external;\\n\\n    /**\\n     * @dev Revokes `role` from the calling account.\\n     *\\n     * Roles are often managed via {grantRole} and {revokeRole}: this function's\\n     * purpose is to provide a mechanism for accounts to lose their privileges\\n     * if they are compromised (such as when a trusted device is misplaced).\\n     *\\n     * If the calling account had been granted `role`, emits a {RoleRevoked}\\n     * event.\\n     *\\n     * Requirements:\\n     *\\n     * - the caller must be `account`.\\n     */\\n    function renounceRole(bytes32 role, address account) external;\\n}\\n\",\"keccak256\":\"0x59ce320a585d7e1f163cd70390a0ef2ff9cec832e2aa544293a00692465a7a57\",\"license\":\"MIT\"},\"@openzeppelin/contracts/access/Ownable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../utils/Context.sol\\\";\\n\\n/**\\n * @dev Contract module which provides a basic access control mechanism, where\\n * there is an account (an owner) that can be granted exclusive access to\\n * specific functions.\\n *\\n * By default, the owner account will be the one that deploys the contract. This\\n * can later be changed with {transferOwnership}.\\n *\\n * This module is used through inheritance. It will make available the modifier\\n * `onlyOwner`, which can be applied to your functions to restrict their use to\\n * the owner.\\n */\\nabstract contract Ownable is Context {\\n    address private _owner;\\n\\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\\n\\n    /**\\n     * @dev Initializes the contract setting the deployer as the initial owner.\\n     */\\n    constructor() {\\n        _transferOwnership(_msgSender());\\n    }\\n\\n    /**\\n     * @dev Throws if called by any account other than the owner.\\n     */\\n    modifier onlyOwner() {\\n        _checkOwner();\\n        _;\\n    }\\n\\n    /**\\n     * @dev Returns the address of the current owner.\\n     */\\n    function owner() public view virtual returns (address) {\\n        return _owner;\\n    }\\n\\n    /**\\n     * @dev Throws if the sender is not the owner.\\n     */\\n    function _checkOwner() internal view virtual {\\n        require(owner() == _msgSender(), \\\"Ownable: caller is not the owner\\\");\\n    }\\n\\n    /**\\n     * @dev Leaves the contract without owner. It will not be possible to call\\n     * `onlyOwner` functions. Can only be called by the current owner.\\n     *\\n     * NOTE: Renouncing ownership will leave the contract without an owner,\\n     * thereby disabling any functionality that is only available to the owner.\\n     */\\n    function renounceOwnership() public virtual onlyOwner {\\n        _transferOwnership(address(0));\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n     * Can only be called by the current owner.\\n     */\\n    function transferOwnership(address newOwner) public virtual onlyOwner {\\n        require(newOwner != address(0), \\\"Ownable: new owner is the zero address\\\");\\n        _transferOwnership(newOwner);\\n    }\\n\\n    /**\\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\\n     * Internal function without access restriction.\\n     */\\n    function _transferOwnership(address newOwner) internal virtual {\\n        address oldOwner = _owner;\\n        _owner = newOwner;\\n        emit OwnershipTransferred(oldOwner, newOwner);\\n    }\\n}\\n\",\"keccak256\":\"0xba43b97fba0d32eb4254f6a5a297b39a19a247082a02d6e69349e071e2946218\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/ERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC1155.sol\\\";\\nimport \\\"./IERC1155Receiver.sol\\\";\\nimport \\\"./extensions/IERC1155MetadataURI.sol\\\";\\nimport \\\"../../utils/Address.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\nimport \\\"../../utils/introspection/ERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the basic standard multi-token.\\n * See https://eips.ethereum.org/EIPS/eip-1155\\n * Originally based on code by Enjin: https://github.com/enjin/erc-1155\\n *\\n * _Available since v3.1._\\n */\\ncontract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {\\n    using Address for address;\\n\\n    // Mapping from token ID to account balances\\n    mapping(uint256 => mapping(address => uint256)) private _balances;\\n\\n    // Mapping from account to operator approvals\\n    mapping(address => mapping(address => bool)) private _operatorApprovals;\\n\\n    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json\\n    string private _uri;\\n\\n    /**\\n     * @dev See {_setURI}.\\n     */\\n    constructor(string memory uri_) {\\n        _setURI(uri_);\\n    }\\n\\n    /**\\n     * @dev See {IERC165-supportsInterface}.\\n     */\\n    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {\\n        return\\n            interfaceId == type(IERC1155).interfaceId ||\\n            interfaceId == type(IERC1155MetadataURI).interfaceId ||\\n            super.supportsInterface(interfaceId);\\n    }\\n\\n    /**\\n     * @dev See {IERC1155MetadataURI-uri}.\\n     *\\n     * This implementation returns the same URI for *all* token types. It relies\\n     * on the token type ID substitution mechanism\\n     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n     *\\n     * Clients calling this function must replace the `\\\\{id\\\\}` substring with the\\n     * actual token type ID.\\n     */\\n    function uri(uint256) public view virtual override returns (string memory) {\\n        return _uri;\\n    }\\n\\n    /**\\n     * @dev See {IERC1155-balanceOf}.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     */\\n    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {\\n        require(account != address(0), \\\"ERC1155: address zero is not a valid owner\\\");\\n        return _balances[id][account];\\n    }\\n\\n    /**\\n     * @dev See {IERC1155-balanceOfBatch}.\\n     *\\n     * Requirements:\\n     *\\n     * - `accounts` and `ids` must have the same length.\\n     */\\n    function balanceOfBatch(\\n        address[] memory accounts,\\n        uint256[] memory ids\\n    ) public view virtual override returns (uint256[] memory) {\\n        require(accounts.length == ids.length, \\\"ERC1155: accounts and ids length mismatch\\\");\\n\\n        uint256[] memory batchBalances = new uint256[](accounts.length);\\n\\n        for (uint256 i = 0; i < accounts.length; ++i) {\\n            batchBalances[i] = balanceOf(accounts[i], ids[i]);\\n        }\\n\\n        return batchBalances;\\n    }\\n\\n    /**\\n     * @dev See {IERC1155-setApprovalForAll}.\\n     */\\n    function setApprovalForAll(address operator, bool approved) public virtual override {\\n        _setApprovalForAll(_msgSender(), operator, approved);\\n    }\\n\\n    /**\\n     * @dev See {IERC1155-isApprovedForAll}.\\n     */\\n    function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {\\n        return _operatorApprovals[account][operator];\\n    }\\n\\n    /**\\n     * @dev See {IERC1155-safeTransferFrom}.\\n     */\\n    function safeTransferFrom(\\n        address from,\\n        address to,\\n        uint256 id,\\n        uint256 amount,\\n        bytes memory data\\n    ) public virtual override {\\n        require(\\n            from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n            \\\"ERC1155: caller is not token owner or approved\\\"\\n        );\\n        _safeTransferFrom(from, to, id, amount, data);\\n    }\\n\\n    /**\\n     * @dev See {IERC1155-safeBatchTransferFrom}.\\n     */\\n    function safeBatchTransferFrom(\\n        address from,\\n        address to,\\n        uint256[] memory ids,\\n        uint256[] memory amounts,\\n        bytes memory data\\n    ) public virtual override {\\n        require(\\n            from == _msgSender() || isApprovedForAll(from, _msgSender()),\\n            \\\"ERC1155: caller is not token owner or approved\\\"\\n        );\\n        _safeBatchTransferFrom(from, to, ids, amounts, data);\\n    }\\n\\n    /**\\n     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n     *\\n     * Emits a {TransferSingle} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `to` cannot be the zero address.\\n     * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n     * acceptance magic value.\\n     */\\n    function _safeTransferFrom(\\n        address from,\\n        address to,\\n        uint256 id,\\n        uint256 amount,\\n        bytes memory data\\n    ) internal virtual {\\n        require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n        address operator = _msgSender();\\n        uint256[] memory ids = _asSingletonArray(id);\\n        uint256[] memory amounts = _asSingletonArray(amount);\\n\\n        _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n        uint256 fromBalance = _balances[id][from];\\n        require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n        unchecked {\\n            _balances[id][from] = fromBalance - amount;\\n        }\\n        _balances[id][to] += amount;\\n\\n        emit TransferSingle(operator, from, to, id, amount);\\n\\n        _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);\\n    }\\n\\n    /**\\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.\\n     *\\n     * Emits a {TransferBatch} event.\\n     *\\n     * Requirements:\\n     *\\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n     * acceptance magic value.\\n     */\\n    function _safeBatchTransferFrom(\\n        address from,\\n        address to,\\n        uint256[] memory ids,\\n        uint256[] memory amounts,\\n        bytes memory data\\n    ) internal virtual {\\n        require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n        require(to != address(0), \\\"ERC1155: transfer to the zero address\\\");\\n\\n        address operator = _msgSender();\\n\\n        _beforeTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n        for (uint256 i = 0; i < ids.length; ++i) {\\n            uint256 id = ids[i];\\n            uint256 amount = amounts[i];\\n\\n            uint256 fromBalance = _balances[id][from];\\n            require(fromBalance >= amount, \\\"ERC1155: insufficient balance for transfer\\\");\\n            unchecked {\\n                _balances[id][from] = fromBalance - amount;\\n            }\\n            _balances[id][to] += amount;\\n        }\\n\\n        emit TransferBatch(operator, from, to, ids, amounts);\\n\\n        _afterTokenTransfer(operator, from, to, ids, amounts, data);\\n\\n        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);\\n    }\\n\\n    /**\\n     * @dev Sets a new URI for all token types, by relying on the token type ID\\n     * substitution mechanism\\n     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].\\n     *\\n     * By this mechanism, any occurrence of the `\\\\{id\\\\}` substring in either the\\n     * URI or any of the amounts in the JSON file at said URI will be replaced by\\n     * clients with the token type ID.\\n     *\\n     * For example, the `https://token-cdn-domain/\\\\{id\\\\}.json` URI would be\\n     * interpreted by clients as\\n     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`\\n     * for token type ID 0x4cce0.\\n     *\\n     * See {uri}.\\n     *\\n     * Because these URIs cannot be meaningfully represented by the {URI} event,\\n     * this function emits no events.\\n     */\\n    function _setURI(string memory newuri) internal virtual {\\n        _uri = newuri;\\n    }\\n\\n    /**\\n     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.\\n     *\\n     * Emits a {TransferSingle} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `to` cannot be the zero address.\\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n     * acceptance magic value.\\n     */\\n    function _mint(address to, uint256 id, uint256 amount, bytes memory data) internal virtual {\\n        require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n\\n        address operator = _msgSender();\\n        uint256[] memory ids = _asSingletonArray(id);\\n        uint256[] memory amounts = _asSingletonArray(amount);\\n\\n        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n        _balances[id][to] += amount;\\n        emit TransferSingle(operator, address(0), to, id, amount);\\n\\n        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);\\n    }\\n\\n    /**\\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.\\n     *\\n     * Emits a {TransferBatch} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `ids` and `amounts` must have the same length.\\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n     * acceptance magic value.\\n     */\\n    function _mintBatch(\\n        address to,\\n        uint256[] memory ids,\\n        uint256[] memory amounts,\\n        bytes memory data\\n    ) internal virtual {\\n        require(to != address(0), \\\"ERC1155: mint to the zero address\\\");\\n        require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n        address operator = _msgSender();\\n\\n        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n        for (uint256 i = 0; i < ids.length; i++) {\\n            _balances[ids[i]][to] += amounts[i];\\n        }\\n\\n        emit TransferBatch(operator, address(0), to, ids, amounts);\\n\\n        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);\\n\\n        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);\\n    }\\n\\n    /**\\n     * @dev Destroys `amount` tokens of token type `id` from `from`\\n     *\\n     * Emits a {TransferSingle} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `from` cannot be the zero address.\\n     * - `from` must have at least `amount` tokens of token type `id`.\\n     */\\n    function _burn(address from, uint256 id, uint256 amount) internal virtual {\\n        require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n\\n        address operator = _msgSender();\\n        uint256[] memory ids = _asSingletonArray(id);\\n        uint256[] memory amounts = _asSingletonArray(amount);\\n\\n        _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n        uint256 fromBalance = _balances[id][from];\\n        require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n        unchecked {\\n            _balances[id][from] = fromBalance - amount;\\n        }\\n\\n        emit TransferSingle(operator, from, address(0), id, amount);\\n\\n        _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n    }\\n\\n    /**\\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.\\n     *\\n     * Emits a {TransferBatch} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `ids` and `amounts` must have the same length.\\n     */\\n    function _burnBatch(address from, uint256[] memory ids, uint256[] memory amounts) internal virtual {\\n        require(from != address(0), \\\"ERC1155: burn from the zero address\\\");\\n        require(ids.length == amounts.length, \\\"ERC1155: ids and amounts length mismatch\\\");\\n\\n        address operator = _msgSender();\\n\\n        _beforeTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n\\n        for (uint256 i = 0; i < ids.length; i++) {\\n            uint256 id = ids[i];\\n            uint256 amount = amounts[i];\\n\\n            uint256 fromBalance = _balances[id][from];\\n            require(fromBalance >= amount, \\\"ERC1155: burn amount exceeds balance\\\");\\n            unchecked {\\n                _balances[id][from] = fromBalance - amount;\\n            }\\n        }\\n\\n        emit TransferBatch(operator, from, address(0), ids, amounts);\\n\\n        _afterTokenTransfer(operator, from, address(0), ids, amounts, \\\"\\\");\\n    }\\n\\n    /**\\n     * @dev Approve `operator` to operate on all of `owner` tokens\\n     *\\n     * Emits an {ApprovalForAll} event.\\n     */\\n    function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {\\n        require(owner != operator, \\\"ERC1155: setting approval status for self\\\");\\n        _operatorApprovals[owner][operator] = approved;\\n        emit ApprovalForAll(owner, operator, approved);\\n    }\\n\\n    /**\\n     * @dev Hook that is called before any token transfer. This includes minting\\n     * and burning, as well as batched variants.\\n     *\\n     * The same hook is called on both single and batched variants. For single\\n     * transfers, the length of the `ids` and `amounts` arrays will be 1.\\n     *\\n     * Calling conditions (for each `id` and `amount` pair):\\n     *\\n     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * of token type `id` will be  transferred to `to`.\\n     * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n     * for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n     * will be burned.\\n     * - `from` and `to` are never both zero.\\n     * - `ids` and `amounts` have the same, non-zero length.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _beforeTokenTransfer(\\n        address operator,\\n        address from,\\n        address to,\\n        uint256[] memory ids,\\n        uint256[] memory amounts,\\n        bytes memory data\\n    ) internal virtual {}\\n\\n    /**\\n     * @dev Hook that is called after any token transfer. This includes minting\\n     * and burning, as well as batched variants.\\n     *\\n     * The same hook is called on both single and batched variants. For single\\n     * transfers, the length of the `id` and `amount` arrays will be 1.\\n     *\\n     * Calling conditions (for each `id` and `amount` pair):\\n     *\\n     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n     * of token type `id` will be  transferred to `to`.\\n     * - When `from` is zero, `amount` tokens of token type `id` will be minted\\n     * for `to`.\\n     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`\\n     * will be burned.\\n     * - `from` and `to` are never both zero.\\n     * - `ids` and `amounts` have the same, non-zero length.\\n     *\\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n     */\\n    function _afterTokenTransfer(\\n        address operator,\\n        address from,\\n        address to,\\n        uint256[] memory ids,\\n        uint256[] memory amounts,\\n        bytes memory data\\n    ) internal virtual {}\\n\\n    function _doSafeTransferAcceptanceCheck(\\n        address operator,\\n        address from,\\n        address to,\\n        uint256 id,\\n        uint256 amount,\\n        bytes memory data\\n    ) private {\\n        if (to.isContract()) {\\n            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {\\n                if (response != IERC1155Receiver.onERC1155Received.selector) {\\n                    revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n                }\\n            } catch Error(string memory reason) {\\n                revert(reason);\\n            } catch {\\n                revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n            }\\n        }\\n    }\\n\\n    function _doSafeBatchTransferAcceptanceCheck(\\n        address operator,\\n        address from,\\n        address to,\\n        uint256[] memory ids,\\n        uint256[] memory amounts,\\n        bytes memory data\\n    ) private {\\n        if (to.isContract()) {\\n            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (\\n                bytes4 response\\n            ) {\\n                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {\\n                    revert(\\\"ERC1155: ERC1155Receiver rejected tokens\\\");\\n                }\\n            } catch Error(string memory reason) {\\n                revert(reason);\\n            } catch {\\n                revert(\\\"ERC1155: transfer to non-ERC1155Receiver implementer\\\");\\n            }\\n        }\\n    }\\n\\n    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {\\n        uint256[] memory array = new uint256[](1);\\n        array[0] = element;\\n\\n        return array;\\n    }\\n}\\n\",\"keccak256\":\"0x81149353c99ccf8ff18af7701bc3f38665c7a97e344cdc0d27f927f03d22af0e\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC1155/IERC1155.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev Required interface of an ERC1155 compliant contract, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-1155[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155 is IERC165 {\\n    /**\\n     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.\\n     */\\n    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);\\n\\n    /**\\n     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all\\n     * transfers.\\n     */\\n    event TransferBatch(\\n        address indexed operator,\\n        address indexed from,\\n        address indexed to,\\n        uint256[] ids,\\n        uint256[] values\\n    );\\n\\n    /**\\n     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to\\n     * `approved`.\\n     */\\n    event ApprovalForAll(address indexed account, address indexed operator, bool approved);\\n\\n    /**\\n     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.\\n     *\\n     * If an {URI} event was emitted for `id`, the standard\\n     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value\\n     * returned by {IERC1155MetadataURI-uri}.\\n     */\\n    event URI(string value, uint256 indexed id);\\n\\n    /**\\n     * @dev Returns the amount of tokens of token type `id` owned by `account`.\\n     *\\n     * Requirements:\\n     *\\n     * - `account` cannot be the zero address.\\n     */\\n    function balanceOf(address account, uint256 id) external view returns (uint256);\\n\\n    /**\\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.\\n     *\\n     * Requirements:\\n     *\\n     * - `accounts` and `ids` must have the same length.\\n     */\\n    function balanceOfBatch(\\n        address[] calldata accounts,\\n        uint256[] calldata ids\\n    ) external view returns (uint256[] memory);\\n\\n    /**\\n     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,\\n     *\\n     * Emits an {ApprovalForAll} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `operator` cannot be the caller.\\n     */\\n    function setApprovalForAll(address operator, bool approved) external;\\n\\n    /**\\n     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.\\n     *\\n     * See {setApprovalForAll}.\\n     */\\n    function isApprovedForAll(address account, address operator) external view returns (bool);\\n\\n    /**\\n     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.\\n     *\\n     * Emits a {TransferSingle} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `to` cannot be the zero address.\\n     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.\\n     * - `from` must have a balance of tokens of type `id` of at least `amount`.\\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the\\n     * acceptance magic value.\\n     */\\n    function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external;\\n\\n    /**\\n     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.\\n     *\\n     * Emits a {TransferBatch} event.\\n     *\\n     * Requirements:\\n     *\\n     * - `ids` and `amounts` must have the same length.\\n     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the\\n     * acceptance magic value.\\n     */\\n    function safeBatchTransferFrom(\\n        address from,\\n        address to,\\n        uint256[] calldata ids,\\n        uint256[] calldata amounts,\\n        bytes calldata data\\n    ) external;\\n}\\n\",\"keccak256\":\"0xcab667ddad478ff0d39c2053ca77fac778af8483c18ab07d810277b4216fd582\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../../utils/introspection/IERC165.sol\\\";\\n\\n/**\\n * @dev _Available since v3.1._\\n */\\ninterface IERC1155Receiver is IERC165 {\\n    /**\\n     * @dev Handles the receipt of a single ERC1155 token type. This function is\\n     * called at the end of a `safeTransferFrom` after the balance has been updated.\\n     *\\n     * NOTE: To accept the transfer, this must return\\n     * `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))`\\n     * (i.e. 0xf23a6e61, or its own function selector).\\n     *\\n     * @param operator The address which initiated the transfer (i.e. msg.sender)\\n     * @param from The address which previously owned the token\\n     * @param id The ID of the token being transferred\\n     * @param value The amount of tokens being transferred\\n     * @param data Additional data with no specified format\\n     * @return `bytes4(keccak256(\\\"onERC1155Received(address,address,uint256,uint256,bytes)\\\"))` if transfer is allowed\\n     */\\n    function onERC1155Received(\\n        address operator,\\n        address from,\\n        uint256 id,\\n        uint256 value,\\n        bytes calldata data\\n    ) external returns (bytes4);\\n\\n    /**\\n     * @dev Handles the receipt of a multiple ERC1155 token types. This function\\n     * is called at the end of a `safeBatchTransferFrom` after the balances have\\n     * been updated.\\n     *\\n     * NOTE: To accept the transfer(s), this must return\\n     * `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))`\\n     * (i.e. 0xbc197c81, or its own function selector).\\n     *\\n     * @param operator The address which initiated the batch transfer (i.e. msg.sender)\\n     * @param from The address which previously owned the token\\n     * @param ids An array containing ids of each token being transferred (order and length must match values array)\\n     * @param values An array containing amounts of each token being transferred (order and length must match ids array)\\n     * @param data Additional data with no specified format\\n     * @return `bytes4(keccak256(\\\"onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)\\\"))` if transfer is allowed\\n     */\\n    function onERC1155BatchReceived(\\n        address operator,\\n        address from,\\n        uint256[] calldata ids,\\n        uint256[] calldata values,\\n        bytes calldata data\\n    ) external returns (bytes4);\\n}\\n\",\"keccak256\":\"0xeb373f1fdc7b755c6a750123a9b9e3a8a02c1470042fd6505d875000a80bde0b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC1155.sol\\\";\\n\\n/**\\n * @dev Interface of the optional ERC1155MetadataExtension interface, as defined\\n * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].\\n *\\n * _Available since v3.1._\\n */\\ninterface IERC1155MetadataURI is IERC1155 {\\n    /**\\n     * @dev Returns the URI for token type `id`.\\n     *\\n     * If the `\\\\{id\\\\}` substring is present in the URI, it must be replaced by\\n     * clients with the actual token type ID.\\n     */\\n    function uri(uint256 id) external view returns (string memory);\\n}\\n\",\"keccak256\":\"0xa66d18b9a85458d28fc3304717964502ae36f7f8a2ff35bc83f6f85d74b03574\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n    /**\\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n     * another (`to`).\\n     *\\n     * Note that `value` may be zero.\\n     */\\n    event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n    /**\\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n     * a call to {approve}. `value` is the new allowance.\\n     */\\n    event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n    /**\\n     * @dev Returns the amount of tokens in existence.\\n     */\\n    function totalSupply() external view returns (uint256);\\n\\n    /**\\n     * @dev Returns the amount of tokens owned by `account`.\\n     */\\n    function balanceOf(address account) external view returns (uint256);\\n\\n    /**\\n     * @dev Moves `amount` tokens from the caller's account to `to`.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transfer(address to, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Returns the remaining number of tokens that `spender` will be\\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n     * zero by default.\\n     *\\n     * This value changes when {approve} or {transferFrom} are called.\\n     */\\n    function allowance(address owner, address spender) external view returns (uint256);\\n\\n    /**\\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n     * that someone may use both the old and the new allowance by unfortunate\\n     * transaction ordering. One possible solution to mitigate this race\\n     * condition is to first reduce the spender's allowance to 0 and set the\\n     * desired value afterwards:\\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n     *\\n     * Emits an {Approval} event.\\n     */\\n    function approve(address spender, uint256 amount) external returns (bool);\\n\\n    /**\\n     * @dev Moves `amount` tokens from `from` to `to` using the\\n     * allowance mechanism. `amount` is then deducted from the caller's\\n     * allowance.\\n     *\\n     * Returns a boolean value indicating whether the operation succeeded.\\n     *\\n     * Emits a {Transfer} event.\\n     */\\n    function transferFrom(address from, address to, uint256 amount) external returns (bool);\\n}\\n\",\"keccak256\":\"0x287b55befed2961a7eabd7d7b1b2839cbca8a5b80ef8dcbb25ed3d4c2002c305\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n    /**\\n     * @dev Returns true if `account` is a contract.\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * It is unsafe to assume that an address for which this function returns\\n     * false is an externally-owned account (EOA) and not a contract.\\n     *\\n     * Among others, `isContract` will return false for the following\\n     * types of addresses:\\n     *\\n     *  - an externally-owned account\\n     *  - a contract in construction\\n     *  - an address where a contract will be created\\n     *  - an address where a contract lived, but was destroyed\\n     *\\n     * Furthermore, `isContract` will also return true if the target contract within\\n     * the same transaction is already scheduled for destruction by `SELFDESTRUCT`,\\n     * which only has an effect at the end of a transaction.\\n     * ====\\n     *\\n     * [IMPORTANT]\\n     * ====\\n     * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n     *\\n     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n     * constructor.\\n     * ====\\n     */\\n    function isContract(address account) internal view returns (bool) {\\n        // This method relies on extcodesize/address.code.length, which returns 0\\n        // for contracts in construction, since the code is only stored at the end\\n        // of the constructor execution.\\n\\n        return account.code.length > 0;\\n    }\\n\\n    /**\\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n     * `recipient`, forwarding all available gas and reverting on errors.\\n     *\\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n     * imposed by `transfer`, making them unable to receive funds via\\n     * `transfer`. {sendValue} removes this limitation.\\n     *\\n     * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n     *\\n     * IMPORTANT: because control is transferred to `recipient`, care must be\\n     * taken to not create reentrancy vulnerabilities. Consider using\\n     * {ReentrancyGuard} or the\\n     * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n     */\\n    function sendValue(address payable recipient, uint256 amount) internal {\\n        require(address(this).balance >= amount, \\\"Address: insufficient balance\\\");\\n\\n        (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n        require(success, \\\"Address: unable to send value, recipient may have reverted\\\");\\n    }\\n\\n    /**\\n     * @dev Performs a Solidity function call using a low level `call`. A\\n     * plain `call` is an unsafe replacement for a function call: use this\\n     * function instead.\\n     *\\n     * If `target` reverts with a revert reason, it is bubbled up by this\\n     * function (like regular Solidity function calls).\\n     *\\n     * Returns the raw returned data. To convert to the expected return value,\\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n     *\\n     * Requirements:\\n     *\\n     * - `target` must be a contract.\\n     * - calling `target` with `data` must not revert.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, 0, \\\"Address: low-level call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n     * `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, 0, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but also transferring `value` wei to `target`.\\n     *\\n     * Requirements:\\n     *\\n     * - the calling contract must have an ETH balance of at least `value`.\\n     * - the called Solidity function must be `payable`.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\\n        return functionCallWithValue(target, data, value, \\\"Address: low-level call with value failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\\n     *\\n     * _Available since v3.1._\\n     */\\n    function functionCallWithValue(\\n        address target,\\n        bytes memory data,\\n        uint256 value,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        require(address(this).balance >= value, \\\"Address: insufficient balance for call\\\");\\n        (bool success, bytes memory returndata) = target.call{value: value}(data);\\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\\n        return functionStaticCall(target, data, \\\"Address: low-level static call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n     * but performing a static call.\\n     *\\n     * _Available since v3.3._\\n     */\\n    function functionStaticCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal view returns (bytes memory) {\\n        (bool success, bytes memory returndata) = target.staticcall(data);\\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n     * but performing a delegate call.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\\n        return functionDelegateCall(target, data, \\\"Address: low-level delegate call failed\\\");\\n    }\\n\\n    /**\\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n     * but performing a delegate call.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function functionDelegateCall(\\n        address target,\\n        bytes memory data,\\n        string memory errorMessage\\n    ) internal returns (bytes memory) {\\n        (bool success, bytes memory returndata) = target.delegatecall(data);\\n        return verifyCallResultFromTarget(target, success, returndata, errorMessage);\\n    }\\n\\n    /**\\n     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n     *\\n     * _Available since v4.8._\\n     */\\n    function verifyCallResultFromTarget(\\n        address target,\\n        bool success,\\n        bytes memory returndata,\\n        string memory errorMessage\\n    ) internal view returns (bytes memory) {\\n        if (success) {\\n            if (returndata.length == 0) {\\n                // only check isContract if the call was successful and the return data is empty\\n                // otherwise we already know that it was a contract\\n                require(isContract(target), \\\"Address: call to non-contract\\\");\\n            }\\n            return returndata;\\n        } else {\\n            _revert(returndata, errorMessage);\\n        }\\n    }\\n\\n    /**\\n     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n     * revert reason or using the provided one.\\n     *\\n     * _Available since v4.3._\\n     */\\n    function verifyCallResult(\\n        bool success,\\n        bytes memory returndata,\\n        string memory errorMessage\\n    ) internal pure returns (bytes memory) {\\n        if (success) {\\n            return returndata;\\n        } else {\\n            _revert(returndata, errorMessage);\\n        }\\n    }\\n\\n    function _revert(bytes memory returndata, string memory errorMessage) private pure {\\n        // Look for revert reason and bubble it up if present\\n        if (returndata.length > 0) {\\n            // The easiest way to bubble the revert reason is using memory via assembly\\n            /// @solidity memory-safe-assembly\\n            assembly {\\n                let returndata_size := mload(returndata)\\n                revert(add(32, returndata), returndata_size)\\n            }\\n        } else {\\n            revert(errorMessage);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x006dd67219697fe68d7fbfdea512e7c4cb64a43565ed86171d67e844982da6fa\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Context.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (utils/Context.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Provides information about the current execution context, including the\\n * sender of the transaction and its data. While these are generally available\\n * via msg.sender and msg.data, they should not be accessed in such a direct\\n * manner, since when dealing with meta-transactions the account sending and\\n * paying for execution may not be the actual sender (as far as an application\\n * is concerned).\\n *\\n * This contract is only required for intermediate, library-like contracts.\\n */\\nabstract contract Context {\\n    function _msgSender() internal view virtual returns (address) {\\n        return msg.sender;\\n    }\\n\\n    function _msgData() internal view virtual returns (bytes calldata) {\\n        return msg.data;\\n    }\\n\\n    function _contextSuffixLength() internal view virtual returns (uint256) {\\n        return 0;\\n    }\\n}\\n\",\"keccak256\":\"0xa92e4fa126feb6907daa0513ddd816b2eb91f30a808de54f63c17d0e162c3439\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/Strings.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/Strings.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./math/Math.sol\\\";\\nimport \\\"./math/SignedMath.sol\\\";\\n\\n/**\\n * @dev String operations.\\n */\\nlibrary Strings {\\n    bytes16 private constant _SYMBOLS = \\\"0123456789abcdef\\\";\\n    uint8 private constant _ADDRESS_LENGTH = 20;\\n\\n    /**\\n     * @dev Converts a `uint256` to its ASCII `string` decimal representation.\\n     */\\n    function toString(uint256 value) internal pure returns (string memory) {\\n        unchecked {\\n            uint256 length = Math.log10(value) + 1;\\n            string memory buffer = new string(length);\\n            uint256 ptr;\\n            /// @solidity memory-safe-assembly\\n            assembly {\\n                ptr := add(buffer, add(32, length))\\n            }\\n            while (true) {\\n                ptr--;\\n                /// @solidity memory-safe-assembly\\n                assembly {\\n                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))\\n                }\\n                value /= 10;\\n                if (value == 0) break;\\n            }\\n            return buffer;\\n        }\\n    }\\n\\n    /**\\n     * @dev Converts a `int256` to its ASCII `string` decimal representation.\\n     */\\n    function toString(int256 value) internal pure returns (string memory) {\\n        return string(abi.encodePacked(value < 0 ? \\\"-\\\" : \\\"\\\", toString(SignedMath.abs(value))));\\n    }\\n\\n    /**\\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.\\n     */\\n    function toHexString(uint256 value) internal pure returns (string memory) {\\n        unchecked {\\n            return toHexString(value, Math.log256(value) + 1);\\n        }\\n    }\\n\\n    /**\\n     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.\\n     */\\n    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {\\n        bytes memory buffer = new bytes(2 * length + 2);\\n        buffer[0] = \\\"0\\\";\\n        buffer[1] = \\\"x\\\";\\n        for (uint256 i = 2 * length + 1; i > 1; --i) {\\n            buffer[i] = _SYMBOLS[value & 0xf];\\n            value >>= 4;\\n        }\\n        require(value == 0, \\\"Strings: hex length insufficient\\\");\\n        return string(buffer);\\n    }\\n\\n    /**\\n     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.\\n     */\\n    function toHexString(address addr) internal pure returns (string memory) {\\n        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);\\n    }\\n\\n    /**\\n     * @dev Returns true if the two strings are equal.\\n     */\\n    function equal(string memory a, string memory b) internal pure returns (bool) {\\n        return keccak256(bytes(a)) == keccak256(bytes(b));\\n    }\\n}\\n\",\"keccak256\":\"0x3088eb2868e8d13d89d16670b5f8612c4ab9ff8956272837d8e90106c59c14a0\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/ERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC165.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC165} interface.\\n *\\n * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check\\n * for the additional interface id that will be supported. For example:\\n *\\n * ```solidity\\n * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);\\n * }\\n * ```\\n *\\n * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.\\n */\\nabstract contract ERC165 is IERC165 {\\n    /**\\n     * @dev See {IERC165-supportsInterface}.\\n     */\\n    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {\\n        return interfaceId == type(IERC165).interfaceId;\\n    }\\n}\\n\",\"keccak256\":\"0xd10975de010d89fd1c78dc5e8a9a7e7f496198085c151648f20cba166b32582b\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/introspection/IERC165.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC165 standard, as defined in the\\n * https://eips.ethereum.org/EIPS/eip-165[EIP].\\n *\\n * Implementers can declare support of contract interfaces, which can then be\\n * queried by others ({ERC165Checker}).\\n *\\n * For an implementation, see {ERC165}.\\n */\\ninterface IERC165 {\\n    /**\\n     * @dev Returns true if this contract implements the interface defined by\\n     * `interfaceId`. See the corresponding\\n     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]\\n     * to learn more about how these ids are created.\\n     *\\n     * This function call must use less than 30 000 gas.\\n     */\\n    function supportsInterface(bytes4 interfaceId) external view returns (bool);\\n}\\n\",\"keccak256\":\"0x447a5f3ddc18419d41ff92b3773fb86471b1db25773e07f877f548918a185bf1\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/Math.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/Math.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard math utilities missing in the Solidity language.\\n */\\nlibrary Math {\\n    enum Rounding {\\n        Down, // Toward negative infinity\\n        Up, // Toward infinity\\n        Zero // Toward zero\\n    }\\n\\n    /**\\n     * @dev Returns the largest of two numbers.\\n     */\\n    function max(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a > b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two numbers.\\n     */\\n    function min(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a < b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the average of two numbers. The result is rounded towards\\n     * zero.\\n     */\\n    function average(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // (a + b) / 2 can overflow.\\n        return (a & b) + (a ^ b) / 2;\\n    }\\n\\n    /**\\n     * @dev Returns the ceiling of the division of two numbers.\\n     *\\n     * This differs from standard division with `/` in that it rounds up instead\\n     * of rounding down.\\n     */\\n    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {\\n        // (a + b - 1) / b can overflow on addition, so we distribute.\\n        return a == 0 ? 0 : (a - 1) / b + 1;\\n    }\\n\\n    /**\\n     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0\\n     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)\\n     * with further edits by Uniswap Labs also under MIT license.\\n     */\\n    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {\\n        unchecked {\\n            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use\\n            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256\\n            // variables such that product = prod1 * 2^256 + prod0.\\n            uint256 prod0; // Least significant 256 bits of the product\\n            uint256 prod1; // Most significant 256 bits of the product\\n            assembly {\\n                let mm := mulmod(x, y, not(0))\\n                prod0 := mul(x, y)\\n                prod1 := sub(sub(mm, prod0), lt(mm, prod0))\\n            }\\n\\n            // Handle non-overflow cases, 256 by 256 division.\\n            if (prod1 == 0) {\\n                // Solidity will revert if denominator == 0, unlike the div opcode on its own.\\n                // The surrounding unchecked block does not change this fact.\\n                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.\\n                return prod0 / denominator;\\n            }\\n\\n            // Make sure the result is less than 2^256. Also prevents denominator == 0.\\n            require(denominator > prod1, \\\"Math: mulDiv overflow\\\");\\n\\n            ///////////////////////////////////////////////\\n            // 512 by 256 division.\\n            ///////////////////////////////////////////////\\n\\n            // Make division exact by subtracting the remainder from [prod1 prod0].\\n            uint256 remainder;\\n            assembly {\\n                // Compute remainder using mulmod.\\n                remainder := mulmod(x, y, denominator)\\n\\n                // Subtract 256 bit number from 512 bit number.\\n                prod1 := sub(prod1, gt(remainder, prod0))\\n                prod0 := sub(prod0, remainder)\\n            }\\n\\n            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.\\n            // See https://cs.stackexchange.com/q/138556/92363.\\n\\n            // Does not overflow because the denominator cannot be zero at this stage in the function.\\n            uint256 twos = denominator & (~denominator + 1);\\n            assembly {\\n                // Divide denominator by twos.\\n                denominator := div(denominator, twos)\\n\\n                // Divide [prod1 prod0] by twos.\\n                prod0 := div(prod0, twos)\\n\\n                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.\\n                twos := add(div(sub(0, twos), twos), 1)\\n            }\\n\\n            // Shift in bits from prod1 into prod0.\\n            prod0 |= prod1 * twos;\\n\\n            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such\\n            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for\\n            // four bits. That is, denominator * inv = 1 mod 2^4.\\n            uint256 inverse = (3 * denominator) ^ 2;\\n\\n            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works\\n            // in modular arithmetic, doubling the correct bits in each step.\\n            inverse *= 2 - denominator * inverse; // inverse mod 2^8\\n            inverse *= 2 - denominator * inverse; // inverse mod 2^16\\n            inverse *= 2 - denominator * inverse; // inverse mod 2^32\\n            inverse *= 2 - denominator * inverse; // inverse mod 2^64\\n            inverse *= 2 - denominator * inverse; // inverse mod 2^128\\n            inverse *= 2 - denominator * inverse; // inverse mod 2^256\\n\\n            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.\\n            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is\\n            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1\\n            // is no longer required.\\n            result = prod0 * inverse;\\n            return result;\\n        }\\n    }\\n\\n    /**\\n     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.\\n     */\\n    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {\\n        uint256 result = mulDiv(x, y, denominator);\\n        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {\\n            result += 1;\\n        }\\n        return result;\\n    }\\n\\n    /**\\n     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.\\n     *\\n     * Inspired by Henry S. Warren, Jr.'s \\\"Hacker's Delight\\\" (Chapter 11).\\n     */\\n    function sqrt(uint256 a) internal pure returns (uint256) {\\n        if (a == 0) {\\n            return 0;\\n        }\\n\\n        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.\\n        //\\n        // We know that the \\\"msb\\\" (most significant bit) of our target number `a` is a power of 2 such that we have\\n        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.\\n        //\\n        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`\\n        // \\u2192 `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`\\n        // \\u2192 `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`\\n        //\\n        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.\\n        uint256 result = 1 << (log2(a) >> 1);\\n\\n        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,\\n        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at\\n        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision\\n        // into the expected uint128 result.\\n        unchecked {\\n            result = (result + a / result) >> 1;\\n            result = (result + a / result) >> 1;\\n            result = (result + a / result) >> 1;\\n            result = (result + a / result) >> 1;\\n            result = (result + a / result) >> 1;\\n            result = (result + a / result) >> 1;\\n            result = (result + a / result) >> 1;\\n            return min(result, a / result);\\n        }\\n    }\\n\\n    /**\\n     * @notice Calculates sqrt(a), following the selected rounding direction.\\n     */\\n    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {\\n        unchecked {\\n            uint256 result = sqrt(a);\\n            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);\\n        }\\n    }\\n\\n    /**\\n     * @dev Return the log in base 2, rounded down, of a positive value.\\n     * Returns 0 if given 0.\\n     */\\n    function log2(uint256 value) internal pure returns (uint256) {\\n        uint256 result = 0;\\n        unchecked {\\n            if (value >> 128 > 0) {\\n                value >>= 128;\\n                result += 128;\\n            }\\n            if (value >> 64 > 0) {\\n                value >>= 64;\\n                result += 64;\\n            }\\n            if (value >> 32 > 0) {\\n                value >>= 32;\\n                result += 32;\\n            }\\n            if (value >> 16 > 0) {\\n                value >>= 16;\\n                result += 16;\\n            }\\n            if (value >> 8 > 0) {\\n                value >>= 8;\\n                result += 8;\\n            }\\n            if (value >> 4 > 0) {\\n                value >>= 4;\\n                result += 4;\\n            }\\n            if (value >> 2 > 0) {\\n                value >>= 2;\\n                result += 2;\\n            }\\n            if (value >> 1 > 0) {\\n                result += 1;\\n            }\\n        }\\n        return result;\\n    }\\n\\n    /**\\n     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.\\n     * Returns 0 if given 0.\\n     */\\n    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n        unchecked {\\n            uint256 result = log2(value);\\n            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);\\n        }\\n    }\\n\\n    /**\\n     * @dev Return the log in base 10, rounded down, of a positive value.\\n     * Returns 0 if given 0.\\n     */\\n    function log10(uint256 value) internal pure returns (uint256) {\\n        uint256 result = 0;\\n        unchecked {\\n            if (value >= 10 ** 64) {\\n                value /= 10 ** 64;\\n                result += 64;\\n            }\\n            if (value >= 10 ** 32) {\\n                value /= 10 ** 32;\\n                result += 32;\\n            }\\n            if (value >= 10 ** 16) {\\n                value /= 10 ** 16;\\n                result += 16;\\n            }\\n            if (value >= 10 ** 8) {\\n                value /= 10 ** 8;\\n                result += 8;\\n            }\\n            if (value >= 10 ** 4) {\\n                value /= 10 ** 4;\\n                result += 4;\\n            }\\n            if (value >= 10 ** 2) {\\n                value /= 10 ** 2;\\n                result += 2;\\n            }\\n            if (value >= 10 ** 1) {\\n                result += 1;\\n            }\\n        }\\n        return result;\\n    }\\n\\n    /**\\n     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.\\n     * Returns 0 if given 0.\\n     */\\n    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n        unchecked {\\n            uint256 result = log10(value);\\n            return result + (rounding == Rounding.Up && 10 ** result < value ? 1 : 0);\\n        }\\n    }\\n\\n    /**\\n     * @dev Return the log in base 256, rounded down, of a positive value.\\n     * Returns 0 if given 0.\\n     *\\n     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.\\n     */\\n    function log256(uint256 value) internal pure returns (uint256) {\\n        uint256 result = 0;\\n        unchecked {\\n            if (value >> 128 > 0) {\\n                value >>= 128;\\n                result += 16;\\n            }\\n            if (value >> 64 > 0) {\\n                value >>= 64;\\n                result += 8;\\n            }\\n            if (value >> 32 > 0) {\\n                value >>= 32;\\n                result += 4;\\n            }\\n            if (value >> 16 > 0) {\\n                value >>= 16;\\n                result += 2;\\n            }\\n            if (value >> 8 > 0) {\\n                result += 1;\\n            }\\n        }\\n        return result;\\n    }\\n\\n    /**\\n     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.\\n     * Returns 0 if given 0.\\n     */\\n    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {\\n        unchecked {\\n            uint256 result = log256(value);\\n            return result + (rounding == Rounding.Up && 1 << (result << 3) < value ? 1 : 0);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xe4455ac1eb7fc497bb7402579e7b4d64d928b846fce7d2b6fde06d366f21c2b3\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SafeMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (utils/math/SafeMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n// CAUTION\\n// This version of SafeMath should only be used with Solidity 0.8 or later,\\n// because it relies on the compiler's built in overflow checks.\\n\\n/**\\n * @dev Wrappers over Solidity's arithmetic operations.\\n *\\n * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler\\n * now has built in overflow checking.\\n */\\nlibrary SafeMath {\\n    /**\\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            uint256 c = a + b;\\n            if (c < a) return (false, 0);\\n            return (true, c);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, with an overflow flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            if (b > a) return (false, 0);\\n            return (true, a - b);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\\n            // benefit is lost if 'b' is also tested.\\n            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\\n            if (a == 0) return (true, 0);\\n            uint256 c = a * b;\\n            if (c / a != b) return (false, 0);\\n            return (true, c);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            if (b == 0) return (false, 0);\\n            return (true, a / b);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\\n     *\\n     * _Available since v3.4._\\n     */\\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\\n        unchecked {\\n            if (b == 0) return (false, 0);\\n            return (true, a % b);\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the addition of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `+` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Addition cannot overflow.\\n     */\\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a + b;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting on\\n     * overflow (when the result is negative).\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a - b;\\n    }\\n\\n    /**\\n     * @dev Returns the multiplication of two unsigned integers, reverting on\\n     * overflow.\\n     *\\n     * Counterpart to Solidity's `*` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Multiplication cannot overflow.\\n     */\\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a * b;\\n    }\\n\\n    /**\\n     * @dev Returns the integer division of two unsigned integers, reverting on\\n     * division by zero. The result is rounded towards zero.\\n     *\\n     * Counterpart to Solidity's `/` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - The divisor cannot be zero.\\n     */\\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a / b;\\n    }\\n\\n    /**\\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n     * reverting when dividing by zero.\\n     *\\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\\n     * invalid opcode to revert (consuming all remaining gas).\\n     *\\n     * Requirements:\\n     *\\n     * - The divisor cannot be zero.\\n     */\\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\\n        return a % b;\\n    }\\n\\n    /**\\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\\n     * overflow (when the result is negative).\\n     *\\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\\n     * message unnecessarily. For custom revert reasons use {trySub}.\\n     *\\n     * Counterpart to Solidity's `-` operator.\\n     *\\n     * Requirements:\\n     *\\n     * - Subtraction cannot overflow.\\n     */\\n    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n        unchecked {\\n            require(b <= a, errorMessage);\\n            return a - b;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the integer division of two unsigned integers, reverting with custom message on\\n     * division by zero. The result is rounded towards zero.\\n     *\\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\\n     * uses an invalid opcode to revert (consuming all remaining gas).\\n     *\\n     * Requirements:\\n     *\\n     * - The divisor cannot be zero.\\n     */\\n    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n        unchecked {\\n            require(b > 0, errorMessage);\\n            return a / b;\\n        }\\n    }\\n\\n    /**\\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\\n     * reverting with custom message when dividing by zero.\\n     *\\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\\n     * message unnecessarily. For custom revert reasons use {tryMod}.\\n     *\\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\\n     * invalid opcode to revert (consuming all remaining gas).\\n     *\\n     * Requirements:\\n     *\\n     * - The divisor cannot be zero.\\n     */\\n    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\\n        unchecked {\\n            require(b > 0, errorMessage);\\n            return a % b;\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0x58b21219689909c4f8339af00813760337f7e2e7f169a97fe49e2896dcfb3b9a\",\"license\":\"MIT\"},\"@openzeppelin/contracts/utils/math/SignedMath.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Standard signed math utilities missing in the Solidity language.\\n */\\nlibrary SignedMath {\\n    /**\\n     * @dev Returns the largest of two signed numbers.\\n     */\\n    function max(int256 a, int256 b) internal pure returns (int256) {\\n        return a > b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the smallest of two signed numbers.\\n     */\\n    function min(int256 a, int256 b) internal pure returns (int256) {\\n        return a < b ? a : b;\\n    }\\n\\n    /**\\n     * @dev Returns the average of two signed numbers without overflow.\\n     * The result is rounded towards zero.\\n     */\\n    function average(int256 a, int256 b) internal pure returns (int256) {\\n        // Formula from the book \\\"Hacker's Delight\\\"\\n        int256 x = (a & b) + ((a ^ b) >> 1);\\n        return x + (int256(uint256(x) >> 255) & (a ^ b));\\n    }\\n\\n    /**\\n     * @dev Returns the absolute unsigned value of a signed value.\\n     */\\n    function abs(int256 n) internal pure returns (uint256) {\\n        unchecked {\\n            // must be unchecked in order to support `n = type(int256).min`\\n            return uint256(n >= 0 ? n : -n);\\n        }\\n    }\\n}\\n\",\"keccak256\":\"0xf92515413956f529d95977adc9b0567d583c6203fc31ab1c23824c35187e3ddc\",\"license\":\"MIT\"},\"contracts/DataPointsMulti.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"@openzeppelin/contracts/token/ERC1155/ERC1155.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/AccessControl.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/Strings.sol\\\";\\nimport \\\"./lib/base64.sol\\\";\\n\\n/**\\n * @title DataPointsMulti\\n * @dev This contract extends ERC1155 to create a multi-token contract, named DataPointsMulti, intended to represent accumulated data points\\n * within the Masa Network. Each token ID represents a different data type, and it features minting and burning capabilities, with distinct roles\\n * for each action, as well as an admin role for role management. The tokens are non-transferable, meaning they cannot be transferred between\\n * addresses once minted, making them purely a representation of earned points rather than a tradable asset.\\n *\\n * The contract utilizes OpenZeppelin's ERC1155 for the multi-token standard and AccessControl for role-based access control, respectively.\\n * It also implements the ERC1155 URI mechanism to provide on-chain metadata for each token type.\\n */\\ncontract DataPointsMulti is ERC1155, AccessControl {\\n    using Strings for uint256;\\n\\n    // Role definitions for role-based access control\\n    bytes32 public constant MINTER_ROLE = keccak256(\\\"MINTER_ROLE\\\");\\n    bytes32 public constant ADMIN_ROLE = keccak256(\\\"ADMIN_ROLE\\\");\\n    bytes32 public constant UPDATER_ROLE = keccak256(\\\"UPDATER_ROLE\\\");\\n\\n    // Struct for storing token metadata.\\n    struct TokenMetadata {\\n        string name;\\n        string image;\\n        string description;\\n    }\\n\\n    // Define a new struct that includes the token ID and its metadata\\n    struct TokenIdMetadata {\\n        uint256 tokenId;\\n        TokenMetadata metadata;\\n    }\\n\\n    // Struct to hold token balance information.\\n    struct TokenBalance {\\n        string tokenName;\\n        uint256 balance;\\n    }\\n\\n    // Mapping from token ID to its metadata.\\n    mapping(uint256 => TokenMetadata) public tokenMetadata;\\n\\n    // Mapping from address and token ID to an array of UUIDs.\\n    mapping(address => mapping(uint256 => uint256[])) public accountTokenUUIDs;\\n\\n    // Counter for the total number of token types.\\n    uint256 public tokenTypeCount;\\n\\n    // Array of valid token IDs.\\n    uint256[] public validTokenIds;\\n\\n    // Base URI for constructing token URIs.\\n    string public baseURI;\\n\\n    // Events for logging actions on the contract.\\n    event BaseURISet(string newBaseURI);\\n    event TokenMinted(\\n        address account,\\n        uint256 id,\\n        uint256 amount,\\n        uint256 uuid\\n    );\\n    event TokenBatchMinted(\\n        address account,\\n        uint256[] ids,\\n        uint256[] amounts,\\n        uint256[] uuid\\n    );\\n    event TokenBurned(address account, uint256 id, uint256 amount);\\n    event TokenBatchBurned(address account, uint256[] ids, uint256[] amounts);\\n    event TokenNameSet(uint256 id, string name);\\n    event RoleSetup(bytes32 role, address account);\\n\\n    /**\\n     * @dev Initializes the contract by setting a base URI and configuring roles.\\n     * @param baseUriInput The initial base URI for token metadata.\\n     */\\n    constructor(string memory baseUriInput) ERC1155(\\\"\\\") {\\n        baseURI = baseUriInput;\\n\\n        // Grant roles to the contract deployer\\n        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);\\n        _setupRole(ADMIN_ROLE, msg.sender);\\n        _setupRole(MINTER_ROLE, msg.sender);\\n        _setupRole(UPDATER_ROLE, msg.sender);\\n\\n        // Configure role hierarchies\\n        _setRoleAdmin(MINTER_ROLE, ADMIN_ROLE);\\n        _setRoleAdmin(UPDATER_ROLE, ADMIN_ROLE);\\n    }\\n\\n    /**\\n     * @dev Updates the base URI used for token metadata. Can only be called by an admin.\\n     * @param newBaseURI The new base URI to set.\\n     */\\n    function setBaseURI(string memory newBaseURI) public onlyRole(ADMIN_ROLE) {\\n        require(\\n            bytes(newBaseURI).length > 0,\\n            \\\"DataPointsMulti: Base URI cannot be empty\\\"\\n        );\\n        baseURI = newBaseURI;\\n        emit BaseURISet(newBaseURI);\\n    }\\n\\n    /**\\n     * @dev Sets the metadata for a token ID. Can only be called by an admin.\\n     * @param tokenId The token ID to set metadata for.\\n     * @param name The name for the token.\\n     * @param image The image URL for the token.\\n     * @param description The description for the token.\\n     */\\n    function setTokenMetadata(\\n        uint256 tokenId,\\n        string memory name,\\n        string memory image,\\n        string memory description\\n    ) public onlyRole(ADMIN_ROLE) {\\n        require(\\n            bytes(name).length > 0,\\n            \\\"DataPointsMulti: Token name cannot be empty\\\"\\n        );\\n        require(\\n            bytes(image).length > 0,\\n            \\\"DataPointsMulti: Token image cannot be empty\\\"\\n        );\\n        require(\\n            bytes(description).length > 0,\\n            \\\"DataPointsMulti: Token description cannot be empty\\\"\\n        );\\n\\n        tokenMetadata[tokenId] = TokenMetadata(name, image, description);\\n    }\\n\\n    /**\\n     * @dev Generates a URI for a given token ID. The URI is a data URI with a JSON-formatted metadata blob.\\n     * This includes the name, description, and image for the token.\\n     * @param tokenId The token ID to generate a URI for.\\n     * @return The URI string for the given token ID's metadata.\\n     */\\n    function uri(uint256 tokenId) public view override returns (string memory) {\\n        require(\\n            bytes(tokenMetadata[tokenId].name).length > 0,\\n            \\\"DataPointsMulti: Token ID does not exist\\\"\\n        );\\n\\n        // Create a JSON blob with the metadata\\n        string memory json = string(\\n            abi.encodePacked(\\n                '{\\\"name\\\": \\\"',\\n                tokenMetadata[tokenId].name,\\n                '\\\", \\\"description\\\": \\\"',\\n                tokenMetadata[tokenId].description,\\n                '\\\", \\\"image\\\": \\\"',\\n                tokenMetadata[tokenId].image,\\n                '\\\"}'\\n            )\\n        );\\n\\n        // Encode the JSON blob as Base64\\n        string memory encodedJson = Base64.encode(bytes(json));\\n\\n        // Return the encoded data as the URI\\n        return\\n            string(\\n                abi.encodePacked(\\\"data:application/json;base64,\\\", encodedJson)\\n            );\\n    }\\n\\n    /**\\n     * @dev Mint batch of tokens of different types to specified addresses, each with a unique numeric UUID.\\n     * @param toAddresses An array of addresses to mint tokens to.\\n     * @param ids An array of token types to mint.\\n     * @param uuids An array of numeric UUIDs for each token being minted.\\n     */\\n\\n    function batchMint(\\n        address[] memory toAddresses,\\n        uint256[] memory ids,\\n        uint256[] memory uuids\\n    ) public onlyRole(MINTER_ROLE) {\\n        require(\\n            toAddresses.length == ids.length && ids.length == uuids.length,\\n            \\\"Must provide equal numbers of addresses, ids, and UUIDs\\\"\\n        );\\n\\n        for (uint256 i = 0; i < toAddresses.length; i++) {\\n            require(isTokenIdValid(ids[i]), \\\"Invalid token ID\\\");\\n            require(uuids[i] != 0, \\\"UUID cannot be zero\\\");\\n            require(\\n                toAddresses[i] != address(0),\\n                \\\"Cannot mint to the zero address\\\"\\n            );\\n\\n            // Update the state variable before the external call\\n            accountTokenUUIDs[toAddresses[i]][ids[i]].push(uuids[i]);\\n\\n            // External call to mint the token\\n            _mint(toAddresses[i], ids[i], 1, \\\"0x00\\\");\\n\\n            emit TokenMinted(toAddresses[i], ids[i], 1, uuids[i]);\\n        }\\n    }\\n\\n    function isTokenIdValid(uint256 tokenId) public view returns (bool) {\\n        // Example validation logic to check if the token ID has been initialized\\n        // This could be checking against a list of validTokenIds or other criteria\\n        // indicating the token ID has been properly set up.\\n        for (uint256 i = 0; i < validTokenIds.length; i++) {\\n            if (validTokenIds[i] == tokenId) {\\n                return true;\\n            }\\n        }\\n        return false;\\n    }\\n\\n    /**\\n     * @dev Sets the name for a given token ID.\\n     * @param id The token ID.\\n     * @param name The name to assign to the token ID.\\n     * Requires that the caller has the UPDATER_ROLE.\\n     */\\n    function setTokenName(\\n        uint256 id,\\n        string memory name\\n    ) public onlyRole(UPDATER_ROLE) {\\n        require(\\n            bytes(name).length > 0,\\n            \\\"DataPointsMulti: Token name cannot be empty\\\"\\n        );\\n\\n        // Check if the token already has metadata set\\n        bool isNewToken = bytes(tokenMetadata[id].name).length == 0;\\n\\n        // Update the token name within the token metadata\\n        tokenMetadata[id].name = name;\\n\\n        // If this is a new token type, add the token ID to the list and increment the token type counter\\n        if (isNewToken) {\\n            validTokenIds.push(id);\\n            tokenTypeCount++;\\n        }\\n\\n        emit TokenNameSet(id, name);\\n    }\\n\\n    /**\\n     * @dev Retrieves the name of a given token ID.\\n     * @param id The token ID.\\n     * @return The name of the token ID.\\n     */\\n    function getTokenName(uint256 id) public view returns (string memory) {\\n        require(\\n            bytes(tokenMetadata[id].name).length != 0,\\n            \\\"DataPointsMulti: Token ID does not exist\\\"\\n        );\\n        return tokenMetadata[id].name;\\n    }\\n\\n    /**\\n     * @dev Grant or revoke role permissions dynamically.\\n     * @param role The role identifier.\\n     * @param account The address to grant or revoke the role from.\\n     */\\n    function setupRole(bytes32 role, address account) public {\\n        require(\\n            hasRole(DEFAULT_ADMIN_ROLE, msg.sender),\\n            \\\"Caller is not an admin\\\"\\n        );\\n        _setupRole(role, account);\\n        emit RoleSetup(role, account);\\n    }\\n\\n    /**\\n     * @dev Prevents token transfers by overriding `safeTransferFrom` and `safeBatchTransferFrom`.\\n     */\\n    function safeTransferFrom(\\n        address,\\n        address,\\n        uint256,\\n        uint256,\\n        bytes memory\\n    ) public pure override {\\n        require(false, \\\"DataPointsMulti: transfer not allowed\\\");\\n    }\\n\\n    function safeBatchTransferFrom(\\n        address,\\n        address,\\n        uint256[] memory,\\n        uint256[] memory,\\n        bytes memory\\n    ) public pure override {\\n        require(false, \\\"DataPointsMulti: batch transfer not allowed\\\");\\n    }\\n\\n    /**\\n     * @dev See {IERC165-supportsInterface}.\\n     */\\n    function supportsInterface(\\n        bytes4 interfaceId\\n    ) public view virtual override(ERC1155, AccessControl) returns (bool) {\\n        return super.supportsInterface(interfaceId);\\n    }\\n\\n    /**\\n     * @dev Retrieves user balances for all token types.\\n     * @param user The address of the user to query balances for.\\n     * @return An array of TokenBalance structs containing token names and balances.\\n     */\\n    function getUserBalances(\\n        address user\\n    ) public view returns (TokenBalance[] memory) {\\n        uint256 length = validTokenIds.length; // Cache the length of the array\\n        TokenBalance[] memory balances = new TokenBalance[](length);\\n\\n        for (uint256 i = 0; i < validTokenIds.length; i++) {\\n            uint256 tokenId = validTokenIds[i];\\n            balances[i].tokenName = tokenMetadata[tokenId].name;\\n            balances[i].balance = balanceOf(user, tokenId);\\n        }\\n\\n        return balances;\\n    }\\n\\n    /**\\n     * @dev Retrieves the UUIDs for a specific token ID associated with an account.\\n     * @param account The address of the user to query UUIDs for.\\n     * @param id The token ID to query UUIDs for.\\n     * @return An array of UUIDs for the specified token ID associated with the account.\\n     */\\n    function getAccountTokenUUIDs(\\n        address account,\\n        uint256 id\\n    ) public view returns (uint256[] memory) {\\n        return accountTokenUUIDs[account][id];\\n    }\\n\\n    /**\\n     * @dev Public getter to access the array of valid token IDs.\\n     * @return An array of valid token IDs.\\n     */\\n    function getValidTokenIds() public view returns (uint256[] memory) {\\n        return validTokenIds;\\n    }\\n\\n    /**\\n     * @dev Returns an array of structs containing token IDs and their corresponding metadata.\\n     * @return An array of TokenIdMetadata structs.\\n     */\\n    function getAllTokenIdMetadata()\\n        public\\n        view\\n        returns (TokenIdMetadata[] memory)\\n    {\\n        TokenIdMetadata[] memory allTokenIdMetadata = new TokenIdMetadata[](\\n            validTokenIds.length\\n        );\\n        for (uint256 i = 0; i < validTokenIds.length; i++) {\\n            allTokenIdMetadata[i].tokenId = validTokenIds[i];\\n            allTokenIdMetadata[i].metadata = tokenMetadata[validTokenIds[i]];\\n        }\\n        return allTokenIdMetadata;\\n    }\\n}\\n\",\"keccak256\":\"0x49073e359c10f550ae8c51c0b7c862d4f7cda878a38ee35b871dbd8447d3ac27\",\"license\":\"MIT\"},\"contracts/DataStakingDynamicNative.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\nimport \\\"./DataPointsMulti.sol\\\";\\nimport \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport \\\"@openzeppelin/contracts/utils/math/SafeMath.sol\\\";\\nimport \\\"@openzeppelin/contracts/access/Ownable.sol\\\";\\n\\n/**\\n * @title DataStakingDynamicNative\\n * @dev This contract enables users to stake their non-transferable tokens, represented by DataPointsMulti.sol,\\n * and earn rewards based on the staked amount for a specific duration. Each token ID is associated with a unique reward rate, and rewards\\n * are distributed in the form of the native currency (e.g., ETH) after the staking period ends.\\n *\\n * Inherits from DataPointsMulti for token balance interactions. Rewards are managed directly with the native currency of the blockchain,\\n * allowing users to claim their earnings in ETH or the native currency of the network where the contract is deployed.\\n *\\n * @notice Ensure that the DataPointsMulti contract is deployed and its address is known before deploying this contract.\\n * The contract should be funded with enough native currency to cover the reward payouts.\\n */\\ncontract DataStakingDynamicNative is Ownable {\\n    using SafeMath for uint256;\\n\\n    // Name of the Data Staking Pool\\n    string public name;\\n\\n    // Reference to the DataPointsMulti contract for staking operations.\\n    DataPointsMulti public dataPointsMulti;\\n\\n    // Struct to hold staking information for a particular token ID.\\n    struct StakeInfo {\\n        uint256 amountStaked; // Total amount of tokens staked for this ID.\\n        uint256 rewardPerToken; // Reward per token for this ID.\\n        uint256 maxStakeLimit; // Maximum limit of tokens that can be staked.\\n    }\\n\\n    // Struct to hold details of a staking transaction\\n    struct StakingTransaction {\\n        uint256 tokenId;\\n        uint256 amount;\\n        uint256 rewardPerToken;\\n        uint256 timestamp;\\n    }\\n\\n    // Struct to hold details of a claim transaction\\n    struct ClaimTransaction {\\n        uint256 totalRewardsClaimed;\\n        uint256 timestamp;\\n    }\\n\\n    // Struct to hold eligible staking amount details\\n    struct EligibleStakeAmount {\\n        uint256 tokenId;\\n        uint256 amount;\\n    }\\n\\n    // Mapping from user address to an array of their staking transactions\\n    mapping(address => StakingTransaction[]) public userStakingTransactions;\\n\\n    // Mapping from user address to an array of their claimed transactions\\n    mapping(address => ClaimTransaction) public userClaimTransactions;\\n\\n    // Mapping from token ID to its staking information.\\n    mapping(uint256 => StakeInfo) public stakeInfos;\\n\\n    // Nested mapping to track the staked amount by user and token ID.\\n    mapping(address => mapping(uint256 => uint256)) public userStakes;\\n\\n    // Mapping from address to its staked status.\\n    mapping(address => bool) private hasStaked;\\n\\n    // State variable to track number of stakers in pool.\\n    address[] private stakers;\\n\\n    // State variable to track the total rewards available for distribution.\\n    uint256 public totalRewardsPool;\\n\\n    // Array to keep track of all tokenIds with staking parameters\\n    uint256[] public stakingTokenIds;\\n\\n    // State variable to track the timestamp when the total rewards pool becomes full\\n    uint256 public rewardsPoolFullTimestamp;\\n\\n    // State variable to track the amount of rewards that have been reserved but not yet claimed.\\n    uint256 public totalReservedRewards;\\n\\n    // Duration of the staking period in seconds.\\n    uint256 public duration;\\n\\n    // Start time of staking.\\n    uint256 public startTime;\\n\\n    // Royalty fee info\\n    uint256 public royaltyFeePercentage; // Represented as a whole number, e.g., 1 for 1%\\n\\n    // Royalty fee info\\n    address public royaltyRecipient;\\n\\n    // Staking period initialized tracking\\n    bool public stakingPeriodInitialized = false;\\n\\n    // Event emitted when tokens are staked.\\n    event Staked(\\n        address indexed user,\\n        uint256 tokenId,\\n        uint256 amount,\\n        uint256 startTime,\\n        uint256 duration\\n    );\\n\\n    // Event emitted when rewards are claimed.\\n    event RewardsClaimed(address indexed user, uint256 tokenId, uint256 reward);\\n\\n    // Event emitted when rewards are deposited into the contract\\n    event RewardsDeposited(\\n        address indexed depositor,\\n        uint256 amount,\\n        uint256 newTotalRewardsPool\\n    );\\n\\n    // Event emitted when unclaimed rewards are withdrawn from the contract\\n    event UnclaimedRewardsWithdrawn(address indexed owner, uint256 amount);\\n\\n    /**\\n     * @dev Constructor to initialize the DataStaking contract.\\n     * @param _name Name of the Data Staking Pool.\\n     * @param _dataPointsMulti Address of the DataPointsMulti contract.\\n     */\\n    constructor(\\n        string memory _name,\\n        DataPointsMulti _dataPointsMulti\\n    ) Ownable() {\\n        name = _name;\\n        dataPointsMulti = _dataPointsMulti;\\n    }\\n\\n    // Function to receive Ether. msg.data must be empty\\n    receive() external payable {\\n        // Emit an event or handle received Ether\\n        emit RewardsDeposited(\\n            msg.sender,\\n            msg.value,\\n            totalRewardsPool.add(msg.value)\\n        );\\n        totalRewardsPool = totalRewardsPool.add(msg.value);\\n    }\\n\\n    /**\\n     * @dev Sets the staking duration and start time for the contract.\\n     * @param _duration The duration of the staking period in seconds.\\n     * @param _startTime The start time for staking to begin.\\n     */\\n    function setStakingTimeframe(\\n        uint256 _duration,\\n        uint256 _startTime\\n    ) public onlyOwner {\\n        require(\\n            !stakingPeriodInitialized,\\n            \\\"Staking timeframe cannot be changed after initialization.\\\"\\n        );\\n        duration = _duration;\\n        startTime = _startTime;\\n        stakingPeriodInitialized = true;\\n    }\\n\\n    /**\\n     * @dev Sets the reward per token, duration, and max stake limit for a specific token ID.\\n     * @param tokenId The token ID for which to set the staking parameters.\\n     * @param rewardPerToken The reward per token to set for the token ID.\\n     * @param maxStakeLimit The maximum amount of tokens that can be staked for the token ID.\\n     */\\n    function setStakingParameters(\\n        uint256 tokenId,\\n        uint256 rewardPerToken,\\n        uint256 maxStakeLimit\\n    ) public onlyOwner {\\n        require(\\n            stakeInfos[tokenId].amountStaked == 0,\\n            \\\"Token already initialized with staked amounts\\\"\\n        );\\n        require(\\n            dataPointsMulti.isTokenIdValid(tokenId),\\n            \\\"Token ID is not valid\\\"\\n        );\\n        require(\\n            !stakingPeriodInitialized,\\n            \\\"Staking parameters cannot be changed after initialization.\\\"\\n        );\\n\\n        // Set the staking parameters\\n        stakeInfos[tokenId] = StakeInfo({\\n            amountStaked: 0, // Initialize to zero\\n            rewardPerToken: rewardPerToken,\\n            maxStakeLimit: maxStakeLimit\\n        });\\n\\n        // Check if tokenId is already in stakingTokenIds array to avoid duplicates\\n        bool exists = false;\\n        for (uint256 i = 0; i < stakingTokenIds.length; i++) {\\n            if (stakingTokenIds[i] == tokenId) {\\n                exists = true;\\n                break;\\n            }\\n        }\\n        if (!exists) {\\n            stakingTokenIds.push(tokenId);\\n        }\\n    }\\n\\n    /**\\n     * @dev Allows users to stake all their tokens for which staking parameters have been set.\\n     * This function iterates over the array of token IDs that have staking parameters defined.\\n     * For each token ID, it checks the user's balance and stakes up to the maximum stake limit,\\n     * or the user's balance, whichever is lower. It calculates the potential reward and ensures\\n     * that staking does not exceed the total available reward pool. The function updates the user's\\n     * staked amount and the total staked amount for each token ID. It emits a Staked event for each\\n     * staking action performed.\\n     */\\n    function stakeAll() public {\\n        bool isStakingPeriodOver = isStakingPoolFilledOrExpired();\\n        require(!isStakingPeriodOver, \\\"Staking period has not ended yet\\\");\\n\\n        uint256 remainingRewardsPool = totalRewardsPool.sub(\\n            totalReservedRewards\\n        );\\n        require(\\n            remainingRewardsPool > 0,\\n            \\\"Insufficient rewards available in the pool.\\\"\\n        );\\n\\n        uint256 minRewardPerToken = getMinRewardPerToken(); // Get the smallest rewardPerToken\\n\\n        bool hasStakableTokens = false;\\n\\n        for (uint256 i = 0; i < stakingTokenIds.length; i++) {\\n            uint256 tokenId = stakingTokenIds[i];\\n            uint256 userBalance = dataPointsMulti.balanceOf(\\n                msg.sender,\\n                tokenId\\n            );\\n            uint256 previousTotalStaked = userStakes[msg.sender][tokenId];\\n            StakeInfo memory stakeInfo = stakeInfos[tokenId];\\n\\n            if (userBalance == 0 || duration == 0) {\\n                continue;\\n            }\\n            if (userBalance <= previousTotalStaked) {\\n                continue;\\n            }\\n\\n            hasStakableTokens = true;\\n\\n            uint256 remainingUserStakeCapacity = stakeInfo.maxStakeLimit.sub(\\n                previousTotalStaked\\n            );\\n            uint256 maxStakeableBasedOnRewards = remainingRewardsPool.div(\\n                stakeInfo.rewardPerToken\\n            );\\n            uint256 actualMaxStakeable = Math.min(\\n                remainingUserStakeCapacity,\\n                maxStakeableBasedOnRewards\\n            );\\n\\n            uint256 actualStakeableAmount = Math.min(\\n                userBalance.sub(previousTotalStaked),\\n                actualMaxStakeable\\n            );\\n\\n            uint256 actualPotentialReward = actualStakeableAmount.mul(\\n                stakeInfo.rewardPerToken\\n            );\\n            if (actualPotentialReward > remainingRewardsPool) {\\n                actualStakeableAmount = remainingRewardsPool.div(\\n                    stakeInfo.rewardPerToken\\n                );\\n                actualPotentialReward = actualStakeableAmount.mul(\\n                    stakeInfo.rewardPerToken\\n                );\\n            }\\n\\n            remainingRewardsPool = remainingRewardsPool.sub(\\n                actualPotentialReward\\n            );\\n\\n            // Calculate the stake difference for the transaction record\\n            uint256 stakeDifference = actualStakeableAmount;\\n\\n            // Update the user's total staked amount for the tokenId\\n            userStakes[msg.sender][tokenId] = previousTotalStaked.add(\\n                actualStakeableAmount\\n            );\\n\\n            // Update the stake info and total reserved rewards\\n            stakeInfo.amountStaked = stakeInfo.amountStaked.add(\\n                actualStakeableAmount\\n            );\\n            totalReservedRewards = totalReservedRewards.add(\\n                actualPotentialReward\\n            );\\n\\n            if (stakeDifference > 0) {\\n                userStakingTransactions[msg.sender].push(\\n                    StakingTransaction({\\n                        tokenId: tokenId,\\n                        amount: stakeDifference,\\n                        rewardPerToken: stakeInfo.rewardPerToken,\\n                        timestamp: block.timestamp\\n                    })\\n                );\\n                // Emit an event that tokens have been staked\\n                emit Staked(\\n                    msg.sender,\\n                    tokenId,\\n                    actualStakeableAmount,\\n                    startTime,\\n                    duration\\n                );\\n            }\\n        }\\n\\n        // Track unique staker\\n        if (hasStakableTokens && !hasStaked[msg.sender]) {\\n            stakers.push(msg.sender);\\n            hasStaked[msg.sender] = true;\\n        }\\n\\n        require(\\n            hasStakableTokens,\\n            \\\"No stakable tokens found or staking period has ended.\\\"\\n        );\\n\\n        // Adjust the condition to check if the remaining rewards pool is less than the smallest rewardPerToken\\n        if (\\n            remainingRewardsPool > 0 &&\\n            remainingRewardsPool < minRewardPerToken &&\\n            rewardsPoolFullTimestamp == 0\\n        ) {\\n            rewardsPoolFullTimestamp = block.timestamp;\\n        }\\n    }\\n\\n    /**\\n     * @dev Allows users to claim rewards for all their staked tokens after their respective staking periods end.\\n     */\\n    function claimAllRewards() public {\\n        bool isStakingPeriodOver = isStakingPoolFilledOrExpired();\\n        require(isStakingPeriodOver, \\\"Staking period has not ended yet\\\");\\n        uint256 totalReward = 0;\\n\\n        // First pass: Calculate the total reward without making state changes\\n        for (uint256 i = 0; i < stakingTokenIds.length; i++) {\\n            uint256 tokenId = stakingTokenIds[i];\\n            StakeInfo memory stakeInfo = stakeInfos[tokenId];\\n\\n            uint256 stakedAmount = userStakes[msg.sender][tokenId];\\n            if (stakedAmount > 0) {\\n                uint256 reward = stakedAmount.mul(stakeInfo.rewardPerToken);\\n                totalReward = totalReward.add(reward);\\n            }\\n        }\\n\\n        // Check if there are any rewards to claim\\n        require(totalReward > 0, \\\"No rewards to claim\\\");\\n\\n        // Ensure there are enough reserved rewards to cover the claim\\n        require(\\n            totalReward <= totalReservedRewards,\\n            \\\"Insufficient reserved rewards\\\"\\n        );\\n\\n        // Subtract the claimed rewards from the total rewards pool\\n        totalRewardsPool = totalRewardsPool.sub(totalReward); // Update totalRewardsPool to reflect the claimed rewards\\n\\n        // Second pass: Reset stakes and emit events\\n        for (uint256 i = 0; i < stakingTokenIds.length; i++) {\\n            uint256 tokenId = stakingTokenIds[i];\\n            StakeInfo storage stakeInfo = stakeInfos[tokenId];\\n\\n            uint256 stakedAmount = userStakes[msg.sender][tokenId];\\n            if (stakedAmount > 0) {\\n                // Reset the user's staked amount for the tokenId to zero\\n                userStakes[msg.sender][tokenId] = 0;\\n\\n                // Emit an event for the reward claim\\n                emit RewardsClaimed(\\n                    msg.sender,\\n                    tokenId,\\n                    stakedAmount.mul(stakeInfo.rewardPerToken)\\n                );\\n            }\\n        }\\n\\n        // Initialize rewardAfterRoyalty with the totalReward\\n        uint256 rewardAfterRoyalty = totalReward;\\n        uint256 royaltyFee = 0;\\n\\n        // Calculate the royalty fee only if the royaltyFeePercentage is greater than 0\\n        if (royaltyFeePercentage > 0) {\\n            royaltyFee = totalReward.mul(royaltyFeePercentage).div(100);\\n            rewardAfterRoyalty = totalReward.sub(royaltyFee);\\n        }\\n\\n        // Update the claim transaction with the reward after potential royalty\\n        ClaimTransaction memory newClaimTransaction = ClaimTransaction({\\n            totalRewardsClaimed: rewardAfterRoyalty,\\n            timestamp: block.timestamp\\n        });\\n\\n        userClaimTransactions[msg.sender] = newClaimTransaction;\\n\\n        // Subtract the total reward from the total reserved rewards\\n        totalReservedRewards = totalReservedRewards.sub(totalReward);\\n\\n        // Transfer the royalty fee to the royalty recipient if there is a fee\\n        if (royaltyFee > 0) {\\n            (bool royaltySuccess, ) = royaltyRecipient.call{value: royaltyFee}(\\n                \\\"\\\"\\n            );\\n            require(royaltySuccess, \\\"Failed to transfer royalty fee\\\");\\n        }\\n\\n        // Transfer the reward after royalty to the user, reverting on failure\\n        (bool rewardSuccess, ) = msg.sender.call{value: rewardAfterRoyalty}(\\\"\\\");\\n        require(rewardSuccess, \\\"Failed to transfer rewards\\\");\\n    }\\n\\n    /**\\n     * @dev Allows the contract owner to withdraw unclaimed rewards after the staking period has ended.\\n     * This function is designed to recover funds that were not distributed because users did not claim their rewards.\\n     * It can only be called by the owner of the contract and only after the staking period has concluded,\\n     * as determined by the `startTime` and `duration` parameters. The amount withdrawn is the difference\\n     * between the total rewards pool and the total reserved rewards, which represents the unclaimed rewards.\\n     * It is crucial to ensure that all users have had a sufficient opportunity to claim their rewards\\n     * before this function is called to maintain trust and integrity in the staking process.\\n     * @notice This function will revert if the staking period has not ended or if there are no unclaimed rewards.\\n     */\\n    function withdrawUnclaimedRewards() public onlyOwner {\\n        bool isStakingPeriodOver = isStakingPoolFilledOrExpired();\\n        require(isStakingPeriodOver, \\\"Staking period has not ended yet\\\");\\n        require(\\n            totalReservedRewards < totalRewardsPool,\\n            \\\"No unclaimed rewards available\\\"\\n        );\\n\\n        uint256 unclaimedRewards = totalRewardsPool.sub(totalReservedRewards);\\n        // Ensure there are unclaimed rewards to withdraw\\n        require(unclaimedRewards > 0, \\\"No unclaimed rewards to withdraw\\\");\\n\\n        // Update the total rewards pool\\n        totalRewardsPool = totalRewardsPool.sub(unclaimedRewards);\\n\\n        // Transfer the unclaimed rewards to the owner\\n        (bool success, ) = owner().call{value: unclaimedRewards}(\\\"\\\");\\n        require(success, \\\"Failed to withdraw unclaimed rewards\\\");\\n\\n        // Emit the event after a successful withdrawal\\n        emit UnclaimedRewardsWithdrawn(owner(), unclaimedRewards);\\n    }\\n\\n    /**\\n     * @dev Sets the royalty fee and royalty recipient.\\n     * Can only be called by the contract owner.\\n     * @param _royaltyFeePercentage The new royalty fee percentage.\\n     *  @param _royaltyRecipient The new royalty recipient address.\\n     */\\n    function setRoyaltyFeePercentageAndRecipient(\\n        uint256 _royaltyFeePercentage,\\n        address _royaltyRecipient\\n    ) public onlyOwner {\\n        require(\\n            _royaltyRecipient != address(0),\\n            \\\"Royalty recipient cannot be the zero address\\\"\\n        );\\n        royaltyFeePercentage = _royaltyFeePercentage;\\n        royaltyRecipient = _royaltyRecipient;\\n    }\\n\\n    /**\\n     * @dev Returns the remaining amount of ETH in the contract.\\n     * @return The amount of ETH left for rewards.\\n     */\\n    function getRemainingRewards() public view returns (uint256) {\\n        return address(this).balance;\\n    }\\n\\n    /**\\n     * @dev Calculates the maximum amount a user can stake for each tokenId based on the current staking parameters.\\n     * It takes into account the user's balance, the maxStakeLimit for each tokenId, and the remaining rewards in the pool.\\n     * The function ensures that the user does not exceed the maximum staking capacity for any tokenId and that the\\n     * total potential rewards do not surpass the available rewards in the pool. The function returns an array of structs,\\n     * each containing a tokenId and the corresponding amount that the user is eligible to stake.\\n     * @param user The address of the user for whom to calculate the available staking amounts.\\n     * @return eligibleStakes An array of structs, each containing a tokenId and the corresponding eligible staking amount.\\n     */\\n    function getEligibleStakingAmounts(\\n        address user\\n    ) public view returns (EligibleStakeAmount[] memory eligibleStakes) {\\n        eligibleStakes = new EligibleStakeAmount[](stakingTokenIds.length);\\n\\n        // Check if the staking pool is expired or full\\n        bool poolIsExpiredOrFull = block.timestamp > startTime.add(duration) ||\\n            totalReservedRewards >= totalRewardsPool;\\n\\n        if (poolIsExpiredOrFull) {\\n            for (uint256 i = 0; i < stakingTokenIds.length; i++) {\\n                eligibleStakes[i] = EligibleStakeAmount({\\n                    tokenId: stakingTokenIds[i],\\n                    amount: 0\\n                });\\n            }\\n            return eligibleStakes;\\n        }\\n\\n        uint256 remainingUnreservedRewards = totalRewardsPool.sub(\\n            totalReservedRewards\\n        );\\n\\n        for (uint256 i = 0; i < stakingTokenIds.length; i++) {\\n            uint256 tokenId = stakingTokenIds[i];\\n            StakeInfo memory stakeInfo = stakeInfos[tokenId];\\n\\n            uint256 userBalance = dataPointsMulti.balanceOf(user, tokenId);\\n            uint256 userStakedAmount = userStakes[user][tokenId];\\n\\n            // Calculate the remaining staking capacity for this user for this tokenId\\n            uint256 remainingUserStakeCapacity = stakeInfo.maxStakeLimit >\\n                userStakedAmount\\n                ? stakeInfo.maxStakeLimit.sub(userStakedAmount)\\n                : 0;\\n\\n            // Calculate the maximum stakeable amount based on the remaining rewards in the pool\\n            uint256 maxStakeableBasedOnRemainingRewards = remainingUnreservedRewards\\n                    .div(stakeInfo.rewardPerToken);\\n\\n            // The actual maximum stakeable amount is the minimum of the remainingUserStakeCapacity and maxStakeableBasedOnRemainingRewards\\n            uint256 actualMaxStakeable = Math.min(\\n                remainingUserStakeCapacity,\\n                maxStakeableBasedOnRemainingRewards\\n            );\\n\\n            // Determine the maximum additional amount the user can stake\\n            uint256 maxAdditionalStake = Math.min(\\n                userBalance.sub(userStakedAmount),\\n                actualMaxStakeable\\n            );\\n\\n            // Calculate the potential reward for the maxAdditionalStake\\n            uint256 potentialReward = maxAdditionalStake.mul(\\n                stakeInfo.rewardPerToken\\n            );\\n\\n            // If the potential reward exceeds the remaining unreserved rewards, adjust the maxAdditionalStake\\n            if (potentialReward > remainingUnreservedRewards) {\\n                maxAdditionalStake = remainingUnreservedRewards.div(\\n                    stakeInfo.rewardPerToken\\n                );\\n                potentialReward = maxAdditionalStake.mul(\\n                    stakeInfo.rewardPerToken\\n                ); // Recalculate potential reward after adjustment\\n            }\\n\\n            // Set the available staking amount for this tokenId\\n            eligibleStakes[i] = EligibleStakeAmount({\\n                tokenId: tokenId,\\n                amount: maxAdditionalStake\\n            });\\n\\n            // Subtract the potential reward from the remaining unreserved rewards for subsequent iterations\\n            remainingUnreservedRewards = remainingUnreservedRewards.sub(\\n                potentialReward\\n            );\\n        }\\n\\n        return eligibleStakes;\\n    }\\n\\n    /**\\n     * @dev Checks if the staking pool is full based on the total reserved rewards or if the staking period has expired.\\n     * The staking pool is considered full if the total reserved rewards equal the total rewards pool initially set.\\n     * The staking period is considered expired if the current block timestamp is greater than or equal to\\n     * the sum of the `startTime` and `duration`.\\n     * @return True if the staking pool is full based on the total reserved rewards or the staking period has expired, false otherwise.\\n     */\\n    function isStakingPoolFilledOrExpired() public view returns (bool) {\\n        bool isPoolFull = totalReservedRewards >= totalRewardsPool;\\n        bool isStakingPeriodOver = block.timestamp >= startTime.add(duration);\\n\\n        // Calculate the remaining rewards pool\\n        uint256 remainingRewardsPool = totalRewardsPool.sub(\\n            totalReservedRewards\\n        );\\n        uint256 minRewardPerToken = getMinRewardPerToken(); // Assume this function exists\\n\\n        // Check if the remaining rewards pool is less than the smallest rewardPerToken\\n        bool isPoolEffectivelyFull = remainingRewardsPool > 0 &&\\n            remainingRewardsPool < minRewardPerToken;\\n\\n        return isPoolFull || isStakingPeriodOver || isPoolEffectivelyFull;\\n    }\\n\\n    /**\\n     * @dev Checks if the staking pool is full based on the total reserved rewards or if the staking period has expired.\\n     * The staking pool is considered full if the total reserved rewards equal the total rewards pool initially set.\\n     * The staking period is considered expired if the current block timestamp is greater than or equal to\\n     * the sum of the `startTime` and `duration`.\\n     * @return True if the staking pool is full based on the total reserved rewards or the staking period has expired, false otherwise.\\n     */\\n    function getUserStakingTransactionsCount(\\n        address user\\n    ) public view returns (uint256) {\\n        return userStakingTransactions[user].length;\\n    }\\n\\n    function getStakingTokenIds() public view returns (uint256[] memory) {\\n        return stakingTokenIds;\\n    }\\n\\n    /**\\n     * @dev Checks if the user has claimed rewards and returns the details of the last claim transaction.\\n     * @param user The address of the user to check.\\n     * @return hasClaimed A boolean indicating whether the user has claimed rewards.\\n     * @return lastClaimTransaction The details of the last claim transaction if one exists.\\n     */\\n    function hasUserClaimed(\\n        address user\\n    )\\n        public\\n        view\\n        returns (bool hasClaimed, ClaimTransaction memory lastClaimTransaction)\\n    {\\n        // Check if the user's claim transaction has a non-zero timestamp\\n        hasClaimed = userClaimTransactions[user].timestamp > 0;\\n        if (hasClaimed) {\\n            // If the user has claimed, return the claim transaction details\\n            lastClaimTransaction = userClaimTransactions[user];\\n        }\\n    }\\n\\n    function getContractData()\\n        public\\n        view\\n        returns (\\n            string memory contractName,\\n            uint256 totalRewards,\\n            uint256 rewardsFullTimestamp,\\n            uint256 reservedRewards,\\n            uint256 remainingRewards,\\n            uint256 stakingDuration,\\n            uint256 stakingStartTime,\\n            uint256 feePercentage,\\n            address feeRecipient,\\n            bool isStakingPoolFilledOrExpiredBool\\n        )\\n    {\\n        contractName = name;\\n        totalRewards = totalRewardsPool;\\n        rewardsFullTimestamp = rewardsPoolFullTimestamp;\\n        reservedRewards = totalReservedRewards;\\n        remainingRewards = totalRewardsPool.sub(totalReservedRewards);\\n        stakingDuration = duration;\\n        stakingStartTime = startTime;\\n        feePercentage = royaltyFeePercentage;\\n        feeRecipient = royaltyRecipient;\\n        isStakingPoolFilledOrExpiredBool = isStakingPoolFilledOrExpired();\\n    }\\n\\n    function getUserData(\\n        address user\\n    )\\n        public\\n        view\\n        returns (\\n            StakingTransaction[] memory stakingTransactions,\\n            ClaimTransaction memory claimTransaction,\\n            StakeInfo[] memory stakeInfosArray,\\n            uint256[] memory stakedAmounts,\\n            EligibleStakeAmount[] memory eligibleStakes\\n        )\\n    {\\n        stakingTransactions = userStakingTransactions[user];\\n        claimTransaction = userClaimTransactions[user];\\n\\n        // Use stakingTokenIds specific to this contract\\n        stakeInfosArray = new StakeInfo[](stakingTokenIds.length);\\n        stakedAmounts = new uint256[](stakingTokenIds.length);\\n\\n        for (uint256 i = 0; i < stakingTokenIds.length; i++) {\\n            uint256 tokenId = stakingTokenIds[i];\\n            stakeInfosArray[i] = stakeInfos[tokenId];\\n            stakedAmounts[i] = userStakes[user][tokenId];\\n        }\\n\\n        // Reuse the getEligibleStakingAmounts function to avoid redundancy\\n        eligibleStakes = getEligibleStakingAmounts(user);\\n    }\\n\\n    function getNumberOfStakers() public view returns (uint256) {\\n        return stakers.length;\\n    }\\n\\n    function getMinRewardPerToken() public view returns (uint256) {\\n        uint256 minReward = type(uint256).max;\\n        for (uint256 i = 0; i < stakingTokenIds.length; i++) {\\n            uint256 tokenId = stakingTokenIds[i];\\n            uint256 rewardPerToken = stakeInfos[tokenId].rewardPerToken;\\n            if (rewardPerToken < minReward) {\\n                minReward = rewardPerToken;\\n            }\\n        }\\n        return minReward == type(uint256).max ? 0 : minReward;\\n    }\\n}\\n\",\"keccak256\":\"0x6aae4cf3c302f467325fb5204fbe4a35f634a10f0060b4af9299276e3ee05b5b\",\"license\":\"MIT\"},\"contracts/lib/base64.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v5.0.0) (utils/Base64.sol)\\n\\npragma solidity ^0.8.19;\\n\\n/**\\n * @dev Provides a set of functions to operate with Base64 strings.\\n */\\nlibrary Base64 {\\n    /**\\n     * @dev Base64 Encoding/Decoding Table\\n     * See sections 4 and 5 of https://datatracker.ietf.org/doc/html/rfc4648\\n     */\\n    string internal constant _TABLE =\\n        \\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\\\";\\n    string internal constant _TABLE_URL =\\n        \\\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_\\\";\\n\\n    /**\\n     * @dev Converts a `bytes` to its Bytes64 `string` representation.\\n     */\\n    function encode(bytes memory data) internal pure returns (string memory) {\\n        return _encode(data, _TABLE, true);\\n    }\\n\\n    /**\\n     * @dev Converts a `bytes` to its Bytes64Url `string` representation.\\n     */\\n    function encodeURL(\\n        bytes memory data\\n    ) internal pure returns (string memory) {\\n        return _encode(data, _TABLE_URL, false);\\n    }\\n\\n    /**\\n     * @dev Internal table-agnostic conversion\\n     */\\n    function _encode(\\n        bytes memory data,\\n        string memory table,\\n        bool withPadding\\n    ) private pure returns (string memory) {\\n        /**\\n         * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence\\n         * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol\\n         */\\n        if (data.length == 0) return \\\"\\\";\\n\\n        // If padding is enabled, the final length should be `bytes` data length divided by 3 rounded up and then\\n        // multiplied by 4 so that it leaves room for padding the last chunk\\n        // - `data.length + 2`  -> Round up\\n        // - `/ 3`              -> Number of 3-bytes chunks\\n        // - `4 *`              -> 4 characters for each chunk\\n        // If padding is disabled, the final length should be `bytes` data length multiplied by 4/3 rounded up as\\n        // opposed to when padding is required to fill the last chunk.\\n        // - `4 *`              -> 4 characters for each chunk\\n        // - `data.length + 2`  -> Round up\\n        // - `/ 3`              -> Number of 3-bytes chunks\\n        uint256 resultLength = withPadding\\n            ? 4 * ((data.length + 2) / 3)\\n            : (4 * data.length + 2) / 3;\\n\\n        string memory result = new string(resultLength);\\n\\n        /// @solidity memory-safe-assembly\\n        assembly {\\n            // Prepare the lookup table (skip the first \\\"length\\\" byte)\\n            let tablePtr := add(table, 1)\\n\\n            // Prepare result pointer, jump over length\\n            let resultPtr := add(result, 32)\\n\\n            // Run over the input, 3 bytes at a time\\n            for {\\n                let dataPtr := data\\n                let endPtr := add(data, mload(data))\\n            } lt(dataPtr, endPtr) {\\n\\n            } {\\n                // Advance 3 bytes\\n                dataPtr := add(dataPtr, 3)\\n                let input := mload(dataPtr)\\n\\n                // To write each character, shift the 3 bytes (18 bits) chunk\\n                // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)\\n                // and apply logical AND with 0x3F which is the number of\\n                // the previous character in the ASCII table prior to the Base64 Table\\n                // The result is then added to the table to get the character to write,\\n                // and finally write it in the result pointer but with a left shift\\n                // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits\\n\\n                mstore8(\\n                    resultPtr,\\n                    mload(add(tablePtr, and(shr(18, input), 0x3F)))\\n                )\\n                resultPtr := add(resultPtr, 1) // Advance\\n\\n                mstore8(\\n                    resultPtr,\\n                    mload(add(tablePtr, and(shr(12, input), 0x3F)))\\n                )\\n                resultPtr := add(resultPtr, 1) // Advance\\n\\n                mstore8(\\n                    resultPtr,\\n                    mload(add(tablePtr, and(shr(6, input), 0x3F)))\\n                )\\n                resultPtr := add(resultPtr, 1) // Advance\\n\\n                mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))\\n                resultPtr := add(resultPtr, 1) // Advance\\n            }\\n\\n            if withPadding {\\n                // When data `bytes` is not exactly 3 bytes long\\n                // it is padded with `=` characters at the end\\n                switch mod(mload(data), 3)\\n                case 1 {\\n                    mstore8(sub(resultPtr, 1), 0x3d)\\n                    mstore8(sub(resultPtr, 2), 0x3d)\\n                }\\n                case 2 {\\n                    mstore8(sub(resultPtr, 1), 0x3d)\\n                }\\n            }\\n        }\\n\\n        return result;\\n    }\\n}\\n\",\"keccak256\":\"0x1c4ca91af9cdd16b63cd65dafb05e9788b12d261d549e5d9650d424b2be129f4\",\"license\":\"MIT\"}},\"version\":1}",
  "bytecode": "0x60806040523462000031576200001f6200001862000199565b906200045e565b604051612cad6200050a8239612cad90f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b90601f01601f191681019081106001600160401b038211176200006e57604052565b62000036565b906200008b6200008360405190565b92836200004c565b565b6001600160401b0381116200006e57602090601f01601f19160190565b60005b838110620000be5750506000910152565b8181015183820152602001620000ad565b90929192620000e8620000e2826200008d565b62000074565b9381855260208501908284011162000031576200008b92620000aa565b9080601f83011215620000315781516200012292602001620000cf565b90565b6001600160a01b031690565b620001229062000125565b620001478162000131565b036200003157565b905051906200008b826200013c565b919060408382031262000031578251906001600160401b03821162000031576200018f816200012293860162000105565b936020016200014f565b620001bc620031b780380380620001b08162000074565b9283398101906200015e565b9091565b9060ff60a01b9060a01b5b9181191691161790565b90620001e862000122620001f092151590565b8254620001c0565b9055565b634e487b7160e01b600052602260045260246000fd5b90600160028304921680156200022d575b60208310146200022757565b620001f4565b91607f16916200021b565b9160001960089290920291821b911b620001cb565b6200012262000122620001229290565b91906200027262000122620001f0936200024d565b90835462000238565b6200008b916000916200025d565b81811062000295575050565b80620002a560006001936200027b565b0162000289565b9190601f8111620002bc57505050565b620002d06200008b93600052602060002090565b906020601f840181900483019310620002f4575b6020601f90910104019062000289565b9091508190620002e4565b9060001960089091021c191690565b816200031a91620002ff565b906002021790565b906200032c815190565b906001600160401b0382116200006e5762000354826200034d85546200020a565b85620002ac565b602090601f83116001146200038757620001f09291600091836200037b575b50506200030e565b01519050388062000373565b601f198316916200039d85600052602060002090565b9260005b818110620003e157509160029391856001969410620003c4575b50505002019055565b620003d6910151601f841690620002ff565b9055388080620003bb565b91936020600181928787015181550195019201620003a1565b906200008b9162000322565b906001600160a01b0390620001cb565b620001229062000125906001600160a01b031682565b620001229062000416565b62000122906200042c565b906200045662000122620001f09262000437565b825462000406565b90620004886200008b926200047262000490565b6200048060006010620001d5565b6001620003fa565b600262000442565b6200008b33620004a7565b62000122905462000131565b620004b360006200049b565b620004c082600062000442565b90620004f8620004f17f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09362000437565b9162000437565b916200050360405190565b600090a356fe60806040526004361015610023575b361561001957600080fd5b610021612aaf565b005b60003560e01c8063045bccb31461024357806306fdde031461023e5780630b83a727146102395780630fb5a6b4146102345780631d625aed1461022f57806321c5bc7c1461022a5780632ef3ff6f146102255780633a16eca0146102205780633d5ec47e1461021b5780634b50c244146102165780634c00de82146102115780635c1c22e71461020c5780636521695614610207578063658b6729146102025780636dd2525e146101fd578063715018a6146101f857806378e97925146101f357806382e54e3d146101ee5780638ad6db92146101e95780638da5cb5b146101e45780638dcb4061146101df578063969247b2146101da578063a195b69c146101d5578063a68b91ab146101d0578063a9f619ff146101cb578063aa8108db146101c6578063ae486679146101c1578063b5d5b5fa146101bc578063bb561524146101b7578063bf8f05b1146101b2578063c946e5dc146101ad578063f2fde38b146101a8578063fbb6e31f146101a35763ffc9896b0361000e57610ec1565b610d72565b610d5a565b610d3f565b610d18565b610cb1565b610c95565b610c4f565b610c0f565b610be2565b610b82565b610aec565b610ab9565b610a95565b610a7a565b610a61565b610a23565b6109d0565b6109ac565b610991565b610969565b61094e565b610920565b6108cc565b610876565b61081c565b610792565b61076b565b610746565b6106fa565b610585565b610546565b61051f565b61031e565b6001600160a01b031690565b90565b61026081610248565b0361026757565b600080fd5b9050359061027982610257565b565b90602082820312610267576102549161026c565b9052565b80518252610279919060209081905b0151910152565b906102b681604093610293565b0190565b906102da6102d36102c9845190565b8084529260200190565b9260200190565b9060005b8181106102eb5750505090565b9091926103056102fe60019286516102a9565b9460200190565b9291016102de565b6020808252610254929101906102ba565b346102675761034561033961033436600461027b565b611076565b6040519182918261030d565b0390f35b600091031261026757565b634e487b7160e01b600052600060045260246000fd5b634e487b7160e01b600052602260045260246000fd5b90600160028304921680156103a0575b602083101461039b57565b61036a565b91607f1691610390565b805460009392916103c76103bd83610380565b8085529360200190565b916001811690811561041957506001146103e057505050565b6103f39192939450600052602060002090565b916000925b8184106104055750500190565b8054848401526020909301926001016103f8565b92949550505060ff1916825215156020020190565b90610254916103aa565b634e487b7160e01b600052604160045260246000fd5b90601f01601f191681019081106001600160401b0382111761046f57604052565b610438565b9061027961048e9261048560405190565b9384809261042e565b038361044e565b906000106104a65761025490610474565b610354565b61025460006001610495565b60005b8381106104ca5750506000910152565b81810151838201526020016104ba565b6104fb6105046020936102b6936104ef815190565b80835293849260200190565b958691016104b7565b601f01601f191690565b6020808252610254929101906104da565b346102675761052f366004610349565b61034561053a6104ab565b6040519182918261050e565b3461026757610556366004610349565b61055e611577565b604051005b610254916008021c81565b906102549154610563565b6102546000600d61056e565b3461026757610595366004610349565b6103456105a0610579565b6040515b9182918290815260200190565b80610260565b90503590610279826105b1565b919060408382031261026757610254906105de818561026c565b936020016105b7565b61025490610248906001600160a01b031682565b610254906105e7565b610254906105fb565b9061061790610604565b600052602052604060002090565b634e487b7160e01b600052603260045260246000fd5b805482101561065e57610655600491600052602060002090565b91020190600090565b610625565b6102549081565b6102549054610663565b61067f90600361060d565b90610688825490565b811015610267576106989161063b565b50906106a38261066a565b916106b06001820161066a565b9161025460036106c26002850161066a565b930161066a565b6106f6610279946106ef6060949897956106e8608086019a6000870152565b6020850152565b6040830152565b0152565b34610267576103456107166107103660046105c4565b90610674565b9061072394929460405190565b948594856106c9565b919060408382031261026757610254906105de81856105b7565b346102675761055e61075936600461072c565b9061196a565b6102546000600961056e565b346102675761077b366004610349565b6103456105a061075f565b6102546000600f61056e565b34610267576107a2366004610349565b6103456105a0610786565b9060208282031261026757610254916105b7565b6102546102546102549290565b90610617906107c1565b6107e39060056107ce565b6107ec8161066a565b9161025460026106c26001850161066a565b9081526060810193926102799290916040916106f6905b6020830152565b34610267576103456108376108323660046107ad565b6107d8565b604051919391938493846107fe565b90916060828403126102675761025461085f84846105b7565b9361086d81602086016105b7565b936040016105b7565b346102675761055e610889366004610846565b91611cae565b610254916008021c610248565b90610254915461088f565b6102546000601061089c565b61028f90610248565b60208101929161027991906108b3565b34610267576108dc366004610349565b6103456108e76108a7565b604051918291826108bc565b6108fe90600461060d565b9061025460016106c28461066a565b9081526040810192916102799160200152565b346102675761093861093336600461027b565b6108f3565b9061034561094560405190565b9283928361090d565b34610267576103456105a061096436600461027b565b611cb9565b3461026757610979366004610349565b6103456105a060085490565b6102546000600b61056e565b34610267576109a1366004610349565b6103456105a0610985565b34610267576109bc366004610349565b61055e611d0c565b6102546000600e61056e565b34610267576109e0366004610349565b6103456105a06109c4565b805482101561065e57610655600191600052602060002090565b600a80548210156102675761025491610a1d916109eb565b9061056e565b34610267576103456105a0610a393660046107ad565b610a05565b91906040838203126102675761025490610a5881856105b7565b9360200161026c565b346102675761055e610a74366004610a3e565b90611de9565b3461026757610a8a366004610349565b6103456108e7611df3565b3461026757610aa5366004610349565b61055e611fd4565b6102546000600c61056e565b3461026757610ac9366004610349565b6103456105a0610aad565b90151581526060810192916102799160200190610293565b3461026757610b04610aff36600461027b565b6123c3565b90610345610b1160405190565b92839283610ad4565b979593919a999896949290610140890189810360008b0152610b3b916104da565b9a60208901610b48919052565b60408801526060870152608086015260a085015260c084015260e08301526101008201610b74916108b3565b610120016102799115159052565b3461026757610b92366004610349565b610345610b9d612413565b96610bb39a989a96919695929594939460405190565b9a8b9a8b610b1a565b610254916008021c5b60ff1690565b906102549154610bbc565b61025460146010610bcb565b3461026757610bf2366004610349565b610345610bfd610bd6565b60405191829182901515815260200190565b3461026757610c1f366004610349565b6103456105a0612481565b6102546000600261089c565b61028f90610604565b6020810192916102799190610c36565b3461026757610c5f366004610349565b610345610c6a610c2a565b60405191829182610c3f565b610c9061025492610c8b60069360009461060d565b6107ce565b61056e565b34610267576103456105a0610cab3660046105c4565b90610c76565b3461026757610cc1366004610349565b61055e6126cd565b90610cd86102d36102c9845190565b9060005b818110610ce95750505090565b909192610cff6102fe6001928651815260200190565b929101610cdc565b602080825261025492910190610cc9565b3461026757610d28366004610349565b610345610d3361275a565b60405191829182610d07565b3461026757610d4f366004610349565b6103456105a0612764565b346102675761055e610d6d36600461027b565b6127fc565b3461026757610d82366004610349565b610345610bfd612805565b8051825261027991906060908190610daa60208201516020860152565b6102a260408201516040860152565b906102b681608093610d8d565b90610dd56102d36102c9845190565b9060005b818110610de65750505090565b909192610df96102fe6001928651610db9565b929101610dd9565b80518252610279919060409081906102a260208201516020860152565b906102b681606093610e01565b90610e3a6102d36102c9845190565b9060005b818110610e4b5750505090565b909192610e5e6102fe6001928651610e1e565b929101610e3e565b9390610eb3926102549694610e98610e8d610ea59460c08a01908a820360008c0152610dc6565b926020890190610293565b8682036060880152610e2b565b908482036080860152610cc9565b9160a08184039101526102ba565b3461026757610345610edc610ed736600461027b565b6129cf565b91610ee995939560405190565b95869586610e66565b90610279610eff60405190565b928361044e565b6001600160401b03811161046f5760208091020190565b90610f2f610f2a83610f06565b610ef2565b918252565b6102546040610ef2565b610f46610f34565b906020808360005b8152016000905250565b610254610f3e565b60005b828110610f6f57505050565b602090610f7a610f58565b8184015201610f63565b90610279610f9183610f1d565b92602080610f9f8693610f06565b9201910390610f60565b90610fb2825190565b81101561065e576020809102010190565b6102546060610ef2565b9061027961100b6002610fde610fc3565b94610fef610feb8261066a565b8752565b611005610ffe6001830161066a565b6020880152565b0161066a565b6040840152565b61025490610fcd565b61025490610248565b610254905461101b565b90505190610279826105b1565b90602082820312610267576102549161102e565b9160206102799294936106f6604082019660008301906108b3565b6040513d6000823e3d90fd5b90611088611083600a5490565b610f84565b426110b06110ac61025461109c600e61066a565b6110a6600d61066a565b90612b37565b9190565b11801561133b575b6112c9576110d96110c9600961066a565b6110d3600c61066a565b90612b4e565b6110e360006107c1565b905b816110f56110ac610254600a5490565b10156112c257611109610a1d83600a6109eb565b9061111d6111188360056107ce565b611012565b61112f61112a6002611024565b610604565b91602062fdd58e938990611157879661116261114a60405190565b9889958694859460e01b90565b84526004840161104f565b03915afa9384156112bd576111ec896111e76111a261119d6111966112449a61123d9a60009161128f575b5094600661060d565b86906107ce565b61066a565b604087015181101561127d576111e16111c66111bf60408a015190565b8390612b4e565b6111db886111d560208c015190565b90612b7d565b90612b87565b92612b4e565b612b87565b90611202826111fc602087015190565b90612ba7565b9383851161124a575b50611237916112249061081561121f610f34565b938452565b8787916112318383610fa9565b52610fa9565b50612b4e565b9160010190565b906110e5565b9093506112379150611224611274611267856111d5602086015190565b926111fc60208592015190565b9491925061120b565b6111e161128a60006107c1565b6111c6565b6112b0915060203d81116112b6575b6112a8818361044e565b81019061103b565b3861118d565b503d61129e565b61106a565b5090925050565b9091506112d660006107c1565b806112e66110ac610254600a5490565b1015611337576113329061132b611301610a1d83600a6109eb565b61131e6108156000611319611314610f34565b948552565b6107c1565b8483916112318383610fa9565b5060010190565b6112d6565b5090565b50611346600c61066a565b6113566110ac610254600961066a565b10156110b8565b1561136457565b60405162461bcd60e51b8152806113ad600482016020808252818101527f5374616b696e6720706572696f6420686173206e6f7420656e64656420796574604082015260600190565b0390fd5b156113b857565b60405162461bcd60e51b81526020600482015260136024820152724e6f207265776172647320746f20636c61696d60681b6044820152606490fd5b156113fa57565b60405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e7420726573657276656420726577617264730000006044820152606490fd5b90600019905b9181191691161790565b9061145f610254611466926107c1565b825461143f565b9055565b6102799190611483906020906001906114898185875190565b9061144f565b0192015190565b906102799161146a565b6001600160401b03811161046f57602090601f01601f19160190565b90610f2f610f2a8361149a565b3d156114dd576114d23d6114b6565b903d6000602084013e565b606090565b156114e957565b60405162461bcd60e51b815260206004820152601e60248201527f4661696c656420746f207472616e7366657220726f79616c74792066656500006044820152606490fd5b1561153557565b60405162461bcd60e51b815260206004820152601a6024820152794661696c656420746f207472616e73666572207265776172647360301b6044820152606490fd5b611587611582612805565b61135d565b61159160006107c1565b61159b60006107c1565b806115ab6110ac610254600a5490565b1015611622576115bf610a1d82600a6109eb565b6115df61119d6115d36111188460056107ce565b92610c8b33600661060d565b806115ed6110ac60006107c1565b11611602575b505060010161159b565b61159b565b926110a661161a926111fc60206115fd969792015190565b9190386115f3565b5061163a816116346110ac60006107c1565b116113b1565b6116558161164e6110ac610254600c61066a565b11156113f3565b61166c6116656111bf600961066a565b600961144f565b61167660006107c1565b806116866110ac610254600a5490565b101561175d576116e39061169e610a1d82600a6109eb565b6116ac6102548260056107ce565b906116c561119d6116be33600661060d565b83906107ce565b91826116d46110ac60006107c1565b116116e8575b50505060010190565b611676565b61171b9061170c6116f960006107c1565b61170761119633600661060d565b61144f565b6111fc6001339495920161066a565b6117457fdacbdde355ba930696a362ea6738feb9f8bd52dfb3d81947558fd3217e23e32592610604565b9261175261094560405190565b0390a23880806116da565b50600080610279928061176f836107c1565b9061177a600f61066a565b6117866110ac866107c1565b1161183c575b6117cc6117d3916117bd856117ad426108156117a6610f34565b938b850152565b6117b833600461060d565b611490565b6117c7600c61066a565b612b4e565b600c61144f565b806117e06110ac856107c1565b11611807575b5033906117f260405190565b90818003925af16118016114c3565b5061152e565b8280611836926118176010611024565b9061182160405190565b90818003925af16118306114c3565b506114e2565b386117e6565b91505061185a611850826111fc600f61066a565b6111d560646107c1565b6117d36117cc61186a8385612b4e565b9391505061178c565b9061027991611880612c01565b61192f565b6102549060a01c610bc5565b6102549054611885565b156118a257565b60405162461bcd60e51b815260206004820152603960248201527f5374616b696e672074696d656672616d652063616e6e6f74206265206368616e60448201527833b2b21030b33a32b91034b734ba34b0b634bd30ba34b7b71760391b6064820152608490fd5b9060ff60a01b9060a01b611445565b9061192861025461146692151590565b8254611909565b9061195761195e9261195061194b6119476010611891565b1590565b61189b565b600d61144f565b600e61144f565b61027960016010611918565b9061027991611873565b906102799291611982612c01565b611b50565b1561198e57565b60405162461bcd60e51b815260206004820152602d60248201527f546f6b656e20616c726561647920696e697469616c697a65642077697468207360448201526c74616b656420616d6f756e747360981b6064820152608490fd5b801515610260565b90505190610279826119e9565b9060208282031261026757610254916119f1565b15611a1957565b60405162461bcd60e51b8152602060048201526015602482015274151bdad95b881251081a5cc81b9bdd081d985b1a59605a1b6044820152606490fd5b15611a5d57565b60405162461bcd60e51b815260206004820152603a60248201527f5374616b696e6720706172616d65746572732063616e6e6f74206265206368616044820152793733b2b21030b33a32b91034b734ba34b0b634bd30ba34b7b71760311b6064820152608490fd5b610279919061148390604090600290611ade8185875190565b61148960018201611483602088015190565b9061027991611ac5565b9160001960089290920291821b911b611445565b9190611b1f610254611466936107c1565b908354611afa565b80549190600160401b83101561046f5782611b4a916001610279950181556109eb565b90611b0e565b91611bba9190611b7c611b6960006110058760056107ce565b611b766110ac60006107c1565b14611987565b6020611b8b61112a6002611024565b635a783c0090611bac8792611b9f60405190565b9788948593849360e01b90565b835260048301526024820190565b03915afa9081156112bd57611bde611c1192611c2195600091611c80575b50611a12565b611bf3611bee6119476010611891565b611a56565b6106ef6000936106e8611c0d611c07610fc3565b966107c1565b8652565b611c1c8360056107ce565b611af0565b600090611c2e60006107c1565b80611c3e6110ac610254600a5490565b1015611c7857611c52610a1d82600a6109eb565b8214611c6057600101611c2e565b50905060005b611c6d5750565b61027990600a611b27565b509015611c66565b611ca1915060203d8111611ca7575b611c99818361044e565b8101906119fe565b38611bd8565b503d611c8f565b906102799291611974565b611cd061025491611cc8600090565b50600361060d565b5490565b611cdc612c01565b610279611cfa565b6102486102546102549290565b61025490611ce4565b610279611d076000611cf1565b612c1e565b610279611cd4565b9061027991611d21612c01565b611dad565b15611d2d57565b60405162461bcd60e51b815260206004820152602c60248201527f526f79616c747920726563697069656e742063616e6e6f74206265207468652060448201526b7a65726f206164647265737360a01b6064820152608490fd5b906001600160a01b0390611445565b90611da661025461146692610604565b8254611d87565b90611de261027992611ddb83611dd4611dce611dc96000611cf1565b610248565b91610248565b1415611d26565b600f61144f565b6010611d96565b9061027991611d14565b6102546000611024565b15611e0457565b60405162461bcd60e51b815260206004820152602b60248201527f496e73756666696369656e74207265776172647320617661696c61626c65206960448201526a37103a3432903837b7b61760a91b6064820152608490fd5b6102546080610ef2565b610279919061148390606090600390611e808185875190565b611e9260018201611483602088015190565b61148960028201611483604088015190565b91906104a65761027991611e67565b80549190600160401b83101561046f5782611ed69160016102799501815561063b565b90611ea4565b61025490610bc5565b6102549054611edc565b916001600160a01b0360089290920291821b911b611445565b9190611f1961025461146693610604565b908354611eef565b80549190600160401b83101561046f5782611f44916001610279950181556109eb565b90611f08565b9060ff90611445565b90611f6361025461146692151590565b8254611f4a565b15611f7157565b60405162461bcd60e51b815260206004820152603560248201527f4e6f207374616b61626c6520746f6b656e7320666f756e64206f72207374616b60448201527434b733903832b934b7b2103430b99032b73232b21760591b6064820152608490fd5b611fe2611582611947612805565b611fef6110c9600961066a565b90612007826120016110ac60006107c1565b11611dfd565b61200f612481565b9060009061201d60006107c1565b925b8361202f6110ac610254600a5490565b10156122e557612043610a1d85600a6109eb565b9361205161112a6002611024565b602062fdd58e913390611157899461207861206b60405190565b9687958694859460e01b90565b03915afa9081156112bd576000916122c7575b50936120a561119d61209e33600661060d565b88906107ce565b956120b46111188260056107ce565b91866120c36110ac60006107c1565b1480156122a9575b612298578787111561229857506121106001966111e76121086120f96120f2604088015190565b8c90612b4e565b6111db8d6111d560208a015190565b918a90612b4e565b91612120836111fc602084015190565b97898911612259575b61218a6117cc6121416121a898999a9b9c8d90612b4e565b9b61216661215188958990612b37565b61170761215f33600661060d565b89906107ce565b61217b611c0d612174875190565b8990612b37565b612185600c61066a565b612b37565b806121986110ac60006107c1565b116121b0575b5050505060010190565b92919061201f565b6121fe916121f96121c561025433600361060d565b916121f26121d66020889693015190565b6121eb4293610ffe6121e6611e5d565b988952565b6040860152565b6060840152565b611eb3565b33909161220b600e61066a565b9261224d612219600d61066a565b6122437f9cfd25589d1eb8ad71e342a86a8524e83522e3936c0803048c08f6d9ad974f4095610604565b9561072360405190565b0390a23880808061219e565b92506121a89495969750612272896111d5602084015190565b9261218a6117cc61214161228b876111fc602088015190565b9b9a999850505050612129565b965050506121a89192935060010190565b506122b4600d61066a565b6122c16110ac60006107c1565b146120cb565b6122df915060203d81116112b6576112a8818361044e565b3861208b565b916122fd919493508080612379575b61235457611f6a565b8161230b6110ac60006107c1565b11918261234a575b50508061232c575b61232157565b61027942600b61144f565b50612337600b61066a565b6123446110ac60006107c1565b1461231b565b1090503880612313565b61235f336008611f21565b612374600161236f33600761060d565b611f53565b611f6a565b5061239061194761238b33600761060d565b611ee5565b6122f4565b906102796123b360016123a6610f34565b94611005610feb8261066a565b6020840152565b61025490612395565b906123cc610f58565b906123dd600161100585600461060d565b6123ea6110ac60006107c1565b1192836123f45750565b61025491925061240590600461060d565b6123ba565b61025490610474565b61241d600161240a565b90612428600961066a565b90612433600b61066a565b9061243e600c61066a565b9061244c6110c9600961066a565b90612457600d61066a565b90612462600e61066a565b9061246d600f61066a565b906124786010611024565b90610254612805565b60001961248e60006107c1565b8061249e6110ac610254600a5490565b10156124e1576124c160016110056124ba610a1d85600a6109eb565b60056107ce565b8281106124d7575b5060010161248e565b61248e565b91506124d26124c9565b506000198103610254575061025460006107c1565b6124fe612c01565b6102796125fa565b1561250d57565b60405162461bcd60e51b815260206004820152601e60248201527f4e6f20756e636c61696d6564207265776172647320617661696c61626c6500006044820152606490fd5b1561255957565b60405162461bcd60e51b8152806113ad600482016020808252818101527f4e6f20756e636c61696d6564207265776172647320746f207769746864726177604082015260600190565b156125a957565b60405162461bcd60e51b8152602060048201526024808201527f4661696c656420746f20776974686472617720756e636c61696d6564207265776044820152636172647360e01b6064820152608490fd5b612605611582612805565b612628612612600c61066a565b6126226110ac610254600961066a565b10612506565b6126356110c9600961066a565b61264c816126466110ac60006107c1565b11612552565b61265c6116656111bf600961066a565b61268960008061266a611df3565b8461267460405190565b90818003925af16126836114c3565b506125a2565b612691611df3565b6126c86126be7fe6a467945ee2b9323024312d40476005cea716e53bfa2328daa40d58a825b72092610604565b926105a460405190565b0390a2565b6102796124f6565b906126f06126e46102c9845490565b92600052602060002090565b9060005b8181106127015750505090565b90919261272561271e6001926127168761066a565b815260200190565b9460010190565b9291016126f4565b90610254916126d5565b9061027961048e9261274860405190565b9384809261272d565b61025490612737565b610254600a612751565b61276d30610604565b3190565b6102799061277d612c01565b6127dd565b1561278957565b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b61027990611d07816127f5611dce611dc96000611cf1565b1415612782565b61027990612771565b61280f600c61066a565b61281f6110ac610254600961066a565b1015426128356110ac61025461109c600e61066a565b10156128446110c9600961066a565b61284c612481565b8161285a6110ac60006107c1565b119182612886575b50509190811561287e575b50908115612879575090565b905090565b90503861286d565b1090503880612862565b906102796121f260036128a1611e5d565b946128ae610feb8261066a565b6128bd610ffe6001830161066a565b6110056128cc6002830161066a565b6040880152565b61025490612890565b906128e5825490565b6128ee81610f1d565b926129026020850191600052602060002090565b6000915b8383106129135750505050565b60046020600192612923856128d3565b815201920192019190612906565b610254906128dc565b612942610fc3565b90602080808460008152016000610f4e565b61025461293a565b60005b82811061296b57505050565b602090612976612954565b818401520161295f565b9061027961298d83610f1d565b9260208061299b8693610f06565b920191039061295c565b369037565b906102796129b783610f1d565b926020806129c58693610f06565b92019103906129a5565b906129d8610f58565b506129ec6129e783600361060d565b612931565b6129fa61240584600461060d565b92612a0c612a07600a5490565b612980565b91612a1e612a19600a5490565b6129aa565b94612a2960006107c1565b80612a396110ac610254600a5490565b1015612aa157612a9c90612a96612a8961119d612a5a610a1d85600a6109eb565b612a7d612a688260056107ce565b8b612a738892611012565b6112318383610fa9565b50610c8b89600661060d565b612a93838b610fa9565b52565b60010190565b612a29565b509390949161025490611076565b3433612ac5612abe600961066a565b3490612b37565b612aef7f6e8a19c7bcac2f8ca75d80a333a2cfffd851001c55ba805c58cc66c70d92bd7492610604565b92612afc61094560405190565b0390a2610279611665612abe600961066a565b634e487b7160e01b600052601160045260246000fd5b91908201809211612b3257565b612b0f565b6102549190612b25565b91908203918211612b3257565b6102549190612b41565b634e487b7160e01b600052601260045260246000fd5b8115612b78570490565b612b58565b6102549190612b6e565b9080821015612879575090565b81810292918115918404141715612b3257565b6102549190612b94565b15612bb857565b60405162461bcd60e51b8152806113ad600482016020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b610279612c0c611df3565b612c18611dce33610248565b14612bb1565b612c286000611024565b612c33826000611d96565b90612c67612c617f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e093610604565b91610604565b91612c7160405190565b600090a356fea264697066735822122068dd72d2b92a8759b1859bc37cf1dfd81b7c64ff71994ba52c0718bcbe13b6af64736f6c63430008180033",
  "deployedBytecode": "0x60806040526004361015610023575b361561001957600080fd5b610021612aaf565b005b60003560e01c8063045bccb31461024357806306fdde031461023e5780630b83a727146102395780630fb5a6b4146102345780631d625aed1461022f57806321c5bc7c1461022a5780632ef3ff6f146102255780633a16eca0146102205780633d5ec47e1461021b5780634b50c244146102165780634c00de82146102115780635c1c22e71461020c5780636521695614610207578063658b6729146102025780636dd2525e146101fd578063715018a6146101f857806378e97925146101f357806382e54e3d146101ee5780638ad6db92146101e95780638da5cb5b146101e45780638dcb4061146101df578063969247b2146101da578063a195b69c146101d5578063a68b91ab146101d0578063a9f619ff146101cb578063aa8108db146101c6578063ae486679146101c1578063b5d5b5fa146101bc578063bb561524146101b7578063bf8f05b1146101b2578063c946e5dc146101ad578063f2fde38b146101a8578063fbb6e31f146101a35763ffc9896b0361000e57610ec1565b610d72565b610d5a565b610d3f565b610d18565b610cb1565b610c95565b610c4f565b610c0f565b610be2565b610b82565b610aec565b610ab9565b610a95565b610a7a565b610a61565b610a23565b6109d0565b6109ac565b610991565b610969565b61094e565b610920565b6108cc565b610876565b61081c565b610792565b61076b565b610746565b6106fa565b610585565b610546565b61051f565b61031e565b6001600160a01b031690565b90565b61026081610248565b0361026757565b600080fd5b9050359061027982610257565b565b90602082820312610267576102549161026c565b9052565b80518252610279919060209081905b0151910152565b906102b681604093610293565b0190565b906102da6102d36102c9845190565b8084529260200190565b9260200190565b9060005b8181106102eb5750505090565b9091926103056102fe60019286516102a9565b9460200190565b9291016102de565b6020808252610254929101906102ba565b346102675761034561033961033436600461027b565b611076565b6040519182918261030d565b0390f35b600091031261026757565b634e487b7160e01b600052600060045260246000fd5b634e487b7160e01b600052602260045260246000fd5b90600160028304921680156103a0575b602083101461039b57565b61036a565b91607f1691610390565b805460009392916103c76103bd83610380565b8085529360200190565b916001811690811561041957506001146103e057505050565b6103f39192939450600052602060002090565b916000925b8184106104055750500190565b8054848401526020909301926001016103f8565b92949550505060ff1916825215156020020190565b90610254916103aa565b634e487b7160e01b600052604160045260246000fd5b90601f01601f191681019081106001600160401b0382111761046f57604052565b610438565b9061027961048e9261048560405190565b9384809261042e565b038361044e565b906000106104a65761025490610474565b610354565b61025460006001610495565b60005b8381106104ca5750506000910152565b81810151838201526020016104ba565b6104fb6105046020936102b6936104ef815190565b80835293849260200190565b958691016104b7565b601f01601f191690565b6020808252610254929101906104da565b346102675761052f366004610349565b61034561053a6104ab565b6040519182918261050e565b3461026757610556366004610349565b61055e611577565b604051005b610254916008021c81565b906102549154610563565b6102546000600d61056e565b3461026757610595366004610349565b6103456105a0610579565b6040515b9182918290815260200190565b80610260565b90503590610279826105b1565b919060408382031261026757610254906105de818561026c565b936020016105b7565b61025490610248906001600160a01b031682565b610254906105e7565b610254906105fb565b9061061790610604565b600052602052604060002090565b634e487b7160e01b600052603260045260246000fd5b805482101561065e57610655600491600052602060002090565b91020190600090565b610625565b6102549081565b6102549054610663565b61067f90600361060d565b90610688825490565b811015610267576106989161063b565b50906106a38261066a565b916106b06001820161066a565b9161025460036106c26002850161066a565b930161066a565b6106f6610279946106ef6060949897956106e8608086019a6000870152565b6020850152565b6040830152565b0152565b34610267576103456107166107103660046105c4565b90610674565b9061072394929460405190565b948594856106c9565b919060408382031261026757610254906105de81856105b7565b346102675761055e61075936600461072c565b9061196a565b6102546000600961056e565b346102675761077b366004610349565b6103456105a061075f565b6102546000600f61056e565b34610267576107a2366004610349565b6103456105a0610786565b9060208282031261026757610254916105b7565b6102546102546102549290565b90610617906107c1565b6107e39060056107ce565b6107ec8161066a565b9161025460026106c26001850161066a565b9081526060810193926102799290916040916106f6905b6020830152565b34610267576103456108376108323660046107ad565b6107d8565b604051919391938493846107fe565b90916060828403126102675761025461085f84846105b7565b9361086d81602086016105b7565b936040016105b7565b346102675761055e610889366004610846565b91611cae565b610254916008021c610248565b90610254915461088f565b6102546000601061089c565b61028f90610248565b60208101929161027991906108b3565b34610267576108dc366004610349565b6103456108e76108a7565b604051918291826108bc565b6108fe90600461060d565b9061025460016106c28461066a565b9081526040810192916102799160200152565b346102675761093861093336600461027b565b6108f3565b9061034561094560405190565b9283928361090d565b34610267576103456105a061096436600461027b565b611cb9565b3461026757610979366004610349565b6103456105a060085490565b6102546000600b61056e565b34610267576109a1366004610349565b6103456105a0610985565b34610267576109bc366004610349565b61055e611d0c565b6102546000600e61056e565b34610267576109e0366004610349565b6103456105a06109c4565b805482101561065e57610655600191600052602060002090565b600a80548210156102675761025491610a1d916109eb565b9061056e565b34610267576103456105a0610a393660046107ad565b610a05565b91906040838203126102675761025490610a5881856105b7565b9360200161026c565b346102675761055e610a74366004610a3e565b90611de9565b3461026757610a8a366004610349565b6103456108e7611df3565b3461026757610aa5366004610349565b61055e611fd4565b6102546000600c61056e565b3461026757610ac9366004610349565b6103456105a0610aad565b90151581526060810192916102799160200190610293565b3461026757610b04610aff36600461027b565b6123c3565b90610345610b1160405190565b92839283610ad4565b979593919a999896949290610140890189810360008b0152610b3b916104da565b9a60208901610b48919052565b60408801526060870152608086015260a085015260c084015260e08301526101008201610b74916108b3565b610120016102799115159052565b3461026757610b92366004610349565b610345610b9d612413565b96610bb39a989a96919695929594939460405190565b9a8b9a8b610b1a565b610254916008021c5b60ff1690565b906102549154610bbc565b61025460146010610bcb565b3461026757610bf2366004610349565b610345610bfd610bd6565b60405191829182901515815260200190565b3461026757610c1f366004610349565b6103456105a0612481565b6102546000600261089c565b61028f90610604565b6020810192916102799190610c36565b3461026757610c5f366004610349565b610345610c6a610c2a565b60405191829182610c3f565b610c9061025492610c8b60069360009461060d565b6107ce565b61056e565b34610267576103456105a0610cab3660046105c4565b90610c76565b3461026757610cc1366004610349565b61055e6126cd565b90610cd86102d36102c9845190565b9060005b818110610ce95750505090565b909192610cff6102fe6001928651815260200190565b929101610cdc565b602080825261025492910190610cc9565b3461026757610d28366004610349565b610345610d3361275a565b60405191829182610d07565b3461026757610d4f366004610349565b6103456105a0612764565b346102675761055e610d6d36600461027b565b6127fc565b3461026757610d82366004610349565b610345610bfd612805565b8051825261027991906060908190610daa60208201516020860152565b6102a260408201516040860152565b906102b681608093610d8d565b90610dd56102d36102c9845190565b9060005b818110610de65750505090565b909192610df96102fe6001928651610db9565b929101610dd9565b80518252610279919060409081906102a260208201516020860152565b906102b681606093610e01565b90610e3a6102d36102c9845190565b9060005b818110610e4b5750505090565b909192610e5e6102fe6001928651610e1e565b929101610e3e565b9390610eb3926102549694610e98610e8d610ea59460c08a01908a820360008c0152610dc6565b926020890190610293565b8682036060880152610e2b565b908482036080860152610cc9565b9160a08184039101526102ba565b3461026757610345610edc610ed736600461027b565b6129cf565b91610ee995939560405190565b95869586610e66565b90610279610eff60405190565b928361044e565b6001600160401b03811161046f5760208091020190565b90610f2f610f2a83610f06565b610ef2565b918252565b6102546040610ef2565b610f46610f34565b906020808360005b8152016000905250565b610254610f3e565b60005b828110610f6f57505050565b602090610f7a610f58565b8184015201610f63565b90610279610f9183610f1d565b92602080610f9f8693610f06565b9201910390610f60565b90610fb2825190565b81101561065e576020809102010190565b6102546060610ef2565b9061027961100b6002610fde610fc3565b94610fef610feb8261066a565b8752565b611005610ffe6001830161066a565b6020880152565b0161066a565b6040840152565b61025490610fcd565b61025490610248565b610254905461101b565b90505190610279826105b1565b90602082820312610267576102549161102e565b9160206102799294936106f6604082019660008301906108b3565b6040513d6000823e3d90fd5b90611088611083600a5490565b610f84565b426110b06110ac61025461109c600e61066a565b6110a6600d61066a565b90612b37565b9190565b11801561133b575b6112c9576110d96110c9600961066a565b6110d3600c61066a565b90612b4e565b6110e360006107c1565b905b816110f56110ac610254600a5490565b10156112c257611109610a1d83600a6109eb565b9061111d6111188360056107ce565b611012565b61112f61112a6002611024565b610604565b91602062fdd58e938990611157879661116261114a60405190565b9889958694859460e01b90565b84526004840161104f565b03915afa9384156112bd576111ec896111e76111a261119d6111966112449a61123d9a60009161128f575b5094600661060d565b86906107ce565b61066a565b604087015181101561127d576111e16111c66111bf60408a015190565b8390612b4e565b6111db886111d560208c015190565b90612b7d565b90612b87565b92612b4e565b612b87565b90611202826111fc602087015190565b90612ba7565b9383851161124a575b50611237916112249061081561121f610f34565b938452565b8787916112318383610fa9565b52610fa9565b50612b4e565b9160010190565b906110e5565b9093506112379150611224611274611267856111d5602086015190565b926111fc60208592015190565b9491925061120b565b6111e161128a60006107c1565b6111c6565b6112b0915060203d81116112b6575b6112a8818361044e565b81019061103b565b3861118d565b503d61129e565b61106a565b5090925050565b9091506112d660006107c1565b806112e66110ac610254600a5490565b1015611337576113329061132b611301610a1d83600a6109eb565b61131e6108156000611319611314610f34565b948552565b6107c1565b8483916112318383610fa9565b5060010190565b6112d6565b5090565b50611346600c61066a565b6113566110ac610254600961066a565b10156110b8565b1561136457565b60405162461bcd60e51b8152806113ad600482016020808252818101527f5374616b696e6720706572696f6420686173206e6f7420656e64656420796574604082015260600190565b0390fd5b156113b857565b60405162461bcd60e51b81526020600482015260136024820152724e6f207265776172647320746f20636c61696d60681b6044820152606490fd5b156113fa57565b60405162461bcd60e51b815260206004820152601d60248201527f496e73756666696369656e7420726573657276656420726577617264730000006044820152606490fd5b90600019905b9181191691161790565b9061145f610254611466926107c1565b825461143f565b9055565b6102799190611483906020906001906114898185875190565b9061144f565b0192015190565b906102799161146a565b6001600160401b03811161046f57602090601f01601f19160190565b90610f2f610f2a8361149a565b3d156114dd576114d23d6114b6565b903d6000602084013e565b606090565b156114e957565b60405162461bcd60e51b815260206004820152601e60248201527f4661696c656420746f207472616e7366657220726f79616c74792066656500006044820152606490fd5b1561153557565b60405162461bcd60e51b815260206004820152601a6024820152794661696c656420746f207472616e73666572207265776172647360301b6044820152606490fd5b611587611582612805565b61135d565b61159160006107c1565b61159b60006107c1565b806115ab6110ac610254600a5490565b1015611622576115bf610a1d82600a6109eb565b6115df61119d6115d36111188460056107ce565b92610c8b33600661060d565b806115ed6110ac60006107c1565b11611602575b505060010161159b565b61159b565b926110a661161a926111fc60206115fd969792015190565b9190386115f3565b5061163a816116346110ac60006107c1565b116113b1565b6116558161164e6110ac610254600c61066a565b11156113f3565b61166c6116656111bf600961066a565b600961144f565b61167660006107c1565b806116866110ac610254600a5490565b101561175d576116e39061169e610a1d82600a6109eb565b6116ac6102548260056107ce565b906116c561119d6116be33600661060d565b83906107ce565b91826116d46110ac60006107c1565b116116e8575b50505060010190565b611676565b61171b9061170c6116f960006107c1565b61170761119633600661060d565b61144f565b6111fc6001339495920161066a565b6117457fdacbdde355ba930696a362ea6738feb9f8bd52dfb3d81947558fd3217e23e32592610604565b9261175261094560405190565b0390a23880806116da565b50600080610279928061176f836107c1565b9061177a600f61066a565b6117866110ac866107c1565b1161183c575b6117cc6117d3916117bd856117ad426108156117a6610f34565b938b850152565b6117b833600461060d565b611490565b6117c7600c61066a565b612b4e565b600c61144f565b806117e06110ac856107c1565b11611807575b5033906117f260405190565b90818003925af16118016114c3565b5061152e565b8280611836926118176010611024565b9061182160405190565b90818003925af16118306114c3565b506114e2565b386117e6565b91505061185a611850826111fc600f61066a565b6111d560646107c1565b6117d36117cc61186a8385612b4e565b9391505061178c565b9061027991611880612c01565b61192f565b6102549060a01c610bc5565b6102549054611885565b156118a257565b60405162461bcd60e51b815260206004820152603960248201527f5374616b696e672074696d656672616d652063616e6e6f74206265206368616e60448201527833b2b21030b33a32b91034b734ba34b0b634bd30ba34b7b71760391b6064820152608490fd5b9060ff60a01b9060a01b611445565b9061192861025461146692151590565b8254611909565b9061195761195e9261195061194b6119476010611891565b1590565b61189b565b600d61144f565b600e61144f565b61027960016010611918565b9061027991611873565b906102799291611982612c01565b611b50565b1561198e57565b60405162461bcd60e51b815260206004820152602d60248201527f546f6b656e20616c726561647920696e697469616c697a65642077697468207360448201526c74616b656420616d6f756e747360981b6064820152608490fd5b801515610260565b90505190610279826119e9565b9060208282031261026757610254916119f1565b15611a1957565b60405162461bcd60e51b8152602060048201526015602482015274151bdad95b881251081a5cc81b9bdd081d985b1a59605a1b6044820152606490fd5b15611a5d57565b60405162461bcd60e51b815260206004820152603a60248201527f5374616b696e6720706172616d65746572732063616e6e6f74206265206368616044820152793733b2b21030b33a32b91034b734ba34b0b634bd30ba34b7b71760311b6064820152608490fd5b610279919061148390604090600290611ade8185875190565b61148960018201611483602088015190565b9061027991611ac5565b9160001960089290920291821b911b611445565b9190611b1f610254611466936107c1565b908354611afa565b80549190600160401b83101561046f5782611b4a916001610279950181556109eb565b90611b0e565b91611bba9190611b7c611b6960006110058760056107ce565b611b766110ac60006107c1565b14611987565b6020611b8b61112a6002611024565b635a783c0090611bac8792611b9f60405190565b9788948593849360e01b90565b835260048301526024820190565b03915afa9081156112bd57611bde611c1192611c2195600091611c80575b50611a12565b611bf3611bee6119476010611891565b611a56565b6106ef6000936106e8611c0d611c07610fc3565b966107c1565b8652565b611c1c8360056107ce565b611af0565b600090611c2e60006107c1565b80611c3e6110ac610254600a5490565b1015611c7857611c52610a1d82600a6109eb565b8214611c6057600101611c2e565b50905060005b611c6d5750565b61027990600a611b27565b509015611c66565b611ca1915060203d8111611ca7575b611c99818361044e565b8101906119fe565b38611bd8565b503d611c8f565b906102799291611974565b611cd061025491611cc8600090565b50600361060d565b5490565b611cdc612c01565b610279611cfa565b6102486102546102549290565b61025490611ce4565b610279611d076000611cf1565b612c1e565b610279611cd4565b9061027991611d21612c01565b611dad565b15611d2d57565b60405162461bcd60e51b815260206004820152602c60248201527f526f79616c747920726563697069656e742063616e6e6f74206265207468652060448201526b7a65726f206164647265737360a01b6064820152608490fd5b906001600160a01b0390611445565b90611da661025461146692610604565b8254611d87565b90611de261027992611ddb83611dd4611dce611dc96000611cf1565b610248565b91610248565b1415611d26565b600f61144f565b6010611d96565b9061027991611d14565b6102546000611024565b15611e0457565b60405162461bcd60e51b815260206004820152602b60248201527f496e73756666696369656e74207265776172647320617661696c61626c65206960448201526a37103a3432903837b7b61760a91b6064820152608490fd5b6102546080610ef2565b610279919061148390606090600390611e808185875190565b611e9260018201611483602088015190565b61148960028201611483604088015190565b91906104a65761027991611e67565b80549190600160401b83101561046f5782611ed69160016102799501815561063b565b90611ea4565b61025490610bc5565b6102549054611edc565b916001600160a01b0360089290920291821b911b611445565b9190611f1961025461146693610604565b908354611eef565b80549190600160401b83101561046f5782611f44916001610279950181556109eb565b90611f08565b9060ff90611445565b90611f6361025461146692151590565b8254611f4a565b15611f7157565b60405162461bcd60e51b815260206004820152603560248201527f4e6f207374616b61626c6520746f6b656e7320666f756e64206f72207374616b60448201527434b733903832b934b7b2103430b99032b73232b21760591b6064820152608490fd5b611fe2611582611947612805565b611fef6110c9600961066a565b90612007826120016110ac60006107c1565b11611dfd565b61200f612481565b9060009061201d60006107c1565b925b8361202f6110ac610254600a5490565b10156122e557612043610a1d85600a6109eb565b9361205161112a6002611024565b602062fdd58e913390611157899461207861206b60405190565b9687958694859460e01b90565b03915afa9081156112bd576000916122c7575b50936120a561119d61209e33600661060d565b88906107ce565b956120b46111188260056107ce565b91866120c36110ac60006107c1565b1480156122a9575b612298578787111561229857506121106001966111e76121086120f96120f2604088015190565b8c90612b4e565b6111db8d6111d560208a015190565b918a90612b4e565b91612120836111fc602084015190565b97898911612259575b61218a6117cc6121416121a898999a9b9c8d90612b4e565b9b61216661215188958990612b37565b61170761215f33600661060d565b89906107ce565b61217b611c0d612174875190565b8990612b37565b612185600c61066a565b612b37565b806121986110ac60006107c1565b116121b0575b5050505060010190565b92919061201f565b6121fe916121f96121c561025433600361060d565b916121f26121d66020889693015190565b6121eb4293610ffe6121e6611e5d565b988952565b6040860152565b6060840152565b611eb3565b33909161220b600e61066a565b9261224d612219600d61066a565b6122437f9cfd25589d1eb8ad71e342a86a8524e83522e3936c0803048c08f6d9ad974f4095610604565b9561072360405190565b0390a23880808061219e565b92506121a89495969750612272896111d5602084015190565b9261218a6117cc61214161228b876111fc602088015190565b9b9a999850505050612129565b965050506121a89192935060010190565b506122b4600d61066a565b6122c16110ac60006107c1565b146120cb565b6122df915060203d81116112b6576112a8818361044e565b3861208b565b916122fd919493508080612379575b61235457611f6a565b8161230b6110ac60006107c1565b11918261234a575b50508061232c575b61232157565b61027942600b61144f565b50612337600b61066a565b6123446110ac60006107c1565b1461231b565b1090503880612313565b61235f336008611f21565b612374600161236f33600761060d565b611f53565b611f6a565b5061239061194761238b33600761060d565b611ee5565b6122f4565b906102796123b360016123a6610f34565b94611005610feb8261066a565b6020840152565b61025490612395565b906123cc610f58565b906123dd600161100585600461060d565b6123ea6110ac60006107c1565b1192836123f45750565b61025491925061240590600461060d565b6123ba565b61025490610474565b61241d600161240a565b90612428600961066a565b90612433600b61066a565b9061243e600c61066a565b9061244c6110c9600961066a565b90612457600d61066a565b90612462600e61066a565b9061246d600f61066a565b906124786010611024565b90610254612805565b60001961248e60006107c1565b8061249e6110ac610254600a5490565b10156124e1576124c160016110056124ba610a1d85600a6109eb565b60056107ce565b8281106124d7575b5060010161248e565b61248e565b91506124d26124c9565b506000198103610254575061025460006107c1565b6124fe612c01565b6102796125fa565b1561250d57565b60405162461bcd60e51b815260206004820152601e60248201527f4e6f20756e636c61696d6564207265776172647320617661696c61626c6500006044820152606490fd5b1561255957565b60405162461bcd60e51b8152806113ad600482016020808252818101527f4e6f20756e636c61696d6564207265776172647320746f207769746864726177604082015260600190565b156125a957565b60405162461bcd60e51b8152602060048201526024808201527f4661696c656420746f20776974686472617720756e636c61696d6564207265776044820152636172647360e01b6064820152608490fd5b612605611582612805565b612628612612600c61066a565b6126226110ac610254600961066a565b10612506565b6126356110c9600961066a565b61264c816126466110ac60006107c1565b11612552565b61265c6116656111bf600961066a565b61268960008061266a611df3565b8461267460405190565b90818003925af16126836114c3565b506125a2565b612691611df3565b6126c86126be7fe6a467945ee2b9323024312d40476005cea716e53bfa2328daa40d58a825b72092610604565b926105a460405190565b0390a2565b6102796124f6565b906126f06126e46102c9845490565b92600052602060002090565b9060005b8181106127015750505090565b90919261272561271e6001926127168761066a565b815260200190565b9460010190565b9291016126f4565b90610254916126d5565b9061027961048e9261274860405190565b9384809261272d565b61025490612737565b610254600a612751565b61276d30610604565b3190565b6102799061277d612c01565b6127dd565b1561278957565b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b61027990611d07816127f5611dce611dc96000611cf1565b1415612782565b61027990612771565b61280f600c61066a565b61281f6110ac610254600961066a565b1015426128356110ac61025461109c600e61066a565b10156128446110c9600961066a565b61284c612481565b8161285a6110ac60006107c1565b119182612886575b50509190811561287e575b50908115612879575090565b905090565b90503861286d565b1090503880612862565b906102796121f260036128a1611e5d565b946128ae610feb8261066a565b6128bd610ffe6001830161066a565b6110056128cc6002830161066a565b6040880152565b61025490612890565b906128e5825490565b6128ee81610f1d565b926129026020850191600052602060002090565b6000915b8383106129135750505050565b60046020600192612923856128d3565b815201920192019190612906565b610254906128dc565b612942610fc3565b90602080808460008152016000610f4e565b61025461293a565b60005b82811061296b57505050565b602090612976612954565b818401520161295f565b9061027961298d83610f1d565b9260208061299b8693610f06565b920191039061295c565b369037565b906102796129b783610f1d565b926020806129c58693610f06565b92019103906129a5565b906129d8610f58565b506129ec6129e783600361060d565b612931565b6129fa61240584600461060d565b92612a0c612a07600a5490565b612980565b91612a1e612a19600a5490565b6129aa565b94612a2960006107c1565b80612a396110ac610254600a5490565b1015612aa157612a9c90612a96612a8961119d612a5a610a1d85600a6109eb565b612a7d612a688260056107ce565b8b612a738892611012565b6112318383610fa9565b50610c8b89600661060d565b612a93838b610fa9565b52565b60010190565b612a29565b509390949161025490611076565b3433612ac5612abe600961066a565b3490612b37565b612aef7f6e8a19c7bcac2f8ca75d80a333a2cfffd851001c55ba805c58cc66c70d92bd7492610604565b92612afc61094560405190565b0390a2610279611665612abe600961066a565b634e487b7160e01b600052601160045260246000fd5b91908201809211612b3257565b612b0f565b6102549190612b25565b91908203918211612b3257565b6102549190612b41565b634e487b7160e01b600052601260045260246000fd5b8115612b78570490565b612b58565b6102549190612b6e565b9080821015612879575090565b81810292918115918404141715612b3257565b6102549190612b94565b15612bb857565b60405162461bcd60e51b8152806113ad600482016020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b610279612c0c611df3565b612c18611dce33610248565b14612bb1565b612c286000611024565b612c33826000611d96565b90612c67612c617f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e093610604565b91610604565b91612c7160405190565b600090a356fea264697066735822122068dd72d2b92a8759b1859bc37cf1dfd81b7c64ff71994ba52c0718bcbe13b6af64736f6c63430008180033",
  "devdoc": {
    "details": "This contract enables users to stake their non-transferable tokens, represented by DataPointsMulti.sol, and earn rewards based on the staked amount for a specific duration. Each token ID is associated with a unique reward rate, and rewards are distributed in the form of the native currency (e.g., ETH) after the staking period ends. Inherits from DataPointsMulti for token balance interactions. Rewards are managed directly with the native currency of the blockchain, allowing users to claim their earnings in ETH or the native currency of the network where the contract is deployed.",
    "kind": "dev",
    "methods": {
      "claimAllRewards()": {
        "details": "Allows users to claim rewards for all their staked tokens after their respective staking periods end."
      },
      "constructor": {
        "details": "Constructor to initialize the DataStaking contract.",
        "params": {
          "_dataPointsMulti": "Address of the DataPointsMulti contract.",
          "_name": "Name of the Data Staking Pool."
        }
      },
      "getEligibleStakingAmounts(address)": {
        "details": "Calculates the maximum amount a user can stake for each tokenId based on the current staking parameters. It takes into account the user's balance, the maxStakeLimit for each tokenId, and the remaining rewards in the pool. The function ensures that the user does not exceed the maximum staking capacity for any tokenId and that the total potential rewards do not surpass the available rewards in the pool. The function returns an array of structs, each containing a tokenId and the corresponding amount that the user is eligible to stake.",
        "params": {
          "user": "The address of the user for whom to calculate the available staking amounts."
        },
        "returns": {
          "eligibleStakes": "An array of structs, each containing a tokenId and the corresponding eligible staking amount."
        }
      },
      "getRemainingRewards()": {
        "details": "Returns the remaining amount of ETH in the contract.",
        "returns": {
          "_0": "The amount of ETH left for rewards."
        }
      },
      "getUserStakingTransactionsCount(address)": {
        "details": "Checks if the staking pool is full based on the total reserved rewards or if the staking period has expired. The staking pool is considered full if the total reserved rewards equal the total rewards pool initially set. The staking period is considered expired if the current block timestamp is greater than or equal to the sum of the `startTime` and `duration`.",
        "returns": {
          "_0": "True if the staking pool is full based on the total reserved rewards or the staking period has expired, false otherwise."
        }
      },
      "hasUserClaimed(address)": {
        "details": "Checks if the user has claimed rewards and returns the details of the last claim transaction.",
        "params": {
          "user": "The address of the user to check."
        },
        "returns": {
          "hasClaimed": "A boolean indicating whether the user has claimed rewards.",
          "lastClaimTransaction": "The details of the last claim transaction if one exists."
        }
      },
      "isStakingPoolFilledOrExpired()": {
        "details": "Checks if the staking pool is full based on the total reserved rewards or if the staking period has expired. The staking pool is considered full if the total reserved rewards equal the total rewards pool initially set. The staking period is considered expired if the current block timestamp is greater than or equal to the sum of the `startTime` and `duration`.",
        "returns": {
          "_0": "True if the staking pool is full based on the total reserved rewards or the staking period has expired, false otherwise."
        }
      },
      "owner()": {
        "details": "Returns the address of the current owner."
      },
      "renounceOwnership()": {
        "details": "Leaves the contract without owner. It will not be possible to call `onlyOwner` functions. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby disabling any functionality that is only available to the owner."
      },
      "setRoyaltyFeePercentageAndRecipient(uint256,address)": {
        "details": "Sets the royalty fee and royalty recipient. Can only be called by the contract owner.",
        "params": {
          "_royaltyFeePercentage": "The new royalty fee percentage.",
          "_royaltyRecipient": "The new royalty recipient address."
        }
      },
      "setStakingParameters(uint256,uint256,uint256)": {
        "details": "Sets the reward per token, duration, and max stake limit for a specific token ID.",
        "params": {
          "maxStakeLimit": "The maximum amount of tokens that can be staked for the token ID.",
          "rewardPerToken": "The reward per token to set for the token ID.",
          "tokenId": "The token ID for which to set the staking parameters."
        }
      },
      "setStakingTimeframe(uint256,uint256)": {
        "details": "Sets the staking duration and start time for the contract.",
        "params": {
          "_duration": "The duration of the staking period in seconds.",
          "_startTime": "The start time for staking to begin."
        }
      },
      "stakeAll()": {
        "details": "Allows users to stake all their tokens for which staking parameters have been set. This function iterates over the array of token IDs that have staking parameters defined. For each token ID, it checks the user's balance and stakes up to the maximum stake limit, or the user's balance, whichever is lower. It calculates the potential reward and ensures that staking does not exceed the total available reward pool. The function updates the user's staked amount and the total staked amount for each token ID. It emits a Staked event for each staking action performed."
      },
      "transferOwnership(address)": {
        "details": "Transfers ownership of the contract to a new account (`newOwner`). Can only be called by the current owner."
      },
      "withdrawUnclaimedRewards()": {
        "details": "Allows the contract owner to withdraw unclaimed rewards after the staking period has ended. This function is designed to recover funds that were not distributed because users did not claim their rewards. It can only be called by the owner of the contract and only after the staking period has concluded, as determined by the `startTime` and `duration` parameters. The amount withdrawn is the difference between the total rewards pool and the total reserved rewards, which represents the unclaimed rewards. It is crucial to ensure that all users have had a sufficient opportunity to claim their rewards before this function is called to maintain trust and integrity in the staking process."
      }
    },
    "title": "DataStakingDynamicNative",
    "version": 1
  },
  "userdoc": {
    "kind": "user",
    "methods": {
      "withdrawUnclaimedRewards()": {
        "notice": "This function will revert if the staking period has not ended or if there are no unclaimed rewards."
      }
    },
    "notice": "Ensure that the DataPointsMulti contract is deployed and its address is known before deploying this contract. The contract should be funded with enough native currency to cover the reward payouts.",
    "version": 1
  },
  "storageLayout": {
    "storage": [
      {
        "astId": 396,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "_owner",
        "offset": 0,
        "slot": "0",
        "type": "t_address"
      },
      {
        "astId": 6533,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "name",
        "offset": 0,
        "slot": "1",
        "type": "t_string_storage"
      },
      {
        "astId": 6536,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "dataPointsMulti",
        "offset": 0,
        "slot": "2",
        "type": "t_contract(DataPointsMulti)5598"
      },
      {
        "astId": 6568,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "userStakingTransactions",
        "offset": 0,
        "slot": "3",
        "type": "t_mapping(t_address,t_array(t_struct(StakingTransaction)6552_storage)dyn_storage)"
      },
      {
        "astId": 6573,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "userClaimTransactions",
        "offset": 0,
        "slot": "4",
        "type": "t_mapping(t_address,t_struct(ClaimTransaction)6557_storage)"
      },
      {
        "astId": 6578,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "stakeInfos",
        "offset": 0,
        "slot": "5",
        "type": "t_mapping(t_uint256,t_struct(StakeInfo)6543_storage)"
      },
      {
        "astId": 6584,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "userStakes",
        "offset": 0,
        "slot": "6",
        "type": "t_mapping(t_address,t_mapping(t_uint256,t_uint256))"
      },
      {
        "astId": 6588,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "hasStaked",
        "offset": 0,
        "slot": "7",
        "type": "t_mapping(t_address,t_bool)"
      },
      {
        "astId": 6591,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "stakers",
        "offset": 0,
        "slot": "8",
        "type": "t_array(t_address)dyn_storage"
      },
      {
        "astId": 6593,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "totalRewardsPool",
        "offset": 0,
        "slot": "9",
        "type": "t_uint256"
      },
      {
        "astId": 6596,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "stakingTokenIds",
        "offset": 0,
        "slot": "10",
        "type": "t_array(t_uint256)dyn_storage"
      },
      {
        "astId": 6598,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "rewardsPoolFullTimestamp",
        "offset": 0,
        "slot": "11",
        "type": "t_uint256"
      },
      {
        "astId": 6600,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "totalReservedRewards",
        "offset": 0,
        "slot": "12",
        "type": "t_uint256"
      },
      {
        "astId": 6602,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "duration",
        "offset": 0,
        "slot": "13",
        "type": "t_uint256"
      },
      {
        "astId": 6604,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "startTime",
        "offset": 0,
        "slot": "14",
        "type": "t_uint256"
      },
      {
        "astId": 6606,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "royaltyFeePercentage",
        "offset": 0,
        "slot": "15",
        "type": "t_uint256"
      },
      {
        "astId": 6608,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "royaltyRecipient",
        "offset": 0,
        "slot": "16",
        "type": "t_address"
      },
      {
        "astId": 6611,
        "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
        "label": "stakingPeriodInitialized",
        "offset": 20,
        "slot": "16",
        "type": "t_bool"
      }
    ],
    "types": {
      "t_address": {
        "encoding": "inplace",
        "label": "address",
        "numberOfBytes": "20"
      },
      "t_array(t_address)dyn_storage": {
        "base": "t_address",
        "encoding": "dynamic_array",
        "label": "address[]",
        "numberOfBytes": "32"
      },
      "t_array(t_struct(StakingTransaction)6552_storage)dyn_storage": {
        "base": "t_struct(StakingTransaction)6552_storage",
        "encoding": "dynamic_array",
        "label": "struct DataStakingDynamicNative.StakingTransaction[]",
        "numberOfBytes": "32"
      },
      "t_array(t_uint256)dyn_storage": {
        "base": "t_uint256",
        "encoding": "dynamic_array",
        "label": "uint256[]",
        "numberOfBytes": "32"
      },
      "t_bool": {
        "encoding": "inplace",
        "label": "bool",
        "numberOfBytes": "1"
      },
      "t_contract(DataPointsMulti)5598": {
        "encoding": "inplace",
        "label": "contract DataPointsMulti",
        "numberOfBytes": "20"
      },
      "t_mapping(t_address,t_array(t_struct(StakingTransaction)6552_storage)dyn_storage)": {
        "encoding": "mapping",
        "key": "t_address",
        "label": "mapping(address => struct DataStakingDynamicNative.StakingTransaction[])",
        "numberOfBytes": "32",
        "value": "t_array(t_struct(StakingTransaction)6552_storage)dyn_storage"
      },
      "t_mapping(t_address,t_bool)": {
        "encoding": "mapping",
        "key": "t_address",
        "label": "mapping(address => bool)",
        "numberOfBytes": "32",
        "value": "t_bool"
      },
      "t_mapping(t_address,t_mapping(t_uint256,t_uint256))": {
        "encoding": "mapping",
        "key": "t_address",
        "label": "mapping(address => mapping(uint256 => uint256))",
        "numberOfBytes": "32",
        "value": "t_mapping(t_uint256,t_uint256)"
      },
      "t_mapping(t_address,t_struct(ClaimTransaction)6557_storage)": {
        "encoding": "mapping",
        "key": "t_address",
        "label": "mapping(address => struct DataStakingDynamicNative.ClaimTransaction)",
        "numberOfBytes": "32",
        "value": "t_struct(ClaimTransaction)6557_storage"
      },
      "t_mapping(t_uint256,t_struct(StakeInfo)6543_storage)": {
        "encoding": "mapping",
        "key": "t_uint256",
        "label": "mapping(uint256 => struct DataStakingDynamicNative.StakeInfo)",
        "numberOfBytes": "32",
        "value": "t_struct(StakeInfo)6543_storage"
      },
      "t_mapping(t_uint256,t_uint256)": {
        "encoding": "mapping",
        "key": "t_uint256",
        "label": "mapping(uint256 => uint256)",
        "numberOfBytes": "32",
        "value": "t_uint256"
      },
      "t_string_storage": {
        "encoding": "bytes",
        "label": "string",
        "numberOfBytes": "32"
      },
      "t_struct(ClaimTransaction)6557_storage": {
        "encoding": "inplace",
        "label": "struct DataStakingDynamicNative.ClaimTransaction",
        "members": [
          {
            "astId": 6554,
            "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
            "label": "totalRewardsClaimed",
            "offset": 0,
            "slot": "0",
            "type": "t_uint256"
          },
          {
            "astId": 6556,
            "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
            "label": "timestamp",
            "offset": 0,
            "slot": "1",
            "type": "t_uint256"
          }
        ],
        "numberOfBytes": "64"
      },
      "t_struct(StakeInfo)6543_storage": {
        "encoding": "inplace",
        "label": "struct DataStakingDynamicNative.StakeInfo",
        "members": [
          {
            "astId": 6538,
            "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
            "label": "amountStaked",
            "offset": 0,
            "slot": "0",
            "type": "t_uint256"
          },
          {
            "astId": 6540,
            "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
            "label": "rewardPerToken",
            "offset": 0,
            "slot": "1",
            "type": "t_uint256"
          },
          {
            "astId": 6542,
            "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
            "label": "maxStakeLimit",
            "offset": 0,
            "slot": "2",
            "type": "t_uint256"
          }
        ],
        "numberOfBytes": "96"
      },
      "t_struct(StakingTransaction)6552_storage": {
        "encoding": "inplace",
        "label": "struct DataStakingDynamicNative.StakingTransaction",
        "members": [
          {
            "astId": 6545,
            "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
            "label": "tokenId",
            "offset": 0,
            "slot": "0",
            "type": "t_uint256"
          },
          {
            "astId": 6547,
            "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
            "label": "amount",
            "offset": 0,
            "slot": "1",
            "type": "t_uint256"
          },
          {
            "astId": 6549,
            "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
            "label": "rewardPerToken",
            "offset": 0,
            "slot": "2",
            "type": "t_uint256"
          },
          {
            "astId": 6551,
            "contract": "contracts/DataStakingDynamicNative.sol:DataStakingDynamicNative",
            "label": "timestamp",
            "offset": 0,
            "slot": "3",
            "type": "t_uint256"
          }
        ],
        "numberOfBytes": "128"
      },
      "t_uint256": {
        "encoding": "inplace",
        "label": "uint256",
        "numberOfBytes": "32"
      }
    }
  }
}