diff --git a/deploy/8_1_deploy_staking_estoken.ts b/deploy/8_1_deploy_staking_estoken.ts new file mode 100644 index 0000000..749f5a2 --- /dev/null +++ b/deploy/8_1_deploy_staking_estoken.ts @@ -0,0 +1,23 @@ +import {HardhatRuntimeEnvironment} from "hardhat/types"; +import {DeployFunction} from "hardhat-deploy/types"; +import {deplayOne} from "../scripts/utils"; +import {ZeroAddress} from "ethers"; + + +const deployNFTClaim: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const config = require(`../config/config_${hre.network.name}`); + const tokenName = "Escrowed CEC"; + const tokenSymbol = "esCEC"; + const esCEC = await deplayOne({ + hre, + name: "esCEC", + type: "erc20", + contractName: "EsToken", + args: [tokenName, tokenSymbol], + verify: true, + }); +}; + +deployNFTClaim.tags = ["EsCEC"]; + +export default deployNFTClaim; diff --git a/deploy/8_deploy_staking.ts b/deploy/8_2_deploy_staking_cec.ts similarity index 86% rename from deploy/8_deploy_staking.ts rename to deploy/8_2_deploy_staking_cec.ts index 83f8a02..13e2156 100644 --- a/deploy/8_deploy_staking.ts +++ b/deploy/8_2_deploy_staking_cec.ts @@ -1,27 +1,16 @@ import {HardhatRuntimeEnvironment} from "hardhat/types"; import {DeployFunction} from "hardhat-deploy/types"; -import {updateArray, deplayOne} from "../scripts/utils"; +import {deplayOne, loadData} from "../scripts/utils"; import {ZeroAddress} from "ethers"; - -const secondsPerYear = 365 * 24 * 60 * 60; - +import { assert } from "chai"; const deployNFTClaim: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const config = require(`../config/config_${hre.network.name}`); - const {mallFeeAddress, paymentTokens, verifier} = config.market; const {cec, rewardPerSecond, vestingDuration} = config.staking; - const tokenName = "Escrowed CEC"; - const tokenSymbol = "esCEC"; - const esCEC = await deplayOne({ - hre, - name: "esCEC", - type: "erc20", - contractName: "EsToken", - args: [tokenName, tokenSymbol], - verify: true, - }); - + const datas = loadData({ network: hre.network.name }); + const esCEC = datas.find((item: any) => item.name === "esCEC"); + assert(esCEC, "esCEC not found"); const stakedCecTracker = await deplayOne({ hre, name: "stakedCecTracker", @@ -52,7 +41,7 @@ const deployNFTClaim: DeployFunction = async function (hre: HardhatRuntimeEnviro const rewardRouter = await deplayOne({ hre, - name: "rewardRouter", + name: "stakedCecRouter", type: "logic", contractName: "RewardRouter", args: [cec, esCEC.address, stakedCecTracker.address, vester.address], @@ -98,6 +87,6 @@ const deployNFTClaim: DeployFunction = async function (hre: HardhatRuntimeEnviro console.log("==esCECContract setHandler"); }; -deployNFTClaim.tags = ["Staking"]; +deployNFTClaim.tags = ["StakingCEC"]; export default deployNFTClaim; diff --git a/deploy/8_3_deploy_staking_escec.ts b/deploy/8_3_deploy_staking_escec.ts new file mode 100644 index 0000000..468160d --- /dev/null +++ b/deploy/8_3_deploy_staking_escec.ts @@ -0,0 +1,78 @@ +import {HardhatRuntimeEnvironment} from "hardhat/types"; +import {DeployFunction} from "hardhat-deploy/types"; +import {deplayOne, loadData} from "../scripts/utils"; +import {ZeroAddress} from "ethers"; +import { assert } from "chai"; + + + +const deployNFTClaim: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { + const config = require(`../config/config_${hre.network.name}`); + const {cec, rewardPerSecond, vestingDuration} = config.staking; + const datas = loadData({ network: hre.network.name }); + const esCEC = datas.find((item: any) => item.name === "esCEC"); + const vester = datas.find((item: any) => item.name === "vester"); + assert(esCEC, "esCEC not found"); + assert(vester, "vester not found"); + + const stakedCecTracker = await deplayOne({ + hre, + name: "stakedEsCecTracker", + type: "logic", + contractName: "RewardTracker", + args: ["Staked CEC", "sCEC"], + verify: true, + }); + + const stakedCecDistributor = await deplayOne({ + hre, + name: "stakedEsCecDistributor", + type: "logic", + contractName: "RewardDistributor", + args: [esCEC.address, stakedCecTracker.address], + verify: true, + }); + + const rewardRouter = await deplayOne({ + hre, + name: "stakedEsCecRouter", + type: "logic", + contractName: "RewardRouter", + args: [cec, esCEC.address, stakedCecTracker.address, vester.address], + verify: true, + }); + + const stakedCecTrackerContract = await hre.ethers.getContractAt("RewardTracker", stakedCecTracker.address); + const stakedCecDistributorContract = await hre.ethers.getContractAt( + "RewardDistributor", + stakedCecDistributor.address, + ); + + let tx = await stakedCecTrackerContract.initialize([cec, esCEC.address], stakedCecDistributor.address); + await tx.wait(); + console.log("==stakedEsCecTrackerContract initialized"); + tx = await stakedCecTrackerContract.setInPrivateTransferMode(true); + await tx.wait(); + console.log("==stakedEsCecTrackerContract setInPrivateTransferMode"); + tx = await stakedCecTrackerContract.setInPrivateStakingMode(true); + await tx.wait(); + console.log("==stakedEsCecTrackerContract setInPrivateStakingMode"); + tx = await stakedCecDistributorContract.updateLastDistributionTime(); + await tx.wait(); + console.log("==stakedEsCecDistributorContract updateLastDistributionTime"); + tx = await stakedCecDistributorContract.setTokensPerInterval(rewardPerSecond); + await tx.wait(); + console.log("==stakedEsCecDistributorContract setTokensPerInterval"); + tx = await stakedCecTrackerContract.setHandler(rewardRouter.address, true); + await tx.wait(); + console.log("==stakedEsCecTrackerContract setHandler"); + const esCECContract = await hre.ethers.getContractAt("EsToken", esCEC.address); + // 添加转账白名单 + tx = await esCECContract.setHandler(stakedCecTracker.address, true); + await tx.wait(); + console.log("==esCECContract setHandler"); +}; + +deployNFTClaim.tags = ["StakingEsCEC"]; + +export default deployNFTClaim; diff --git a/deployments/bsc_test/EsToken.json b/deployments/bsc_test/EsToken.json deleted file mode 100644 index 28cb755..0000000 --- a/deployments/bsc_test/EsToken.json +++ /dev/null @@ -1,646 +0,0 @@ -{ - "address": "0x4dF834064455D4BA48B98D5B6b8E19f43673e948", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "internalType": "string", - "name": "_symbol", - "type": "string" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "address", - "name": "spender", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "burn", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "subtractedValue", - "type": "uint256" - } - ], - "name": "decreaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "gov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "inPrivateTransferMode", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "internalType": "uint256", - "name": "addedValue", - "type": "uint256" - } - ], - "name": "increaseAllowance", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isHandler", - "outputs": [ - { - "internalType": "bool", - "name": "status", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "isMinter", - "outputs": [ - { - "internalType": "bool", - "name": "status", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "mint", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_gov", - "type": "address" - } - ], - "name": "setGov", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_handler", - "type": "address" - }, - { - "internalType": "bool", - "name": "_isActive", - "type": "bool" - } - ], - "name": "setHandler", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "_inPrivateTransferMode", - "type": "bool" - } - ], - "name": "setInPrivateTransferMode", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_minter", - "type": "address" - }, - { - "internalType": "bool", - "name": "_isActive", - "type": "bool" - } - ], - "name": "setMinter", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_sender", - "type": "address" - }, - { - "internalType": "address", - "name": "_recipient", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0xe3bdd970980374200e4f1d1f7378d4da63935f6500e2ee1695092a6bd920d220", - "receipt": { - "to": null, - "from": "0x50A8e60041A206AcaA5F844a1104896224be6F39", - "contractAddress": "0x4dF834064455D4BA48B98D5B6b8E19f43673e948", - "transactionIndex": 0, - "gasUsed": "993001", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x1cf277b34f36e8f3ad45d755943df594c05fc10ef259128d886afe10dcca0c0c", - "transactionHash": "0xe3bdd970980374200e4f1d1f7378d4da63935f6500e2ee1695092a6bd920d220", - "logs": [], - "blockNumber": 43540319, - "cumulativeGasUsed": "993001", - "status": 1, - "byzantium": true - }, - "args": [ - "Escrowed CEC", - "esCEC" - ], - "numDeployments": 1, - "solcInputHash": "1b5451948df002b329e5d71e4ffbd43e", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"inPrivateTransferMode\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isHandler\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isMinter\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gov\",\"type\":\"address\"}],\"name\":\"setGov\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_handler\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_isActive\",\"type\":\"bool\"}],\"name\":\"setHandler\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"_inPrivateTransferMode\",\"type\":\"bool\"}],\"name\":\"setInPrivateTransferMode\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_minter\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_isActive\",\"type\":\"bool\"}],\"name\":\"setMinter\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{\"allowance(address,address)\":{\"details\":\"See {IERC20-allowance}.\"},\"approve(address,uint256)\":{\"details\":\"See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address.\"},\"balanceOf(address)\":{\"details\":\"See {IERC20-balanceOf}.\"},\"decimals()\":{\"details\":\"Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.\"},\"decreaseAllowance(address,uint256)\":{\"details\":\"Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`.\"},\"increaseAllowance(address,uint256)\":{\"details\":\"Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address.\"},\"name()\":{\"details\":\"Returns the name of the token.\"},\"symbol()\":{\"details\":\"Returns the symbol of the token, usually a shorter version of the name.\"},\"totalSupply()\":{\"details\":\"See {IERC20-totalSupply}.\"},\"transfer(address,uint256)\":{\"details\":\"See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/tokens/erc20/EsToken.sol\":\"EsToken\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/token/ERC20/ERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"./IERC20.sol\\\";\\nimport \\\"./extensions/IERC20Metadata.sol\\\";\\nimport \\\"../../utils/Context.sol\\\";\\n\\n/**\\n * @dev Implementation of the {IERC20} interface.\\n *\\n * This implementation is agnostic to the way tokens are created. This means\\n * that a supply mechanism has to be added in a derived contract using {_mint}.\\n * For a generic mechanism see {ERC20PresetMinterPauser}.\\n *\\n * TIP: For a detailed writeup see our guide\\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\\n * to implement supply mechanisms].\\n *\\n * The default value of {decimals} is 18. To change this, you should override\\n * this function so it returns a different value.\\n *\\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\\n * instead returning `false` on failure. This behavior is nonetheless\\n * conventional and does not conflict with the expectations of ERC20\\n * applications.\\n *\\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\\n * This allows applications to reconstruct the allowance for all accounts just\\n * by listening to said events. Other implementations of the EIP may not emit\\n * these events, as it isn't required by the specification.\\n *\\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\\n * functions have been added to mitigate the well-known issues around setting\\n * allowances. See {IERC20-approve}.\\n */\\ncontract ERC20 is Context, IERC20, IERC20Metadata {\\n mapping(address => uint256) private _balances;\\n\\n mapping(address => mapping(address => uint256)) private _allowances;\\n\\n uint256 private _totalSupply;\\n\\n string private _name;\\n string private _symbol;\\n\\n /**\\n * @dev Sets the values for {name} and {symbol}.\\n *\\n * All two of these values are immutable: they can only be set once during\\n * construction.\\n */\\n constructor(string memory name_, string memory symbol_) {\\n _name = name_;\\n _symbol = symbol_;\\n }\\n\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() public view virtual override returns (string memory) {\\n return _name;\\n }\\n\\n /**\\n * @dev Returns the symbol of the token, usually a shorter version of the\\n * name.\\n */\\n function symbol() public view virtual override returns (string memory) {\\n return _symbol;\\n }\\n\\n /**\\n * @dev Returns the number of decimals used to get its user representation.\\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\\n *\\n * Tokens usually opt for a value of 18, imitating the relationship between\\n * Ether and Wei. This is the default value returned by this function, unless\\n * it's overridden.\\n *\\n * NOTE: This information is only used for _display_ purposes: it in\\n * no way affects any of the arithmetic of the contract, including\\n * {IERC20-balanceOf} and {IERC20-transfer}.\\n */\\n function decimals() public view virtual override returns (uint8) {\\n return 18;\\n }\\n\\n /**\\n * @dev See {IERC20-totalSupply}.\\n */\\n function totalSupply() public view virtual override returns (uint256) {\\n return _totalSupply;\\n }\\n\\n /**\\n * @dev See {IERC20-balanceOf}.\\n */\\n function balanceOf(address account) public view virtual override returns (uint256) {\\n return _balances[account];\\n }\\n\\n /**\\n * @dev See {IERC20-transfer}.\\n *\\n * Requirements:\\n *\\n * - `to` cannot be the zero address.\\n * - the caller must have a balance of at least `amount`.\\n */\\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _transfer(owner, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-allowance}.\\n */\\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\\n return _allowances[owner][spender];\\n }\\n\\n /**\\n * @dev See {IERC20-approve}.\\n *\\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\\n * `transferFrom`. This is semantically equivalent to an infinite approval.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, amount);\\n return true;\\n }\\n\\n /**\\n * @dev See {IERC20-transferFrom}.\\n *\\n * Emits an {Approval} event indicating the updated allowance. This is not\\n * required by the EIP. See the note at the beginning of {ERC20}.\\n *\\n * NOTE: Does not update the allowance if the current allowance\\n * is the maximum `uint256`.\\n *\\n * Requirements:\\n *\\n * - `from` and `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n * - the caller must have allowance for ``from``'s tokens of at least\\n * `amount`.\\n */\\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\\n address spender = _msgSender();\\n _spendAllowance(from, spender, amount);\\n _transfer(from, to, amount);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically increases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n */\\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n _approve(owner, spender, allowance(owner, spender) + addedValue);\\n return true;\\n }\\n\\n /**\\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\\n *\\n * This is an alternative to {approve} that can be used as a mitigation for\\n * problems described in {IERC20-approve}.\\n *\\n * Emits an {Approval} event indicating the updated allowance.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `spender` must have allowance for the caller of at least\\n * `subtractedValue`.\\n */\\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\\n address owner = _msgSender();\\n uint256 currentAllowance = allowance(owner, spender);\\n require(currentAllowance >= subtractedValue, \\\"ERC20: decreased allowance below zero\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - subtractedValue);\\n }\\n\\n return true;\\n }\\n\\n /**\\n * @dev Moves `amount` of tokens from `from` to `to`.\\n *\\n * This internal function is equivalent to {transfer}, and can be used to\\n * e.g. implement automatic token fees, slashing mechanisms, etc.\\n *\\n * Emits a {Transfer} event.\\n *\\n * Requirements:\\n *\\n * - `from` cannot be the zero address.\\n * - `to` cannot be the zero address.\\n * - `from` must have a balance of at least `amount`.\\n */\\n function _transfer(address from, address to, uint256 amount) internal virtual {\\n require(from != address(0), \\\"ERC20: transfer from the zero address\\\");\\n require(to != address(0), \\\"ERC20: transfer to the zero address\\\");\\n\\n _beforeTokenTransfer(from, to, amount);\\n\\n uint256 fromBalance = _balances[from];\\n require(fromBalance >= amount, \\\"ERC20: transfer amount exceeds balance\\\");\\n unchecked {\\n _balances[from] = fromBalance - amount;\\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\\n // decrementing then incrementing.\\n _balances[to] += amount;\\n }\\n\\n emit Transfer(from, to, amount);\\n\\n _afterTokenTransfer(from, to, amount);\\n }\\n\\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\\n * the total supply.\\n *\\n * Emits a {Transfer} event with `from` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n */\\n function _mint(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: mint to the zero address\\\");\\n\\n _beforeTokenTransfer(address(0), account, amount);\\n\\n _totalSupply += amount;\\n unchecked {\\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\\n _balances[account] += amount;\\n }\\n emit Transfer(address(0), account, amount);\\n\\n _afterTokenTransfer(address(0), account, amount);\\n }\\n\\n /**\\n * @dev Destroys `amount` tokens from `account`, reducing the\\n * total supply.\\n *\\n * Emits a {Transfer} event with `to` set to the zero address.\\n *\\n * Requirements:\\n *\\n * - `account` cannot be the zero address.\\n * - `account` must have at least `amount` tokens.\\n */\\n function _burn(address account, uint256 amount) internal virtual {\\n require(account != address(0), \\\"ERC20: burn from the zero address\\\");\\n\\n _beforeTokenTransfer(account, address(0), amount);\\n\\n uint256 accountBalance = _balances[account];\\n require(accountBalance >= amount, \\\"ERC20: burn amount exceeds balance\\\");\\n unchecked {\\n _balances[account] = accountBalance - amount;\\n // Overflow not possible: amount <= accountBalance <= totalSupply.\\n _totalSupply -= amount;\\n }\\n\\n emit Transfer(account, address(0), amount);\\n\\n _afterTokenTransfer(account, address(0), amount);\\n }\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\\n *\\n * This internal function is equivalent to `approve`, and can be used to\\n * e.g. set automatic allowances for certain subsystems, etc.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `owner` cannot be the zero address.\\n * - `spender` cannot be the zero address.\\n */\\n function _approve(address owner, address spender, uint256 amount) internal virtual {\\n require(owner != address(0), \\\"ERC20: approve from the zero address\\\");\\n require(spender != address(0), \\\"ERC20: approve to the zero address\\\");\\n\\n _allowances[owner][spender] = amount;\\n emit Approval(owner, spender, amount);\\n }\\n\\n /**\\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\\n *\\n * Does not update the allowance amount in case of infinite allowance.\\n * Revert if not enough allowance is available.\\n *\\n * Might emit an {Approval} event.\\n */\\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\\n uint256 currentAllowance = allowance(owner, spender);\\n if (currentAllowance != type(uint256).max) {\\n require(currentAllowance >= amount, \\\"ERC20: insufficient allowance\\\");\\n unchecked {\\n _approve(owner, spender, currentAllowance - amount);\\n }\\n }\\n }\\n\\n /**\\n * @dev Hook that is called before any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * will be transferred to `to`.\\n * - when `from` is zero, `amount` tokens will be minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n\\n /**\\n * @dev Hook that is called after any transfer of tokens. This includes\\n * minting and burning.\\n *\\n * Calling conditions:\\n *\\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\\n * has been transferred to `to`.\\n * - when `from` is zero, `amount` tokens have been minted for `to`.\\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\\n * - `from` and `to` are never both zero.\\n *\\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\\n */\\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\\n}\\n\",\"keccak256\":\"0xa56ca923f70c1748830700250b19c61b70db9a683516dc5e216694a50445d99c\",\"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/token/ERC20/extensions/IERC20Metadata.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\n\\n/**\\n * @dev Interface for the optional metadata functions from the ERC20 standard.\\n *\\n * _Available since v4.1._\\n */\\ninterface IERC20Metadata is IERC20 {\\n /**\\n * @dev Returns the name of the token.\\n */\\n function name() external view returns (string memory);\\n\\n /**\\n * @dev Returns the symbol of the token.\\n */\\n function symbol() external view returns (string memory);\\n\\n /**\\n * @dev Returns the decimals places of the token.\\n */\\n function decimals() external view returns (uint8);\\n}\\n\",\"keccak256\":\"0x8de418a5503946cabe331f35fe242d3201a73f67f77aaeb7110acb1f30423aca\",\"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\"},\"contracts/core/Governable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ncontract Governable {\\n address public gov;\\n\\n constructor() {\\n gov = msg.sender;\\n }\\n\\n modifier onlyGov() {\\n require(msg.sender == gov, \\\"Governable: forbidden\\\");\\n _;\\n }\\n\\n function setGov(address _gov) external onlyGov {\\n gov = _gov;\\n }\\n}\\n\",\"keccak256\":\"0xcb7c11d1557db3369d984c7e804b1946c79867f3ab2dd2793ad3bb502c6c2383\",\"license\":\"MIT\"},\"contracts/interfaces/IMintable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ninterface IMintable {\\n function isMinter(address _account) external returns (bool);\\n function setMinter(address _minter, bool _isActive) external;\\n function mint(address _account, uint256 _amount) external;\\n function burn(address _account, uint256 _amount) external;\\n}\",\"keccak256\":\"0x99bccac95e8a4bba811b01e39e40ce5921ec977432696fd492a2a340674e90ae\",\"license\":\"MIT\"},\"contracts/tokens/erc20/EsToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.19;\\n\\nimport {ERC20} from \\\"@openzeppelin/contracts/token/ERC20/ERC20.sol\\\";\\nimport {IMintable} from \\\"../../interfaces/IMintable.sol\\\";\\nimport {Governable} from \\\"../../core/Governable.sol\\\";\\n\\ncontract EsToken is ERC20, IMintable, Governable {\\n bool public inPrivateTransferMode;\\n\\n mapping(address account => bool status) public override isMinter;\\n\\n mapping(address account => bool status) public isHandler;\\n\\n constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {}\\n\\n modifier onlyMinter() {\\n require(isMinter[msg.sender], \\\"EsToken: forbidden\\\");\\n _;\\n }\\n\\n function setMinter(address _minter, bool _isActive) external override onlyGov {\\n isMinter[_minter] = _isActive;\\n }\\n\\n function mint(address _account, uint256 _amount) external override onlyMinter {\\n _mint(_account, _amount);\\n }\\n\\n function burn(address _account, uint256 _amount) external override onlyMinter {\\n _burn(_account, _amount);\\n }\\n\\n function setInPrivateTransferMode(bool _inPrivateTransferMode) external onlyGov {\\n inPrivateTransferMode = _inPrivateTransferMode;\\n }\\n\\n function setHandler(address _handler, bool _isActive) external onlyGov {\\n isHandler[_handler] = _isActive;\\n }\\n\\n function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool) {\\n if (isHandler[msg.sender]) {\\n _transfer(_sender, _recipient, _amount);\\n return true;\\n }\\n _spendAllowance(_sender, msg.sender, _amount);\\n _transfer(_sender, _recipient, _amount);\\n return true;\\n }\\n\\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal override {\\n if (inPrivateTransferMode) {\\n require(isHandler[msg.sender], \\\"EsToken: msg.sender not whitelisted\\\");\\n }\\n super._beforeTokenTransfer(from, to, amount);\\n }\\n}\\n\",\"keccak256\":\"0x0f9aa9b29d2258e7560e1a66f49f87f071c764db41c779a27c7eab3424a9807b\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6080604052346200032f5762001346803803806200001d8162000334565b9283398101906040818303126200032f5780516001600160401b03908181116200032f57836200004f9184016200035a565b91602093848201518381116200032f576200006b92016200035a565b82518281116200022f576003918254916001958684811c9416801562000324575b888510146200030e578190601f94858111620002b8575b508890858311600114620002515760009262000245575b505060001982861b1c191690861b1783555b80519384116200022f5760049586548681811c9116801562000224575b828210146200020f57838111620001c4575b50809285116001146200015657509383949184926000956200014a575b50501b92600019911b1c19161790555b600580546001600160a01b03191633179055604051610f799081620003cd8239f35b01519350388062000118565b92919084601f1981168860005285600020956000905b89838310620001a957505050106200018e575b50505050811b01905562000128565b01519060f884600019921b161c19169055388080806200017f565b8587015189559097019694850194889350908101906200016c565b87600052816000208480880160051c82019284891062000205575b0160051c019087905b828110620001f8575050620000fb565b60008155018790620001e8565b92508192620001df565b602288634e487b7160e01b6000525260246000fd5b90607f1690620000e9565b634e487b7160e01b600052604160045260246000fd5b015190503880620000ba565b90889350601f19831691876000528a6000209260005b8c828210620002a1575050841162000288575b505050811b018355620000cc565b015160001983881b60f8161c191690553880806200027a565b8385015186558c9790950194938401930162000267565b90915085600052886000208580850160051c8201928b861062000304575b918a91869594930160051c01915b828110620002f4575050620000a3565b600081558594508a9101620002e4565b92508192620002d6565b634e487b7160e01b600052602260045260246000fd5b93607f16936200008c565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176200022f57604052565b919080601f840112156200032f5782516001600160401b0381116200022f5760209062000390601f8201601f1916830162000334565b928184528282870101116200032f5760005b818110620003b857508260009394955001015290565b8581018301518482018401528201620003a256fe608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde031461099857508163095ea7b31461096e57816312d43a511461094557816318160ddd1461092657816323b872dd146108eb578163313ce567146108cf578163395093511461087f57816340c10f191461072857816346ea87af146106ea5781635a47a1a71461069857816370a082311461066157816395d89b41146105425781639cb7de4b146104e55781639dc29fac1461033f578163a457c2d71461029a57508063a9059cbb1461026a578063aa271e1a1461022d578063cf456ae7146101ce578063cfad57a21461017d578063dd62ed3e146101355763dfbaefb11461010c57600080fd5b3461013157816003193601126101315760209060ff60055460a01c1690519015158152f35b5080fd5b503461013157806003193601126101315780602092610152610ab9565b61015a610ad4565b6001600160a01b0391821683526001865283832091168252845220549051908152f35b82346101cb5760203660031901126101cb57610197610ab9565b600554906001600160a01b03906101b13383851614610e01565b16906bffffffffffffffffffffffff60a01b161760055580f35b80fd5b503461013157806003193601126101315761022a906101eb610ab9565b906101f4610aea565b60055490926001600160a01b039161020f9083163314610e01565b168452600660205283209060ff801983541691151516179055565b80f35b50346101315760203660031901126101315760209160ff9082906001600160a01b03610257610ab9565b1681526006855220541690519015158152f35b5034610131578060031936011261013157602090610293610289610ab9565b6024359033610b1c565b5160018152f35b905082346101cb57826003193601126101cb576102b5610ab9565b918360243592338152600160205281812060018060a01b03861682526020522054908282106102ee576020856102938585038733610cff565b608490602086519162461bcd60e51b8352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152fd5b8391503461013157826003193601126101315761035a610ab9565b6024353384526020916006835261037660ff8787205416610e45565b6001600160a01b03169283156104985760ff60055460a01c16610437575b83855284835285852054908282106103e95750908495817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef94938688528785520381872055816002540360025551908152a380f35b865162461bcd60e51b8152908101849052602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608490fd5b3385526007835260ff868620541661039457855162461bcd60e51b8152908101839052602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152608490fd5b855162461bcd60e51b8152908101839052602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608490fd5b50503461013157806003193601126101315761022a90610503610ab9565b9061050c610aea565b60055490926001600160a01b03916105279083163314610e01565b168452600760205283209060ff801983541691151516179055565b838334610131578160031936011261013157805190828454600181811c90808316928315610657575b60209384841081146106445783885290811561062857506001146105d3575b505050829003601f01601f191682019267ffffffffffffffff8411838510176105c057508291826105bc925282610a70565b0390f35b634e487b7160e01b815260418552602490fd5b8787529192508591837f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b838510610614575050505083010185808061058a565b8054888601830152930192849082016105fe565b60ff1916878501525050151560051b840101905085808061058a565b634e487b7160e01b895260228a52602489fd5b91607f169161056b565b5050346101315760203660031901126101315760209181906001600160a01b03610689610ab9565b16815280845220549051908152f35b839034610131576020366003190112610131573580151580910361013157600554906106ce336001600160a01b03841614610e01565b60ff60a01b1990911660a09190911b60ff60a01b161760055580f35b5050346101315760203660031901126101315760209160ff9082906001600160a01b03610715610ab9565b1681526007855220541690519015158152f35b90503461087b578160031936011261087b57610742610ab9565b6024353385526020916006835261075e60ff8688205416610e45565b6001600160a01b0316938415610839579085929160ff60055460a01c166107ca575b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9394506107b082600254610af9565b60025585855284835280852082815401905551908152a380f35b91939092503386526007845260ff8287205416156107ec575084918391610780565b83608492519162461bcd60e51b8352820152602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152fd5b5162461bcd60e51b8152808401839052601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606490fd5b8280fd5b5050346101315780600319360112610131576102936020926108c86108a2610ab9565b338352600186528483206001600160a01b03821684528652918490205460243590610af9565b9033610cff565b5050346101315781600319360112610131576020905160128152f35b5050346101315760603660031901126101315760209061091d61090c610ab9565b610914610ad4565b60443591610e86565b90519015158152f35b5050346101315781600319360112610131576020906002549051908152f35b50503461013157816003193601126101315760055490516001600160a01b039091168152602090f35b50503461013157806003193601126101315760209061029361098e610ab9565b6024359033610cff565b8490843461087b578260031936011261087b5782600354600181811c90808316928315610a66575b6020938484108114610644578388529081156106285750600114610a1057505050829003601f01601f191682019267ffffffffffffffff8411838510176105c057508291826105bc925282610a70565b600387529192508591837fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b838510610a52575050505083010185808061058a565b805488860183015293019284908201610a3c565b91607f16916109c0565b6020808252825181830181905290939260005b828110610aa557505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610a83565b600435906001600160a01b0382168203610acf57565b600080fd5b602435906001600160a01b0382168203610acf57565b602435908115158203610acf57565b91908201809211610b0657565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03908116918215610cac5716918215610c5b5760ff60055460a01c16610bf4575b600082815280602052604081205491808310610ba057604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b60405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608490fd5b33600052600760205260ff60406000205416610b445760405162461bcd60e51b815260206004820152602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b6001600160a01b03908116918215610db05716918215610d605760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b15610e0857565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b15610e4c57565b60405162461bcd60e51b815260206004820152601260248201527122b9aa37b5b2b71d103337b93134b23232b760711b6044820152606490fd5b91906000338152600760205260ff604082205416610f39576001600160a01b03841681526001602081815260408084203385529091529091205493908401610ed8575b610ed39350610b1c565b600190565b828410610ef457610eef83610ed395033383610cff565b610ec9565b60405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606490fd5b50610ed392610b1c56fea264697066735822122039c60ab226638efd7dfd7f4a981d06ee73b69ed60c23a236674a452c7782b33a64736f6c63430008130033", - "deployedBytecode": "0x608060408181526004918236101561001657600080fd5b600092833560e01c91826306fdde031461099857508163095ea7b31461096e57816312d43a511461094557816318160ddd1461092657816323b872dd146108eb578163313ce567146108cf578163395093511461087f57816340c10f191461072857816346ea87af146106ea5781635a47a1a71461069857816370a082311461066157816395d89b41146105425781639cb7de4b146104e55781639dc29fac1461033f578163a457c2d71461029a57508063a9059cbb1461026a578063aa271e1a1461022d578063cf456ae7146101ce578063cfad57a21461017d578063dd62ed3e146101355763dfbaefb11461010c57600080fd5b3461013157816003193601126101315760209060ff60055460a01c1690519015158152f35b5080fd5b503461013157806003193601126101315780602092610152610ab9565b61015a610ad4565b6001600160a01b0391821683526001865283832091168252845220549051908152f35b82346101cb5760203660031901126101cb57610197610ab9565b600554906001600160a01b03906101b13383851614610e01565b16906bffffffffffffffffffffffff60a01b161760055580f35b80fd5b503461013157806003193601126101315761022a906101eb610ab9565b906101f4610aea565b60055490926001600160a01b039161020f9083163314610e01565b168452600660205283209060ff801983541691151516179055565b80f35b50346101315760203660031901126101315760209160ff9082906001600160a01b03610257610ab9565b1681526006855220541690519015158152f35b5034610131578060031936011261013157602090610293610289610ab9565b6024359033610b1c565b5160018152f35b905082346101cb57826003193601126101cb576102b5610ab9565b918360243592338152600160205281812060018060a01b03861682526020522054908282106102ee576020856102938585038733610cff565b608490602086519162461bcd60e51b8352820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152fd5b8391503461013157826003193601126101315761035a610ab9565b6024353384526020916006835261037660ff8787205416610e45565b6001600160a01b03169283156104985760ff60055460a01c16610437575b83855284835285852054908282106103e95750908495817fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef94938688528785520381872055816002540360025551908152a380f35b865162461bcd60e51b8152908101849052602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608490fd5b3385526007835260ff868620541661039457855162461bcd60e51b8152908101839052602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152608490fd5b855162461bcd60e51b8152908101839052602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608490fd5b50503461013157806003193601126101315761022a90610503610ab9565b9061050c610aea565b60055490926001600160a01b03916105279083163314610e01565b168452600760205283209060ff801983541691151516179055565b838334610131578160031936011261013157805190828454600181811c90808316928315610657575b60209384841081146106445783885290811561062857506001146105d3575b505050829003601f01601f191682019267ffffffffffffffff8411838510176105c057508291826105bc925282610a70565b0390f35b634e487b7160e01b815260418552602490fd5b8787529192508591837f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b838510610614575050505083010185808061058a565b8054888601830152930192849082016105fe565b60ff1916878501525050151560051b840101905085808061058a565b634e487b7160e01b895260228a52602489fd5b91607f169161056b565b5050346101315760203660031901126101315760209181906001600160a01b03610689610ab9565b16815280845220549051908152f35b839034610131576020366003190112610131573580151580910361013157600554906106ce336001600160a01b03841614610e01565b60ff60a01b1990911660a09190911b60ff60a01b161760055580f35b5050346101315760203660031901126101315760209160ff9082906001600160a01b03610715610ab9565b1681526007855220541690519015158152f35b90503461087b578160031936011261087b57610742610ab9565b6024353385526020916006835261075e60ff8688205416610e45565b6001600160a01b0316938415610839579085929160ff60055460a01c166107ca575b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9394506107b082600254610af9565b60025585855284835280852082815401905551908152a380f35b91939092503386526007845260ff8287205416156107ec575084918391610780565b83608492519162461bcd60e51b8352820152602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152fd5b5162461bcd60e51b8152808401839052601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606490fd5b8280fd5b5050346101315780600319360112610131576102936020926108c86108a2610ab9565b338352600186528483206001600160a01b03821684528652918490205460243590610af9565b9033610cff565b5050346101315781600319360112610131576020905160128152f35b5050346101315760603660031901126101315760209061091d61090c610ab9565b610914610ad4565b60443591610e86565b90519015158152f35b5050346101315781600319360112610131576020906002549051908152f35b50503461013157816003193601126101315760055490516001600160a01b039091168152602090f35b50503461013157806003193601126101315760209061029361098e610ab9565b6024359033610cff565b8490843461087b578260031936011261087b5782600354600181811c90808316928315610a66575b6020938484108114610644578388529081156106285750600114610a1057505050829003601f01601f191682019267ffffffffffffffff8411838510176105c057508291826105bc925282610a70565b600387529192508591837fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b838510610a52575050505083010185808061058a565b805488860183015293019284908201610a3c565b91607f16916109c0565b6020808252825181830181905290939260005b828110610aa557505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610a83565b600435906001600160a01b0382168203610acf57565b600080fd5b602435906001600160a01b0382168203610acf57565b602435908115158203610acf57565b91908201809211610b0657565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03908116918215610cac5716918215610c5b5760ff60055460a01c16610bf4575b600082815280602052604081205491808310610ba057604082827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef958760209652828652038282205586815220818154019055604051908152a3565b60405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608490fd5b33600052600760205260ff60406000205416610b445760405162461bcd60e51b815260206004820152602360248201527f4573546f6b656e3a206d73672e73656e646572206e6f742077686974656c69736044820152621d195960ea1b6064820152608490fd5b60405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608490fd5b60405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608490fd5b6001600160a01b03908116918215610db05716918215610d605760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b60405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b60405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b15610e0857565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b15610e4c57565b60405162461bcd60e51b815260206004820152601260248201527122b9aa37b5b2b71d103337b93134b23232b760711b6044820152606490fd5b91906000338152600760205260ff604082205416610f39576001600160a01b03841681526001602081815260408084203385529091529091205493908401610ed8575b610ed39350610b1c565b600190565b828410610ef457610eef83610ed395033383610cff565b610ec9565b60405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606490fd5b50610ed392610b1c56fea264697066735822122039c60ab226638efd7dfd7f4a981d06ee73b69ed60c23a236674a452c7782b33a64736f6c63430008130033", - "devdoc": { - "events": { - "Approval(address,address,uint256)": { - "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." - }, - "Transfer(address,address,uint256)": { - "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." - } - }, - "kind": "dev", - "methods": { - "allowance(address,address)": { - "details": "See {IERC20-allowance}." - }, - "approve(address,uint256)": { - "details": "See {IERC20-approve}. NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on `transferFrom`. This is semantically equivalent to an infinite approval. Requirements: - `spender` cannot be the zero address." - }, - "balanceOf(address)": { - "details": "See {IERC20-balanceOf}." - }, - "decimals()": { - "details": "Returns the number of decimals used to get its user representation. For example, if `decimals` equals `2`, a balance of `505` tokens should be displayed to a user as `5.05` (`505 / 10 ** 2`). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the default value returned by this function, unless it's overridden. NOTE: This information is only used for _display_ purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}." - }, - "decreaseAllowance(address,uint256)": { - "details": "Atomically decreases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address. - `spender` must have allowance for the caller of at least `subtractedValue`." - }, - "increaseAllowance(address,uint256)": { - "details": "Atomically increases the allowance granted to `spender` by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - `spender` cannot be the zero address." - }, - "name()": { - "details": "Returns the name of the token." - }, - "symbol()": { - "details": "Returns the symbol of the token, usually a shorter version of the name." - }, - "totalSupply()": { - "details": "See {IERC20-totalSupply}." - }, - "transfer(address,uint256)": { - "details": "See {IERC20-transfer}. Requirements: - `to` cannot be the zero address. - the caller must have a balance of at least `amount`." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 15, - "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", - "label": "_balances", - "offset": 0, - "slot": "0", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 21, - "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", - "label": "_allowances", - "offset": 0, - "slot": "1", - "type": "t_mapping(t_address,t_mapping(t_address,t_uint256))" - }, - { - "astId": 23, - "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", - "label": "_totalSupply", - "offset": 0, - "slot": "2", - "type": "t_uint256" - }, - { - "astId": 25, - "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", - "label": "_name", - "offset": 0, - "slot": "3", - "type": "t_string_storage" - }, - { - "astId": 27, - "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", - "label": "_symbol", - "offset": 0, - "slot": "4", - "type": "t_string_storage" - }, - { - "astId": 1465, - "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", - "label": "gov", - "offset": 0, - "slot": "5", - "type": "t_address" - }, - { - "astId": 1546, - "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", - "label": "inPrivateTransferMode", - "offset": 20, - "slot": "5", - "type": "t_bool" - }, - { - "astId": 1551, - "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", - "label": "isMinter", - "offset": 0, - "slot": "6", - "type": "t_mapping(t_address,t_bool)" - }, - { - "astId": 1555, - "contract": "contracts/tokens/erc20/EsToken.sol:EsToken", - "label": "isHandler", - "offset": 0, - "slot": "7", - "type": "t_mapping(t_address,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "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_address,t_uint256))": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => mapping(address => uint256))", - "numberOfBytes": "32", - "value": "t_mapping(t_address,t_uint256)" - }, - "t_mapping(t_address,t_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - } - } - } -} \ No newline at end of file diff --git a/deployments/bsc_test/RewardDistributor.json b/deployments/bsc_test/RewardDistributor.json index c710bfc..30cc88e 100644 --- a/deployments/bsc_test/RewardDistributor.json +++ b/deployments/bsc_test/RewardDistributor.json @@ -1,5 +1,5 @@ { - "address": "0x538ac34Ada48DA414424615F7BA75041815E8628", + "address": "0x67869546655e1A6A09b9877aEA858cC47444172D", "abi": [ { "inputs": [ @@ -228,25 +228,25 @@ "type": "function" } ], - "transactionHash": "0xd992a2e53749be47d159bf1794e8583b7a4de0d4b088d31a5e7c39693f84a9a0", + "transactionHash": "0x444bc00995d59535bc8a96ff1fcca36a2104e234e402d0970a34c224c9de47a8", "receipt": { "to": null, "from": "0x50A8e60041A206AcaA5F844a1104896224be6F39", - "contractAddress": "0x538ac34Ada48DA414424615F7BA75041815E8628", - "transactionIndex": 1, + "contractAddress": "0x67869546655e1A6A09b9877aEA858cC47444172D", + "transactionIndex": 0, "gasUsed": "701322", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xc1ceb3148d5026609813a5b3573b5911901d7d8d540f016aa93ea036643250e3", - "transactionHash": "0xd992a2e53749be47d159bf1794e8583b7a4de0d4b088d31a5e7c39693f84a9a0", + "blockHash": "0x3acccd0660d9cb67852d07aab1d21d89300244163a3ee83fbfd4285db7615fdb", + "transactionHash": "0x444bc00995d59535bc8a96ff1fcca36a2104e234e402d0970a34c224c9de47a8", "logs": [], - "blockNumber": 43540335, - "cumulativeGasUsed": "722322", + "blockNumber": 43545404, + "cumulativeGasUsed": "701322", "status": 1, "byzantium": true }, "args": [ - "0x4dF834064455D4BA48B98D5B6b8E19f43673e948", - "0xE8450f2A601cc54fcE48704Dc194b92DF34295b7" + "0x1FbA3F84e62163069050f1156b73C008722136A3", + "0x3299431803704C63941531d9d894CB095D15C4bC" ], "numDeployments": 1, "solcInputHash": "35d1d20dc9b7194768908e34f12939fd", diff --git a/deployments/bsc_test/RewardRouter.json b/deployments/bsc_test/RewardRouter.json index 01f53c8..4f980ed 100644 --- a/deployments/bsc_test/RewardRouter.json +++ b/deployments/bsc_test/RewardRouter.json @@ -1,5 +1,5 @@ { - "address": "0x68D5260cC9CC1cBD693C3576D04bAd0f023f7607", + "address": "0x775d7Dbc06835c78437C8783fE11937E46F9ec6e", "abi": [ { "inputs": [ @@ -302,27 +302,27 @@ "type": "function" } ], - "transactionHash": "0xe755e9d70b3507476e57f5f7e8a89e3125a357ad2b808ad96ad422d167f0a4f4", + "transactionHash": "0xe8862dbb54901ea831b2a37a1a2a8dbc8306cb34b9bf43d7f6665f1c3a34ed3e", "receipt": { "to": null, "from": "0x50A8e60041A206AcaA5F844a1104896224be6F39", - "contractAddress": "0x68D5260cC9CC1cBD693C3576D04bAd0f023f7607", + "contractAddress": "0x775d7Dbc06835c78437C8783fE11937E46F9ec6e", "transactionIndex": 0, "gasUsed": "1036133", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xf95207c0235cac45fac6c94ef3d8fe2ced33ddbfdec99341f89e8dda84d86e32", - "transactionHash": "0xe755e9d70b3507476e57f5f7e8a89e3125a357ad2b808ad96ad422d167f0a4f4", + "blockHash": "0x2b30f259ee2e72b9987ce33377eb3637c008e8372d7a0230c0b8cb027539aabd", + "transactionHash": "0xe8862dbb54901ea831b2a37a1a2a8dbc8306cb34b9bf43d7f6665f1c3a34ed3e", "logs": [], - "blockNumber": 43540355, + "blockNumber": 43545413, "cumulativeGasUsed": "1036133", "status": 1, "byzantium": true }, "args": [ "0xe34c5ea0c3083d11a735dc0609533b92130319f5", - "0x4dF834064455D4BA48B98D5B6b8E19f43673e948", - "0xE8450f2A601cc54fcE48704Dc194b92DF34295b7", - "0xd4253007DB8eFbc94E9330961BD563ac86Eab9dd" + "0x1FbA3F84e62163069050f1156b73C008722136A3", + "0x3299431803704C63941531d9d894CB095D15C4bC", + "0x49dcb6Ba542374147278efe9163a6E94e5E40762" ], "numDeployments": 1, "solcInputHash": "97451620892e0f98db18b69f812fe0de", diff --git a/deployments/bsc_test/RewardTracker.json b/deployments/bsc_test/RewardTracker.json index d84a275..ba47e51 100644 --- a/deployments/bsc_test/RewardTracker.json +++ b/deployments/bsc_test/RewardTracker.json @@ -1,5 +1,5 @@ { - "address": "0xE8450f2A601cc54fcE48704Dc194b92DF34295b7", + "address": "0x3299431803704C63941531d9d894CB095D15C4bC", "abi": [ { "inputs": [ @@ -887,18 +887,18 @@ "type": "function" } ], - "transactionHash": "0x43c95316b46324f3685762ed20529da10c87881976f89b2cbbcc04f333b1dd54", + "transactionHash": "0x9f1a3c7f05fc517869c1485810071d08b4ce950734cf8465f16ff83aade79b00", "receipt": { "to": null, "from": "0x50A8e60041A206AcaA5F844a1104896224be6F39", - "contractAddress": "0xE8450f2A601cc54fcE48704Dc194b92DF34295b7", + "contractAddress": "0x3299431803704C63941531d9d894CB095D15C4bC", "transactionIndex": 0, "gasUsed": "2079921", "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0xedd5566f9fc3ae25cd068280ae2d693c44276ba75607c84fa78075be5b599b43", - "transactionHash": "0x43c95316b46324f3685762ed20529da10c87881976f89b2cbbcc04f333b1dd54", + "blockHash": "0xb96e491263641de15972ebab7b2356e0c6ea78387a71af1482d6afcbb3712bab", + "transactionHash": "0x9f1a3c7f05fc517869c1485810071d08b4ce950734cf8465f16ff83aade79b00", "logs": [], - "blockNumber": 43540327, + "blockNumber": 43545395, "cumulativeGasUsed": "2079921", "status": 1, "byzantium": true diff --git a/deployments/bsc_test/Vester.json b/deployments/bsc_test/Vester.json deleted file mode 100644 index 6c00d09..0000000 --- a/deployments/bsc_test/Vester.json +++ /dev/null @@ -1,1233 +0,0 @@ -{ - "address": "0xd4253007DB8eFbc94E9330961BD563ac86Eab9dd", - "abi": [ - { - "inputs": [ - { - "internalType": "string", - "name": "_name", - "type": "string" - }, - { - "internalType": "string", - "name": "_symbol", - "type": "string" - }, - { - "internalType": "uint256", - "name": "_vestingDuration", - "type": "uint256" - }, - { - "internalType": "address", - "name": "_esToken", - "type": "address" - }, - { - "internalType": "address", - "name": "_pairToken", - "type": "address" - }, - { - "internalType": "address", - "name": "_claimableToken", - "type": "address" - }, - { - "internalType": "address", - "name": "_rewardTracker", - "type": "address" - }, - { - "internalType": "bool", - "name": "_needCheckStake", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "spender", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Approval", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "receiver", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Claim", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "name": "Deposit", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "PairTransfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "value", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "address", - "name": "account", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "claimedAmount", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "balance", - "type": "uint256" - } - ], - "name": "Withdraw", - "type": "event" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "_updateVesting", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "name": "allowance", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "approve", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "balanceOf", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "balances", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "bonusRewards", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "claim", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "address", - "name": "_receiver", - "type": "address" - } - ], - "name": "claimForAccount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "claimable", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "claimableToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "claimedAmounts", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "cumulativeClaimAmounts", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "cumulativeRewardDeductions", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "decimals", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "deposit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "depositForAccount", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "esToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "getCombinedAverageStakedAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "getMaxVestableAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_esAmount", - "type": "uint256" - } - ], - "name": "getPairAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "getTotalVested", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "getVestedAmount", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "gov", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "hasPairToken", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "hasRewardTracker", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "handler", - "type": "address" - } - ], - "name": "isHandler", - "outputs": [ - { - "internalType": "bool", - "name": "status", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "lastVestingTimes", - "outputs": [ - { - "internalType": "uint256", - "name": "time", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "name", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "needCheckStake", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "account", - "type": "address" - } - ], - "name": "pairAmounts", - "outputs": [ - { - "internalType": "uint256", - "name": "amount", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pairSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "pairToken", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "rewardTracker", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "setBonusRewards", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "setCumulativeRewardDeductions", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_gov", - "type": "address" - } - ], - "name": "setGov", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_handler", - "type": "address" - }, - { - "internalType": "bool", - "name": "_isActive", - "type": "bool" - } - ], - "name": "setHandler", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_rewardTracker", - "type": "address" - } - ], - "name": "setRewardTracker", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "symbol", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "totalSupply", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "transfer", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "address", - "name": "", - "type": "address" - }, - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "name": "transferFrom", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_account", - "type": "address" - } - ], - "name": "updateVesting", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "vestingDuration", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "withdraw", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_token", - "type": "address" - }, - { - "internalType": "address", - "name": "_account", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_amount", - "type": "uint256" - } - ], - "name": "withdrawToken", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - } - ], - "transactionHash": "0xbcd5da4615445def422a6fe8a366c112ec690d2a750bcc27c3b2cd972f133fbb", - "receipt": { - "to": null, - "from": "0x50A8e60041A206AcaA5F844a1104896224be6F39", - "contractAddress": "0xd4253007DB8eFbc94E9330961BD563ac86Eab9dd", - "transactionIndex": 0, - "gasUsed": "1821618", - "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "blockHash": "0x2615c7a4f0e504f8a3828574488bbab3901d5a2dba7224197a9a4e3965aa712f", - "transactionHash": "0xbcd5da4615445def422a6fe8a366c112ec690d2a750bcc27c3b2cd972f133fbb", - "logs": [], - "blockNumber": 43540343, - "cumulativeGasUsed": "1821618", - "status": 1, - "byzantium": true - }, - "args": [ - "Vested CEC", - "veCEC", - "31536000", - "0x4dF834064455D4BA48B98D5B6b8E19f43673e948", - "0x0000000000000000000000000000000000000000", - "0xe34c5ea0c3083d11a735dc0609533b92130319f5", - "0xE8450f2A601cc54fcE48704Dc194b92DF34295b7", - true - ], - "numDeployments": 1, - "solcInputHash": "97451620892e0f98db18b69f812fe0de", - "metadata": "{\"compiler\":{\"version\":\"0.8.19+commit.7dd6d404\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"string\",\"name\":\"_name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"_symbol\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"_vestingDuration\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"_esToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_pairToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_claimableToken\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_rewardTracker\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_needCheckStake\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Claim\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"Deposit\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"PairTransfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"claimedAmount\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"}],\"name\":\"Withdraw\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"_updateVesting\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balances\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"bonusRewards\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claim\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_receiver\",\"type\":\"address\"}],\"name\":\"claimForAccount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"claimable\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claimableToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"claimedAmounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"cumulativeClaimAmounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"cumulativeRewardDeductions\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"deposit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"depositForAccount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"esToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getCombinedAverageStakedAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getMaxVestableAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_esAmount\",\"type\":\"uint256\"}],\"name\":\"getPairAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getTotalVested\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"getVestedAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gov\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasPairToken\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"hasRewardTracker\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"handler\",\"type\":\"address\"}],\"name\":\"isHandler\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"status\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"lastVestingTimes\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"time\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"needCheckStake\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"pairAmounts\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pairSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"pairToken\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"rewardTracker\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"setBonusRewards\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"setCumulativeRewardDeductions\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_gov\",\"type\":\"address\"}],\"name\":\"setGov\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_handler\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"_isActive\",\"type\":\"bool\"}],\"name\":\"setHandler\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_rewardTracker\",\"type\":\"address\"}],\"name\":\"setRewardTracker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"}],\"name\":\"updateVesting\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"vestingDuration\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"withdraw\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_token\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"_account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"_amount\",\"type\":\"uint256\"}],\"name\":\"withdrawToken\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"events\":{\"Approval(address,address,uint256)\":{\"details\":\"Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance.\"},\"Transfer(address,address,uint256)\":{\"details\":\"Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero.\"}},\"kind\":\"dev\",\"methods\":{},\"stateVariables\":{\"totalSupply\":{\"details\":\"Returns the amount of tokens in existence.\"}},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"contracts/staking/Vester.sol\":\"Vester\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":200},\"remappings\":[],\"viaIR\":true},\"sources\":{\"@openzeppelin/contracts/security/ReentrancyGuard.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Contract module that helps prevent reentrant calls to a function.\\n *\\n * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier\\n * available, which can be applied to functions to make sure there are no nested\\n * (reentrant) calls to them.\\n *\\n * Note that because there is a single `nonReentrant` guard, functions marked as\\n * `nonReentrant` may not call one another. This can be worked around by making\\n * those functions `private`, and then adding `external` `nonReentrant` entry\\n * points to them.\\n *\\n * TIP: If you would like to learn more about reentrancy and alternative ways\\n * to protect against it, check out our blog post\\n * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].\\n */\\nabstract contract ReentrancyGuard {\\n // Booleans are more expensive than uint256 or any type that takes up a full\\n // word because each write operation emits an extra SLOAD to first read the\\n // slot's contents, replace the bits taken up by the boolean, and then write\\n // back. This is the compiler's defense against contract upgrades and\\n // pointer aliasing, and it cannot be disabled.\\n\\n // The values being non-zero value makes deployment a bit more expensive,\\n // but in exchange the refund on every call to nonReentrant will be lower in\\n // amount. Since refunds are capped to a percentage of the total\\n // transaction's gas, it is best to keep them low in cases like this one, to\\n // increase the likelihood of the full refund coming into effect.\\n uint256 private constant _NOT_ENTERED = 1;\\n uint256 private constant _ENTERED = 2;\\n\\n uint256 private _status;\\n\\n constructor() {\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Prevents a contract from calling itself, directly or indirectly.\\n * Calling a `nonReentrant` function from another `nonReentrant`\\n * function is not supported. It is possible to prevent this from happening\\n * by making the `nonReentrant` function external, and making it call a\\n * `private` function that does the actual work.\\n */\\n modifier nonReentrant() {\\n _nonReentrantBefore();\\n _;\\n _nonReentrantAfter();\\n }\\n\\n function _nonReentrantBefore() private {\\n // On the first call to nonReentrant, _status will be _NOT_ENTERED\\n require(_status != _ENTERED, \\\"ReentrancyGuard: reentrant call\\\");\\n\\n // Any calls to nonReentrant after this point will fail\\n _status = _ENTERED;\\n }\\n\\n function _nonReentrantAfter() private {\\n // By storing the original value once again, a refund is triggered (see\\n // https://eips.ethereum.org/EIPS/eip-2200)\\n _status = _NOT_ENTERED;\\n }\\n\\n /**\\n * @dev Returns true if the reentrancy guard is currently set to \\\"entered\\\", which indicates there is a\\n * `nonReentrant` function in the call stack.\\n */\\n function _reentrancyGuardEntered() internal view returns (bool) {\\n return _status == _ENTERED;\\n }\\n}\\n\",\"keccak256\":\"0xa535a5df777d44e945dd24aa43a11e44b024140fc340ad0dfe42acf4002aade1\",\"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/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n *\\n * ==== Security Considerations\\n *\\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\\n * generally recommended is:\\n *\\n * ```solidity\\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\\n * doThing(..., value);\\n * }\\n *\\n * function doThing(..., uint256 value) public {\\n * token.safeTransferFrom(msg.sender, address(this), value);\\n * ...\\n * }\\n * ```\\n *\\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\\n * {SafeERC20-safeTransferFrom}).\\n *\\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\\n * contracts should have entry points that don't rely on permit.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n *\\n * CAUTION: See Security Considerations above.\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\",\"keccak256\":\"0xb264c03a3442eb37a68ad620cefd1182766b58bee6cec40343480392d6b14d69\",\"license\":\"MIT\"},\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport \\\"../IERC20.sol\\\";\\nimport \\\"../extensions/IERC20Permit.sol\\\";\\nimport \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n /**\\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\\n }\\n\\n /**\\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\\n */\\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\\n }\\n\\n /**\\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\\n }\\n\\n /**\\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful.\\n */\\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(oldAllowance >= value, \\\"SafeERC20: decreased allowance below zero\\\");\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\\n }\\n }\\n\\n /**\\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\\n * to be set to zero before setting it to a non-zero value, such as USDT.\\n */\\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\\n\\n if (!_callOptionalReturnBool(token, approvalCall)) {\\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\\n _callOptionalReturn(token, approvalCall);\\n }\\n }\\n\\n /**\\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\\n * Revert on invalid signature.\\n */\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit(owner, spender, value, deadline, v, r, s);\\n uint256 nonceAfter = token.nonces(owner);\\n require(nonceAfter == nonceBefore + 1, \\\"SafeERC20: permit did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(data, \\\"SafeERC20: low-level call failed\\\");\\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \\\"SafeERC20: ERC20 operation did not succeed\\\");\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n *\\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\\n */\\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\\n // and not revert is the subcall reverts.\\n\\n (bool success, bytes memory returndata) = address(token).call(data);\\n return\\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\\n }\\n}\\n\",\"keccak256\":\"0xabefac93435967b4d36a4fabcbdbb918d1f0b7ae3c3d85bc30923b326c927ed1\",\"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\"},\"contracts/core/Governable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ncontract Governable {\\n address public gov;\\n\\n constructor() {\\n gov = msg.sender;\\n }\\n\\n modifier onlyGov() {\\n require(msg.sender == gov, \\\"Governable: forbidden\\\");\\n _;\\n }\\n\\n function setGov(address _gov) external onlyGov {\\n gov = _gov;\\n }\\n}\\n\",\"keccak256\":\"0xcb7c11d1557db3369d984c7e804b1946c79867f3ab2dd2793ad3bb502c6c2383\",\"license\":\"MIT\"},\"contracts/interfaces/IMintable.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ninterface IMintable {\\n function isMinter(address _account) external returns (bool);\\n function setMinter(address _minter, bool _isActive) external;\\n function mint(address _account, uint256 _amount) external;\\n function burn(address _account, uint256 _amount) external;\\n}\",\"keccak256\":\"0x99bccac95e8a4bba811b01e39e40ce5921ec977432696fd492a2a340674e90ae\",\"license\":\"MIT\"},\"contracts/staking/Vester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\nimport {IERC20} from \\\"@openzeppelin/contracts/token/ERC20/IERC20.sol\\\";\\nimport {ReentrancyGuard} from \\\"@openzeppelin/contracts/security/ReentrancyGuard.sol\\\";\\nimport {SafeERC20} from \\\"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\\\";\\nimport {IVester} from \\\"./interfaces/IVester.sol\\\";\\nimport {IRewardTracker} from \\\"./interfaces/IRewardTracker.sol\\\";\\nimport {Governable} from \\\"../core/Governable.sol\\\";\\nimport {IMintable} from \\\"../interfaces/IMintable.sol\\\";\\n\\ncontract Vester is IVester, IERC20, ReentrancyGuard, Governable {\\n using SafeERC20 for IERC20;\\n\\n string public name;\\n string public symbol;\\n uint8 public decimals = 18;\\n uint256 public vestingDuration;\\n address public esToken;\\n address public pairToken;\\n address public claimableToken;\\n\\n address public override rewardTracker;\\n\\n uint256 public override totalSupply;\\n uint256 public pairSupply;\\n bool public needCheckStake;\\n\\n mapping(address account => uint256 amount) public balances;\\n mapping(address account => uint256 amount) public override pairAmounts;\\n mapping(address account => uint256 amount) public override cumulativeClaimAmounts;\\n mapping(address account => uint256 amount) public override claimedAmounts;\\n mapping(address account => uint256 time) public lastVestingTimes;\\n\\n mapping(address account => uint256 amount) public override cumulativeRewardDeductions;\\n mapping(address account => uint256 amount) public override bonusRewards;\\n\\n mapping(address handler => bool status) public isHandler;\\n\\n event Claim(address receiver, uint256 amount);\\n event Deposit(address account, uint256 amount);\\n event Withdraw(address account, uint256 claimedAmount, uint256 balance);\\n event PairTransfer(address indexed from, address indexed to, uint256 value);\\n\\n constructor(\\n string memory _name,\\n string memory _symbol,\\n uint256 _vestingDuration,\\n address _esToken,\\n address _pairToken,\\n address _claimableToken,\\n address _rewardTracker,\\n bool _needCheckStake\\n ) {\\n name = _name;\\n symbol = _symbol;\\n vestingDuration = _vestingDuration;\\n esToken = _esToken;\\n pairToken = _pairToken;\\n claimableToken = _claimableToken;\\n rewardTracker = _rewardTracker;\\n needCheckStake = _needCheckStake;\\n }\\n\\n function setHandler(address _handler, bool _isActive) external onlyGov {\\n isHandler[_handler] = _isActive;\\n }\\n\\n function deposit(uint256 _amount) external nonReentrant {\\n _deposit(msg.sender, _amount);\\n }\\n\\n function depositForAccount(address _account, uint256 _amount) external nonReentrant {\\n _validateHandler();\\n _deposit(_account, _amount);\\n }\\n\\n function claim() external nonReentrant returns (uint256) {\\n return _claim(msg.sender, msg.sender);\\n }\\n\\n function claimForAccount(address _account, address _receiver) external override nonReentrant returns (uint256) {\\n _validateHandler();\\n return _claim(_account, _receiver);\\n }\\n\\n // to help users who accidentally send their tokens to this contract\\n function withdrawToken(address _token, address _account, uint256 _amount) external onlyGov {\\n IERC20(_token).safeTransfer(_account, _amount);\\n }\\n\\n function withdraw() external nonReentrant {\\n address account = msg.sender;\\n address _receiver = account;\\n _claim(account, _receiver);\\n\\n uint256 claimedAmount = cumulativeClaimAmounts[account];\\n uint256 balance = balances[account];\\n uint256 totalVested = balance + claimedAmount;\\n require(totalVested > 0, \\\"Vester: vested amount is zero\\\");\\n\\n if (hasPairToken()) {\\n uint256 pairAmount = pairAmounts[account];\\n _burnPair(account, pairAmount);\\n IERC20(pairToken).safeTransfer(_receiver, pairAmount);\\n }\\n\\n IERC20(esToken).safeTransfer(_receiver, balance);\\n _burn(account, balance);\\n\\n delete cumulativeClaimAmounts[account];\\n delete claimedAmounts[account];\\n delete lastVestingTimes[account];\\n\\n emit Withdraw(account, claimedAmount, balance);\\n }\\n\\n function setRewardTracker(address _rewardTracker) external onlyGov {\\n rewardTracker = _rewardTracker;\\n }\\n\\n function setCumulativeRewardDeductions(address _account, uint256 _amount) external override nonReentrant {\\n _validateHandler();\\n cumulativeRewardDeductions[_account] = _amount;\\n }\\n\\n function setBonusRewards(address _account, uint256 _amount) external override nonReentrant {\\n _validateHandler();\\n bonusRewards[_account] = _amount;\\n }\\n\\n function getMaxVestableAmount(address _account) public view override returns (uint256) {\\n uint256 maxVestableAmount = bonusRewards[_account];\\n\\n if (hasRewardTracker()) {\\n uint256 cumulativeReward = IRewardTracker(rewardTracker).cumulativeRewards(_account);\\n maxVestableAmount = maxVestableAmount + cumulativeReward;\\n }\\n\\n uint256 cumulativeRewardDeduction = cumulativeRewardDeductions[_account];\\n\\n if (maxVestableAmount < cumulativeRewardDeduction) {\\n return 0;\\n }\\n\\n return maxVestableAmount - cumulativeRewardDeduction;\\n }\\n\\n function getCombinedAverageStakedAmount(address _account) public view override returns (uint256) {\\n if (!hasRewardTracker()) {\\n return 0;\\n }\\n \\n uint256 cumulativeReward = IRewardTracker(rewardTracker).cumulativeRewards(_account);\\n if (cumulativeReward == 0) {\\n return 0;\\n }\\n\\n return IRewardTracker(rewardTracker).averageStakedAmounts(_account);\\n }\\n\\n function getPairAmount(address _account, uint256 _esAmount) public view returns (uint256) {\\n if (!hasRewardTracker()) {\\n return 0;\\n }\\n\\n uint256 combinedAverageStakedAmount = getCombinedAverageStakedAmount(_account);\\n if (combinedAverageStakedAmount == 0) {\\n return 0;\\n }\\n\\n uint256 maxVestableAmount = getMaxVestableAmount(_account);\\n if (maxVestableAmount == 0) {\\n return 0;\\n }\\n\\n return (_esAmount * combinedAverageStakedAmount) / maxVestableAmount;\\n }\\n\\n function hasRewardTracker() public view returns (bool) {\\n return rewardTracker != address(0);\\n }\\n\\n function hasPairToken() public view returns (bool) {\\n return pairToken != address(0);\\n }\\n\\n function getTotalVested(address _account) public view returns (uint256) {\\n return balances[_account] + cumulativeClaimAmounts[_account];\\n }\\n\\n function balanceOf(address _account) public view override returns (uint256) {\\n return balances[_account];\\n }\\n\\n // empty implementation, tokens are non-transferrable\\n function transfer(address /* recipient */, uint256 /* amount */) public virtual override returns (bool) {\\n revert(\\\"Vester: non-transferrable\\\");\\n }\\n\\n // empty implementation, tokens are non-transferrable\\n function allowance(address /* owner */, address /* spender */) public view virtual override returns (uint256) {\\n return 0;\\n }\\n\\n // empty implementation, tokens are non-transferrable\\n function approve(address /* spender */, uint256 /* amount */) public virtual override returns (bool) {\\n revert(\\\"Vester: non-transferrable\\\");\\n }\\n\\n // empty implementation, tokens are non-transferrable\\n function transferFrom(\\n address /* sender */,\\n address /* recipient */,\\n uint256 /* amount */\\n ) public virtual override returns (bool) {\\n revert(\\\"Vester: non-transferrable\\\");\\n }\\n\\n function getVestedAmount(address _account) public view override returns (uint256) {\\n uint256 balance = balances[_account];\\n uint256 cumulativeClaimAmount = cumulativeClaimAmounts[_account];\\n return balance + cumulativeClaimAmount;\\n }\\n\\n function _mint(address _account, uint256 _amount) private {\\n require(_account != address(0), \\\"Vester: mint to the zero address\\\");\\n\\n totalSupply = totalSupply + _amount;\\n balances[_account] = balances[_account] + _amount;\\n\\n emit Transfer(address(0), _account, _amount);\\n }\\n\\n function _mintPair(address _account, uint256 _amount) private {\\n require(_account != address(0), \\\"Vester: mint to the zero address\\\");\\n\\n pairSupply = pairSupply + _amount;\\n pairAmounts[_account] = pairAmounts[_account] + _amount;\\n\\n emit PairTransfer(address(0), _account, _amount);\\n }\\n\\n function _burn(address _account, uint256 _amount) private {\\n require(_account != address(0), \\\"Vester: burn from the zero address\\\");\\n require(balances[_account] >= _amount, \\\"Vester: balance is not enough\\\");\\n balances[_account] = balances[_account] - _amount;\\n totalSupply = totalSupply - _amount;\\n\\n emit Transfer(_account, address(0), _amount);\\n }\\n\\n function _burnPair(address _account, uint256 _amount) private {\\n require(_account != address(0), \\\"Vester: burn from the zero address\\\");\\n require(pairAmounts[_account] >= _amount, \\\"Vester: balance is not enough\\\");\\n pairAmounts[_account] = pairAmounts[_account] - _amount;\\n pairSupply = pairSupply - _amount;\\n\\n emit PairTransfer(_account, address(0), _amount);\\n }\\n /**\\n * @dev Deposit ES tokens to the contract\\n */\\n function _deposit(address _account, uint256 _amount) private {\\n require(_amount > 0, \\\"Vester: invalid _amount\\\");\\n _updateVesting(_account);\\n\\n IERC20(esToken).safeTransferFrom(_account, address(this), _amount);\\n\\n _mint(_account, _amount);\\n\\n if (hasPairToken()) {\\n uint256 pairAmount = pairAmounts[_account];\\n uint256 nextPairAmount = getPairAmount(_account, balances[_account]);\\n if (nextPairAmount > pairAmount) {\\n uint256 pairAmountDiff = nextPairAmount - pairAmount;\\n IERC20(pairToken).safeTransferFrom(_account, address(this), pairAmountDiff);\\n _mintPair(_account, pairAmountDiff);\\n }\\n }\\n if (needCheckStake && hasRewardTracker()) {\\n // if u want to transfer 100 esCec to cec, u need to have 100 cec in stake\\n uint256 cecAmount = IRewardTracker(rewardTracker).depositBalances(_account, claimableToken);\\n require(balances[_account] <= cecAmount, \\\"Vester: insufficient cec balance\\\");\\n }\\n uint256 maxAmount = getMaxVestableAmount(_account);\\n require(getTotalVested(_account) <= maxAmount, \\\"Vester: max vestable amount exceeded\\\");\\n\\n emit Deposit(_account, _amount);\\n }\\n\\n function updateVesting(address _account) public {\\n _updateVesting(_account);\\n }\\n\\n function _updateVesting(address _account) public {\\n uint256 amount = _getNextClaimableAmount(_account);\\n lastVestingTimes[_account] = block.timestamp;\\n\\n if (amount == 0) {\\n return;\\n }\\n\\n // transfer claimableAmount from balances to cumulativeClaimAmounts\\n _burn(_account, amount);\\n cumulativeClaimAmounts[_account] = cumulativeClaimAmounts[_account] + amount;\\n\\n IMintable(esToken).burn(address(this), amount);\\n }\\n\\n function _getNextClaimableAmount(address _account) private view returns (uint256) {\\n uint256 timeDiff = block.timestamp - lastVestingTimes[_account];\\n\\n uint256 balance = balances[_account];\\n if (balance == 0) {\\n return 0;\\n }\\n uint256 vestedAmount = getVestedAmount(_account);\\n uint256 claimableAmount = (vestedAmount * timeDiff) / vestingDuration;\\n if (claimableAmount < balance) {\\n return claimableAmount;\\n }\\n\\n return balance;\\n }\\n\\n function claimable(address _account) public view override returns (uint256) {\\n uint256 amount = cumulativeClaimAmounts[_account] - claimedAmounts[_account];\\n uint256 nextClaimable = _getNextClaimableAmount(_account);\\n return amount + nextClaimable;\\n }\\n\\n function _claim(address _account, address _receiver) private returns (uint256) {\\n _updateVesting(_account);\\n uint256 amount = claimable(_account);\\n claimedAmounts[_account] = claimedAmounts[_account] + amount;\\n IERC20(claimableToken).safeTransfer(_receiver, amount);\\n emit Claim(_account, amount);\\n return amount;\\n }\\n\\n function _validateHandler() private view {\\n require(isHandler[msg.sender], \\\"Vester: forbidden\\\");\\n }\\n}\\n\",\"keccak256\":\"0x618672193dba39e5e20500584113ad916c23b994e42d7615e94c2187ed9970e6\",\"license\":\"MIT\"},\"contracts/staking/interfaces/IRewardTracker.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ninterface IRewardTracker {\\n function depositBalances(address _account, address _depositToken) external view returns (uint256);\\n function stakedAmounts(address _account) external view returns (uint256);\\n function updateRewards() external;\\n function stake(address _depositToken, uint256 _amount) external;\\n function stakeForAccount(address _fundingAccount, address _account, address _depositToken, uint256 _amount) external;\\n function unstake(address _depositToken, uint256 _amount) external;\\n function unstakeForAccount(address _account, address _depositToken, uint256 _amount, address _receiver) external;\\n function tokensPerInterval() external view returns (uint256);\\n function claim(address _receiver) external returns (uint256);\\n function claimForAccount(address _account, address _receiver) external returns (uint256);\\n function claimable(address _account) external view returns (uint256);\\n function averageStakedAmounts(address _account) external view returns (uint256);\\n function cumulativeRewards(address _account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x6e0078848746c69ab4c824269552ce070b6fa449cc6803754265fe63cd1b0424\",\"license\":\"MIT\"},\"contracts/staking/interfaces/IVester.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.19;\\n\\ninterface IVester {\\n function needCheckStake() external view returns (bool);\\n function updateVesting(address _account) external;\\n\\n function rewardTracker() external view returns (address);\\n\\n function claimForAccount(address _account, address _receiver) external returns (uint256);\\n\\n function claimable(address _account) external view returns (uint256);\\n function cumulativeClaimAmounts(address _account) external view returns (uint256);\\n function claimedAmounts(address _account) external view returns (uint256);\\n function pairAmounts(address _account) external view returns (uint256);\\n function getVestedAmount(address _account) external view returns (uint256);\\n function cumulativeRewardDeductions(address _account) external view returns (uint256);\\n function bonusRewards(address _account) external view returns (uint256);\\n\\n function setCumulativeRewardDeductions(address _account, uint256 _amount) external;\\n function setBonusRewards(address _account, uint256 _amount) external;\\n\\n function getMaxVestableAmount(address _account) external view returns (uint256);\\n function getCombinedAverageStakedAmount(address _account) external view returns (uint256);\\n}\\n\",\"keccak256\":\"0x1474af11813b06f36f66fdea673237925dad7486fc3a48b26fac94371edbc121\",\"license\":\"MIT\"}},\"version\":1}", - "bytecode": "0x6080604052346200046c57620020b7803803806200001d8162000471565b928339810190610100818303126200046c5780516001600160401b0381116200046c57826200004e91830162000497565b602082015190926001600160401b0382116200046c576200007191830162000497565b90604081015191620000866060830162000509565b90620000956080840162000509565b93620000a460a0850162000509565b9160e0620000b560c0870162000509565b9501519687151588036200046c576001600081905580546001600160a01b031916331790556004805460ff191660121790558051906001600160401b0382116200035d5760025490600182811c9216801562000461575b60208310146200033c5781601f849311620003fd575b50602090601f83116001146200037f5760009262000373575b50508160011b916000199060031b1c1916176002555b8051906001600160401b0382116200035d5760035490600182811c9216801562000352575b60208310146200033c5781601f849311620002ca575b50602090601f83116001146200023b576000926200022f575b50508160011b916000199060031b1c1916176003555b600555600680546001600160a01b03199081166001600160a01b039485161790915560078054821695841695909517909455600880548516918316919091179055600980549093169116179055600c805491151560ff1660ff1992909216919091179055604051611b7890816200051f8239f35b015190503880620001a5565b6003600090815293507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b91905b601f1984168510620002ae576001945083601f1981161062000294575b505050811b01600355620001bb565b015160001960f88460031b161c1916905538808062000285565b8181015183556020948501946001909301929091019062000268565b60036000529091507fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b601f840160051c81016020851062000334575b90849392915b601f830160051c82018110620003245750506200018c565b600081558594506001016200030c565b508062000306565b634e487b7160e01b600052602260045260246000fd5b91607f169162000176565b634e487b7160e01b600052604160045260246000fd5b0151905038806200013b565b6002600090815293506000805160206200209783398151915291905b601f1984168510620003e1576001945083601f19811610620003c7575b505050811b0160025562000151565b015160001960f88460031b161c19169055388080620003b8565b818101518355602094850194600190930192909101906200039b565b600260005290915060008051602062002097833981519152601f840160051c8101916020851062000456575b90601f859493920160051c01905b81811062000446575062000122565b6000815584935060010162000437565b909150819062000429565b91607f16916200010c565b600080fd5b6040519190601f01601f191682016001600160401b038111838210176200035d57604052565b919080601f840112156200046c5782516001600160401b0381116200035d57602090620004cd601f8201601f1916830162000471565b928184528282870101116200046c5760005b818110620004f557508260009394955001015290565b8581018301518482018401528201620004df565b51906001600160a01b03821682036200046c5756fe6040608081526004908136101561001557600080fd5b600091823560e01c90816301e3366714610cf357816306fdde0314610c3457816308f26c7614610c0e578163095ea7b31461048b5781630db9ea4a14610bd657816312d43a5114610bad57816313e82e7a14610b6c5781631514617e14610b4d57816315e90a4114610b2e57816316ca05c514610b0557816318160ddd14610ae657816323b872dd14610acf57816327e235e3146106cf578163313ce56714610aae578163342fcda914610a79578163387a785d14610a415781633ccfd60b146108955781633de35b791461086c578163402914f51461084657816341f22724146107fe57816345f01ee6146107d857816346ea87af1461079a5781634e71d92d146107685781635d50e729146107305781636bcb411a1461070757816370a08231146106cf57816371417b32146106975781637cf8f3b21461066e578163930354731461064d57816395d89b411461054657816397c313f2146105295781639cb7de4b146104c8578163a2545fa514610490578163a9059cbb1461048b578163ac110d1414610467578163b5ff136d1461042f578163b6b55f251461040257508063cfad57a2146103b4578063d5a73fdd14610388578063d75abb571461035e578063d89b700714610317578063dd62ed3e146102ea578063e4214471146102c5578063f2293bb014610272578063f421f62a146102485763f6d6d5aa1461021d57600080fd5b3461024457816003193601126102445760085490516001600160a01b039091168152602090f35b5080fd5b503461024457816003193601126102445760095490516001600160a01b0390911615158152602090f35b82346102c25760203660031901126102c25761028c610d26565b6001546001600160a01b0391906102a69083163314610e2c565b166bffffffffffffffffffffffff60a01b600954161760095580f35b80fd5b82346102c25760203660031901126102c2576102e76102e2610d26565b6118da565b80f35b503461024457806003193601126102445790602091610307610d26565b50610310610d41565b5051908152f35b5034610244578060031936011261024457610330610d26565b610338610e70565b610340611af0565b6001600160a01b031682526012602052812060243590556001815580f35b503461024457816003193601126102445760075490516001600160a01b0390911615158152602090f35b5034610244576020366003190112610244576020906103ad6103a8610d26565b61135d565b9051908152f35b82346102c25760203660031901126102c2576103ce610d26565b600154906001600160a01b03906103e83383851614610e2c565b16906bffffffffffffffffffffffff60a01b161760015580f35b8390346102445760203660031901126102445761042890610421610e70565b35336114f9565b6001815580f35b5050346102445760203660031901126102445760209181906001600160a01b03610457610d26565b168152600f845220549051908152f35b50503461024457816003193601126102445760209060ff600c541690519015158152f35b610e0d565b5050346102445760203660031901126102445760209181906001600160a01b036104b8610d26565b1681526013845220549051908152f35b5050346102445780600319360112610244576104e2610d26565b9060243591821515809303610525576001546001600160a01b03919061050b9083163314610e2c565b168352601460205282209060ff8019835416911617905580f35b8380fd5b83346102c25760203660031901126102c2576102e76102e2610d26565b91905034610649578260031936011261064957805191836003549060019082821c92828116801561063f575b602095868610821461062c575084885290811561060a57506001146105b1575b6105ad86866105a3828b0383610d8c565b5191829182610dc4565b0390f35b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b8284106105f757505050826105ad946105a3928201019438610592565b80548685018801529286019281016105da565b60ff191687860152505050151560051b83010192506105a3826105ad38610592565b634e487b7160e01b845260229052602483fd5b93607f1693610572565b8280fd5b505034610244576020366003190112610244576020906103ad6103a8610d26565b5050346102445780600319360112610244576020906103ad61068e610d26565b60243590611310565b5050346102445760203660031901126102445760209181906001600160a01b036106bf610d26565b1681526010845220549051908152f35b5050346102445760203660031901126102445760209181906001600160a01b036106f7610d26565b168152600d845220549051908152f35b50503461024457816003193601126102445760095490516001600160a01b039091168152602090f35b5050346102445760203660031901126102445760209181906001600160a01b03610758610d26565b168152600e845220549051908152f35b50503461024457816003193601126102445790602091610786610e70565b60016107923333611a5c565b925551908152f35b5050346102445760203660031901126102445760209160ff9082906001600160a01b036107c5610d26565b1681526014855220541690519015158152f35b505034610244576020366003190112610244576020906103ad6107f9610d26565b6111f3565b505034610244578060031936011261024457610818610d26565b610820610e70565b610828611af0565b6001600160a01b031682526013602052812060243590556001815580f35b505034610244576020366003190112610244576020906103ad610867610d26565b611a1e565b50503461024457816003193601126102445760075490516001600160a01b039091168152602090f35b9050346106495782600319360112610649576108af610e70565b6108b93333611a5c565b50338352602091600f835280842054600d845281852054926108db82856110ee565b156109fe5750917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56893916060936109288360018060a01b038060075416610964575b339060065416610ec6565b610932833361146f565b338752600f84528682812055601084528682812055601184528682812055815193338552840152820152a16001815580f35b338a52600e87526109f9856109a98c828120549283916109853315156113cc565b338152600e8d5261099b83838320541015611423565b338152600e8d522054611111565b338d52600e8a52878d20556109c081600b54611111565b600b558b87518281527f659523c479d006050ebc0d0e48fea36d1b2c5d45b2f31402ac6f8671fc84cc048b3392a3338360075416610ec6565b61091d565b825162461bcd60e51b8152908101859052601d60248201527f5665737465723a2076657374656420616d6f756e74206973207a65726f0000006044820152606490fd5b5050346102445760203660031901126102445760209181906001600160a01b03610a69610d26565b1681526012845220549051908152f35b505034610244573660031901126102c257610428610a95610d26565b610a9d610e70565b610aa5611af0565b602435906114f9565b8284346102c257806003193601126102c2575060ff60209254169051908152f35b83346102c257610ade36610d57565b505050611387565b505034610244578160031936011261024457602090600a549051908152f35b50503461024457816003193601126102445760065490516001600160a01b039091168152602090f35b505034610244578160031936011261024457602090600b549051908152f35b5050346102445781600319360112610244576020906005549051908152f35b505034610244578060031936011261024457906020916001610792610b8f610d26565b610b97610d41565b90610ba0610e70565b610ba8611af0565b611a5c565b50503461024457816003193601126102445760015490516001600160a01b039091168152602090f35b5050346102445760203660031901126102445760209181906001600160a01b03610bfe610d26565b1681526011845220549051908152f35b505034610244576020366003190112610244576020906103ad610c2f610d26565b61111e565b91905034610649578260031936011261064957805191836002549060019082821c928281168015610ce9575b602095868610821461062c575084885290811561060a5750600114610c90576105ad86866105a3828b0383610d8c565b929550600283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b828410610cd657505050826105ad946105a3928201019438610592565b8054868501880152928601928101610cb9565b93607f1693610c60565b83346102c2576102e7610d0536610d57565b60015490926001600160a01b0391610d209083163314610e2c565b16610ec6565b600435906001600160a01b0382168203610d3c57565b600080fd5b602435906001600160a01b0382168203610d3c57565b6060906003190112610d3c576001600160a01b03906004358281168103610d3c57916024359081168103610d3c579060443590565b90601f8019910116810190811067ffffffffffffffff821117610dae57604052565b634e487b7160e01b600052604160045260246000fd5b6020808252825181830181905290939260005b828110610df957505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610dd7565b34610d3c576040366003190112610d3c57610e26610d26565b50611387565b15610e3357565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b600260005414610e81576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b60405163a9059cbb60e01b60208201526001600160a01b03929092166024830152604480830193909352918152610f0791610f02606483610d8c565b610f09565b565b60018060a01b0316906040516040810167ffffffffffffffff9082811082821117610dae576040526020938483527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858401526000808587829751910182855af1903d1561104e573d92831161103a5790610fa493929160405192610f9788601f19601f8401160185610d8c565b83523d868885013e611059565b805191821591848315611016575b505050905015610fbf5750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b919381809450010312610244578201519081151582036102c2575080388084610fb2565b634e487b7160e01b85526041600452602485fd5b90610fa49392506060915b919290156110bb575081511561106d575090565b3b156110765790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156110ce5750805190602001fd5b60405162461bcd60e51b81529081906110ea9060048301610dc4565b0390fd5b919082018092116110fb57565b634e487b7160e01b600052601160045260246000fd5b919082039182116110fb57565b6001600160a01b0390811660008181526013602090815260408220546009549294909391921680611170575b5083526012905260408220549081811061116b576111689250611111565b90565b505090565b92826024929460405193848092633792def360e01b82528860048301525afa9182156111e85785926111b3575b50601292916111ab916110ee565b92909161114a565b9091508281813d83116111e1575b6111cb8183610d8c565b810103126111dd5751906111ab61119d565b8480fd5b503d6111c1565b6040513d87823e3d90fd5b6009546001600160a01b03908116919082156112a857604051633792def360e01b81529116600482018190526020918281602481875afa90811561129c576000916112b0575b50156112a857819060246040518095819363a318021760e01b835260048301525afa90811561129c57600091611270575b50905090565b82813d8311611295575b6112848183610d8c565b810103126102c2575051803861126a565b503d61127a565b6040513d6000823e3d90fd5b505050600090565b908382813d83116112d6575b6112c68183610d8c565b810103126102c257505138611239565b503d6112bc565b818102929181159184041417156110fb57565b81156112fa570490565b634e487b7160e01b600052601260045260246000fd5b6009549091906001600160a01b0316156113565761132d826111f3565b9182156112a85761133d9061111e565b9081156112a85761116892611351916112dd565b6112f0565b5050600090565b60018060a01b0316600052600d602052611168604060002054600f602052604060002054906110ee565b60405162461bcd60e51b815260206004820152601960248201527f5665737465723a206e6f6e2d7472616e736665727261626c65000000000000006044820152606490fd5b156113d357565b60405162461bcd60e51b815260206004820152602260248201527f5665737465723a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b1561142a57565b60405162461bcd60e51b815260206004820152601d60248201527f5665737465723a2062616c616e6365206973206e6f7420656e6f7567680000006044820152606490fd5b6001600160a01b03166114838115156113cc565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020600093838552600d82526114c08160408720541015611423565b838552600d82526114d5816040872054611111565b848652600d835260408620556114ed81600a54611111565b600a55604051908152a3565b919080156117f15761150a836118da565b60018060a01b0392611523828560065416833091611836565b8381169361153285151561188f565b61153e83600a546110ee565b600a55600090858252602091600d835260409661155e86898420546110ee565b818352600d85528883205580827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef868b518a8152a3808284600754168061173b575b50505060ff600c54168061172e575b61165b575b5050506115c08261111e565b6115c98361135d565b1161160c575092516001600160a01b0390931683526020830152907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c90604090a1565b60849085519062461bcd60e51b825260048201526024808201527f5665737465723a206d6178207665737461626c6520616d6f756e7420657863656044820152631959195960e21b6064820152fd5b838360095416936008541660448a5180968193637aeceb1f60e11b835286600484015260248301525afa928315611724579082918993946116ef575b508152600d84522054116116ad573880806115b4565b60649085519062461bcd60e51b825280600483015260248201527f5665737465723a20696e73756666696369656e74206365632062616c616e63656044820152fd5b8580929550819394503d831161171d575b61170a8183610d8c565b8101031261024457908791519238611697565b503d611700565b88513d84823e3d90fd5b50826009541615156115af565b828252600e8752868b83205491600d82528c8a61175b8287205482611310565b9185831161176e575b50505050506115a0565b6117aa61179f7f659523c479d006050ebc0d0e48fea36d1b2c5d45b2f31402ac6f8671fc84cc04976117d395611111565b809581943091611836565b6117b588151561188f565b6117c182600b546110ee565b600b55878752600e85528620546110ee565b858552600e83528d8520558c51908152a38082388681808a8e611764565b60405162461bcd60e51b815260206004820152601760248201527f5665737465723a20696e76616c6964205f616d6f756e740000000000000000006044820152606490fd5b6040516323b872dd60e01b60208201526001600160a01b03928316602482015292909116604483015260648083019390935291815260a081019181831067ffffffffffffffff841117610dae57610f0792604052610f09565b1561189657565b606460405162461bcd60e51b815260206004820152602060248201527f5665737465723a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b6118e3816119b7565b6001600160a01b038083166000818152601160205260408082204290559094909392919083156119af57836119179161146f565b808552600f60205261192c83858720546110ee565b908552600f602052838520556006541690813b15610525578251632770a7eb60e21b81523060048201526024810191909152929081908490604490829084905af180156119a35761197c57505050565b67ffffffffffffffff831161198f575052565b634e487b7160e01b81526041600452602490fd5b509051903d90823e3d90fd5b505050505050565b6001600160a01b0381166000818152601160205260409020546119da9042611111565b90600052600d6020526040600020549182156112a857611a0e91611a00611a059261135d565b6112dd565b600554906112f0565b818110611a19575090565b905090565b6111689060018060a01b038116600052600f602052611a56611a50604060002054601060205260406000205490611111565b916119b7565b906110ee565b611ad2917f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d491611a8b816118da565b611a9481611a1e565b9384809360018060a01b03808516806000526010602052611aba846040600020546110ee565b90600052601060205260406000205560085416610ec6565b604080516001600160a01b039290921682526020820192909252a190565b33600052601460205260ff6040600020541615611b0957565b60405162461bcd60e51b81526020600482015260116024820152702b32b9ba32b91d103337b93134b23232b760791b6044820152606490fdfea2646970667358221220234489204fffea7cd94768d2853af6736f28bebec7faafe90bf118698ead01e964736f6c63430008130033405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace", - "deployedBytecode": "0x6040608081526004908136101561001557600080fd5b600091823560e01c90816301e3366714610cf357816306fdde0314610c3457816308f26c7614610c0e578163095ea7b31461048b5781630db9ea4a14610bd657816312d43a5114610bad57816313e82e7a14610b6c5781631514617e14610b4d57816315e90a4114610b2e57816316ca05c514610b0557816318160ddd14610ae657816323b872dd14610acf57816327e235e3146106cf578163313ce56714610aae578163342fcda914610a79578163387a785d14610a415781633ccfd60b146108955781633de35b791461086c578163402914f51461084657816341f22724146107fe57816345f01ee6146107d857816346ea87af1461079a5781634e71d92d146107685781635d50e729146107305781636bcb411a1461070757816370a08231146106cf57816371417b32146106975781637cf8f3b21461066e578163930354731461064d57816395d89b411461054657816397c313f2146105295781639cb7de4b146104c8578163a2545fa514610490578163a9059cbb1461048b578163ac110d1414610467578163b5ff136d1461042f578163b6b55f251461040257508063cfad57a2146103b4578063d5a73fdd14610388578063d75abb571461035e578063d89b700714610317578063dd62ed3e146102ea578063e4214471146102c5578063f2293bb014610272578063f421f62a146102485763f6d6d5aa1461021d57600080fd5b3461024457816003193601126102445760085490516001600160a01b039091168152602090f35b5080fd5b503461024457816003193601126102445760095490516001600160a01b0390911615158152602090f35b82346102c25760203660031901126102c25761028c610d26565b6001546001600160a01b0391906102a69083163314610e2c565b166bffffffffffffffffffffffff60a01b600954161760095580f35b80fd5b82346102c25760203660031901126102c2576102e76102e2610d26565b6118da565b80f35b503461024457806003193601126102445790602091610307610d26565b50610310610d41565b5051908152f35b5034610244578060031936011261024457610330610d26565b610338610e70565b610340611af0565b6001600160a01b031682526012602052812060243590556001815580f35b503461024457816003193601126102445760075490516001600160a01b0390911615158152602090f35b5034610244576020366003190112610244576020906103ad6103a8610d26565b61135d565b9051908152f35b82346102c25760203660031901126102c2576103ce610d26565b600154906001600160a01b03906103e83383851614610e2c565b16906bffffffffffffffffffffffff60a01b161760015580f35b8390346102445760203660031901126102445761042890610421610e70565b35336114f9565b6001815580f35b5050346102445760203660031901126102445760209181906001600160a01b03610457610d26565b168152600f845220549051908152f35b50503461024457816003193601126102445760209060ff600c541690519015158152f35b610e0d565b5050346102445760203660031901126102445760209181906001600160a01b036104b8610d26565b1681526013845220549051908152f35b5050346102445780600319360112610244576104e2610d26565b9060243591821515809303610525576001546001600160a01b03919061050b9083163314610e2c565b168352601460205282209060ff8019835416911617905580f35b8380fd5b83346102c25760203660031901126102c2576102e76102e2610d26565b91905034610649578260031936011261064957805191836003549060019082821c92828116801561063f575b602095868610821461062c575084885290811561060a57506001146105b1575b6105ad86866105a3828b0383610d8c565b5191829182610dc4565b0390f35b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b8284106105f757505050826105ad946105a3928201019438610592565b80548685018801529286019281016105da565b60ff191687860152505050151560051b83010192506105a3826105ad38610592565b634e487b7160e01b845260229052602483fd5b93607f1693610572565b8280fd5b505034610244576020366003190112610244576020906103ad6103a8610d26565b5050346102445780600319360112610244576020906103ad61068e610d26565b60243590611310565b5050346102445760203660031901126102445760209181906001600160a01b036106bf610d26565b1681526010845220549051908152f35b5050346102445760203660031901126102445760209181906001600160a01b036106f7610d26565b168152600d845220549051908152f35b50503461024457816003193601126102445760095490516001600160a01b039091168152602090f35b5050346102445760203660031901126102445760209181906001600160a01b03610758610d26565b168152600e845220549051908152f35b50503461024457816003193601126102445790602091610786610e70565b60016107923333611a5c565b925551908152f35b5050346102445760203660031901126102445760209160ff9082906001600160a01b036107c5610d26565b1681526014855220541690519015158152f35b505034610244576020366003190112610244576020906103ad6107f9610d26565b6111f3565b505034610244578060031936011261024457610818610d26565b610820610e70565b610828611af0565b6001600160a01b031682526013602052812060243590556001815580f35b505034610244576020366003190112610244576020906103ad610867610d26565b611a1e565b50503461024457816003193601126102445760075490516001600160a01b039091168152602090f35b9050346106495782600319360112610649576108af610e70565b6108b93333611a5c565b50338352602091600f835280842054600d845281852054926108db82856110ee565b156109fe5750917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56893916060936109288360018060a01b038060075416610964575b339060065416610ec6565b610932833361146f565b338752600f84528682812055601084528682812055601184528682812055815193338552840152820152a16001815580f35b338a52600e87526109f9856109a98c828120549283916109853315156113cc565b338152600e8d5261099b83838320541015611423565b338152600e8d522054611111565b338d52600e8a52878d20556109c081600b54611111565b600b558b87518281527f659523c479d006050ebc0d0e48fea36d1b2c5d45b2f31402ac6f8671fc84cc048b3392a3338360075416610ec6565b61091d565b825162461bcd60e51b8152908101859052601d60248201527f5665737465723a2076657374656420616d6f756e74206973207a65726f0000006044820152606490fd5b5050346102445760203660031901126102445760209181906001600160a01b03610a69610d26565b1681526012845220549051908152f35b505034610244573660031901126102c257610428610a95610d26565b610a9d610e70565b610aa5611af0565b602435906114f9565b8284346102c257806003193601126102c2575060ff60209254169051908152f35b83346102c257610ade36610d57565b505050611387565b505034610244578160031936011261024457602090600a549051908152f35b50503461024457816003193601126102445760065490516001600160a01b039091168152602090f35b505034610244578160031936011261024457602090600b549051908152f35b5050346102445781600319360112610244576020906005549051908152f35b505034610244578060031936011261024457906020916001610792610b8f610d26565b610b97610d41565b90610ba0610e70565b610ba8611af0565b611a5c565b50503461024457816003193601126102445760015490516001600160a01b039091168152602090f35b5050346102445760203660031901126102445760209181906001600160a01b03610bfe610d26565b1681526011845220549051908152f35b505034610244576020366003190112610244576020906103ad610c2f610d26565b61111e565b91905034610649578260031936011261064957805191836002549060019082821c928281168015610ce9575b602095868610821461062c575084885290811561060a5750600114610c90576105ad86866105a3828b0383610d8c565b929550600283527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace5b828410610cd657505050826105ad946105a3928201019438610592565b8054868501880152928601928101610cb9565b93607f1693610c60565b83346102c2576102e7610d0536610d57565b60015490926001600160a01b0391610d209083163314610e2c565b16610ec6565b600435906001600160a01b0382168203610d3c57565b600080fd5b602435906001600160a01b0382168203610d3c57565b6060906003190112610d3c576001600160a01b03906004358281168103610d3c57916024359081168103610d3c579060443590565b90601f8019910116810190811067ffffffffffffffff821117610dae57604052565b634e487b7160e01b600052604160045260246000fd5b6020808252825181830181905290939260005b828110610df957505060409293506000838284010152601f8019910116010190565b818101860151848201604001528501610dd7565b34610d3c576040366003190112610d3c57610e26610d26565b50611387565b15610e3357565b60405162461bcd60e51b815260206004820152601560248201527423b7bb32b93730b136329d103337b93134b23232b760591b6044820152606490fd5b600260005414610e81576002600055565b60405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606490fd5b60405163a9059cbb60e01b60208201526001600160a01b03929092166024830152604480830193909352918152610f0791610f02606483610d8c565b610f09565b565b60018060a01b0316906040516040810167ffffffffffffffff9082811082821117610dae576040526020938483527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858401526000808587829751910182855af1903d1561104e573d92831161103a5790610fa493929160405192610f9788601f19601f8401160185610d8c565b83523d868885013e611059565b805191821591848315611016575b505050905015610fbf5750565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b919381809450010312610244578201519081151582036102c2575080388084610fb2565b634e487b7160e01b85526041600452602485fd5b90610fa49392506060915b919290156110bb575081511561106d575090565b3b156110765790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156110ce5750805190602001fd5b60405162461bcd60e51b81529081906110ea9060048301610dc4565b0390fd5b919082018092116110fb57565b634e487b7160e01b600052601160045260246000fd5b919082039182116110fb57565b6001600160a01b0390811660008181526013602090815260408220546009549294909391921680611170575b5083526012905260408220549081811061116b576111689250611111565b90565b505090565b92826024929460405193848092633792def360e01b82528860048301525afa9182156111e85785926111b3575b50601292916111ab916110ee565b92909161114a565b9091508281813d83116111e1575b6111cb8183610d8c565b810103126111dd5751906111ab61119d565b8480fd5b503d6111c1565b6040513d87823e3d90fd5b6009546001600160a01b03908116919082156112a857604051633792def360e01b81529116600482018190526020918281602481875afa90811561129c576000916112b0575b50156112a857819060246040518095819363a318021760e01b835260048301525afa90811561129c57600091611270575b50905090565b82813d8311611295575b6112848183610d8c565b810103126102c2575051803861126a565b503d61127a565b6040513d6000823e3d90fd5b505050600090565b908382813d83116112d6575b6112c68183610d8c565b810103126102c257505138611239565b503d6112bc565b818102929181159184041417156110fb57565b81156112fa570490565b634e487b7160e01b600052601260045260246000fd5b6009549091906001600160a01b0316156113565761132d826111f3565b9182156112a85761133d9061111e565b9081156112a85761116892611351916112dd565b6112f0565b5050600090565b60018060a01b0316600052600d602052611168604060002054600f602052604060002054906110ee565b60405162461bcd60e51b815260206004820152601960248201527f5665737465723a206e6f6e2d7472616e736665727261626c65000000000000006044820152606490fd5b156113d357565b60405162461bcd60e51b815260206004820152602260248201527f5665737465723a206275726e2066726f6d20746865207a65726f206164647265604482015261737360f01b6064820152608490fd5b1561142a57565b60405162461bcd60e51b815260206004820152601d60248201527f5665737465723a2062616c616e6365206973206e6f7420656e6f7567680000006044820152606490fd5b6001600160a01b03166114838115156113cc565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6020600093838552600d82526114c08160408720541015611423565b838552600d82526114d5816040872054611111565b848652600d835260408620556114ed81600a54611111565b600a55604051908152a3565b919080156117f15761150a836118da565b60018060a01b0392611523828560065416833091611836565b8381169361153285151561188f565b61153e83600a546110ee565b600a55600090858252602091600d835260409661155e86898420546110ee565b818352600d85528883205580827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef868b518a8152a3808284600754168061173b575b50505060ff600c54168061172e575b61165b575b5050506115c08261111e565b6115c98361135d565b1161160c575092516001600160a01b0390931683526020830152907fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c90604090a1565b60849085519062461bcd60e51b825260048201526024808201527f5665737465723a206d6178207665737461626c6520616d6f756e7420657863656044820152631959195960e21b6064820152fd5b838360095416936008541660448a5180968193637aeceb1f60e11b835286600484015260248301525afa928315611724579082918993946116ef575b508152600d84522054116116ad573880806115b4565b60649085519062461bcd60e51b825280600483015260248201527f5665737465723a20696e73756666696369656e74206365632062616c616e63656044820152fd5b8580929550819394503d831161171d575b61170a8183610d8c565b8101031261024457908791519238611697565b503d611700565b88513d84823e3d90fd5b50826009541615156115af565b828252600e8752868b83205491600d82528c8a61175b8287205482611310565b9185831161176e575b50505050506115a0565b6117aa61179f7f659523c479d006050ebc0d0e48fea36d1b2c5d45b2f31402ac6f8671fc84cc04976117d395611111565b809581943091611836565b6117b588151561188f565b6117c182600b546110ee565b600b55878752600e85528620546110ee565b858552600e83528d8520558c51908152a38082388681808a8e611764565b60405162461bcd60e51b815260206004820152601760248201527f5665737465723a20696e76616c6964205f616d6f756e740000000000000000006044820152606490fd5b6040516323b872dd60e01b60208201526001600160a01b03928316602482015292909116604483015260648083019390935291815260a081019181831067ffffffffffffffff841117610dae57610f0792604052610f09565b1561189657565b606460405162461bcd60e51b815260206004820152602060248201527f5665737465723a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b6118e3816119b7565b6001600160a01b038083166000818152601160205260408082204290559094909392919083156119af57836119179161146f565b808552600f60205261192c83858720546110ee565b908552600f602052838520556006541690813b15610525578251632770a7eb60e21b81523060048201526024810191909152929081908490604490829084905af180156119a35761197c57505050565b67ffffffffffffffff831161198f575052565b634e487b7160e01b81526041600452602490fd5b509051903d90823e3d90fd5b505050505050565b6001600160a01b0381166000818152601160205260409020546119da9042611111565b90600052600d6020526040600020549182156112a857611a0e91611a00611a059261135d565b6112dd565b600554906112f0565b818110611a19575090565b905090565b6111689060018060a01b038116600052600f602052611a56611a50604060002054601060205260406000205490611111565b916119b7565b906110ee565b611ad2917f47cee97cb7acd717b3c0aa1435d004cd5b3c8c57d70dbceb4e4458bbd60e39d491611a8b816118da565b611a9481611a1e565b9384809360018060a01b03808516806000526010602052611aba846040600020546110ee565b90600052601060205260406000205560085416610ec6565b604080516001600160a01b039290921682526020820192909252a190565b33600052601460205260ff6040600020541615611b0957565b60405162461bcd60e51b81526020600482015260116024820152702b32b9ba32b91d103337b93134b23232b760791b6044820152606490fdfea2646970667358221220234489204fffea7cd94768d2853af6736f28bebec7faafe90bf118698ead01e964736f6c63430008130033", - "devdoc": { - "events": { - "Approval(address,address,uint256)": { - "details": "Emitted when the allowance of a `spender` for an `owner` is set by a call to {approve}. `value` is the new allowance." - }, - "Transfer(address,address,uint256)": { - "details": "Emitted when `value` tokens are moved from one account (`from`) to another (`to`). Note that `value` may be zero." - } - }, - "kind": "dev", - "methods": {}, - "stateVariables": { - "totalSupply": { - "details": "Returns the amount of tokens in existence." - } - }, - "version": 1 - }, - "userdoc": { - "kind": "user", - "methods": {}, - "version": 1 - }, - "storageLayout": { - "storage": [ - { - "astId": 10, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "_status", - "offset": 0, - "slot": "0", - "type": "t_uint256" - }, - { - "astId": 888, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "gov", - "offset": 0, - "slot": "1", - "type": "t_address" - }, - { - "astId": 1410, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "name", - "offset": 0, - "slot": "2", - "type": "t_string_storage" - }, - { - "astId": 1412, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "symbol", - "offset": 0, - "slot": "3", - "type": "t_string_storage" - }, - { - "astId": 1415, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "decimals", - "offset": 0, - "slot": "4", - "type": "t_uint8" - }, - { - "astId": 1417, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "vestingDuration", - "offset": 0, - "slot": "5", - "type": "t_uint256" - }, - { - "astId": 1419, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "esToken", - "offset": 0, - "slot": "6", - "type": "t_address" - }, - { - "astId": 1421, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "pairToken", - "offset": 0, - "slot": "7", - "type": "t_address" - }, - { - "astId": 1423, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "claimableToken", - "offset": 0, - "slot": "8", - "type": "t_address" - }, - { - "astId": 1426, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "rewardTracker", - "offset": 0, - "slot": "9", - "type": "t_address" - }, - { - "astId": 1429, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "totalSupply", - "offset": 0, - "slot": "10", - "type": "t_uint256" - }, - { - "astId": 1431, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "pairSupply", - "offset": 0, - "slot": "11", - "type": "t_uint256" - }, - { - "astId": 1433, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "needCheckStake", - "offset": 0, - "slot": "12", - "type": "t_bool" - }, - { - "astId": 1437, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "balances", - "offset": 0, - "slot": "13", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 1442, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "pairAmounts", - "offset": 0, - "slot": "14", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 1447, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "cumulativeClaimAmounts", - "offset": 0, - "slot": "15", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 1452, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "claimedAmounts", - "offset": 0, - "slot": "16", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 1456, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "lastVestingTimes", - "offset": 0, - "slot": "17", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 1461, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "cumulativeRewardDeductions", - "offset": 0, - "slot": "18", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 1466, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "bonusRewards", - "offset": 0, - "slot": "19", - "type": "t_mapping(t_address,t_uint256)" - }, - { - "astId": 1470, - "contract": "contracts/staking/Vester.sol:Vester", - "label": "isHandler", - "offset": 0, - "slot": "20", - "type": "t_mapping(t_address,t_bool)" - } - ], - "types": { - "t_address": { - "encoding": "inplace", - "label": "address", - "numberOfBytes": "20" - }, - "t_bool": { - "encoding": "inplace", - "label": "bool", - "numberOfBytes": "1" - }, - "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_uint256)": { - "encoding": "mapping", - "key": "t_address", - "label": "mapping(address => uint256)", - "numberOfBytes": "32", - "value": "t_uint256" - }, - "t_string_storage": { - "encoding": "bytes", - "label": "string", - "numberOfBytes": "32" - }, - "t_uint256": { - "encoding": "inplace", - "label": "uint256", - "numberOfBytes": "32" - }, - "t_uint8": { - "encoding": "inplace", - "label": "uint8", - "numberOfBytes": "1" - } - } - } -} \ No newline at end of file diff --git a/deployments/bsc_test/solcInputs/1b5451948df002b329e5d71e4ffbd43e.json b/deployments/bsc_test/solcInputs/1b5451948df002b329e5d71e4ffbd43e.json deleted file mode 100644 index d4f1582..0000000 --- a/deployments/bsc_test/solcInputs/1b5451948df002b329e5d71e4ffbd43e.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "language": "Solidity", - "sources": { - "@openzeppelin/contracts/token/ERC20/ERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * The default value of {decimals} is 18. To change this, you should override\n * this function so it returns a different value.\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the default value returned by this function, unless\n * it's overridden.\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `to` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address to, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _transfer(owner, to, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on\n * `transferFrom`. This is semantically equivalent to an infinite approval.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * NOTE: Does not update the allowance if the current allowance\n * is the maximum `uint256`.\n *\n * Requirements:\n *\n * - `from` and `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n * - the caller must have allowance for ``from``'s tokens of at least\n * `amount`.\n */\n function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {\n address spender = _msgSender();\n _spendAllowance(from, spender, amount);\n _transfer(from, to, amount);\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n address owner = _msgSender();\n _approve(owner, spender, allowance(owner, spender) + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n address owner = _msgSender();\n uint256 currentAllowance = allowance(owner, spender);\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(owner, spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `from` to `to`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `from` cannot be the zero address.\n * - `to` cannot be the zero address.\n * - `from` must have a balance of at least `amount`.\n */\n function _transfer(address from, address to, uint256 amount) internal virtual {\n require(from != address(0), \"ERC20: transfer from the zero address\");\n require(to != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(from, to, amount);\n\n uint256 fromBalance = _balances[from];\n require(fromBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[from] = fromBalance - amount;\n // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by\n // decrementing then incrementing.\n _balances[to] += amount;\n }\n\n emit Transfer(from, to, amount);\n\n _afterTokenTransfer(from, to, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n unchecked {\n // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.\n _balances[account] += amount;\n }\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n // Overflow not possible: amount <= accountBalance <= totalSupply.\n _totalSupply -= amount;\n }\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(address owner, address spender, uint256 amount) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Updates `owner` s allowance for `spender` based on spent `amount`.\n *\n * Does not update the allowance amount in case of infinite allowance.\n * Revert if not enough allowance is available.\n *\n * Might emit an {Approval} event.\n */\n function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {\n uint256 currentAllowance = allowance(owner, spender);\n if (currentAllowance != type(uint256).max) {\n require(currentAllowance >= amount, \"ERC20: insufficient allowance\");\n unchecked {\n _approve(owner, spender, currentAllowance - amount);\n }\n }\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n" - }, - "@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.4) (token/ERC20/extensions/IERC20Permit.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\n *\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\n * need to send a transaction, and thus is not required to hold Ether at all.\n *\n * ==== Security Considerations\n *\n * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature\n * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be\n * considered as an intention to spend the allowance in any specific way. The second is that because permits have\n * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should\n * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be\n * generally recommended is:\n *\n * ```solidity\n * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {\n * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}\n * doThing(..., value);\n * }\n *\n * function doThing(..., uint256 value) public {\n * token.safeTransferFrom(msg.sender, address(this), value);\n * ...\n * }\n * ```\n *\n * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of\n * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also\n * {SafeERC20-safeTransferFrom}).\n *\n * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so\n * contracts should have entry points that don't rely on permit.\n */\ninterface IERC20Permit {\n /**\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\n * given ``owner``'s signed approval.\n *\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\n * ordering also apply here.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `deadline` must be a timestamp in the future.\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\n * over the EIP712-formatted function arguments.\n * - the signature must use ``owner``'s current nonce (see {nonces}).\n *\n * For more information on the signature format, see the\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\n * section].\n *\n * CAUTION: See Security Considerations above.\n */\n function permit(\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) external;\n\n /**\n * @dev Returns the current nonce for `owner`. This value must be\n * included whenever a signature is generated for {permit}.\n *\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\n * prevents a signature from being used multiple times.\n */\n function nonces(address owner) external view returns (uint256);\n\n /**\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\n */\n // solhint-disable-next-line func-name-mixedcase\n function DOMAIN_SEPARATOR() external view returns (bytes32);\n}\n" - }, - "@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" - }, - "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": { - "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../extensions/IERC20Permit.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n /**\n * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeTransfer(IERC20 token, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n /**\n * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the\n * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.\n */\n function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(IERC20 token, address spender, uint256 value) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n /**\n * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n uint256 oldAllowance = token.allowance(address(this), spender);\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));\n }\n\n /**\n * @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful.\n */\n function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));\n }\n }\n\n /**\n * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,\n * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval\n * to be set to zero before setting it to a non-zero value, such as USDT.\n */\n function forceApprove(IERC20 token, address spender, uint256 value) internal {\n bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);\n\n if (!_callOptionalReturnBool(token, approvalCall)) {\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));\n _callOptionalReturn(token, approvalCall);\n }\n }\n\n /**\n * @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.\n * Revert on invalid signature.\n */\n function safePermit(\n IERC20Permit token,\n address owner,\n address spender,\n uint256 value,\n uint256 deadline,\n uint8 v,\n bytes32 r,\n bytes32 s\n ) internal {\n uint256 nonceBefore = token.nonces(owner);\n token.permit(owner, spender, value, deadline, v, r, s);\n uint256 nonceAfter = token.nonces(owner);\n require(nonceAfter == nonceBefore + 1, \"SafeERC20: permit did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n require(returndata.length == 0 || abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n *\n * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.\n */\n function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false\n // and not revert is the subcall reverts.\n\n (bool success, bytes memory returndata) = address(token).call(data);\n return\n success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));\n }\n}\n" - }, - "@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" - }, - "@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" - }, - "contracts/core/Governable.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\ncontract Governable {\n address public gov;\n\n constructor() {\n gov = msg.sender;\n }\n\n modifier onlyGov() {\n require(msg.sender == gov, \"Governable: forbidden\");\n _;\n }\n\n function setGov(address _gov) external onlyGov {\n gov = _gov;\n }\n}\n" - }, - "contracts/interfaces/IMintable.sol": { - "content": "// SPDX-License-Identifier: MIT\npragma solidity 0.8.19;\n\ninterface IMintable {\n function isMinter(address _account) external returns (bool);\n function setMinter(address _minter, bool _isActive) external;\n function mint(address _account, uint256 _amount) external;\n function burn(address _account, uint256 _amount) external;\n}" - }, - "contracts/tokens/erc20/EsToken.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.19;\n\nimport {ERC20} from \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport {IMintable} from \"../../interfaces/IMintable.sol\";\nimport {Governable} from \"../../core/Governable.sol\";\n\ncontract EsToken is ERC20, IMintable, Governable {\n bool public inPrivateTransferMode;\n\n mapping(address account => bool status) public override isMinter;\n\n mapping(address account => bool status) public isHandler;\n\n constructor(string memory _name, string memory _symbol) ERC20(_name, _symbol) {}\n\n modifier onlyMinter() {\n require(isMinter[msg.sender], \"EsToken: forbidden\");\n _;\n }\n\n function setMinter(address _minter, bool _isActive) external override onlyGov {\n isMinter[_minter] = _isActive;\n }\n\n function mint(address _account, uint256 _amount) external override onlyMinter {\n _mint(_account, _amount);\n }\n\n function burn(address _account, uint256 _amount) external override onlyMinter {\n _burn(_account, _amount);\n }\n\n function setInPrivateTransferMode(bool _inPrivateTransferMode) external onlyGov {\n inPrivateTransferMode = _inPrivateTransferMode;\n }\n\n function setHandler(address _handler, bool _isActive) external onlyGov {\n isHandler[_handler] = _isActive;\n }\n\n function transferFrom(address _sender, address _recipient, uint256 _amount) public override returns (bool) {\n if (isHandler[msg.sender]) {\n _transfer(_sender, _recipient, _amount);\n return true;\n }\n _spendAllowance(_sender, msg.sender, _amount);\n _transfer(_sender, _recipient, _amount);\n return true;\n }\n\n function _beforeTokenTransfer(address from, address to, uint256 amount) internal override {\n if (inPrivateTransferMode) {\n require(isHandler[msg.sender], \"EsToken: msg.sender not whitelisted\");\n }\n super._beforeTokenTransfer(from, to, amount);\n }\n}\n" - }, - "contracts/tokens/erc20/EsToken2.sol": { - "content": "// SPDX-License-Identifier: MIT\n\npragma solidity 0.8.19;\n\nimport {IERC20} from \"@openzeppelin/contracts/token/ERC20/IERC20.sol\";\nimport {SafeERC20} from \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport {IMintable} from \"../../interfaces/IMintable.sol\";\nimport {Governable} from \"../../core/Governable.sol\";\n\ncontract EsToken2 is IERC20, IMintable, Governable {\n using SafeERC20 for IERC20;\n\n string public name;\n string public symbol;\n uint8 public decimals = 18;\n\n uint256 public override totalSupply;\n bool public inPrivateTransferMode;\n\n mapping(address => uint256) public balances;\n mapping(address => mapping(address => uint256)) public allowances;\n mapping(address => bool) public nonStakingAccounts;\n mapping(address => bool) public admins;\n\n mapping(address => bool) public override isMinter;\n\n mapping(address => bool) public isHandler;\n\n constructor(string memory _name, string memory _symbol) {\n name = _name;\n symbol = _symbol;\n }\n\n modifier onlyMinter() {\n require(isMinter[msg.sender], \"EsToken: forbidden\");\n _;\n }\n\n modifier onlyAdmin() {\n require(admins[msg.sender], \"BaseToken: forbidden\");\n _;\n }\n\n function setMinter(address _minter, bool _isActive) external override onlyGov {\n isMinter[_minter] = _isActive;\n }\n\n function addAdmin(address _account) external onlyGov {\n admins[_account] = true;\n }\n\n function removeAdmin(address _account) external onlyGov {\n admins[_account] = false;\n }\n\n function mint(address _account, uint256 _amount) external override onlyMinter {\n _mint(_account, _amount);\n }\n\n function burn(address _account, uint256 _amount) external override onlyMinter {\n _burn(_account, _amount);\n }\n\n function setInPrivateTransferMode(bool _inPrivateTransferMode) external onlyGov {\n inPrivateTransferMode = _inPrivateTransferMode;\n }\n\n function setHandler(address _handler, bool _isActive) external onlyGov {\n isHandler[_handler] = _isActive;\n }\n\n function balanceOf(address _account) external view override returns (uint256) {\n return balances[_account];\n }\n\n function stakedBalance(address _account) external view returns (uint256) {\n if (nonStakingAccounts[_account]) {\n return 0;\n }\n return balances[_account];\n }\n\n function transfer(address _recipient, uint256 _amount) external override returns (bool) {\n _transfer(msg.sender, _recipient, _amount);\n return true;\n }\n\n function allowance(address _owner, address _spender) external view override returns (uint256) {\n return allowances[_owner][_spender];\n }\n\n function approve(address _spender, uint256 _amount) external override returns (bool) {\n _approve(msg.sender, _spender, _amount);\n return true;\n }\n\n function transferFrom(address _sender, address _recipient, uint256 _amount) external override returns (bool) {\n if (isHandler[msg.sender]) {\n _transfer(_sender, _recipient, _amount);\n return true;\n }\n require(allowances[_sender][msg.sender] >= _amount, \"EsToken: transfer amount exceeds allowance\");\n uint256 nextAllowance = allowances[_sender][msg.sender] - _amount;\n _approve(_sender, msg.sender, nextAllowance);\n _transfer(_sender, _recipient, _amount);\n return true;\n }\n\n function _mint(address _account, uint256 _amount) internal {\n require(_account != address(0), \"EsToken: mint to the zero address\");\n\n totalSupply = totalSupply + _amount;\n balances[_account] = balances[_account] + _amount;\n\n emit Transfer(address(0), _account, _amount);\n }\n\n function _burn(address _account, uint256 _amount) internal {\n require(_account != address(0), \"EsToken: burn from the zero address\");\n\n require(balances[_account] >= _amount, \"EsToken: burn amount exceeds balance\");\n balances[_account] = balances[_account] - _amount;\n totalSupply = totalSupply - _amount;\n\n emit Transfer(_account, address(0), _amount);\n }\n\n function _transfer(address _sender, address _recipient, uint256 _amount) private {\n require(_sender != address(0), \"EsToken: transfer from the zero address\");\n require(_recipient != address(0), \"EsToken: transfer to the zero address\");\n\n if (inPrivateTransferMode) {\n require(isHandler[msg.sender], \"EsToken: msg.sender not whitelisted\");\n }\n\n require(balances[_sender] >= _amount, \"EsToken: transfer amount exceeds balance\");\n balances[_sender] = balances[_sender] - _amount;\n balances[_recipient] = balances[_recipient] + _amount;\n\n emit Transfer(_sender, _recipient, _amount);\n }\n\n function _approve(address _owner, address _spender, uint256 _amount) private {\n require(_owner != address(0), \"EsToken: approve from the zero address\");\n require(_spender != address(0), \"EsToken: approve to the zero address\");\n\n allowances[_owner][_spender] = _amount;\n\n emit Approval(_owner, _spender, _amount);\n }\n}\n" - } - }, - "settings": { - "optimizer": { - "enabled": true, - "runs": 200 - }, - "viaIR": true, - "outputSelection": { - "*": { - "*": [ - "abi", - "evm.bytecode", - "evm.deployedBytecode", - "evm.methodIdentifiers", - "metadata", - "devdoc", - "userdoc", - "storageLayout", - "evm.gasEstimates" - ], - "": [ - "ast" - ] - } - }, - "metadata": { - "useLiteralContent": true - } - } -} \ No newline at end of file diff --git a/out/bsc_test_dev.json b/out/bsc_test_dev.json index bca323e..cc9c2d5 100644 --- a/out/bsc_test_dev.json +++ b/out/bsc_test_dev.json @@ -23,12 +23,6 @@ "json": "assets/contracts/FT.json", "address": "0xe34c5ea0c3083d11a735dc0609533b92130319f5" }, - { - "name": "rewardTracker", - "type": "logic", - "json": "assets/contracts/RewardTracker.json", - "address": "0x5aB49C4b7e21e35fD4fd05affB019320a95cb03D" - }, { "name": "TokenClaim", "type": "logic", @@ -39,30 +33,48 @@ "name": "esCEC", "type": "erc20", "json": "assets/contracts/EsToken.json", - "address": "0x4dF834064455D4BA48B98D5B6b8E19f43673e948" + "address": "0x1FbA3F84e62163069050f1156b73C008722136A3" }, { "name": "stakedCecTracker", "type": "logic", "json": "assets/contracts/RewardTracker.json", - "address": "0xE8450f2A601cc54fcE48704Dc194b92DF34295b7" + "address": "0x409890BEEf967e63b52F7BB13A986eD4900691Ed" }, { "name": "stakedCecDistributor", "type": "logic", "json": "assets/contracts/RewardDistributor.json", - "address": "0x538ac34Ada48DA414424615F7BA75041815E8628" + "address": "0x613884c63F9c9e7Aa02c659364E060AaA1c8dB33" }, { "name": "vester", "type": "logic", "json": "assets/contracts/Vester.json", - "address": "0xd4253007DB8eFbc94E9330961BD563ac86Eab9dd" + "address": "0x49dcb6Ba542374147278efe9163a6E94e5E40762" }, { - "name": "rewardRouter", + "name": "stakedCecRouter", "type": "logic", "json": "assets/contracts/RewardRouter.json", - "address": "0x68D5260cC9CC1cBD693C3576D04bAd0f023f7607" + "address": "0xCB3dBb5d893743CE6f7c959CbBb44AfE0b83a04F" + }, + { + "name": "stakedEsCecTracker", + "type": "logic", + "json": "assets/contracts/RewardTracker.json", + "address": "0x3299431803704C63941531d9d894CB095D15C4bC" + }, + { + "name": "stakedEsCecDistributor", + "type": "logic", + "json": "assets/contracts/RewardDistributor.json", + "address": "0x67869546655e1A6A09b9877aEA858cC47444172D" + }, + { + "name": "stakedEsCecRouter", + "type": "logic", + "json": "assets/contracts/RewardRouter.json", + "address": "0x775d7Dbc06835c78437C8783fE11937E46F9ec6e" } ] \ No newline at end of file diff --git a/package.json b/package.json index b80d249..25a6797 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,10 @@ "deploy:airdrop": "hardhat deploy --tags AirdropToken --network imtbl_test --reset", "deploy:tokenclaim": "hardhat deploy --tags TokenClaim --network bsc_test --reset", "deploy:gameitemmall": "hardhat deploy --tags GameItemMall --network imtbl_test --reset", - "deploy:staking": "hardhat deploy --tags Staking --network bsc_test --reset", + "deploy:staking:token": "hardhat deploy --tags EsCEC --network bsc_test --reset", + "deploy:staking:cec": "hardhat deploy --tags StakingCEC --network bsc_test --reset", + "deploy:staking:escec": "hardhat deploy --tags StakingEsCEC --network bsc_test --reset", + "deploy:staking": "npm run deploy:staking:token && npm run deploy:staking:cec && npm run deploy:staking:escec", "solhint": "solhint --config ./.solhint.json", "show_verify_list": "npx hardhat verify --list-networks", "convert-abi": "npx hardhat run scripts/convert-abi.js",